Results 1 to 2 of 2
  1. #1

    Action Script Problem

    I have a preloader with this action script >

    myLoaded = Math.round(getBytesLoaded());
    myTotal = 285077;
    myPercent = (myLoaded/myTotal);
    myBar._width = myPercent*500;
    myText = Math.round(myPercent*100)+"%";
    ifFrameLoaded (3) {
    gotoAndStop(3);
    } else {
    gotoAndPlay(1);
    }

    The error message I get > **Error** Scene=Scene 1, layer=Actions, frame=2:Line 8: 'else' encountered without matching 'if'
    } else {

    I'm not sure what I'm doing wrong???

  2. #2
    "ifFrameLoaded" doesn't work like a normal "if" statement, so Flash is seeing the "else" as an orphan. Try changing this:

    ifFrameLoaded (3) {

    to this:

    if (this._framesloaded >= 3) {

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Subscribe to us on YouTube