|
-
MX 2004(AS2)Error with actionscript in Flash puzzle
Statement must appear within on/onClipEvent handler varoffsety = 0
I was trying to follow a tutorial by the book, which did not mention using any of the "on" commands
the tutorial can be found here:
as a .doc
google cahced as HTML(no pics)

Any suggestions?
based off of the tutorial, should I use onClipEvent and then which code?
-
Registered User
hi,
You get that error when you attach code to a button or movie clip.
If you attach code to any of these objects, the code has to be inside an on() or an onClipEvent().
If you attach code to a frame, it's the opposite: you can't used on() oronClipEvent().
As you're using MX 2004, and AS20 you should attach all your code to the (main) timeline as this is the preferred way to code - it's a good practice which brings a lot of advantages.
-
thanks for the help, but I was still having issues with this particular tutorial. Its for making an interactive jigsaw puzzle with flash. Wouldn't I need to attach the specific code to the specific piece, or in the fram code is there a way to assign certain sections of code to a piece without it being on the piece. (The pieces are named piece1, piece2, piece3...and so on through piece30. (Going left to right)
-
What the author means is that you are supposed to put the script on the first frame of the movieclips timeline(Doubleclick the movieclip on stage to get to it's timeline). I know this isn't "good practice" but thats what he/she means.
/Mirandir
-
 Originally Posted by Mirandir
What the author means is that you are supposed to put the script on the first frame of the movieclips timeline(Doubleclick the movieclip on stage to get to it's timeline). I know this isn't "good practice" but thats what he/she means.
/Mirandir
Thanks, I'll try the tip.
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
|