-
actionscripting! (Ugh).
Can anyone tell me why this isn't working? I'm learning actionscript and my first lesson isn't working. I made a movie clip with the instant name 'mcQuit'.
mcQuit.onPress = function():Void {
trace("Why isn't this working?")
};
In this case the lessons from Lynda.com are created from MX and I'm using 8, is there an actionscript conflict here?
-
the only reason for this (correct script) to not work is that you probably didn't give mcQuit an instance name, or that that instance is not present at the time and/or place of the call.
gparis
-
I have one frame and I have the symbol named mcQuit. Heres the error:
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 1: Statement must appear within on/onClipEvent handler
mcQuit.onPress = function():Void {
Total ActionScript Errors: 1 Reported Errors: 1
-
All 1s and 0s
Hi,
The problem is that you've placed the actionscript on the movieclip itself. You want to attach the code to a frame on the timeline. You should place the code on the first frame that the clip appears at.
Hope this helps.
"If I have seen further, it is by standing on the shoulders of giants." - Sir Isaac Newton
-
Oh yea!
Thanks so much! I knew it was gonna be something stupid on my part. I'm accustomed to adding the onPress/release event handler to the button that i'm controlling. I'm trying to learn actionscript, its cool but taxing on my brain!
Thanks again.
P
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|