AS2 AS3 helps conversion

I have three base type of navigation and buttons in a movie. Using action script 2, but I would like to pass to the action script 3. Can anyone suggest how convert or rewrite these lines (below) for AS3?

I've been away from Flash for a while and try to get the acknowledgement of receipt. I'm not a programmer, and won't any programmer lingo if thrown out there. Any help would be appreciated until I have the time to learn more. Thanks in advance for any help. Yes I am reading and trying to figure out as you read this. Just under pressure. :-)

___________________________________

I use it to simply navigate a calendar:

btn_back_main.onRelease = function() {}

_root.gotoAndPlay ("main");

};

___________________________________

I use it to open the PDF files:

This.sec_01_btn_01.onRelease = function() {}

getURL("pdf/sec_01_pdf_01.pdf");

};

___________________________________

I use it to load external SWF in a particular place:

This.btn_video.onRelease = function() {}

(" load_targ.loadMovie("loads/sec_01.swf ");

};

___________________________________

Fun with AS3.

Please mark this as answered.

Tags: Adobe Animate

Similar Questions

  • AS2 AS3 help.

    Hi guys.

    I had a major problem when trying to convert an old AS2 AS3 code.

    It would be great if you guys can help in anyway you can.

    What I try to do is, load in a clip again and again to create a rain effect, the clip is a drop of falling rain.

    I need for the MovieClip name is also updated every time. For example, Name1, name2, Name3, name4 ect

    AS2 code:

    {onClipEvent (load)}

    _root.d_counter = 1;

    }

    {onClipEvent (enterFrame)}

    If () {}

    _root.attachMovie ("particles", "particle", + _root.d_counter, _root.d_counter, {_x:0, _y:0});})

    _root.d_counter = _root.d_counter + 1;

    }

    }

    =====================================

    My AS3 Code:

    particle.addEventListener (Event.ADDED_TO_STAGE, loaded);
    function loaded(event:Event):void {}
    var _counter:Number = 1;
    }
    particle.addEventListener (Event.ENTER_FRAME, entered);
    function entered(event:Event):void {}
    if (MovieClip (root) .d_counter < 100) {}
    MovieClip (root) .addChild (particle);
    . D_counter (root) of MovieClip is MovieClip (root) .d_counter + 1;.
    }
    }
    =====================================
    My code is close to what I want, but it does not load in multiple instances of the same object.
    Any help would be great.

    use:

    var d_counter:Number = 1;
    particle.addEventListener (Event.ENTER_FRAME, entered);
    function entered(event:Event):void {}
    If (MovieClip (root) .d_counter< 200){="">
    trace ("Yes");
    rain in the var: MovieClip = new Particle();
    Rain.x = Math.Random () * stage.stageWidth;
    MovieClip (root) .addChild (rain);
    . D_counter (root) of MovieClip is MovieClip (root) .d_counter + 1;.
    } else {}
    remove your particles and their ready for gc
    particle.removeEventListener (Event.ENTER_FRAME, entered)
    }
    }
  • AS2 AS3 help required

    Hi, I have an AS2 code that I would like AS3 code, I get an error:

    Stage 4, layer 'character', frame 1, line 1, column 201086: syntax error: expecting semicolon before leftbrace.

    I modified the code already, removing underscores if necessary. Here is the code and the additional code I will use later, I would be grateful any changes with that could help. Im a complete newbie to AS2 and AS3 and just a little game at the end of my animation film.

    Current situation:

    onClipEvent (load) {}

    var field: MovieClip = root.ground;

    var grav:Number = 0;

    var gravity: number = 2;

    var speed: Number = 7;

    var maxJump:Number = - 12;

    var touchingGround:Boolean = false;

    }

    onClipEvent (enterFrame) {}

    y += grav.

    Grav += gravity;

    While (ground.hitTest (x, y, true)) {}

    y = gravity;

    Grav = 0;

    }

    If (ground.hitTest (x, y + 5, true)) {}

    touchingGround = true;

    }

    else {}

    touchingGround = false;

    }

    If (Key.isDown (Key.RIGHT)) {}

    Speed x +=;

    }

    If (Key.isDown (Key.LEFT)) {}

    x = speed;

    }

    If (Key.isDown (Key.UP) & & touchingGround) {}

    Grav = maxJump;

    }

    If (ground.hitTest (x + (width/2), y-(height/2), true)) {}

    x = speed;

    }

    If (ground.hitTest (x-(width/2), y-(height/2), true)) {}

    Speed x +=;

    }

    If (ground.hitTest (x, y-(height), true)) {}

    grav = 3;

    }

    }

    Bits of code for the other layers.

    VCAM layer


    onClipEvent (enterFrame) {}

    y += (root.char.y-y)/4;

    x += (root.char.x-x)/4;

    }

    reset the box


    onClipEvent (enterFrame) {}

    If (root.char.hitTest (this)) {}

    root. CharX = char.x

    root. Char.y = Chesneau

    }

    }

    Thanks for any help!

    Hello

    the code in as3 is almost completely different.

    I think you have to rewrite all of this, it's better.

  • Need help with as2 as3 conversion. Please, I beg you.

    Could someone help me to convert as2 as3, please?

    Source code:

    _root.magnet = 500;
    _root.magic = 10;

    and

    onClipEvent (load)
    {
        homex = this._x;
        homey = this._y;
        forcex = 1;
        forcey = 1;
    }
    onClipEvent (enterFrame)
    {
        x0 = this._x;
        y0 = this._y;
        x1 = this._xmouse;
        y1 = this._ymouse;
        distancex = x1 - x0;
        distancey = y1 - y0;
        distance = Math.sqrt(distancex * distancex + distancey * distancey);
        powerx = this._x - distancex / distance * _root.magnet / distance;
        powery = this._y - distancey / distance * _root.magnet / distance;
        forcex = (forcex + (homex - x0) / 2) / _root.magic;
        forcey = (forcey + (homey - y0) / 2) / _root.magic;
        this._x = powerx + forcex;
        this._y = powery + forcey;
    }

    I am a newbie in flash so if anyone can help with this would be great.

    I really need to be done please help me.

    MovieClip(root).magnet = 500;MovieClip(root).magic = 10;
    

    and

    var homex:Number = yourmc.x;var homey:Number = yourmc.y;var forcex:Number = 1;var forcey:Number = 1;
    
    yourmc.addEventListener(Event.ENTER_FRAME, loopF);
    
    function loopF(e:Event){    var x0:Number = e.currentTarget.x;    var y0:Number = e.currentTarget.y;    var x1:Number = e.currentTarget.mouseX;    var y1:Number = e.currentTarget.mouseY;    var distancex:Number = x1 - x0;    var distancey:Number = y1 - y0;    var distance:Number = Math.sqrt(distancex * distancex + distancey * distancey);    var powerx:Number = e.currentTarget.x - distancex / distance * MovieClip(root).magnet/distance;    var powery:Number = e.currentTarget.y - distancey / distance * MovieClip(root).magnet/distance;    forcex = (forcex + (homex - x0) / 2) /MovieClip(root).magic;    forcey = (forcey + (homey - y0) / 2) / MovieClip(root).magic;    e.currentTarget.x = powerx + forcex;    e.currentTarget.y = powery + forcey;}
    
  • AS2 AS3 conversion please!

    Hi guys.

    I had a major problem when trying to convert an old AS2 AS3 code.

    It would be great if you guys can help in anyway you can.

    onClipEvent (enterFrame)

    {

    This;

    If (_x > 520)

    {

    setProperty (this, _x,-20);

    } / / end if

    This;

    If (_x <-20)

    {

    setProperty (this, _x, 520);

    } / / end if

    setProperty (this, _x, _x + (1.250000E + 000) Number);

    }

    In the chronology of the object in question, try:

    addEventListener (Event.ENTER_FRAME, moveX);

    function moveX(evt:Event):void {}

    If (x > 520) {}

    x = - 20;

    }

    If (x<>

    x = 520;

    }

    x += 1.25;

    }

  • Conversion function XML AS2 AS3

    Hi guys, how are you?

    Once again I m here to ask for your help.

    I m trying to convert an AS2 AS3 script, but I m not good in AS3 síntax yet. I Don t know how to create this structure. Please, could someone help me?

    xml:
    
    <resources>
    
             <levelTitle1>Iniciante</levelTitle1>
              <levelTitle5>Aprendiz</levelTitle5>
              <levelTitle10>Aspirante</levelTitle10>
              <levelTitle15>Recruta</levelTitle15>
              <levelTitle20>Experiente</levelTitle20>
              <levelTitle30>Profissional</levelTitle30>
              <levelTitle50>Star</levelTitle50>
              <levelTitle70>Ás</levelTitle70>
              <levelTitle90>Campeão</levelTitle90>
              <levelTitle120>Lenda</levelTitle120>
    
    </resources>
    
    
    AS2 Function:
    
    public static function getLanguage(tag:String):String
    {
               if (languageObject[tag].data){
    
    
                        return slanguageObject.resources[tag].data;
               }
                 return "Error";
     }
    

    I can´t find a way to work in as3 without the parameter 'data '.

    I want to call this as2 function, pass "levelTitle30" to the "tag" parameter and return by the return of the function of the content of "levelTitle30" of the xml tag.

    Kind regards

    is your code xml in an external file?

    If so, (for example, resources.xml), you would use:

    var xml

    var urlLoader:URLLoader = new URLLoader();

    urlLoader.addEventListener (Event.COMPLETE, completeF);

    urlLoader.load (new URLRequest ("resources.xml"));

    function completeF(e:Event):void {}

    XML = e.Target.Data;

    }

    public static function getLanguage(tag:String):String{
    if(xml[tag]){
    return xml[tag];

    } else {
    return "Error";
    }
    }

  • To AS2 AS3, need help.

    I learned Flash using AS2 and I try now migrate to AS3, but some of the simplest things have changed.  I know I can't put script directly on movieclips now, but I do not know how to use if the conditions to check for movieclips hit some frames, etc.

    Can someone direct me to the tutorials on the displacement of AS2 AS3 and some of the fundamental behaviors of AS3.

    For example:

    If I had a movieclip I used as a button and I tried jumping a specific image when another movieclip on the stage struck a framework?  With AS2, I could simply put a script on the movieclip itself that says something like:

    onClipEvent (EnterFrame)

    {

    If (this ._currentframe is 10)

    {

    _parent.sampleClip.gotoAndStop (2);

    }

    }

    I don't know how to do simple same navigation like this in AS3 code.

    Thanks for the help.

    There are a lot of tutorials and a few great books too. For tutorials that you probably want just a search on any specific problems that you find. Regarding the example you gave, it is a little different in 3 and also better:

    someMovieClip.addEventListener (Event.ENTER_FRAME, checkFrame);
    function checkFrame(e:Event) {}
    if(someMovieClip.currentFrame == 10) {}
    sampleClip.gotoAndStop (2);
    }
    }

    I say better because you don't need to worry about scope as you did in 2 - checkFrame is not executed in the context of the someMovieClip - sampleClip is available directly, you don't need to 'parent' to access.

  • Convert AS2 AS3

    So I made this game to base a few years ago, which was in AS2 and Flash 6.  Now I want to convert this AS2 AS3 game, but I have no idea where to start.  The code is approximalty 4 k lines long and I don't know what to change to make it work in AS3.  What do you guys suggest?

    I think you need to set the lower bar, do a few test tasks and see if you can complete them on Android. Code conversion takes a long time. You need an application view whole birds and you need to understand exactly how it works. You cannot convert random each piece to the equivalent AS3. You will need to rewrite it in a way that makes sense, using if everything going to OOPs.

    Make fun test applications on Android. Download a few buttons to make them do things, read the camera, vibrate the device, put up a StageWebView things and stick, etc.. Have fun. Otherwise, I think you're going to burn and/or will not convert the app very well.

    Believe me, I have come back to my own code a year later, with a lot more experience and didn't even know, I wrote and thought that the classic line... Who hell wrote this code? Oh... Yes, I did... What I thought?

  • actions AS2 as3 scripts

    can someone help me to get comparable to as2 as3 actions? as

    1. "Loadmovie" on different levels. Level 0, level 1, etc.

    2 in, click on "loadmovie".

    3 fscommand like, quiet, full screen, enable scale.

    4. on the release to go and play

    5. on the release of play and stop.

    6. play the content to the side of the clip with liberation.

    1 AS3 doesn't have a Level0, level1, etc..  You can use the Loader class to load an external swf,

    2 AS2 doesn't have any such orders - the loader allows you to load an external file.  If you want to have an insider click it then use an event listener for a CLICK MouseEvent.

    3. search Google AS3 fscommand

    4 AS3 uses the same command gotoAndStop that AS2, except that the arguments for scene/frame are reversed to frame/scene - again, happens with a click, use an event listener for a CLICK MouseEvent

    5 AS2 doesn't have any orders to play and stop, they are against orders, nor is AS3.  If you want to say stop, it's the same for both except, once again, the order of the arguments

    6. This would be the same in AS2 where you target the movieclip using the dot notation and tell the play() - once again, using an event listener for a CLICK MouseEvent.

    Explaining the AS3 button Code
    --------------------------

    Assume that you create a button symbol.  Since this is a button, it is already a car animation object that will react to mouse interactions, but only visually at this stage.  The first thing you need to do to make it useful down must assign a unique instance name.  If you drag a copy of it on the stage of the library, and while it is still selected, enter you this unique instance for her name in the Panel properties... say you name "btn1.

    In AS3, to make a button with the code, you must add a listener of events and event handler for it function.  You may need to add a little (for different events, like reversal, deployment, by clicking on it, but for now let's just say you want to be able to click them to get a web page.)  In the scenario that contains this button, a layer of separate actions that you create in a similar framework where this button exists, numbered, you must add the event listener:

    Btn1.addEventListener (MouseEvent.CLICK, btn1Click);

    The name of the unique function for the treatment, the click of this button is specified at the end of the assignment of event listener, so now you just have to write this function:

    function btn1Click(evt:MouseEvent):void {}

    var url: String = "http://www.awebsite.com/awebpage.html";

    var req:URLRequest = new URLRequest (url);

    navigateToURL (req);

    }

    Here's what this is:

    evt:MouseEvent - event listeners get an argument automatically the function should be implemented to receive.  In this case I just this argument a name of variable evt, although I could choose anything.

    : Sub - this defines the class of the value that the function returns.  In this case, the function does not return anything, so "Sub" is used.  If she returned a value, you will see a line that contains "return xyz." in the function (where xyz is not literal, it represents just the variable or the value returned)

    The normal code that opens a web page contains three distinct elements, the url, the application and command to get the page, so I showed in three separate lines.  Many people combine in a single line.

    In AS3, in strict mode, it is necessary to identify the types/classes of variables being created, that's why you see: String,: MouseEvent, etc. display everywhere.

    I know it's probably clear as mud in the explanation, but I hope that it will shed some light on what you're working with.

    Now, to create another button with a single function for it, you could just drag another copy of the library, give it a unique name, say btn2, copy / paste the code from btn1 and replace "btn1" "btn2" in this code copied, adding a new url to the page, this button opens.

  • Declare the new color of AS2 AS3

    Hi all

    Could you let me know how to 'convert' the following AS2 AS3 code:

    var distracterBkgdColor = new Color (this.distracterBkgd_mc);

    Thank you!

    var ct:ColorTransform = this.distracterBkgd_mc.transform.colorTransform;

    CT. Color = 0xrrbbgg;
    this.distracterBkgd_mc.transform.colorTransform = ct;

  • Replace code as2 as3

    I used a tutorial http://www.Flash-game-design.com/Flash-tutorials/funky-Flash-website-Tutorial-5.html make a menu for my application, I tried following advice on how to change code AS2 AS3, but it simply doesn't.

    menu = ['bulls', 'about', 'alignment', 'plan'];

    current var menu = [0];

    for (var i = 0; i < menu.length; i ++) {}

    var b = menu [i];

    ce.stars._visible [b + '_btn'] = false;

    this .txt [b + '_btn'] = b;

    this [b + '_btn'] .onPress = function() {}

    _root.site [current + "_btn"].stars._visible = false;

    _root.site [this.txt + "_btn"].stars._visible = true;

    current = this.txt;

    _root.site.content.gotoAndStop (this.txt)

    };

    }

    Cette.stars._visible [current + "btn"] = true;

    this.onEnterFrame = function() {}

    this [current + '_btn']. stars.s1._rotation += 1;

    this [current + '_btn']. stars.s2._rotation & = 0.5;

    };

    Thank you

    Glenn

    Hi, I have fixed that and you sent the mail, check the Inbox.

  • Script conversion link external as2 as3

    Hello.

    I used this script I found online to create an accessible Flash file a text file external full of hyperlinks via the buttons in the Flash animation. The code is as2. I had to update the Flash AS3 file and now the script does not work. I can't understand how to do the same thing as this script in AS3. Can someone help me?

    Here is the AS2 script:

    text file = new LoadVars()
    textFile.onLoad = function() {}
    buttonlink1 is this. BlackBooklink;
    buttonlink2 is this. Ashtraylink;
    buttonlink3 = this.bedroomlink;
    buttonlink4 = this.tvlink;
    buttonlink5 = this.spiderlink;
    buttonlink6 is this. Mirrorlink;
    buttonlink7 is this. Boomboxlink;
    buttonlink8 is this. Suitlink;
    buttonlink9 = this.cashlink;
    buttonlink10 = this.fastfoodlink;
    buttonlink11 is this. Idolatrylink;
    buttonlink12 is this. Trashlink;
    }

    textFile.load ("LeftHouseLinks.txt");

    -buttons
    BlackBook.onRelease = function() {}
    getURL (buttonlink1, "_self");
    };

    Ashtray.onRelease = function() {}
    getURL (buttonlink2, "_self");
    };

    bedroom.onRelease = function() {}
    getURL (buttonlink3, "_self");
    };

    tv.onRelease = function() {}
    getURL (buttonlink4, "_self");
    };

    spider.onRelease = function() {}
    getURL (buttonlink5, "_self");
    };

    Mirror.onRelease = function() {}
    getURL (buttonlink6, "_self");
    };

    Boombox.onRelease = function() {}
    getURL (buttonlink7, "_self");
    };

    Suit.onRelease = function() {}
    getURL (buttonlink8, "_self");
    };

    cash.onRelease = function() {}
    getURL (buttonlink9, "_self");
    };

    fastfood.onRelease = function() {}
    getURL (buttonlink10, "_self");
    };

    idolatry.onRelease = function() {}
    getURL (buttonlink11, "_self");
    };

    trashtalk.onRelease = function() {}
    getURL (buttonlink11,"_s)

    It is the content of the external txt file.

    & BlackBooklink = http://www.Yahoo.com
    & Ashtraylink = http://www.Google.com
    & bedroomlink = http://www.Yahoo.com
    & tvlink = http://www.Google.com
    & spiderlink = http://www.Yahoo.com
    & Mirrorlink = http://www.Google.com
    & Boomboxlink = http://www.Yahoo.com
    & Suitlink = http://www.Google.com
    & cashlink = http://www.Yahoo.com
    & fastfoodlink = http://www.Google.com
    & Idolatrylink = http://www.Yahoo.com

    I know not how to run the AS3 button, I do not know the code so that when I click the button, it accesses the external file and goes on the hyperlink specified by the button.

    Any help would be appreciated.

    -Shawn

    It is probably not a question of buttonlink1 is not found, it is more likely a problem with buttonlink1 do not have a defined value entrusted to him.  If you go to the section of the tutorial I mentioned who is called "Loading Variables from a text file" you will see how values can be traced.  You want to do is to assign your buttonlink values in this function using these values... something like the following inside the function...

    buttonlink1 = e.target.data.BlackBooklink;

    What you have now will assign nothing to them because it will run until the file is loaded (that is outside the service of FULL charge).  And you must declare variables at the beginning of your code.  The way you have it now, you run the risk of the variable exist not until you try to use it.

  • Charger (need help to convert AS2 AS3)

    Because I know that this code works very well and that I use it in one of my flash AS3, I need it in one of my flash AS2 and I do not know how to adapt. I searched more than 100 threads and I can not find something similar... Thank you to help me make it work in AS2! As I need in AS2, I thought it would be the right place to post.

    I posted the entire process of loading code, but I need help especially with the charger part. How to do this in AS2? Thank you!

    var img = 0;
    var image_total = 0;

    var myImages_array:Array = new Array();
    var myBitmaps_array:Array = new Array();

    function Init();

    {

    Image URLS is loaded into a table before this call
    LoadImage();

    }


    function LoadImage()
    {
    If (img, myImages_array.length) / / img is the index of the current image and myImages_array is my URL table
    {

    I need help with this framework, you can
    var loader: Loader = new Loader();

    / / Returns the full path of the image and load it
    Loader.Load (new URLRequest (my_site_url + myImages_array [img]));
    loader.contentLoaderInfo.addEventListener (Event.COMPLETE, imageLoaded);

    }
    on the other
    {
    If (count == 0)
    {

    When everything is loaded, I'll start loading my Bitmaps in a short slide show
    Count += 1;
    init_slideshow();
    }
    }
    }

    function imageLoaded(e:Event):void
    {
    Bitmap of the image: var = e.target.content;

    Bitmap manipulation (deleted) here

    image_total = myBitmaps_array.push (image);

    If (img < myImages_array.length)
    {
    IMG += 1;

    Call the following image
    LoadImage();
    }
    }

    function init_slideshow (): void
    {

    The current index for the first Reserts
    IMG = 0;

    Start the slide show, since everything is loaded
    animate_slideshow();
    }

    Look at the MoveClipLoader class and the addListener method that supports.

  • Old AS2 to AS3 code conversion

    I just updated an old file flash with some new photos.  I don't know much about Flash - enough to change the photos and click on export, BUT now I'm getting errors.  I had a _root problem which I fixed it thanks to this forum, but I still get these errors:

    Scene 1, Layer 'Actions', frame 3, line 14, column 21120: access of undefined property timer1.
    Scene 1, Layer 'Actions', frame 3, line 18, column 21120: access of undefined property I.
    Scene 1, Layer 'Actions', frame 3, line 29, column 21120: access of undefined property timer2.
    Scene 1, Layer 'Actions', frame 3, line 33, column 351120: access of undefined property I.
    Scene 1, Layer 'Actions', frame 3, line 34, column 51120: access of undefined property I.
    Scene 1, Layer 'Actions', frame 3, line 35, column 171120: access of undefined property timer2.
    Scene 1, Layer 'Actions', frame 3, line 40, column 21120: access of undefined property I.
    Scene 1, Layer 'Actions', frame 3, line 40, column 61120: access of undefined property I.
    Scene 1, Layer 'Actions', frame 3, line 44, column 161120: access of undefined property timer1.
    Preloader, layer 'Actions', frame 1, line 1, column 11120: access of undefined property bytes_loaded.
    Preloader, layer 'Actions', frame 1, line 2, column 11120: access of undefined property bytes_total.
    Preloader, layer 'Actions', frame 1, line 3, column 11120: access of undefined property getPercent.
    Preloader, layer 'Actions', frame 1, line 3, column 141120: access of undefined property bytes_loaded.
    Preloader, layer 'Actions', frame 1, line 3, column 271120: access of undefined property bytes_total.
    Preloader, layer 'Actions', frame 1, line 4, column 251120: access of undefined property getPercent.
    Preloader, layer 'Actions', frame 1, line 5, column 301120: access of undefined property getPercent.
    Preloader, layer 'Actions', frame 1, line 7, column 51120: access of undefined property bytes_loaded.
    Preloader, layer 'Actions', frame 1, line 7, column 211120: access of undefined property bytes_total.
    Preloader, layer 'Actions', frame 1, line 8, column 241067: constraint implied a value of type int to type String unrelated.

    I didn't initially write the code and I don't know enough about the Flash to fix.  Here is the code:

    Stop();

    var fadeSpeed = 40; Sets the fad - in speed of images, the default value is 30

    var imageTime = 5; Sets the time that each image is on the screen in a few seconds

    MovieClip (root) .attachMovie ("mc_Images", "mcFader", 10, {x: 0, y:0});})

    MovieClip (root).mcFader._alpha = 0;

    MovieClip (root).mcFader._visible = false;

    var = 1 imageNum;

    startShow();

    function startShow() {}

    Timer1 = setInterval (loadImage, imageTime * 1000);

    }

    function loadImage() {}

    i = 0;

    imageNum ++;

    If (imageNum is. mcImages._totalFrames MovieClip (root) + 1) {}

    1 = imageNum;

    }

    MovieClip (root).mcImages._x = 0;

    MovieClip (root).mcImages._y = 0;

    MovieClip (root).mcFader._alpha = 0;

    MovieClip (root).mcFader._visible = true;

    MovieClip (root).mcFader.gotoAndStop (imageNum);

    MovieClip (root) .nextImage = imageNum;

    TIMER2 = setInterval (fadeImage, fadeSpeed);

    }

    {} fadeImage() function

    MovieClip (root).mcFader._alpha = i;

    If (i > 100) {}

    clearInterval (timer2);

    MovieClip (root).mcImages.gotoAndStop (MovieClip (root) .nextImage);

    MovieClip (root).mcFader._alpha = 0;

    MovieClip (root).mcFader._visible = false;

    }

    i = i + 10;

    }

    function goLink (fNum) {}

    clearInterval (timer1);

    MovieClip (root).mcImages.gotoAndStop (fNum);

    }

    ANY help would be GREATLY appreciated!

    OK, I studied a little bit.

    The variable i is 0 in loadImage, which is called by a function timed out startShow, that is called directly.

    So I had reason to suppose I = 0, but you don't even need to define this term yet.

    If you add

    var i;

    var timer1 timer2;

    at the beginning of the program, variables are defined in the world, which as far as I can see is the intention.

    Which leaves me with a single syntax curious and variable not defined:

    R36:

    this.mcImages.gotoAndStop (this.nextImg years);

    What is meant here? Age is never defined. I suppose it could be set by Flashvars, as in as2, these would be accessible as a root variable, but this does not mean much for me. I expect something like this.nextImg + age or something.
    So I looked again: nextImg is not defined, but I found this.nextImage = imageNum;

    It is therefore just a space which caused there somehow.

    Corrected it and it compiles, but immeadeately after compiling, you get a problem with attachMovie

    this.attachMovie ("mc_Images", "mcFader", 10, {x: 0, y:0});})

    It is a way of as2 to take things out of your library and placing them as one child of another.

    The new way to do that is to make a video available in your library, then instantiating a new class with:

    var mcFader:mc_Images = new mc_Images();

    this.setChildIndex(mcFader,10);

    mcFader.x = 0; It is not necessary, as it is by default, as it was in as2, so it was obsolete it as well!

    mcFader.y=0;// that's not necessary, as it is by default, as it was in as2, so it was obsolete it as well!

    this.addChild (mcFader);

    After that, there are other issues

    I have to look at the source to correct them, because they have to do with the structure of mc_images. Is not in the code, but in your library.

    All of the code would look like this:

    Stop();

    var fadeSpeed = 40; Sets the fad - in speed of images, the default value is 30

    var imageTime = 5; Sets the time that each image is on the screen in a few seconds

    var mcFader:mc_Images = new mc_Images();

    this.setChildIndex(mcFader,10);

    mcFader.x = 0; It is not necessary, as it is by default, as it was in as2, so it was obsolete it as well!

    mcFader.y=0;// that's not necessary, as it is by default, as it was in as2, so it was obsolete it as well!

    this.addChild (mcFader);

    this.mcFader._alpha = 0;

    this.mcFader._visible = false;

    var = 1 imageNum;

    var i = 0;

    var timer1 timer2;

    startShow();

    function startShow() {}

    Timer1 = setInterval (loadImage, imageTime * 1000);

    }

    function loadImage() {}

    i = 0;

    imageNum ++;

    If (imageNum == this.mcImages._totalFrames + 1) {}

    1 = imageNum;

    }

    this.mcImages._x = 0;

    this.mcImages._y = 0;

    this.mcFader._alpha = 0;

    this.mcFader._visible = true;

    this.mcFader.gotoAndStop (imageNum);

    this.nextImage = imageNum;

    var timer2 = setInterval (fadeImage, fadeSpeed);

    }

    {} fadeImage() function

    this.mcFader._alpha = i;

    If (i > 100) {}

    clearInterval (timer2);

    this.mcImages.gotoAndStop (this.nextImgage);

    this.mcFader._alpha = 0;

    this.mcFader._visible = false;

    }

    i = i + 10;

    }

    function goLink (fNum) {}

    clearInterval (timer1);

    this.mcImages.gotoAndStop (fNum);

    }

    jencreates wrote:

    I just updated an old file flash with some new photos.  I don't know much about Flash - enough to change the photos and click on export, BUT now I'm getting errors.  I had a _root problem which I fixed it thanks to this forum, but I still get these errors:

    Scene 1, Layer 'Actions', frame 3, line 14, column 2 1120: access of undefined property timer1.
    Scene 1, Layer 'Actions', frame 3, line 18, column 2 1120: access of undefined property I.
    Scene 1, Layer 'Actions', frame 3, line 29, column 2 1120: access of undefined property timer2.
    Scene 1, Layer 'Actions', frame 3, line 33, column 35 1120: access of undefined property I.
    Scene 1, Layer 'Actions', frame 3, line 34, column 5 1120: access of undefined property I.
    Scene 1, Layer 'Actions', frame 3, line 35, column 17 1120: access of undefined property timer2.
    Scene 1, Layer 'Actions', frame 3, line 40, column 2 1120: access of undefined property I.
    Scene 1, Layer 'Actions', frame 3, line 40, column 6 1120: access of undefined property I.
    Scene 1, Layer 'Actions', frame 3, line 44, column 16 1120: access of undefined property timer1.
    Preloader, layer 'Actions', frame 1, line 1, column 1 1120: access of undefined property bytes_loaded.
    Preloader, layer 'Actions', frame 1, line 2, column 1 1120: access of undefined property bytes_total.
    Preloader, layer 'Actions', frame 1, line 3, column 1 1120: access of undefined property getPercent.
    Preloader, layer 'Actions', frame 1, line 3, column 14 1120: access of undefined property bytes_loaded.
    Preloader, layer 'Actions', frame 1, line 3, column 27 1120: access of undefined property bytes_total.
    Preloader, layer 'Actions', frame 1, line 4, column 25 1120: access of undefined property getPercent.
    Preloader, layer 'Actions', frame 1, line 5, column 30 1120: access of undefined property getPercent.
    Preloader, layer 'Actions', frame 1, line 7, column 5 1120: access of undefined property bytes_loaded.
    Preloader, layer 'Actions', frame 1, line 7, column 21 1120: access of undefined property bytes_total.
    Preloader, layer 'Actions', frame 1, line 8, column 24 1067: constraint implied a value of type int to type String unrelated.

    I didn't initially write the code and I don't know enough about the Flash to fix.  Here is the code:

    Stop();

    var fadeSpeed = 40; Sets the fad - in speed of images, the default value is 30

    var imageTime = 5; Sets the time that each image is on the screen in a few seconds

    MovieClip (root) .attachMovie ("mc_Images", "mcFader", 10, {x: 0, y:0});})

    MovieClip (root).mcFader._alpha = 0;

    MovieClip (root).mcFader._visible = false;

    var = 1 imageNum;

    startShow();

    function startShow() {}

    Timer1 = setInterval (loadImage, imageTime * 1000);

    }

    function loadImage() {}

    i = 0;

    imageNum ++;

    If (imageNum is. mcImages._totalFrames MovieClip (root) + 1) {}

    1 = imageNum;

    }

    MovieClip (root).mcImages._x = 0;

    MovieClip (root).mcImages._y = 0;

    MovieClip (root).mcFader._alpha = 0;

    MovieClip (root).mcFader._visible = true;

    MovieClip (root).mcFader.gotoAndStop (imageNum);

    MovieClip (root) .nextImage = imageNum;

    TIMER2 = setInterval (fadeImage, fadeSpeed);

    }

    {} fadeImage() function

    MovieClip (root).mcFader._alpha = i;

    If (i > 100) {}

    clearInterval (timer2);

    MovieClip (root),.mcImages.gotoAndStop (MovieClip (root) .nextIm years);

    MovieClip (root).mcFader._alpha = 0;

    MovieClip (root).mcFader._visible = false;

    }

    i = i + 10;

    }

    function goLink (fNum) {}

    clearInterval (timer1);

    MovieClip (root).mcImages.gotoAndStop (fNum);

    }

    ANY help would be GREATLY appreciated!

  • Conversion of AS2 AS3

    I have a button with the following ActionScript code:

    function blurbOut (blurb) {}

    Blurb._x = 1600;

    }

    function stagetitle (blurb, box) {}

    Blurb._x = box._x + 180;

    Blurb._y = box._y + 1;

    }

    and

    on (release) {}

    _level0.stagetitle (_level0.info1, this);

    }

    on {(deployment)

    _level0.blurbOut (_level0.info1);

    }

    This works like a ToolTip. I want to convert these scripts in AS3... So that when I include the Captivate 6 animation, it works. Can someone help me.

    function blurbOut(blurb:DisplayObject) {}

    Blurb.x = 1600;

    }

    function stagetitle (blurb: DisplayObject, box: DisplayObject) {}

    Blurb.x = Box.x + 180;

    Blurb.y = Box.y + 1;

    }

    and

    this.addEventListener (MouseEvent.CLICK, clickHandler);

    this.addEventListener (MouseEvent.ROLL_OUT, outHandler);

    function clickHandler(e:MouseEvent):void {}

    MovieClip (root) .stagetitle (MovieClip .info1 (root), this);

    }

    function outHandler(e:MouseEvent):void {}

    MovieClip (root) .blurbOut (MovieClip (root) .info1);

    }

Maybe you are looking for

  • Satellite C55-C1665 - Windows 10 activation problem

    Dear support, I have improved my language unique windows preinstalled 8.1 (Toshiba C55-C1665) to windows 10 home through usb media, but impossible to activate with the 0x8007232B error. Please help. Thank youElijah

  • Satellite Pro U300 - how to go if connected to the LAN WiFi

    How can I change my laptop to the wireless router, when you connect to the internet LAN?My laptop is Toshiba Satellite U300 pro Post edited by: marto_noa

  • Satellite L350 freezes in games

    I know this is not a gaming laptop, but was enough to run minor games. Everything was fine when I bought without any problem to report, but recently when I play the game will work fine min one (FPS and the smooth running of large) but then suddenly i

  • Change the left kick in fact email application.

    Hello. I know that slide left full email deletes (or met) this email. How can I disable this option / change what is the complete left JAB? Thank you.

  • Cod file not generated

    Hello I'm not able to generate the cod file after making a few changes to the code. I didn't add a new class or method for the code. I just had a 2 lines of code and generated my cod, but due to a problem file, I get null pointer error. I tried almos