flash function help
Out of context: Reply #9
- Started
- Last post
- 12 Responses
- caseyc0
Try to use onRelease instead of onPress. It's more natural to the user to have some kind of control over when the button executes, even if conciously they dont realize it.
Now, for the code part... I'm assuming you that you want your button clip to have some code but you dont want to put the code in the actual clip to try and keep things organized (on the root timeline)
If you are just starting with functions, I'm not sure you want to dive right in to AS2 so you'll want to look into "classes" in AS1, you can define a bunch of them on the first frame and then use Object.registerClass() and movie clip linkage ids to associate them with specific clips (like your button)
Here's an example:
http://pastebin.coconut.se/?id=4…The macromedia flash help also has some decent tutorials on this type of thing.
Cheers,