Need help translating menu from as2 to as3

Ive been at this for a week now, trying to build a
straightforward accordian menu, translating an existing as2 menu
into as3. I desperately need help, I've reach my conceptual ends in
terms of code knowledge. Could someone please take a look at what
I've got and what I need to do to get it working? I've included the
AS3 file I've been working on and well as the AS2 files I've been
referencing and attempting to translate. Any help really be
appreciated...also, here is the code I have so far below.

you have a 4 enterframe loops running continually when they
only need to run after a menu item has been clicked and can stop
after all menu items have reached their final positions.
and you need to compute the final positions for each menu
item after one of them is clicked.
you might do better to check for an as3 tutorial for an
accordian menu. it's a bit more involved than you're thinking.

Similar Messages

  • Translating tellTarget from AS2 to AS3

    Hi all!
    I am truely a beginner and here is my problem.
    I have been working on a Flash website in coded in AS3. Now, I have found a stright-forward turorial on adding a Sound ON/OFF button coded i AS2!
    What I want to do is to translate the piece of AS2 code below to AS3:
    on (release) {
    tellTarget ("supernovastar.mp3") {
    stopAllSounds();
    on (release) {
    nextFrame();
    I am aware of the on (release) has been changes to EventListners in AS3 but I cannot figure the rest out.
    I am greatful for any advice and help!
    Thanks!

    tellTarget is AS1, not AS2, and is replaced with dot notation coding (aka OOP).  But since the command in this case is to stop all sounds, targeting an object doesn't seem necessary since it is a global command.  The replacement for it would be to import the SoundMixer class (early on) and call its stopAll() method.
    import flash.media.SoundMixer;
    SoundMixer.stopAll();
    For the second on(release) section, nextFrame is still valid in AS3

  • Please help 'Translate' These codes from AS2 to AS3 for me

    Hi, i need help 'translating' these codes from Action Script 2 to Action Script 3. Please Do it for me:
    toc    loadText = new LoadVars();
        loadText.load("Curie.txt");
        loadText.onLoad = function(success) {
            if (success) {
                // trace(success);
                Curie.html = true;
                Curie.htmlText = this.Curie;
    Please translate it for me, i need it ASAP thanks
    Kenneth

    Thank you for helping me
    Kenneth
    Date: Thu, 15 Oct 2009 05:49:14 -0600
    From: [email protected]
    To: [email protected]
    Subject: Please help 'Translate' These codes from AS2 to AS3 for me
    Take a look at that:
    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/migration.html
    There is a LoadVars section on that.
    There is also a tutorial here:
    http://www.republicofcode.com/tutorials/flash/as3externaltext/
    Cheers,
    CaioToOn!
    >

  • Issues converting scroll bar components from AS2 to AS3

    I am working on editing a document that has scroll bar components that I would like to convert from AS2 to AS3 since everytime I try to open the document it shows a WARNING and won't convert them and when I publish and look at the final document the scroll bar seems to act unusally since it is obviously still on AS2.
    Here are two of the scripts I finally was able to find within it. Should I fix it and how so? This first is for the "Creative Scroll Area" and the second is for the "Creative Scrollbar"
    package  {
              import flash.display.MovieClip;
              public class Creative Scroll Area extends MovieClip {
                        public function Creative Scroll Area() {
                                  // constructor code
    package  {
              import flash.display.MovieClip;
              public class Creative Scrollbar extends MovieClip {
                        public function Creative Scrollbar() {
                                  // constructor code

    Okay, well I know the code is making a scroll bar and a scroll area and under the "type" it says they are "compiled..." which is unusual since most of the other components I've worked with have been movie clips or bitmaps. Do I need to look up what AS3 components I need to replace the script from above? Because when I looked for that I couldn't specifically find what I needed or really understood if I was looking at the right information.
    Here is something I found when trying to "debug" it:
    WARNING: The component 'UIScrollBar' requires ActionScript 2.0, which is not supported in this version of Flash Professional.
    WARNING: The component 'Creative Scrollbar' requires ActionScript 2.0, which is not supported in this version of Flash Professional.
    WARNING: The component 'Creative Scroll Area' requires ActionScript 2.0, which is not supported in this version of Flash Professional.

  • TS1389 I need help removing UAC from itunes..

    I need help removing UAC from itunes so it will not allow me to open itunes. Everything I have read from other comments that you shouldn't turn off your user account control. I just to be able to open itunes. Can anyone help me with this problem?? Greg, ogrady612@yahoo,com

    I had this problem too but you do not need UAC to be turned on.
    Click on start and search for 'uac' in the search box at the bottom and click on 'Change User Account Control Settings' when it comes up. Move the slider to the bottom when the window appears and save the changes and your done!
    It's worked for me and my uac has been off for months without causing me any problems!
    Hope this helped

  • Declare new color from AS2 to AS3

    Hi All,
    Could you let me know how to "convert" the following code from AS2 to AS3:
    var distracterBkgdColor = new Color(this.distracterBkgd_mc);
    Thanks!

    var ct:ColorTransform = this.distracterBkgd_mc.transform.colorTransform;ct.color = 0xrrbbgg;
    this.distracterBkgd_mc.transform.colorTransform=ct;

  • Need help coping project from one computer to another.

    I need help coping project from one computer to another.  I loaded all video on computer 1, copied events and project folder to computer 2.  I was told I only needed to copy the project folder back to computer 1 since the events folder is already there.   I copied project folder back to computer 1 but the files wont open.  I dont have computer 2 available. 
    Please help!!!

    Hi
    No that's not the way to do it - iMovie gets confused and in some cases the problems might be un-repairable.
    You've got several problems
    • iMovie'08 - CAN NOT MOVE PROJCTS - You NEED iMovie'09 or iMovie'11 - I see no other working solution
    • Never MOVE or alter any folder named
    iMovie Projects - or -
    iMovie Events
    on DeskTop/Finder - This might be very harmful
    • Moving (Projects) and Events - HAS TO be done within the iMovie Application.
    You've got an Evets window and here You can view Your Events in two ways - Yearly - or - Yearly per Hard disk
    Here You can move within this "window" to another location
    • Projects - NO they do not contain Your full movie - only a document on howto use the material in Event folder
    and there might be worse if You added Photos from iPhoto and Audio from iTunes/Garageband - then You have
    to get this over to the second Mac too, to be able to continue editing.
    So to move Your projects to another Mac You need
    • iMovie'09 or 11
    • an external hard disk -
    MUST BE Mac OS Extended formatted - as UNIX/DOS/FAT32/Mac OS Exchange will not work for VIDEO
    Should be a FireWire one - as UBS/UBS2 performs badly when used for video
    • Then move/copy over within Project resp Events window in iMovie Application
    Hopefully I've been not to confusing or badly structured to be followed.
    Yours Bengt W

  • I need help removing CS3 from Windows 7 so I can reinstall

    I need help removing CS3 from Windows 7 so I can reinstall

    Before trying to remove try re-installing CS3 right on top of the current install.  Often re-installing Photoshop on top of itself fixes the install.  If it does be sure to apply the cs3 updates.
    Download Adobe CS4 and CS3 Free Trials Here (incl. After Effects) | ProDesignTools
    your product key can be retrieved from here https://www.adobe.com/account/my-products-services.html
    use these links for the updates.
    Adobe - Photoshop : For Macintosh
    Adobe - Photoshop : For Windows

  • Please i need help with switch from the us store to malaysian store how i can switch

    Please i need help with switch from the us store to malaysian store how i can switch

    Click here and follow the instructions to change the iTunes Store country.
    (82303)

  • Loader (Need help to convert from AS3 to AS2)

    Since I know this code works fine and that I use it into one of my AS3 flash, I need it in one of my AS2 flash and I don't know how to adapt it. I've searched in over 100 threads and I can't find something similar... Thanks to help me get it to work in AS2! Since I need it in AS2, I thought it would be the right place to post it.
    I posted all the loading process code, but I would need help mostly with the Loader part. How to do it in AS2? Thanks!
    var img = 0;
    var image_total = 0;
    var myImages_array:Array = new Array();
    var myBitmaps_array:Array = new Array();
    function Init();
    // Images urls are loaded into an array before this call
    LoadImage();
    function LoadImage()
        if (img < myImages_array.length) // img is the current image index and myImages_array is my array of URLs
    // I need help with this part please
            var loader:Loader = new Loader();
    // returns the image full path and load it
            loader.load(new URLRequest(my_site_url + myImages_array[img]));
            loader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);
        else
            if (count == 0)
    // When everything's loaded, I'll start loading my Bitmaps into a small slideshow
                count += 1;
                init_slideshow();
    function imageLoaded(e:Event):void
        var image:Bitmap = e.target.content;
    // Bitmap manipulation here (removed)
        image_total = myBitmaps_array.push(image);
        if (img < myImages_array.length)
            img += 1;
    // Call next image
            LoadImage();
    function init_slideshow():void
    // Reserts the current index for the first one
        img = 0;
    // Start the slideshow since everything's loaded
        animate_slideshow();

    If you look at the Flash help documentation for the addListener metod of the MovieClipLoader class, there is an erxample there that you should hopefully be able to work from.  It will be better if you get your stuff coded into AS2 before you pursue more help with it.  IT is difficult to tell you how to fix something if you don't show what you are using.

  • Help!  Need help translating AS3 to AS2!

    Good afternoon. I have a very simple roll over animation that
    I want to use in Captivate 3. However, all of my experience with
    Flash is with AS3 which is not recognized by C3. Attached is my
    code snippet for the event that is not being supported. Would
    anyone be willing to tell me where to start to make this into AS2
    (or 1)?
    Thank you in advance for any assistance.

    MrFrankZ,
    Here's the code from your first post, and I understand you'd
    like to
    convert it to ActionScript 2.0 (or even 1.0):
    >>> gotoAndPlay("notRolled");
    >>> rollBox.addEventListener(MouseEvent.MOUSE_OVER,
    onRoll);
    >>>
    >>> function onRoll(event:MouseEvent):void
    >>> {
    >>> gotoAndPlay("rolled");
    >>> }
    >>> stop();
    To that, someone replied this:
    >> It's using AS 2. Can you display all of the code?
    ... which turns out to be incorrect. The code you're showing
    is indeed AS3.
    Telltale signs include the MouseEvent class reference, the
    MOUSE_OVER event
    constant, and the lowercase :void reference.
    > The compiler is "The class or interface 'MouseEvent'
    could not be
    > loaded."
    That makes sense for a FLA file configured for AS2, because
    AS2 doesn't
    have a MouseEvent class. Fortunately, this is a simple
    scenario, so let's
    break it down.
    The first line doesn't change at all:
    gotoAndPlay("notRolled");
    That does the same thing in either AS2 or AS3; namely, it
    invokes the
    MovieClip.gotoAndPlay() method on a particular MovieClip
    instance (happens
    to be the timeline in which this code appears) and sends that
    movie clip's
    timeline to a frame labeled "notRolled".
    Wiring up the event handler is your biggest change. AS2 does
    support
    the addEventListener() method, but only for components. In
    AS2, there are
    (bewilderingly) five different ways to assign event handlers,
    and the one
    that's going to work here -- and feel most this AS3 version
    -- looks like
    this:
    rollBox.onRollOver = onRoll;
    In principle, it's doing the same thing. I'm assuming
    rollBox is a
    movie clip symbol, so to see what functionality has has
    available to it,
    you'll look up the MovieClip class in the ActionScript 2.0
    Language
    Reference. When you do, you'll see headings for Properties
    (characteristics
    of the object), Methods (things the object can do), and
    Events (things the
    object can react to). A mouse-over is something the movie
    clip will react
    to, which makes it an event. What I've shown in my sample
    suggestion is the
    MovieClip.onRollOver event, as associated with your rollBox
    instance.
    The syntax is different from AS3, but the basic
    functionality is the
    same: "rollBox, when the mouse rolls over you, perform the
    onRoll()
    function."
    And now for that function:
    function onRoll():Void {
    gotoAndPlay("rolled");
    Only two small changes: a) drop the event:MouseEvent
    parameter and b)
    change :void to :Void.
    Here it is altogether:
    // AS2
    gotoAndPlay("notRolled");
    rollBox.onRollOver = onRoll;
    function onRoll():Void {
    gotoAndPlay("rolled");
    And to make this work in AS2, all you have to do is drop the
    strong
    typing (in this case, the :Void):
    // AS1
    gotoAndPlay("notRolled");
    rollBox.onRollOver = onRoll;
    function onRoll() {
    gotoAndPlay("rolled");
    David Stiller
    Co-author, The ActionScript 3.0 Quick Reference Guide
    http://tinyurl.com/2s28a5
    "Luck is the residue of good design."

  • New mac user needs help transfering files from Dell...

    I have a Dell running Windows XP and need help transfering the files from the dell to the mac.
    Also I have no idea what OP system I have, how do you tell which one you have???

    Go to the blue Apple menu and scroll down to "About this Mac"
    In the summary window that opens you will find the following information:
    Mac OS X version (assuming you are running OS X)
    Processor speed.
    Memory
    Startup disk
    The More Info button will take you to an in-depth overview of hardware, network set-up and installed software.
    As far as transference is concerned, you can either transfer files via CD, DVD, external hard drive... or by networking the two computers.
    Here's a link for an overview concerning Mac to PC connectivity:
    http://docs.info.apple.com/article.html?artnum=19652
    I hope the above helps.
    Reagrds
    Tony
    G5 iMac, G4PB, iMac DVD 450Mhz   Mac OS X (10.4.2)  

  • Need help in migration from Layer2 to layer3

    HI Guys
    Need u r help in migration from layer2 switched network to layer3.
    here is the setup there are 9 sites connected with a 10gig backbone in a ring.each site has a 6513 but at the data centre site we having two 6513.we are having a combination of voice and data vlans.at present all the sites are connected with layer2 trunks.all the trunks are teminated at the core ie datacentre site.so how should i procedd and what are the advantages of it ie migration.
    Thanks
    Mahmood

    For this migration you first need to assign IP addresses to your connections between switches. This could be /30 (or /31, if supported) subnets. You should also consider running some dynamic routing protocol such as OSPF between switches.
    Hope this helps.

  • I DESPERATLY NEED HELP TRANSFERING SONGS FROM IPOD TO ITUNES LIBRARY

    hi my computer crashed downstairs and i need help moving all my songs from my ipod to my itunes library, on the other computer...will someone please help me?

    Hello Markatkis,
    Make sure your not connecting it to more than one PC. A new iPOd is set to "Auto Update" by default. With this setting all you do is plug the iPOd into the PC and iTUnes automaticly opens, loads all the songs it has listed in iTunes to the iPod, and after its done, ejects the iPOd.
    If you connect it to another PC tho with iTUnes on it you usually get a promtp that in short says "iPOd library linked to another PC, do you want to link to this one" if you click yes, it wipes the iPOd clean and loads only whats on that PC.
    Since your new to all of this a great place for you may be the "iPod 101" site. It will show you all the bacis ropes of using your iPOd, using iTUnes, and using them both together. http://www.apple.com/support/ipod101/

  • Desperately needs help burning DVD from iPhoto

    I am using iPhoto 6.0.6. I desperately need help burning a DVD of a slide show that I created for my daughter's wedding.
    I put several songs together by opening them and then combining them using QuickTime Pro. I imported the audio into iTunes and created a slide show using iPhoto. The slide show is perfect! The slides are finally in sink with the music just as I want them! But I don't know how to burn the slide show as a DVD.
    I tried exporting the video from iPhoto to my computer, but at the end of the export, I get this message: please note that the music included in the slideshow can only be played on authorized machines. And when I try to play the video (after the export), most of the music on the video cannot be heard. When I try to authorize my machine, I am told that it's already authorized.
    If someone would send detailed instructions on how to proceed, I would greatly appreciate it.
    Greg

    Is your problem the DRM audio tracks you purchased from iTunes store?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 6 and 7 libraries and Tiger and Leopard. Just put the application in the Dock and click on it whenever you want to backup the dB file. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.
    Note: There's now an Automator backup application for iPhoto 5 that will work with Tiger or Leopard.

Maybe you are looking for

  • Problem displaying drill down STANDARD ALV for a particular record after pressing back button

    I have a simple interactive ALV grid report. NOT 'OO'. It display correctly on initial execution. AT the moment, 6 records. I want it to work such that if i click record '1', a drill-down version of that ALV with only that one record clicked is displ

  • Ring buffer overflow message (Solaris 10)

    When I disconnected the Ethernet cable from the back of our Netra 210 , the console would show this messages # telnet <ip> Trying <ip>...P su: [ID 643653 kern.notice] NOTICE: su0: ring buffer overflow Apr 3 11:57:11 kern.notice] NOTICE: su0: ring buf

  • Sun WorkShop 6 update 1 C 5.2 2000/09/11 needed.

    To get support from the one of our vendors I need Sun WorkShop 6 update 1 C 5.2 2000/09/11 to compile our application. Is ths version still available? Where?? Kind regards, Markus

  • I have locked my mac ssd and i cant do partion and show eror

    i tried to install new mavericks on my macbook air so i format my hdd from disk utility and now when i go to install lion on my mac its shows hard disk is lock.. i m very tensed now what to do? reply me asap

  • Installing older version of Java on OSX Lion

    I am trying to install an older version of Java on OSX lion 10.7.3. The latest update conflicts with matlab, I want to revert to java version 1.6.0_37. I have downloaded the version I want but when I try to install it ( click on the *.pkg file) I get