1087 Migration issue: ActionScript 3.0 iterates over an object's properties within a "for x in target" statement in random order.

This is a code migration warning. In ActionScript 2.0, the order in which the properties of an object were processed was always the same. In ActionScript 3.0, the order is random and can change from machine to machine. If unexpected ordering behavior occurs, inspect this loop to determine if this change in behavior may affect your code.

1087: Syntax error: extra characters found after end of program.

Problem:
A block of code may be missing an opening brace ({).

Example:
[as]
if (!iconParent)
iconParent = Application.application;
}
[/as]

Notice there is no opening brace after “(!iconParent)”.

10 thoughts on “1087 Migration issue: ActionScript 3.0 iterates over an object's properties within a "for x in target" statement in random order.

  1. i keep getting the same message “1087:syntax error: extra characters found after end of program” on this action:

    on(release){
    gotoAndStop(“SectionOne”);

    }

    from what i can tell there isn’t anything wrong with it.

    any suggestions?

    Like

  2. I solved my problem, my project was set to compile with AS3 rather than AS2 and I was trying to use AS2 script syntax in AS3 which has had some significant changes made to it. This may help Sina with the problem that she was experiencing as it solved mine.

    Like

  3. I also encountered this problem when I try to switch from AS2 to AS3, here is the code,

    Actionscript:

    1.
    onClipEvent (load) {
    2.
    total = _root.getBytesTotal();
    3.
    }
    4.
    onClipEvent (enterFrame) {
    5.
    loaded = _root.getBytesLoaded();
    6.
    percent = int(loaded/total*100);
    7.
    text = percent+”%”;
    8.
    gotoAndStop(percent);
    9.
    if (loaded == total) {
    10.
    _root.gotoAndPlay(2);
    11.
    }
    12.
    }

    Can anyone please help??? Thanks so much!

    Like

  4. mine says that, even though there is an opening brace after the beginning:

    Actionscript:

    1.
    onClipEvent(“1”){
    2.
    if(Key.isDown(Key.RIGHT)){
    3.
    this._x+=5;
    4.
    this.gotoAndStop(“1:character”);

    can anyone help me?

    Like

  5. @Di – should you put quotes around your parameter?

    // incorrect
    onClipEvent (enterFrame) {

    // correct
    onClipEvent (“enterFrame”) {

    @trent – you have opening braces but it looks like you are missing the closing braces. you may also have to specify an event rather than a number? ie “onClick” or “click” instead of “1”

    Actionscript:

    1.
    // correct
    2.
    onClipEvent(“1”){
    3.
    if(Key.isDown(Key.RIGHT)){
    4.
    this._x+=5;
    5.
    this.gotoAndStop(“1:character”);
    6.
    }
    7.
    }

    Like

  6. I am trying to control a movie clip from the root of a movie and am getting the same error in the following code. Is there anybody that can help me?

    mc_slides.ifFrameLoaded (35) {
    mc_slides.gotoAndPlay(3);
    }

    Like

  7. I’m trying to figure out how to link the site together and I have found out how but constantly im gettting this error message saying that there are extra characters but the code is exactly like it was in the tutorial can someone please assist me.

    on(“release”) {
    getURL(“http://www.crystalicecreations.com”)
    }

    Like

  8. @HH – I’m not sure what the error might be but retype the code above. if you have “formated” quotes then that will mess it up. formated quotes are the kind you find in word processing programs. they are the special “begin” quote that faces one direction and the special “end” quote that faces the other direction. software doesn’t like that and you frequently run into errors when you copy code from book examples. the other thing that may be going on is that nothing is wrong with this code but you have an error somewhere else. remove this code and see if the error goes away then add it back in (retype it or copy and paste it into notepad and then copy and paste it into flash).

    Like

Leave a comment