PDA

View Full Version : OnClipEvent



vip3r
August 23rd, 2002, 04:17 PM
i want to make an onClipEvent(enterframe); , but flash won't let me. its disabled. perhaps because im on the main timeline? anybody know how to do it another way?

telekinesis
August 23rd, 2002, 04:22 PM
You can only put the onClipEvent on a movie clip, hence the name onClipEvent!

But if you are using Flash MX and want to place the code on your main timeline use this:


intanceName.onEnterFrame = function() {
//YOUR CODE HERE
};

vip3r
August 23rd, 2002, 04:24 PM
o i c, but any other way to do it? i want to do something when the it starts playing the frame.....

vip3r
August 23rd, 2002, 04:27 PM
ok,thanx a lot!!!

telekinesis
August 23rd, 2002, 04:28 PM
I'm a lil confused on what you are talking about, are you wanted that frame to loop the code executing it every frame like the onClipEvent(enterFrame) {}? Or do you just want the code executed once?

vip3r
August 23rd, 2002, 04:29 PM
i want when the playhead crosses the frame, to be able to execute teh code

vip3r
August 23rd, 2002, 04:31 PM
in the code u gave me, what would i place under instance name? _root?

telekinesis
August 23rd, 2002, 04:32 PM
So in other words I suppose you want that code executed only once, thats easy! Just place the code you want on the frame you want, lets say you want to put the action gotoAndPlay(2); on frame 3, open up your actions panel if it already isn't (F9) and enter the code:


gotoAndPlay(2);

vip3r
August 23rd, 2002, 04:33 PM
im so stupid...
lol, thanx!!!

dudeman
August 23rd, 2002, 04:35 PM
heh dan.. do you have any im progs? =)

telekinesis
August 23rd, 2002, 04:35 PM
No problem, any more trouble just holla back!

telekinesis
August 23rd, 2002, 04:37 PM
Ummm, I have AIM but I can't use it at work because of the security proxy on my network! I doubt I will even be home tonight (I'm a senior and its a friday night, why would I want to be home or yet even sober) so you are going to either have to private message me or reply here!