Thanks everyone.

The onEnterFrame is not attached to any clip, but, I have a bunch of
balls bouncing around a screen, and I just wanted to pause them when
interacting with one of them.

I never really figured out how to pause the onEnterFrame. What I did
was, pull the setting of the variables for direction and velocity into
an init function that is only run once. The variables are not
destroyed when I delete the onEnterFrame, and when I want motion to
resume, I go to the same frame, basically refiring the onEnterFrame.

On 5/8/07, Durai Raj <[EMAIL PROTECTED]> wrote:
Yes it would be better that we did that on the object. But I guess Schemula
specified for a movieClip?

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Leandro
Amano
Sent: Tuesday, 8 May, 2007 23:36
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] pause an onEnterFrame?

Don't use onEnterFrame event in mc instances, example:

var o:Object = new Object();
o.onEnterFrame = function() {
 trace(true);
};
var mc:MovieClip = this.attachMovie("a", "b", 1, o);

[]'s
Leandro Amano

On 5/8/07, Durai Raj <[EMAIL PROTECTED]> wrote:
>
> You can set a toggle variable to pause and resume the event
>
> Code snippets
>
> //Toggle variable
>
> Var bToggleEvent:Boolean=true
>
> Somemc.onEnterFrame=function():Void
> {
> If(bToggleEvent)
> {
> //Execute the code here
> }
> }
>
>
> Somemc.onRollover=function()
> {
>
> bToggleEvent=false
> }
> Somemc.onRollout=function()
> {
>
> bToggleEvent=true
>
> }
>
>
> Hope this would solve your problem
>
> Durai
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Count
> Schemula
> Sent: Tuesday, May 08, 2007 10:22 AM
> To: flashcoders list
> Subject: [Flashcoders] pause an onEnterFrame?
>
> Is there anyway to pause an onEnterFrame event?
>
> Right now I delete the onEnterFrame when an onRollOver event occurs,
> and reinitialize it when an onRollOut event occurs, but that causes
> all of my motion variables to get re-initiated, and thus makes the
> motion go through a huge jump.
>
> Is there a way to pause, and resume an onEnterFrame?
>
> Thanks.
>
> --
> count_schemula
> _______________________________________________
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
>
>
> DISCLAIMER:
> This communication may be confidential and privileged and the views
> expressed herein may be personal and are not necessarily the views of
ReDIM.
> It is for the exclusive use of the intended recipient. If you are not the
> intended recipient, please note that any distribution,
> copying or use of this communication or the  information in it is strictly
> prohibited.If you have received this communication
> in error, please notify us by email ([EMAIL PROTECTED]) and then delete the
> email and any copies of it.
>
>
> _______________________________________________
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>



--
--
Leandro Amano
Digital Bug
Chief Creative Officer
Adobe Certified Expert
Adobe Certified Instructor
Adobe User Group Leader
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



DISCLAIMER:
This communication may be confidential and privileged and the views expressed 
herein may be personal and are not necessarily the views of ReDIM.
It is for the exclusive use of the intended recipient. If you are not the 
intended recipient, please note that any distribution,
copying or use of this communication or the  information in it is strictly 
prohibited.If you have received this communication
in error, please notify us by email ([EMAIL PROTECTED]) and then delete the 
email and any copies of it.


_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



--
count_schemula
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to