A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: [RESOLVED] [CS4] Help making AS2 code working on all Flash versions

Threaded View

  1. #1
    Join Date
    Oct 2006

    resolved [RESOLVED] [CS4] Help making AS2 code working on all Flash versions


    I did this AS2 code in Flash CS4 and have a little trouble with it.

    if (as2_mc.text != "Using Actionscript 2") {
    	_root.dynamic_mc._x = 0;
    	_root.dynamic_mc._y = 0;
    	_root.dynamic_txt.text = "Not using Actionscript 2";
    	var textstyle:TextFormat = new TextFormat();
    	textstyle.color = 0xffffff;
    	textstyle.size = 16;
    	textstyle.font = "Arial";
    	textstyle.align = "center";
    	_root.dynamic_txt.autoSize = true;
    	_root.dynamic_txt.multiline = true;
    	_root.dynamic_txt.wordWrap = true;
    	_root.dynamic_txt._x = (Stage.width-_root.dynamic_txt._width)/2;
    	_root.dynamic_txt._y = (Stage.height-_root.dynamic_txt._height)/2;
    It works like I want it to in Flash 7 and looks like this, but when I change the publish settings into Flash 8/9/10, the code looks like this.

    How do I make the code work on all AS2 Flash versions?
    Attached Files Attached Files
    Last edited by humbuged; 04-22-2009 at 12:10 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center