Skip to main content
Participant
July 6, 2008
Question

on clip event

  • July 6, 2008
  • 3 replies
  • 469 views
Hi

What is the right action script for this on clip event to put it in its own layer in the timeline?


onClipEvent (load) {
_x = 22;
_y =113;
div = 5;
}





onClipEvent (enterFrame) {
_x += (endX-_x)/div;
_y += (endY-_y)/div;

_root.pic1.onRelease = function() {
endX = 22;
endY = 113;
};
_root.pic2.onRelease = function() {
endX = -282;
endY = 113;
};
_root.pic3.onRelease = function() {
endX = -582 ;
endY = 113;
};

}



Thanks in Advanced



This topic has been closed for replies.

3 replies

kglad
Community Expert
Community Expert
July 7, 2008
you can attach any files using this forum. you can upload your file and post a link.
kglad
Community Expert
Community Expert
July 7, 2008
that code will work for a movieclip with instance name mc1 WHEN the movieclip and code are attached to the same timeline.
Participant
July 7, 2008
Hmmm...is not working. Is a way that i can attached the fla.?
Participant
July 7, 2008
My apology. I know my English is not helping but let me try again.
It works when i have it whith all the layers in the timeline but when i put it( as one layer, one frame) in the MAIN timeline it doesnt.
kglad
Community Expert
Community Expert
July 6, 2008
give your movieclip and instance name, say mc1. you can then use:

Participant
July 6, 2008
Thanks Klag!!

It works!!
But for some reason that i would LOOOVEEEE to know when i put this mc on the main time line it doesnt work anymore :( This is driving me kookoo!!!. I thought it was that i was putting the actions on the mc. but now that i tried to put it in its own layer doesnt work either.. HEELLPP!!