How do you convert this code from AS3 to AS2?

Hi,
I created some AS3 code that is working perfectly for us.
However now we need to convert it to AS2 so that it can be Flash
Player 8 compatible. If it could also be compatible for Flash
Player 7 that would be ideal but not a requirement.
Thanks in advance.

Are you wanting someone to do the conversion for you, or are
you asking for general tips for doing the conversion yourself?
i can give you tips:
have a look at the
ActionScript
2.0 Migration page.
In this you'll find the property conversions eg(going from
AS3 to AS2). y becomes _y, height becomes _height, scaleX becomes
_xscale, void becomes Void etc.
you'll find that events need to be converted, eg.
particle.addEventListener(Event.ENTER_FRAME,
animateParticle);
becomes:
particle.onEnterFrame=animateParticle;
the onEnterFrame class doesn't pass an Event parameter to the
event listener. Instead, the event listener is automatically in the
scope of the event dispatcher, so instead of 'event.target' you
will be able to just target 'this'.
You'll need to use setInterval() instead of the Timer class.
You'll need to use attachMovie() instead of
addChild().

Similar Messages

  • How do you convert the audio from a mpeg4 video file to mp3?

    How do you convert the audio from a mpeg4 video file to mp3 format?

    Probably the easiest way to do this is to download a free media convertor. Most will be able to convert video into audio files.

  • HT201263 If yor phone is lost how do you change lock code from computer?

    If your phone is lost how do you change lock code from computer?

    You cannot remotely change the lock code

  • HT1420 How do you do this?  From the Store menu, choose Authorize This Computer. there is no option to Authorize This Compyter from the iTunes "store"!!!???

    How do you do this?  From the Store menu, choose Authorize This Computer. there is no option to Authorize This Compyter from the iTunes "store"!!!???

    If the computer's running Mac OS X, move the cursor to the very top of the computer's screen, click on Store, and choose Authorize this Computer.
    If the computer's running Windows, press the Alt and S keys and choose Authorize this Computer, or click here, follow the instructions, click on Store in the menu bar, and choose Authorize this Computer.
    (89775)

  • Change some code from as3 to as2

    Hi, I want to use as2 because it compatible with my website.
    I want to change some code from as3 to as2
    /////////////////////////////image1//////////////////////////////// if(MovieClip(this.parent).imagetxt.text == "a") {     var imgurl:String = "C:/Users/Thái/Desktop/ls/cotton-1.jpg";     var myrequest:URL = new URL(imgurl);     myloader.scaleContent = true;     myloader.load(myrequest); } /////////////////////////////image2//////////////////////////////// else if(MovieClip(this.parent).imagetxt.text == "b") {     var imgurl2:String = "http://aloflash.com/images/upload/3.jpg";     var myrequest2:URLRequest = new URLRequest(imgurl2);     myloader.scaleContent = true;     myloader.load(myrequest2); }thank you for your support.

    use:
    var myloader:MovieClip=this.createEmptyMovieClip("loader_mc",this.getNextHighestDepth());
    if (MovieClip(this._parent).imagetxt.text == "a") {
        var imgurl:String = "C:/Users/Thái/Desktop/ls/cotton-1.jpg";
        myloader.load(imgurl);
    } else if (MovieClip(this._parent).imagetxt.text == "b") {
        var imgurl2:String = "http://aloflash.com/images/upload/3.jpg
        myloader.load(imgurl2);

  • How do you convert this String into a double?

    Hi, in this code I want to convert String arg into a double. I'm trying to do this so that I can convert some string into a double in this calculator that I'm making. Here is the code:
    public class par {
    public static void main(String[] args) {
    String str = "351";
    double arg = new double(str); // should convert the string into a double
         System.out.println(arg);
         System.out.println(str);
    I keep getting errors in line 4, if any of you could help me out here I'll be thankful, i'm kinda new to java and my search for java's equivalent of alof() (its a function in C libraries that converts char[] into a double)lead me to this.
    Tony L.

    Use the Following:
    String num = "123.2";
    double d = Double.parseDouble(num);

  • How do you convert a movie from .mov to .jpeg or a format compatible with non iOS computers?

    I created a movie on iMovie that I would like to share with family members through a flash drive.  The problem is is that they don't have iOS computers.  How do I convert my movie in iMovie from .mov to a file compatible with other computers?  Thank you

    Yes, normally the whole point of making it an XFA is so you can type in it. You must use Adobe Reader or Adobe Acrobat to fill it.
    What happens when you try?

  • How do you convert a file from .mov to .avi in quicktime pro

    I'm using a kodak Z50 digital camera that records video files as .mov files. I was told I could convert the files to .avi files using quicktime pro, but I can't figure out how to do it. Anyone know?

    I am assuming you already are able to open the movie
    in QT Player. Use Export in the File menu, choose
    Movie to Avi in the drop-down Export Menu and then
    click on Options to choose one of the pre-loaded avi
    codecs for the compression. You may also want to
    search for and install one of the newer codecs, such
    as 3ivx or divx since the preinstalled codecs are all
    rather old.
    eMac 700
    mhz   Mac OS 9.2.x  
    Thanks for the help. It worked, but the quality of the video is poor. Is there anything I can do about this?

  • How do I upgrade this code from Flash 6?

    I bought a template and am attempting to reverse engineer the
    code written for Flash 6 and ActionScript 1.0 without really
    knowing ActionScript very well to start with. I would like to
    update the code to ActionScript 3.0 and a later version of Flash so
    that I can use the effect with updated features, but when setting
    the publish preferences to Flash 8, the code simply does not work.
    It doesn't fail or cause syntax or even runtime errors. It simply
    does nothing at all. It works fine when publishing for Flash 6 but
    not in Flash 8 or beyond. Is there something obvious to the
    veterans out there that you can point out to me? When tracing the
    code, the variable Object.environment.dotCount returns "undefined"
    but I'm not sure how to define it without reinitializing it,
    thereby defeating the purpose...
    The code should produce the effect demonstrated at
    http://www.ohmyflash.com/effect/201.html

    Not so hastily.
    Backup your data, and read this tip:
    https://discussions.apple.com/docs/DOC-6271

  • How to convert the code from 8.2 to 7.1

    Hello friends
                   I have to convert the one vi from 8.2 to 7.1 Version.How to convert this code.
    Jayavel

    Hello Friends
                  i attached the code in 8.2 version.Convert this code into 7.1
    Jayavel
    Attachments:
    FreenrunTest.vi ‏1456 KB

  • How do you stop mobile sites from loading in safari automatically on my iPad? I can't log into mobile me because of this.

    How do you stop mobile sites from loading in safari automatically on my iPad? I can't log into mobile me because of this.

    The me.com website is not designed for or intended to be accessed by iOS devices. Apple provides support in iOS or seperate Apps for accessing all aspects of MobileMe except for the Accounts section.
    Use MobielMe as intended and you'll have no problems.
    See: http://support.apple.com/kb/ts1673
    Even if you use a different browser to get access to me.com on iOS, you'll find most of it is unusable.
    Other websites that present you with the mobile version have been programmed to do so by their developers. They specifically look for users accessing from 'mobile' devices and switch to the mobile site. Many such sites provide a link to go back to the 'full' site, if not, there's not a lot you can do except use a browser that can pretend not to be a mobile browser.

  • If you right-click an image you can select to "Block Images" from the site, but how do you reverse this choice?

    If you right-click an image on a web page you can select to
    "Block Images from [the url of the site]".
    This works well, particularly to make the page printer-friendly, but how do you reverse this choice to see the images again?

    You can see all permissions for the current page in Tools > Page Info > Permissions
    If it is from a different domain then use this:
    *A way to see which images are blocked is to click the favicon (<i>Site Identification</i> icon) on the left side of the location bar.
    *A click on the "More Information" button will open the Security tab of the "Page Info" window (also accessible via "Tools > Page Info").
    *Open the <i>Media</i> tab of the "Page Info" window.
    *Select the first image and scroll down though the list with the Down arrow key.
    *If an image in the list is grayed and there is a check-mark in the box "<i>Block Images from...</i>" then remove that mark to unblock the images from that domain.

  • Background noise removal takes about 3 seconds into each clip in timeline to kick in, so each clip has noise in the first few seconds.  How do you get this to remove noise from the very start of the clip?

    Background noise removal takes about 3 seconds into each clip in timeline to kick in, so each clip has noise in the first few seconds.  How do you get this to remove noise from the very start of the clip?

    insert a 5 second gap in the beginning of the timeline.

  • When I'm trying to mirror on AppleTV instead of mirroring my iPod, a random picture from library pops up on the screen. How do you fix this? Has this happened to anyone else?

    When using mirror on AppleTV instead of mirroring my iPod I get a random picture from library. How do you fix this?

    No, that's not mirroring. As I said that's basic airplay. Mirroring is an entirely different function.
    What model iPod do you have? Mirroring requires an iPod Touch 5th Generation.
    http://support.apple.com/kb/HT5209?viewlocale=en_US&locale=en_US
    http://support.apple.com/kb/ht1353

  • HT2534 What is iTune gift card? How can i get the code from this?

    What's iTune gift card? How can i get the code from this?

    "What's iTune gift card?"
    It is a gift card like any other gift card.  It is a card that contains credit for purchases in the itunes store.
    "How can i get the code from this?"
    Genreally there is a scratch of area under which the code lies.

Maybe you are looking for