Skip to main content
emmanuela19023762
Participant
March 11, 2015
Question

ActionScript Syntax Error

  • March 11, 2015
  • 1 reply
  • 399 views

I'm making a project for my online class, and my script is having errors in 2 lines. I need some help. Can anyone figure out what's wrong with this?

Import Flash.events.Event; Stop();

This.addEventListener (Event.ENTER_FRAME, loading);

Function Loading (e:Event)

    Var total: Number = this.stage.loaderInfo.bytesTotal;

Var loaded: Number = this.stage.loaderInfo.bytesLoaded;

  Loading_bar.scaleX = loaded/total;

Loading_text.text =Math.floor ((loaded/total)*100) + "%";

If (total == loaded) { play ();

                           

    Play():                   

        This.removeEventListener (Event.ENTER_FRAME, loading);

}

}

If you can find the problem, I'll be grateful. And do hurry, I have until tomorrow to post my animation video.

This topic has been closed for replies.

1 reply

Ned Murphy
Legend
March 11, 2015

When you get error messages and want help solving them you should include the complete messages.  Looking at your code I would say the problem might lie in your use of capital letters for terms like: import,  this,  var,  function,

emmanuela19023762
Participant
March 11, 2015

It helps.

Thanks so much!

Ned Murphy
Legend
March 11, 2015

You're welcome