RE: [Flashcoders] Order of events for function call

2007-03-15 Thread Paul Steven
Thanks Paul

Kind of similar to what I have but with this method there is a delay if
balls are falling from high up. Ideally I would like there to be no delay
but guess that could make things too complex.

if (this.List_Of_Falling_Ball_Objects.length == 0 
this.List_Of_Sliding_Ball_Objects.length == 0) {


this.Move_Balls_Up();
this.Play_Balls_Up_Sound();

}

Cheers


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul Andrews
Sent: 14 March 2007 22:58
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Order of events for function call

Without thinking about this too much, I might have a count of the balls in 
transit. When a ball reaches it's destination, the count is decremented. I 
would only add a new row when the count is zero. Does that do the trick?

Paul
- Original Message - 
From: Paul Steven [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Wednesday, March 14, 2007 8:00 PM
Subject: RE: [Flashcoders] Order of events for function call


I have another related question about this collapse game.

 Every few seconds, all the rows of balls on the game screen move up one 
 row
 and are replaced with a new row of random balls.

 I have a problem whereby this may occur immediately after I have just
 assigned the falling balls their new destinations. Hence the falling balls
 think that the bottom row was empty and are heading to fill this gap but 
 now
 the new line of balls has filled this gap and shifted all the tile data up
 by one row.

 I would appreciate any advice on how to prevent this problem.

 Thanks

 Paul



 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Paul 
 Steven
 Sent: 14 March 2007 15:23
 To: flashcoders@chattyfig.figleaf.com
 Subject: RE: [Flashcoders] Order of events for function call

 Thanks to everyone for the great advice. I have now taken your advice and
 got rid of all the multiple onEnterFrames and it now works a treat.



 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of T. Michael
 Keesey
 Sent: 14 March 2007 14:44
 To: flashcoders@chattyfig.figleaf.com
 Subject: Re: [Flashcoders] Order of events for function call

 You can't rely on the order of events for two movies in the same
 timeline. Instead, why not have an onEnterFrame in the parent clip
 that calls functions in ball_mc and ball2_mc in the proper order?

 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

 ___
 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



 -- 
 T. Michael Keesey
 Director of Technology
 Exopolis, Inc.
 2894 Rowena Avenue Ste. B
 Los Angeles, California 90039
 --
 The Dinosauricon: http://dino.lm.com
 Parry  Carney: http://parryandcarney.com
 ISPN Forum: http://www.phylonames.org/forum/
 ___
 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

 ___
 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

 ___
 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

[Flashcoders] Order of events for function call

2007-03-14 Thread Paul Steven
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

___
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


Re: [Flashcoders] Order of events for function call

2007-03-14 Thread nox

you can solve it with reverse ordering:

...
object2 = attachMovie(ball_mc,ball_mc2,2);
object1 = attachMovie(ball_mc,ball_mc,1);
...






- Original Message - 
From: Paul Steven [EMAIL PROTECTED]

To: flashcoders@chattyfig.figleaf.com
Sent: Wednesday, March 14, 2007 11:53
Subject: [Flashcoders] Order of events for function call



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

___
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



___
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


Re: [Flashcoders] Order of events for function call

2007-03-14 Thread Mauricio Furtado Massaia

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

___
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


___
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


Re: [Flashcoders] Order of events for function call

2007-03-14 Thread Johannes Nel

i understand that its a example, but using an enterframe beacon rather than
multiple enterframe handlers is better and might make this kind of thing
much easier to manage

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

___
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





--
j:pn
http://www.lennel.org
___
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


RE: [Flashcoders] Order of events for function call

2007-03-14 Thread Paul Steven
Thanks Paul

Basically it is a collapse style game - where when the user clicks on a ball
that has 2 similar balls adjacent, all 3 balls disappear and the other
surrounding balls will move to fill any spaces created from the removed
balls.

Here is the basic approach I am taking:

I have a 2 dimensional array storing the game grid, each array element
stores the contents of the grid square. So the content of each square will
be either a ball object or have the value none.

After a cluster of balls are removed, I first loop through each of the
columns, and within this column loop through all the balls in this column
and check if there is a ball below it.

If there is no ball, then I attach an onEnterFrame function to make this
ball start falling. I also set the value of this grid square to none. The
onEnterFrame function will adjust the y position of the ball. It will also
check if the ball is at a node - if so then it checks the contents of the
square below it to see if it can fall further or if it needs to stop. If it
stops then I set the value of this grid square in the grid array to this
ball object.

Once all the columns have been checked for falling balls, I then loop
through all the columns again and check if any columns can move horizontally
to fill any gaps that may have appeared.

Due to this problem of the onEnterFrame not being called in the order I
assigned it, I am getting the problem where a grid square is not being
recorded as full until too late so a ball is able to move into a square that
another ball has just moved into.

I think as you suggest, I need to first create a list of all objects that
are going to move and then iterate through this loop so that the balls move
in the correct order. 

Any advice much appreciated!

Paul





-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul Andrews
Sent: 14 March 2007 11:42
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Order of events for function call

It doesn't really matter which you assign first, it's all determined by the 
order in which flash decides to call the functions which has no relationship

to the assignment order. I suspect you would be better advised to use an 
independent enterframe function that is not attached to the objects for any 
processing that requires a specific order.

Perhaps you can elaborate on what you are trying to do?

Paul

- Original Message - 
From: Paul Steven [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Wednesday, March 14, 2007 10:53 AM
Subject: [Flashcoders] Order of events for function call


 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

 ___
 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
 

___
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

___
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


Re: [Flashcoders] Order of events for function call

2007-03-14 Thread Paul Andrews
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: flashcoders@chattyfig.figleaf.com
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

___
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


___
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



___
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


Re: [Flashcoders] Order of events for function call

2007-03-14 Thread Paul Andrews
I think you just need a single enterframe function that will update the 
array/animate the balls as required. There's no need to add a separate 
enterframe function to make a particular ball start falling, just control 
the falling ball in the single function, just as you would in a separate 
enterframe function.


Good luck,

Paul
- Original Message - 
From: Paul Steven [EMAIL PROTECTED]

To: flashcoders@chattyfig.figleaf.com
Sent: Wednesday, March 14, 2007 12:32 PM
Subject: RE: [Flashcoders] Order of events for function call



Thanks Paul

Basically it is a collapse style game - where when the user clicks on a 
ball

that has 2 similar balls adjacent, all 3 balls disappear and the other
surrounding balls will move to fill any spaces created from the removed
balls.

Here is the basic approach I am taking:

I have a 2 dimensional array storing the game grid, each array element
stores the contents of the grid square. So the content of each square will
be either a ball object or have the value none.

After a cluster of balls are removed, I first loop through each of the
columns, and within this column loop through all the balls in this column
and check if there is a ball below it.

If there is no ball, then I attach an onEnterFrame function to make this
ball start falling. I also set the value of this grid square to none. 
The

onEnterFrame function will adjust the y position of the ball. It will also
check if the ball is at a node - if so then it checks the contents of the
square below it to see if it can fall further or if it needs to stop. If 
it

stops then I set the value of this grid square in the grid array to this
ball object.

Once all the columns have been checked for falling balls, I then loop
through all the columns again and check if any columns can move 
horizontally

to fill any gaps that may have appeared.

Due to this problem of the onEnterFrame not being called in the order I
assigned it, I am getting the problem where a grid square is not being
recorded as full until too late so a ball is able to move into a square 
that

another ball has just moved into.

I think as you suggest, I need to first create a list of all objects that
are going to move and then iterate through this loop so that the balls 
move

in the correct order.

Any advice much appreciated!

Paul





-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul 
Andrews

Sent: 14 March 2007 11:42
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Order of events for function call

It doesn't really matter which you assign first, it's all determined by 
the
order in which flash decides to call the functions which has no 
relationship


to the assignment order. I suspect you would be better advised to use an
independent enterframe function that is not attached to the objects for 
any

processing that requires a specific order.

Perhaps you can elaborate on what you are trying to do?

Paul

- Original Message - 
From: Paul Steven [EMAIL PROTECTED]

To: flashcoders@chattyfig.figleaf.com
Sent: Wednesday, March 14, 2007 10:53 AM
Subject: [Flashcoders] Order of events for function call



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

___
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



___
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

___
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



___
Flashcoders

Re: [Flashcoders] Order of events for function call

2007-03-14 Thread T. Michael Keesey

You can't rely on the order of events for two movies in the same
timeline. Instead, why not have an onEnterFrame in the parent clip
that calls functions in ball_mc and ball2_mc in the proper order?

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

___
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




--
T. Michael Keesey
Director of Technology
Exopolis, Inc.
2894 Rowena Avenue Ste. B
Los Angeles, California 90039
--
The Dinosauricon: http://dino.lm.com
Parry  Carney: http://parryandcarney.com
ISPN Forum: http://www.phylonames.org/forum/
___
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


RE: [Flashcoders] Order of events for function call

2007-03-14 Thread Paul Steven
Thanks to everyone for the great advice. I have now taken your advice and
got rid of all the multiple onEnterFrames and it now works a treat.



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of T. Michael
Keesey
Sent: 14 March 2007 14:44
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Order of events for function call

You can't rely on the order of events for two movies in the same
timeline. Instead, why not have an onEnterFrame in the parent clip
that calls functions in ball_mc and ball2_mc in the proper order?

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

 ___
 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



-- 
T. Michael Keesey
Director of Technology
Exopolis, Inc.
2894 Rowena Avenue Ste. B
Los Angeles, California 90039
--
The Dinosauricon: http://dino.lm.com
Parry  Carney: http://parryandcarney.com
ISPN Forum: http://www.phylonames.org/forum/
___
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

___
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


RE: [Flashcoders] Order of events for function call

2007-03-14 Thread Paul Steven
I have another related question about this collapse game.

Every few seconds, all the rows of balls on the game screen move up one row
and are replaced with a new row of random balls.

I have a problem whereby this may occur immediately after I have just
assigned the falling balls their new destinations. Hence the falling balls
think that the bottom row was empty and are heading to fill this gap but now
the new line of balls has filled this gap and shifted all the tile data up
by one row.

I would appreciate any advice on how to prevent this problem. 

Thanks

Paul



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul Steven
Sent: 14 March 2007 15:23
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] Order of events for function call

Thanks to everyone for the great advice. I have now taken your advice and
got rid of all the multiple onEnterFrames and it now works a treat.



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of T. Michael
Keesey
Sent: 14 March 2007 14:44
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Order of events for function call

You can't rely on the order of events for two movies in the same
timeline. Instead, why not have an onEnterFrame in the parent clip
that calls functions in ball_mc and ball2_mc in the proper order?

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

 ___
 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



-- 
T. Michael Keesey
Director of Technology
Exopolis, Inc.
2894 Rowena Avenue Ste. B
Los Angeles, California 90039
--
The Dinosauricon: http://dino.lm.com
Parry  Carney: http://parryandcarney.com
ISPN Forum: http://www.phylonames.org/forum/
___
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

___
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

___
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


Re: [Flashcoders] Order of events for function call

2007-03-14 Thread Paul Andrews
Without thinking about this too much, I might have a count of the balls in 
transit. When a ball reaches it's destination, the count is decremented. I 
would only add a new row when the count is zero. Does that do the trick?


Paul
- Original Message - 
From: Paul Steven [EMAIL PROTECTED]

To: flashcoders@chattyfig.figleaf.com
Sent: Wednesday, March 14, 2007 8:00 PM
Subject: RE: [Flashcoders] Order of events for function call



I have another related question about this collapse game.

Every few seconds, all the rows of balls on the game screen move up one 
row

and are replaced with a new row of random balls.

I have a problem whereby this may occur immediately after I have just
assigned the falling balls their new destinations. Hence the falling balls
think that the bottom row was empty and are heading to fill this gap but 
now

the new line of balls has filled this gap and shifted all the tile data up
by one row.

I would appreciate any advice on how to prevent this problem.

Thanks

Paul



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul 
Steven

Sent: 14 March 2007 15:23
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] Order of events for function call

Thanks to everyone for the great advice. I have now taken your advice and
got rid of all the multiple onEnterFrames and it now works a treat.



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of T. Michael
Keesey
Sent: 14 March 2007 14:44
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Order of events for function call

You can't rely on the order of events for two movies in the same
timeline. Instead, why not have an onEnterFrame in the parent clip
that calls functions in ball_mc and ball2_mc in the proper order?

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

___
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




--
T. Michael Keesey
Director of Technology
Exopolis, Inc.
2894 Rowena Avenue Ste. B
Los Angeles, California 90039
--
The Dinosauricon: http://dino.lm.com
Parry  Carney: http://parryandcarney.com
ISPN Forum: http://www.phylonames.org/forum/
___
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

___
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

___
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



___
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