I believe you, but it's not a good way to build your project. As your
project gets more complicated it'll suddenly stop working as you expected.
What happens if you change the order?
Much better to have a single independent enterframe handler where the order
is important, there you can execute the functions in a clear unambiguous
order.
Paul
----- Original Message -----
From: "Mauricio Furtado Massaia" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, March 14, 2007 12:03 PM
Subject: Re: [Flashcoders] Order of events for function call
Paul,
I dont know why it happens but if u change the order of the attach the
object1.onEnterFrame will work first :
object2 = attachMovie("ball_mc","ball_mc2",2);
object1 = attachMovie("ball_mc","ball_mc",1);
object1.onEnterFrame = function() {
trace ("Object1 enter frame");
}
object2.onEnterFrame = function() {
trace ("Object2 enter frame");
}
I hope it help
MauricioMassaia
On 3/14/07, Paul Steven <[EMAIL PROTECTED]> wrote:
This may be really basic but I can't understand.
The following is a simplified version of what I am trying to achieve.
Basically I am attaching an onEnterFrame function to 2 objects, say
object1
and object2.
I am attaching it to object1 first however it is calling the onEnterFrame
function for object2 first.
I would appreciate any advice on why this is happening.
When I test the movie, the "Object2 enter frame" trace is displaying
first.
Here is the code for my simplified test file:
object1 = attachMovie("ball_mc","ball_mc",1);
object2 = attachMovie("ball_mc","ball_mc2",2);
object1.onEnterFrame = function() {
trace ("Object1 enter frame");
}
object2.onEnterFrame = function() {
trace ("Object2 enter frame");
}
Many thanks
Paul
_______________________________________________
[email protected]
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
_______________________________________________
[email protected]
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
_______________________________________________
[email protected]
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