Jump to content

Recommended Posts

hey i been trying to do this loading thingy but i have no idea how to fix these 2 last errors

Scene 1, Layer 'action', Frame 1, Line 2 1078: Label must be a simple identifier.
and
Scene 1, Layer 'action', Frame 1, Line 4 1071: Syntax error: expected a definition keyword (such as function) after attribute and, not font.
and this is my code
import flash.text.Font;font-family: "Time New Roman";property:fontFamily = "Time New Roman";and font-weight: "Time New Roman";property:fontWeight = "Regular";Font.registerFont(mytext);function loadProgress(my_content:ProgressEvent):void { var percent:Number = Math.floor( (my_content.bytesLoaded * 100) / my_content.bytesTotal );mytext.text = percent + "%";circularloader.gotoAndStop(percent);}function loadComplete(e:Event):void {currentFrame + 1;}loaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress);loaderInfo.addEventListener(Event.COMPLETE, loadComplete);

can anyone say whats wrong here?

Edited by DDs1

Share this post


Link to post
Share on other sites

This doesn't look like valid Actionscript: font-family: "Time New Roman"; The first part is subtracting "family" from "font", the colon indicated a typed variable except there's no name after it. Then you have a string after that.

Share this post


Link to post
Share on other sites
This doesn't look like valid Actionscript: font-family: "Time New Roman"; The first part is subtracting "family" from "font", the colon indicated a typed variable except there's no name after it. Then you have a string after that.
oh, i rewrote the script and didnt need those code anymore 0.o but now im having this annoying error
Scene 1, Layer 'action', Frame 1, Line 5 1086: Syntax error: expecting semicolon before Number.
there were other errors in this code also which i can easily fix but this one is giving me a bit of a problem
import flash.events.ProgressEvent;import flash.events.Event;function loadProgress(my_loader:ProgressEvent):void{var percent Number = Math.floor( ( my_loader:bytesLoaded * 100 )/ my_loader:bytesTotal );MyLoadText.text = percent + "%";preloader.gotoAndStop(precent);}function loadComplete(e:Event):void{currentFrame +1;}loaderInfo.addEventListener(ProgressEvent.PROGRESS,loadProgress);loaderInfo.addEventListener(Event.COMPLETE,loadComplete);

not too sure where the semi colon have to go, i been moving it around on that line to match what the error is saying but did not work or do i have to remove something? since thats how i fixed the last erroralso if i placed the semicolon before Number, that wouldnt make much sense since semicolons are for ending a statement, etc. But i tried it and it outputted another error asking for a colon

var percent; Number = Math.floor( ( my_loader:bytesLoaded * 100 )/ my_loader:bytesTotal );
so that above quote wouldnt work, now ill try to figure it out when i wake up Edited by DDs1

Share this post


Link to post
Share on other sites
gotoAndStop? precent or percent, that is the question
:Shock: ............. :facepalm: thank you ill correct that :facepalm:

Share this post


Link to post
Share on other sites

that didnt fix the error still getting the output error

Scene 1, Layer 'action', Frame 1, Line 5 1086: Syntax error: expecting semicolon before Number.

Share this post


Link to post
Share on other sites

i think i fixed the problem 0.o not too sure tho

Share this post


Link to post
Share on other sites

what does this mean? TypeError: Error #1010: A term is undefined and has no properties.at Flashwebsite_fla::MainTimeline/loaderF() error fixed, was a misspelled word again

Edited by DDs1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×