| 224 | | mc[textname].createTextField("text",1,0,0,textboxsize,textheight); |
|---|
| | 227 | var htmlText; |
|---|
| | 228 | if (conf.roundtextbox) { |
|---|
| | 229 | mc[textname].createTextField("text",1,5,5,textboxsize,textheight); |
|---|
| | 230 | mc[textname].text.border = false; |
|---|
| | 231 | mc[textname].text.background = true; |
|---|
| | 232 | htmlText = "<font color=\"#0000F0\" face=\"Verdana,Arial,_sans\" size=\"" + conf.textsize + "\"><b>" + title + "</b></font><br><font color=\"#000000\" face=\"Verdana,Arial,_sans\" size=\"" + conf.textsize + "\">" + summary + "</font>"; |
|---|
| | 233 | } else { |
|---|
| | 234 | mc[textname].createTextField("text",1,0,0,textboxsize,textheight); |
|---|
| | 235 | mc[textname].text.border = true; |
|---|
| | 236 | mc[textname].text.backgroundColor = 0xFFFFFF; |
|---|
| | 237 | mc[textname].text.background = true; |
|---|
| | 238 | htmlText = "<font color=\"#555555\" face=\"Verdana,Arial,_sans\" size=\"" + conf.textsize + "\"><b>" + title + "</b><br>" + summary + "</font>"; |
|---|
| | 239 | } |
|---|
| | 245 | |
|---|
| | 246 | if (conf.roundtextbox) { |
|---|
| | 247 | // turn box into a rounded rectangle |
|---|
| | 248 | var cstroke = {width:2, color:0x808080, alpha:100}; |
|---|
| | 249 | var ccolor = {color:0xf0f0f0, alpha:100}; |
|---|
| | 250 | rrectangle( |
|---|
| | 251 | mc[textname], |
|---|
| | 252 | mc[textname]._width + boxmargin, |
|---|
| | 253 | mc[textname]._height + boxmargin + 3, |
|---|
| | 254 | 6, |
|---|
| | 255 | // ((textx+w+16) > Stage.width ) ? (Stage.width-w-16) : textx, |
|---|
| | 256 | textx, |
|---|
| | 257 | texty, |
|---|
| | 258 | cstroke, |
|---|
| | 259 | ccolor); |
|---|
| | 260 | |
|---|
| | 261 | // add a dropshadow |
|---|
| | 262 | var dropShadow = new flash.filters.DropShadowFilter(); |
|---|
| | 263 | dropShadow.blurX = 4; |
|---|
| | 264 | dropShadow.blurY = 4; |
|---|
| | 265 | dropShadow.distance = 4; |
|---|
| | 266 | dropShadow.angle = 45; |
|---|
| | 267 | dropShadow.quality = 2; |
|---|
| | 268 | dropShadow.alpha = 0.75; |
|---|
| | 269 | mc[textname].filters = [dropShadow]; |
|---|
| | 270 | } |
|---|
| | 277 | } |
|---|
| | 278 | |
|---|
| | 279 | // Rounded rectangle made only with actionscript. |
|---|
| | 280 | // Code taken and modified from http://www.actionscript-toolbox.com |
|---|
| | 281 | // w = rectangle width |
|---|
| | 282 | // h = rectangle height |
|---|
| | 283 | // rad = rounded corner radius |
|---|
| | 284 | // x = x start point for rectangle |
|---|
| | 285 | // y = y start point for rectangle |
|---|
| | 286 | // |
|---|
| | 287 | private function rrectangle( mc:MovieClip, w:Number, h:Number, rad:Number, x:Number, y:Number, stroke:Object, fill:Object) : Void { |
|---|
| | 288 | x = Math.round(x); |
|---|
| | 289 | y = Math.round(y); |
|---|
| | 290 | w = Math.round(w); |
|---|
| | 291 | h = Math.round(h); |
|---|
| | 292 | |
|---|
| | 293 | mc.lineStyle(stroke.width, stroke.color, stroke.alpha); |
|---|
| | 294 | mc.beginFill(fill.color, fill.alpha); |
|---|
| | 295 | mc.moveTo(0+rad, 0); |
|---|
| | 296 | mc.lineTo(w-rad, 0); |
|---|
| | 297 | mc.curveTo(w, 0, w, rad); |
|---|
| | 298 | mc.lineTo(w, h-rad); |
|---|
| | 299 | mc.curveTo(w, h, w-rad, h); |
|---|
| | 300 | mc.lineTo(0+rad, h); |
|---|
| | 301 | mc.curveTo(0, h, 0, h-rad); |
|---|
| | 302 | mc.lineTo(0, 0+rad); |
|---|
| | 303 | mc.curveTo(0, 0, 0+rad, 0); |
|---|
| | 304 | mc.endFill(); |
|---|
| | 305 | mc._x = x; |
|---|
| | 306 | mc._y = y; |
|---|