-
How to unLoad onClipEvents????
Hey Everyone.
Im having a problem with a unloading a onClipEvent.
I have a web site which ive set up with a content_mc on the main scene and all the content inside that mc.
In my main scene i have a photo with a page curl effect, that is set off by a onClipEvent.
I only want this effect on the home page in the main scene, so how do i unload it after i go into the other pages????
Ive spent hours trying everything i know..
Please help!!!!
Many many thanks
ck
My code as is:
onClipEvent (enterFrame) {
if (_root._xmouse>_root.x1 and _root._xmouse<_root.x2 and _root._ymouse>_root.y1 and _root._ymouse<_root.y2) {
tellTarget ("_root.next") {
gotoAndStop(2);
}
} else {
tellTarget ("_root.next") {
gotoAndStop(3);
}
}
}
-
Senior Member
First of all you are using Flash 4 code, which is deprecated in Flash 8. Then you better not associate any scripts with objects. Instead you put this in the actionframe where your image (movieclip) is.
mc.onEnterFrame = function ()
{
if (_root._xmouse>_root.x1 and _root._xmouse<_root.x2 and _root._ymouse>_root.y1 and _root._ymouse<_root.y2)
{
_root.next.gotoAndStop(2);
this.onEnterFrame = null;
} else
{
_root.next.gotoAndStop(3);
this.onEnterFrame = null;
}
}
- The right of the People to create Flash movies shall not be infringed. -
-
Page curl stays up.
Hello Again.
Flash 4 code! thats how good i am!!
Okay so i put this on the frame of my page curl_mc.
It looks good but i have the curl going up but it just stays up.
What i want is it working on the home page, but when i leave the home page for it to disable or something.
Is this possible? Or have i got it all wrong?
Your help has always been great so thank you.
ck
-
.gotIt()
Okay sorry ive totally got it working fine now.
Thanks you so much for the push forward.
ck
-
Ryan Thomson
not too steal your thread.. but IS there a way to unload onclipevents? I've had to work with really old games a few times lately for work and I have no intentions of recoding huge games haha.. just wondering if there's a quick fix to dump the enterFrame?
-
FK'n_dog
the only way to unload onclipevents is to unload the clip
once started they run for the life of the clip, but you can make the event conditional -
onClipEvent(enterFrame){
if(someVar==true){..do stuff.].
}
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
|