onClipEvent
onClipEvent
- Started
- Last post
- 4 Responses
- qruise
in actionscript.
i do...
_root.attachMovie("blah", "shit", 1);
i want to assign a clipevent handler to it, but it wont work. ive tried this:
_root["shit"].onClipEvent(enterF... = function() { trace('yo'); }
but that dont work. so how?
- joyride0
ur pushin the clipevent into somtin dat dont exist yet. try to trace da mc
- ornj0
First, you don't need to use [ ]. "shit" is the name of the new movie clip, you can just type _root.shit or even shit and leave it at that.
second, your syntax is wrong. You want this:
_root.shit.onEnterFrame = function() { }
- ornj0
Let me rephrase that, your syntax is not incorrect, but you will probably have better luck with the syntax i suggested.
- CyBrain0
Probably better practice to use a listener. I should probably take my own advice.