[Flashcoders] Keep pane facing camera in 3D (Five3D specifically)

2010-04-28 Thread dopeco...@hotmail.com

Hi all,

I am at the tail end of a project done in Five3D after doing a few 
different ones in Papervision and I am stuck on a fundamental feature 
that I hope someone who payed attention in math class (which I didn't) 
could help me out on. I am doing something that has movement similar to 
WP-Cumulus, i.e. items placed around a virtual globe, with each item 
always facing front when that globe is rotated. I know papervision had 
something pre-built for this type of thing, but Five3D doesn't, so I 
suspect I may have to get tricky with some maths to keep all panes 
facing front.


Anyone know where to start on this?, currently, if I spin the globe 
on it's Y axis, and turn each item on that globe but the inverse of its 
rotation, and works fine around that axis alone. Throw in both x and y 
rotation at the same time though and things go a little skewy.


Any help would be most appreciated and will earn me a couple of 
hours extra sleep :)


Cheers
Adam
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Keep pane facing camera in 3D (Five3D specifically)

2010-04-28 Thread Glen Pike

Eeek,

I tried this / ran into the problem.   In PV3D, you generally move 
the camera around the world / objects.  In Five3D you move the world or 
the objects around, which behaves completely differently.


I tried unsuccessfully to integrate a 3D camera - borrowing some of 
the ideas from the PV3D one.  I think you apply a transform to the 
entire world based on your camera distance from 0,0 and 2 of your angles 
- I lost all my bookmarks for it, but I remember Ralph Hauwert - 
UnitZero one did some maths to make 3D rotations work avoiding gimbal 
lock, e.g. when you rotate one axis upside down, the direction of 
rotation for the 2nd axis relative to your mouse movements flip.  This 
does not happen with a camera.


I will have a look later when I get home to see if I can find some 
more stuff if you are still stuck.


Later

Glen

On 28/04/2010 10:36, dopeco...@hotmail.com wrote:

Hi all,

I am at the tail end of a project done in Five3D after doing a few 
different ones in Papervision and I am stuck on a fundamental feature 
that I hope someone who payed attention in math class (which I didn't) 
could help me out on. I am doing something that has movement similar 
to WP-Cumulus, i.e. items placed around a virtual globe, with each 
item always facing front when that globe is rotated. I know 
papervision had something pre-built for this type of thing, but Five3D 
doesn't, so I suspect I may have to get tricky with some maths to keep 
all panes facing front.


Anyone know where to start on this?, currently, if I spin the 
globe on it's Y axis, and turn each item on that globe but the inverse 
of its rotation, and works fine around that axis alone. Throw in both 
x and y rotation at the same time though and things go a little skewy.


Any help would be most appreciated and will earn me a couple of 
hours extra sleep :)


Cheers
Adam
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Keep pane facing camera in 3D (Five3D specifically)

2010-04-28 Thread John McCormack

Why would the planes rotate if they are not children of the globe?

John

dopeco...@hotmail.com wrote:

Hi all,

I am at the tail end of a project done in Five3D after doing a few 
different ones in Papervision and I am stuck on a fundamental feature 
that I hope someone who payed attention in math class (which I didn't) 
could help me out on. I am doing something that has movement similar 
to WP-Cumulus, i.e. items placed around a virtual globe, with each 
item always facing front when that globe is rotated. I know 
papervision had something pre-built for this type of thing, but Five3D 
doesn't, so I suspect I may have to get tricky with some maths to keep 
all panes facing front.


Anyone know where to start on this?, currently, if I spin the 
globe on it's Y axis, and turn each item on that globe but the inverse 
of its rotation, and works fine around that axis alone. Throw in both 
x and y rotation at the same time though and things go a little skewy.


Any help would be most appreciated and will earn me a couple of 
hours extra sleep :)


Cheers
Adam
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders





___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Keep pane facing camera in 3D (Five3D specifically)

2010-04-28 Thread dopeco...@hotmail.com

Hi John,

Each plane is attached to the globe, so if I rotate the globe alone, the 
children move with it hence I see the back of the planes etc. ... what I 
want is to be able to keep the front of the planes facing the user at 
their correct perspectives, very similiar to this (although not related 
in nature at all):


http://www.logicnest.com/archives/132

Cheers
Adam



John McCormack wrote:

Why would the planes rotate if they are not children of the globe?

John

dopeco...@hotmail.com wrote:

Hi all,

I am at the tail end of a project done in Five3D after doing a 
few different ones in Papervision and I am stuck on a fundamental 
feature that I hope someone who payed attention in math class (which 
I didn't) could help me out on. I am doing something that has 
movement similar to WP-Cumulus, i.e. items placed around a virtual 
globe, with each item always facing front when that globe is rotated. 
I know papervision had something pre-built for this type of thing, 
but Five3D doesn't, so I suspect I may have to get tricky with some 
maths to keep all panes facing front.


Anyone know where to start on this?, currently, if I spin the 
globe on it's Y axis, and turn each item on that globe but the 
inverse of its rotation, and works fine around that axis alone. Throw 
in both x and y rotation at the same time though and things go a 
little skewy.


Any help would be most appreciated and will earn me a couple of 
hours extra sleep :)


Cheers
Adam
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders 



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Keep pane facing camera in 3D (Five3D specifically)

2010-04-28 Thread Glen Pike

I think you mean billboards - something that always faces the camera?

Does it have to be in Five3D - can you accomplish this in Flash by 
manipulating the z-depth


On 28/04/2010 11:35, dopeco...@hotmail.com wrote:

Hi John,

Each plane is attached to the globe, so if I rotate the globe alone, 
the children move with it hence I see the back of the planes etc. ... 
what I want is to be able to keep the front of the planes facing the 
user at their correct perspectives, very similiar to this (although 
not related in nature at all):


http://www.logicnest.com/archives/132

Cheers
Adam



John McCormack wrote:

Why would the planes rotate if they are not children of the globe?

John

dopeco...@hotmail.com wrote:

Hi all,

I am at the tail end of a project done in Five3D after doing a 
few different ones in Papervision and I am stuck on a fundamental 
feature that I hope someone who payed attention in math class (which 
I didn't) could help me out on. I am doing something that has 
movement similar to WP-Cumulus, i.e. items placed around a virtual 
globe, with each item always facing front when that globe is 
rotated. I know papervision had something pre-built for this type of 
thing, but Five3D doesn't, so I suspect I may have to get tricky 
with some maths to keep all panes facing front.


Anyone know where to start on this?, currently, if I spin the 
globe on it's Y axis, and turn each item on that globe but the 
inverse of its rotation, and works fine around that axis alone. 
Throw in both x and y rotation at the same time though and things go 
a little skewy.


Any help would be most appreciated and will earn me a couple of 
hours extra sleep :)


Cheers
Adam
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders 



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Keep pane facing camera in 3D (Five3D specifically)

2010-04-28 Thread dopeco...@hotmail.com
As this is a FP9 project, I suspect it may require Five3D, however if 
there is a reasonable solution with z-depth it might be something that 
could be considered, just not to sure on where to start for the maths on 
this aspect of it.


Glen Pike wrote:

I think you mean billboards - something that always faces the camera?

Does it have to be in Five3D - can you accomplish this in Flash by 
manipulating the z-depth


On 28/04/2010 11:35, dopeco...@hotmail.com wrote:

Hi John,

Each plane is attached to the globe, so if I rotate the globe alone, 
the children move with it hence I see the back of the planes etc. ... 
what I want is to be able to keep the front of the planes facing the 
user at their correct perspectives, very similiar to this (although 
not related in nature at all):


http://www.logicnest.com/archives/132

Cheers
Adam



John McCormack wrote:

Why would the planes rotate if they are not children of the globe?

John

dopeco...@hotmail.com wrote:

Hi all,

I am at the tail end of a project done in Five3D after doing a 
few different ones in Papervision and I am stuck on a fundamental 
feature that I hope someone who payed attention in math class 
(which I didn't) could help me out on. I am doing something that 
has movement similar to WP-Cumulus, i.e. items placed around a 
virtual globe, with each item always facing front when that globe 
is rotated. I know papervision had something pre-built for this 
type of thing, but Five3D doesn't, so I suspect I may have to get 
tricky with some maths to keep all panes facing front.


Anyone know where to start on this?, currently, if I spin the 
globe on it's Y axis, and turn each item on that globe but the 
inverse of its rotation, and works fine around that axis alone. 
Throw in both x and y rotation at the same time though and things 
go a little skewy.


Any help would be most appreciated and will earn me a couple of 
hours extra sleep :)


Cheers
Adam
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders 



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders 


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Keep pane facing camera in 3D (Five3D specifically)

2010-04-28 Thread John McCormack


Looks interesting:
http://www.logicnest.com/archives/132


In PV3D there is a function to lookAt() an object.
As the objects rotate with the globe you can tell them to look at the 
centre of the globe.


I couldn't find the right maths on the five3D site.

John


dopeco...@hotmail.com wrote:
As this is a FP9 project, I suspect it may require Five3D, however if 
there is a reasonable solution with z-depth it might be something that 
could be considered, just not to sure on where to start for the maths 
on this aspect of it.


Glen Pike wrote:

I think you mean billboards - something that always faces the camera?

Does it have to be in Five3D - can you accomplish this in Flash by 
manipulating the z-depth


On 28/04/2010 11:35, dopeco...@hotmail.com wrote:

Hi John,

Each plane is attached to the globe, so if I rotate the globe alone, 
the children move with it hence I see the back of the planes etc. 
... what I want is to be able to keep the front of the planes facing 
the user at their correct perspectives, very similiar to this 
(although not related in nature at all):


http://www.logicnest.com/archives/132

Cheers
Adam



John McCormack wrote:

Why would the planes rotate if they are not children of the globe?

John

dopeco...@hotmail.com wrote:

Hi all,

I am at the tail end of a project done in Five3D after doing a 
few different ones in Papervision and I am stuck on a fundamental 
feature that I hope someone who payed attention in math class 
(which I didn't) could help me out on. I am doing something that 
has movement similar to WP-Cumulus, i.e. items placed around a 
virtual globe, with each item always facing front when that globe 
is rotated. I know papervision had something pre-built for this 
type of thing, but Five3D doesn't, so I suspect I may have to get 
tricky with some maths to keep all panes facing front.


Anyone know where to start on this?, currently, if I spin the 
globe on it's Y axis, and turn each item on that globe but the 
inverse of its rotation, and works fine around that axis alone. 
Throw in both x and y rotation at the same time though and things 
go a little skewy.


Any help would be most appreciated and will earn me a couple 
of hours extra sleep :)


Cheers
Adam
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders 



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders 


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders





___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Keep pane facing camera in 3D (Five3D specifically)

2010-04-28 Thread dopeco...@hotmail.com
Yep John that's pretty much the effect we are after, lookAt() is the 
method I was trying to think of in PV3D, thanks for the reminder, but 
like you, finding an five3D equivelant considering it doesn't have 
cameras as does PV is proving impossible for a typical API end user like 
myself, I will have a poke around the lookAt function of PV though to 
see if it gives me any hints.


John McCormack wrote:

Looks interesting:
http://www.logicnest.com/archives/132


In PV3D there is a function to lookAt() an object.
As the objects rotate with the globe you can tell them to look at the 
centre of the globe.


I couldn't find the right maths on the five3D site.

John


dopeco...@hotmail.com wrote:
As this is a FP9 project, I suspect it may require Five3D, however if 
there is a reasonable solution with z-depth it might be something 
that could be considered, just not to sure on where to start for the 
maths on this aspect of it.


Glen Pike wrote:

I think you mean billboards - something that always faces the camera?

Does it have to be in Five3D - can you accomplish this in Flash by 
manipulating the z-depth


On 28/04/2010 11:35, dopeco...@hotmail.com wrote:

Hi John,

Each plane is attached to the globe, so if I rotate the globe 
alone, the children move with it hence I see the back of the planes 
etc. ... what I want is to be able to keep the front of the planes 
facing the user at their correct perspectives, very similiar to 
this (although not related in nature at all):


http://www.logicnest.com/archives/132

Cheers
Adam



John McCormack wrote:

Why would the planes rotate if they are not children of the globe?

John

dopeco...@hotmail.com wrote:

Hi all,

I am at the tail end of a project done in Five3D after doing 
a few different ones in Papervision and I am stuck on a 
fundamental feature that I hope someone who payed attention in 
math class (which I didn't) could help me out on. I am doing 
something that has movement similar to WP-Cumulus, i.e. items 
placed around a virtual globe, with each item always facing front 
when that globe is rotated. I know papervision had something 
pre-built for this type of thing, but Five3D doesn't, so I 
suspect I may have to get tricky with some maths to keep all 
panes facing front.


Anyone know where to start on this?, currently, if I spin the 
globe on it's Y axis, and turn each item on that globe but the 
inverse of its rotation, and works fine around that axis alone. 
Throw in both x and y rotation at the same time though and things 
go a little skewy.


Any help would be most appreciated and will earn me a couple 
of hours extra sleep :)


Cheers
Adam
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders 



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders 


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders 



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] passing obj name

2010-04-28 Thread Lehr, Theodore
so I have:
flower.addEventListener(MouseEvent.ROLL_OVER,jiggle);

function jiggle(e:Event):void
{
 var timer:Timer=new Timer(2,100);
 timer.addEventListener(TimerEvent.TIMER,shakeBtn);
 timer.start();
}

function shakeBtn(e:Event)
{
 flower.main.rotation+=Math.random()*8-4;
 flower.main.x+=Math.random()*8-4;
 flower.main.y+=Math.random()*8-4;
}

How can I pass mc name (flower) down to shakeBtn so that I can reuse the 
function
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] passing obj name

2010-04-28 Thread Eric E. Dolecki
function shakeBtn(e:Event):void {
 e.target.main.rotation+=Math.random()*8-4;

I think that should work


On Wed, Apr 28, 2010 at 8:36 AM, Lehr, Theodore
ted_l...@federal.dell.comwrote:

 so I have:
 flower.addEventListener(MouseEvent.ROLL_OVER,jiggle);

 function jiggle(e:Event):void
 {
 var timer:Timer=new Timer(2,100);
 timer.addEventListener(TimerEvent.TIMER,shakeBtn);
 timer.start();
 }

 function shakeBtn(e:Event)
 {
 flower.main.rotation+=Math.random()*8-4;
 flower.main.x+=Math.random()*8-4;
 flower.main.y+=Math.random()*8-4;
 }

 How can I pass mc name (flower) down to shakeBtn so that I can reuse the
 function
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




-- 
http://ericd.net
Interactive design and development
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] passing obj name

2010-04-28 Thread Lehr, Theodore
no - I think because the e at that point is for the timer


From: flashcoders-boun...@chattyfig.figleaf.com 
[flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Eric E. Dolecki 
[edole...@gmail.com]
Sent: Wednesday, April 28, 2010 8:49 AM
To: Flash Coders List
Subject: Re: [Flashcoders] passing obj name

function shakeBtn(e:Event):void {
 e.target.main.rotation+=Math.random()*8-4;

I think that should work


On Wed, Apr 28, 2010 at 8:36 AM, Lehr, Theodore
ted_l...@federal.dell.comwrote:

 so I have:
 flower.addEventListener(MouseEvent.ROLL_OVER,jiggle);

 function jiggle(e:Event):void
 {
 var timer:Timer=new Timer(2,100);
 timer.addEventListener(TimerEvent.TIMER,shakeBtn);
 timer.start();
 }

 function shakeBtn(e:Event)
 {
 flower.main.rotation+=Math.random()*8-4;
 flower.main.x+=Math.random()*8-4;
 flower.main.y+=Math.random()*8-4;
 }

 How can I pass mc name (flower) down to shakeBtn so that I can reuse the
 function
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




--
http://ericd.net
Interactive design and development
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] passing obj name

2010-04-28 Thread Keith Reinfeld
Maybe: 

var shakable:*; 

flower.addEventListener(MouseEvent.ROLL_OVER,jiggle);

function jiggle(e:Event):void
{
shakable = e.currentTarget;
 var timer:Timer=new Timer(2,100);
 timer.addEventListener(TimerEvent.TIMER,shakeBtn);
 timer.start();
}

function shakeBtn(e:Event)
{
 shakable.main.rotation+=Math.random()*8-4;
 shakable.main.x+=Math.random()*8-4;
 shakable.main.y+=Math.random()*8-4;
}

Regards,

Keith Reinfeld
Home Page: http://keithreinfeld.home.comcast.net

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-
 boun...@chattyfig.figleaf.com] On Behalf Of Lehr, Theodore
 Sent: Wednesday, April 28, 2010 7:36 AM
 To: Flash Coders List
 Subject: [Flashcoders] passing obj name
 
 so I have:
 flower.addEventListener(MouseEvent.ROLL_OVER,jiggle);
 
 function jiggle(e:Event):void
 {
  var timer:Timer=new Timer(2,100);
  timer.addEventListener(TimerEvent.TIMER,shakeBtn);
  timer.start();
 }
 
 function shakeBtn(e:Event)
 {
  flower.main.rotation+=Math.random()*8-4;
  flower.main.x+=Math.random()*8-4;
  flower.main.y+=Math.random()*8-4;
 }
 
 How can I pass mc name (flower) down to shakeBtn so that I can reuse
 the function
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] passing obj name

2010-04-28 Thread Nathan Mynarcik
Create a variable to store the item to shake:

var itemToShake:MovieClip;

flower.addEventListener(MouseEvent.ROLL_OVER,jiggle);

function jiggle(e:Event):void
{

 var timer:Timer=new Timer(2,100);
 timer.addEventListener(TimerEvent.TIMER,shakeBtn);
 timer.start();
itemToShake = e.currentTarget;
}

function shakeBtn(e:Event)
{
 itemToShake.main.rotation+=Math.random()*8-4;
 itemToShake.main.x+=Math.random()*8-4;
 itemToShake.main.y+=Math.random()*8-4;
}


-Original Message-
From: Lehr, Theodore ted_l...@federal.dell.com
Date: Wed, 28 Apr 2010 08:59:05 
To: Flash Coders Listflashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] passing obj name

no - I think because the e at that point is for the timer


From: flashcoders-boun...@chattyfig.figleaf.com 
[flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Eric E. Dolecki 
[edole...@gmail.com]
Sent: Wednesday, April 28, 2010 8:49 AM
To: Flash Coders List
Subject: Re: [Flashcoders] passing obj name

function shakeBtn(e:Event):void {
 e.target.main.rotation+=Math.random()*8-4;

I think that should work


On Wed, Apr 28, 2010 at 8:36 AM, Lehr, Theodore
ted_l...@federal.dell.comwrote:

 so I have:
 flower.addEventListener(MouseEvent.ROLL_OVER,jiggle);

 function jiggle(e:Event):void
 {
 var timer:Timer=new Timer(2,100);
 timer.addEventListener(TimerEvent.TIMER,shakeBtn);
 timer.start();
 }

 function shakeBtn(e:Event)
 {
 flower.main.rotation+=Math.random()*8-4;
 flower.main.x+=Math.random()*8-4;
 flower.main.y+=Math.random()*8-4;
 }

 How can I pass mc name (flower) down to shakeBtn so that I can reuse the
 function
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




--
http://ericd.net
Interactive design and development
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] passing obj name

2010-04-28 Thread Keith Reinfeld
 100 

There's a whole lotta shakin' goin' on...

Regards,

Keith Reinfeld
Home Page: http://keithreinfeld.home.comcast.net



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] passing obj name

2010-04-28 Thread Eric E. Dolecki
Oops - I didn't truly read the email - my apologies. Storing the target is
probably a decent way to go.

On Wed, Apr 28, 2010 at 9:33 AM, Nathan Mynarcik nat...@mynarcik.comwrote:

 Create a variable to store the item to shake:

 var itemToShake:MovieClip;

 flower.addEventListener(MouseEvent.ROLL_OVER,jiggle);

 function jiggle(e:Event):void
 {

  var timer:Timer=new Timer(2,100);
 timer.addEventListener(TimerEvent.TIMER,shakeBtn);
 timer.start();
 itemToShake = e.currentTarget;
 }

 function shakeBtn(e:Event)
 {
 itemToShake.main.rotation+=Math.random()*8-4;
 itemToShake.main.x+=Math.random()*8-4;
 itemToShake.main.y+=Math.random()*8-4;
 }


 -Original Message-
 From: Lehr, Theodore ted_l...@federal.dell.com
 Date: Wed, 28 Apr 2010 08:59:05
 To: Flash Coders Listflashcoders@chattyfig.figleaf.com
 Subject: RE: [Flashcoders] passing obj name

 no - I think because the e at that point is for the timer

 
 From: flashcoders-boun...@chattyfig.figleaf.com [
 flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Eric E. Dolecki [
 edole...@gmail.com]
 Sent: Wednesday, April 28, 2010 8:49 AM
 To: Flash Coders List
 Subject: Re: [Flashcoders] passing obj name

 function shakeBtn(e:Event):void {
 e.target.main.rotation+=Math.random()*8-4;

 I think that should work


 On Wed, Apr 28, 2010 at 8:36 AM, Lehr, Theodore
 ted_l...@federal.dell.comwrote:

  so I have:
  flower.addEventListener(MouseEvent.ROLL_OVER,jiggle);
 
  function jiggle(e:Event):void
  {
  var timer:Timer=new Timer(2,100);
  timer.addEventListener(TimerEvent.TIMER,shakeBtn);
  timer.start();
  }
 
  function shakeBtn(e:Event)
  {
  flower.main.rotation+=Math.random()*8-4;
  flower.main.x+=Math.random()*8-4;
  flower.main.y+=Math.random()*8-4;
  }
 
  How can I pass mc name (flower) down to shakeBtn so that I can reuse
 the
  function
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 



 --
 http://ericd.net
 Interactive design and development
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




-- 
http://ericd.net
Interactive design and development
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] passing obj name

2010-04-28 Thread Lehr, Theodore
lol - thanks everyone - good stuff


From: flashcoders-boun...@chattyfig.figleaf.com 
[flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Keith Reinfeld 
[keithreinf...@comcast.net]
Sent: Wednesday, April 28, 2010 9:39 AM
To: nat...@mynarcik.com; 'Flash Coders List'
Subject: RE: [Flashcoders] passing obj name

 100

There's a whole lotta shakin' goin' on...

Regards,

Keith Reinfeld
Home Page: http://keithreinfeld.home.comcast.net



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] arranging

2010-04-28 Thread Lehr, Theodore
If I have mcs that are put on the same layer in the ide - how can I change 
their order (i.e. send to back, bring forward) in as3?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] arranging

2010-04-28 Thread Nathan Mynarcik
addChild(mc) normally brings them to the top. 
--Original Message--
From: Henrik Andersson
Sender: flashcoders-boun...@chattyfig.figleaf.com
To: Flash Coders List
ReplyTo: Flash Coders List
Subject: Re: [Flashcoders] arranging
Sent: Apr 28, 2010 12:13 PM

Lehr, Theodore wrote:
 If I have mcs that are put on the same layer in the ide - how can I change 
 their order (i.e. send to back, bring forward) in as3?

They will still have different indexes on the display list. Just do the 
same old stuff as usual.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] arranging

2010-04-28 Thread Lehr, Theodore
the issue is that these are mcs that are NOT put there in as but in the IDE 
I tried getChildIndex and it says that this is for display objects - not static 
objects... any way to change order with static objects?


From: flashcoders-boun...@chattyfig.figleaf.com 
[flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Nathan Mynarcik 
[nat...@mynarcik.com]
Sent: Wednesday, April 28, 2010 1:33 PM
To: Flash Coders List
Subject: Re: [Flashcoders] arranging

addChild(mc) normally brings them to the top.
--Original Message--
From: Henrik Andersson
Sender: flashcoders-boun...@chattyfig.figleaf.com
To: Flash Coders List
ReplyTo: Flash Coders List
Subject: Re: [Flashcoders] arranging
Sent: Apr 28, 2010 12:13 PM

Lehr, Theodore wrote:
 If I have mcs that are put on the same layer in the ide - how can I change 
 their order (i.e. send to back, bring forward) in as3?

They will still have different indexes on the display list. Just do the
same old stuff as usual.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] arranging

2010-04-28 Thread Henrik Andersson

Lehr, Theodore wrote:

the issue is that these are mcs that are NOT put there in as but in the IDE 
I tried getChildIndex and it says that this is for display objects - not static 
objects... any way to change order with static objects?



If it is visible, it is on the displaylist.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] arranging

2010-04-28 Thread Nathan Mynarcik
Will getChildIndex and setChildIndex not work either for static objects?


-Original Message-
From: Lehr, Theodore ted_l...@federal.dell.com
Date: Wed, 28 Apr 2010 13:38:39 
To: Flash Coders Listflashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] arranging

the issue is that these are mcs that are NOT put there in as but in the IDE 
I tried getChildIndex and it says that this is for display objects - not static 
objects... any way to change order with static objects?


From: flashcoders-boun...@chattyfig.figleaf.com 
[flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Nathan Mynarcik 
[nat...@mynarcik.com]
Sent: Wednesday, April 28, 2010 1:33 PM
To: Flash Coders List
Subject: Re: [Flashcoders] arranging

addChild(mc) normally brings them to the top.
--Original Message--
From: Henrik Andersson
Sender: flashcoders-boun...@chattyfig.figleaf.com
To: Flash Coders List
ReplyTo: Flash Coders List
Subject: Re: [Flashcoders] arranging
Sent: Apr 28, 2010 12:13 PM

Lehr, Theodore wrote:
 If I have mcs that are put on the same layer in the ide - how can I change 
 their order (i.e. send to back, bring forward) in as3?

They will still have different indexes on the display list. Just do the
same old stuff as usual.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] arranging

2010-04-28 Thread Nathan Mynarcik


This worked with three circles on the stage in the timeline.  All have  
the same eventlistener to them.  Does error if the object is already  
at the top.


Have fun!

function getIndex(e:MouseEvent):void
{
var mc:MovieClip = MovieClip(getChildByName(e.currentTarget.name));
var index:int;
index = getChildIndex(mc);
setChildIndex(mc, index+1);

}

-Nathan


Quoting Nathan Mynarcik nat...@mynarcik.com:


Will getChildIndex and setChildIndex not work either for static objects?


-Original Message-
From: Lehr, Theodore ted_l...@federal.dell.com
Date: Wed, 28 Apr 2010 13:38:39
To: Flash Coders Listflashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] arranging

the issue is that these are mcs that are NOT put there in as but in   
the IDE I tried getChildIndex and it says that this is for   
display objects - not static objects... any way to change order with  
 static objects?



From: flashcoders-boun...@chattyfig.figleaf.com   
[flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Nathan   
Mynarcik [nat...@mynarcik.com]

Sent: Wednesday, April 28, 2010 1:33 PM
To: Flash Coders List
Subject: Re: [Flashcoders] arranging

addChild(mc) normally brings them to the top.
--Original Message--
From: Henrik Andersson
Sender: flashcoders-boun...@chattyfig.figleaf.com
To: Flash Coders List
ReplyTo: Flash Coders List
Subject: Re: [Flashcoders] arranging
Sent: Apr 28, 2010 12:13 PM

Lehr, Theodore wrote:
If I have mcs that are put on the same layer in the ide - how can I  
 change their order (i.e. send to back, bring forward) in as3?


They will still have different indexes on the display list. Just do the
same old stuff as usual.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] arranging

2010-04-28 Thread Lehr, Theodore
ok - so I am trying this:

var curChild=getChildByName(e.currentTarget.name);
var curIndex:int=getChildIndex(curChild);
trace(curIndex);

and it seems as though it is counting from the back up... so if I have 12 mcs, 
then the one no top will trace 12... I would think the one on top would be 
1 I would love to just set it to 1 to make it come to the top and then 
reset it back to it's original number to put it back any thoughts


From: flashcoders-boun...@chattyfig.figleaf.com 
[flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Nathan Mynarcik 
[nat...@mynarcik.com]
Sent: Wednesday, April 28, 2010 1:51 PM
To: Flash Coders List
Subject: Re: [Flashcoders] arranging

Will getChildIndex and setChildIndex not work either for static objects?


-Original Message-
From: Lehr, Theodore ted_l...@federal.dell.com
Date: Wed, 28 Apr 2010 13:38:39
To: Flash Coders Listflashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] arranging

the issue is that these are mcs that are NOT put there in as but in the IDE 
I tried getChildIndex and it says that this is for display objects - not static 
objects... any way to change order with static objects?


From: flashcoders-boun...@chattyfig.figleaf.com 
[flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Nathan Mynarcik 
[nat...@mynarcik.com]
Sent: Wednesday, April 28, 2010 1:33 PM
To: Flash Coders List
Subject: Re: [Flashcoders] arranging

addChild(mc) normally brings them to the top.
--Original Message--
From: Henrik Andersson
Sender: flashcoders-boun...@chattyfig.figleaf.com
To: Flash Coders List
ReplyTo: Flash Coders List
Subject: Re: [Flashcoders] arranging
Sent: Apr 28, 2010 12:13 PM

Lehr, Theodore wrote:
 If I have mcs that are put on the same layer in the ide - how can I change 
 their order (i.e. send to back, bring forward) in as3?

They will still have different indexes on the display list. Just do the
same old stuff as usual.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] arranging

2010-04-28 Thread Nathan Mynarcik
Yup! Get the display list numChildren and subtract 1 from it. That's the number 
you want to set as the new index. 


-Original Message-
From: Lehr, Theodore ted_l...@federal.dell.com
Date: Wed, 28 Apr 2010 14:04:51 
To: nat...@mynarcik.comnat...@mynarcik.com; Flash Coders 
Listflashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] arranging

ok - so I am trying this:

var curChild=getChildByName(e.currentTarget.name);
var curIndex:int=getChildIndex(curChild);
trace(curIndex);

and it seems as though it is counting from the back up... so if I have 12 mcs, 
then the one no top will trace 12... I would think the one on top would be 
1 I would love to just set it to 1 to make it come to the top and then 
reset it back to it's original number to put it back any thoughts


From: flashcoders-boun...@chattyfig.figleaf.com 
[flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Nathan Mynarcik 
[nat...@mynarcik.com]
Sent: Wednesday, April 28, 2010 1:51 PM
To: Flash Coders List
Subject: Re: [Flashcoders] arranging

Will getChildIndex and setChildIndex not work either for static objects?


-Original Message-
From: Lehr, Theodore ted_l...@federal.dell.com
Date: Wed, 28 Apr 2010 13:38:39
To: Flash Coders Listflashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] arranging

the issue is that these are mcs that are NOT put there in as but in the IDE 
I tried getChildIndex and it says that this is for display objects - not static 
objects... any way to change order with static objects?


From: flashcoders-boun...@chattyfig.figleaf.com 
[flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Nathan Mynarcik 
[nat...@mynarcik.com]
Sent: Wednesday, April 28, 2010 1:33 PM
To: Flash Coders List
Subject: Re: [Flashcoders] arranging

addChild(mc) normally brings them to the top.
--Original Message--
From: Henrik Andersson
Sender: flashcoders-boun...@chattyfig.figleaf.com
To: Flash Coders List
ReplyTo: Flash Coders List
Subject: Re: [Flashcoders] arranging
Sent: Apr 28, 2010 12:13 PM

Lehr, Theodore wrote:
 If I have mcs that are put on the same layer in the ide - how can I change 
 their order (i.e. send to back, bring forward) in as3?

They will still have different indexes on the display list. Just do the
same old stuff as usual.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] arranging

2010-04-28 Thread Lehr, Theodore
great! thanks...


From: flashcoders-boun...@chattyfig.figleaf.com 
[flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Nathan Mynarcik 
[nat...@mynarcik.com]
Sent: Wednesday, April 28, 2010 12:30 PM
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] arranging

This worked with three circles on the stage in the timeline.  All have
the same eventlistener to them.  Does error if the object is already
at the top.

Have fun!

function getIndex(e:MouseEvent):void
{
var mc:MovieClip = MovieClip(getChildByName(e.currentTarget.name));
var index:int;
index = getChildIndex(mc);
setChildIndex(mc, index+1);

}

-Nathan


Quoting Nathan Mynarcik nat...@mynarcik.com:

 Will getChildIndex and setChildIndex not work either for static objects?


 -Original Message-
 From: Lehr, Theodore ted_l...@federal.dell.com
 Date: Wed, 28 Apr 2010 13:38:39
 To: Flash Coders Listflashcoders@chattyfig.figleaf.com
 Subject: RE: [Flashcoders] arranging

 the issue is that these are mcs that are NOT put there in as but in
 the IDE I tried getChildIndex and it says that this is for
 display objects - not static objects... any way to change order with
  static objects?

 
 From: flashcoders-boun...@chattyfig.figleaf.com
 [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Nathan
 Mynarcik [nat...@mynarcik.com]
 Sent: Wednesday, April 28, 2010 1:33 PM
 To: Flash Coders List
 Subject: Re: [Flashcoders] arranging

 addChild(mc) normally brings them to the top.
 --Original Message--
 From: Henrik Andersson
 Sender: flashcoders-boun...@chattyfig.figleaf.com
 To: Flash Coders List
 ReplyTo: Flash Coders List
 Subject: Re: [Flashcoders] arranging
 Sent: Apr 28, 2010 12:13 PM

 Lehr, Theodore wrote:
 If I have mcs that are put on the same layer in the ide - how can I
  change their order (i.e. send to back, bring forward) in as3?

 They will still have different indexes on the display list. Just do the
 same old stuff as usual.
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] arranging

2010-04-28 Thread Juan Pablo Califano
The display list is managed as a stack. New items go on top when you add
them by default. So the first item you added will have index 0. If you
addChild() again, the new child will be at index 1.

If you want to get the topmost child, you can do:

container.getChildAt(container.numChildren - 1);

Cheers
Juan Pablo Califano
2010/4/28 Lehr, Theodore ted_l...@federal.dell.com

 ok - so I am trying this:

 var curChild=getChildByName(e.currentTarget.namehttp://e.currenttarget.name/
 );
 var curIndex:int=getChildIndex(curChild);
 trace(curIndex);

 and it seems as though it is counting from the back up... so if I have 12
 mcs, then the one no top will trace 12... I would think the one on top would
 be 1 I would love to just set it to 1 to make it come to the top and
 then reset it back to it's original number to put it back any
 thoughts

 
 From: flashcoders-boun...@chattyfig.figleaf.com [
 flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Nathan Mynarcik [
 nat...@mynarcik.com]
 Sent: Wednesday, April 28, 2010 1:51 PM
  To: Flash Coders List
 Subject: Re: [Flashcoders] arranging

 Will getChildIndex and setChildIndex not work either for static objects?


 -Original Message-
 From: Lehr, Theodore ted_l...@federal.dell.com
 Date: Wed, 28 Apr 2010 13:38:39
 To: Flash Coders Listflashcoders@chattyfig.figleaf.com
 Subject: RE: [Flashcoders] arranging

 the issue is that these are mcs that are NOT put there in as but in the
 IDE I tried getChildIndex and it says that this is for display objects -
 not static objects... any way to change order with static objects?

 
 From: flashcoders-boun...@chattyfig.figleaf.com [
 flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Nathan Mynarcik [
 nat...@mynarcik.com]
 Sent: Wednesday, April 28, 2010 1:33 PM
 To: Flash Coders List
 Subject: Re: [Flashcoders] arranging

 addChild(mc) normally brings them to the top.
 --Original Message--
 From: Henrik Andersson
 Sender: flashcoders-boun...@chattyfig.figleaf.com
 To: Flash Coders List
 ReplyTo: Flash Coders List
 Subject: Re: [Flashcoders] arranging
 Sent: Apr 28, 2010 12:13 PM

 Lehr, Theodore wrote:
  If I have mcs that are put on the same layer in the ide - how can I
 change their order (i.e. send to back, bring forward) in as3?

 They will still have different indexes on the display list. Just do the
 same old stuff as usual.
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] arranging

2010-04-28 Thread Hans Wichman
they're being stacked, first one is zero, second is 1, so the top one has
the highest depth.
addChild (getChildAt(0)); brings bottom one to top, just tried it in the
IDE, works like a charm.

On Wed, Apr 28, 2010 at 8:04 PM, Lehr, Theodore
ted_l...@federal.dell.comwrote:

 ok - so I am trying this:

 var curChild=getChildByName(e.currentTarget.namehttp://e.currenttarget.name/
 );
 var curIndex:int=getChildIndex(curChild);
 trace(curIndex);

 and it seems as though it is counting from the back up... so if I have 12
 mcs, then the one no top will trace 12... I would think the one on top would
 be 1 I would love to just set it to 1 to make it come to the top and
 then reset it back to it's original number to put it back any
 thoughts

 
 From: flashcoders-boun...@chattyfig.figleaf.com [
 flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Nathan Mynarcik [
 nat...@mynarcik.com]
 Sent: Wednesday, April 28, 2010 1:51 PM
  To: Flash Coders List
 Subject: Re: [Flashcoders] arranging

 Will getChildIndex and setChildIndex not work either for static objects?


 -Original Message-
 From: Lehr, Theodore ted_l...@federal.dell.com
 Date: Wed, 28 Apr 2010 13:38:39
 To: Flash Coders Listflashcoders@chattyfig.figleaf.com
 Subject: RE: [Flashcoders] arranging

 the issue is that these are mcs that are NOT put there in as but in the
 IDE I tried getChildIndex and it says that this is for display objects -
 not static objects... any way to change order with static objects?

 
 From: flashcoders-boun...@chattyfig.figleaf.com [
 flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Nathan Mynarcik [
 nat...@mynarcik.com]
 Sent: Wednesday, April 28, 2010 1:33 PM
 To: Flash Coders List
 Subject: Re: [Flashcoders] arranging

 addChild(mc) normally brings them to the top.
 --Original Message--
 From: Henrik Andersson
 Sender: flashcoders-boun...@chattyfig.figleaf.com
 To: Flash Coders List
 ReplyTo: Flash Coders List
 Subject: Re: [Flashcoders] arranging
 Sent: Apr 28, 2010 12:13 PM

 Lehr, Theodore wrote:
  If I have mcs that are put on the same layer in the ide - how can I
 change their order (i.e. send to back, bring forward) in as3?

 They will still have different indexes on the display list. Just do the
 same old stuff as usual.
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] arranging

2010-04-28 Thread Lehr, Theodore
ok - but what would container be for stuff just placed on the stage in the 
IDE??


From: flashcoders-boun...@chattyfig.figleaf.com 
[flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Juan Pablo Califano 
[califa010.flashcod...@gmail.com]
Sent: Wednesday, April 28, 2010 2:17 PM
To: Flash Coders List
Subject: Re: [Flashcoders] arranging

The display list is managed as a stack. New items go on top when you add
them by default. So the first item you added will have index 0. If you
addChild() again, the new child will be at index 1.

If you want to get the topmost child, you can do:

container.getChildAt(container.numChildren - 1);

Cheers
Juan Pablo Califano
2010/4/28 Lehr, Theodore ted_l...@federal.dell.com

 ok - so I am trying this:

 var curChild=getChildByName(e.currentTarget.namehttp://e.currenttarget.name/
 );
 var curIndex:int=getChildIndex(curChild);
 trace(curIndex);

 and it seems as though it is counting from the back up... so if I have 12
 mcs, then the one no top will trace 12... I would think the one on top would
 be 1 I would love to just set it to 1 to make it come to the top and
 then reset it back to it's original number to put it back any
 thoughts

 
 From: flashcoders-boun...@chattyfig.figleaf.com [
 flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Nathan Mynarcik [
 nat...@mynarcik.com]
 Sent: Wednesday, April 28, 2010 1:51 PM
  To: Flash Coders List
 Subject: Re: [Flashcoders] arranging

 Will getChildIndex and setChildIndex not work either for static objects?


 -Original Message-
 From: Lehr, Theodore ted_l...@federal.dell.com
 Date: Wed, 28 Apr 2010 13:38:39
 To: Flash Coders Listflashcoders@chattyfig.figleaf.com
 Subject: RE: [Flashcoders] arranging

 the issue is that these are mcs that are NOT put there in as but in the
 IDE I tried getChildIndex and it says that this is for display objects -
 not static objects... any way to change order with static objects?

 
 From: flashcoders-boun...@chattyfig.figleaf.com [
 flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Nathan Mynarcik [
 nat...@mynarcik.com]
 Sent: Wednesday, April 28, 2010 1:33 PM
 To: Flash Coders List
 Subject: Re: [Flashcoders] arranging

 addChild(mc) normally brings them to the top.
 --Original Message--
 From: Henrik Andersson
 Sender: flashcoders-boun...@chattyfig.figleaf.com
 To: Flash Coders List
 ReplyTo: Flash Coders List
 Subject: Re: [Flashcoders] arranging
 Sent: Apr 28, 2010 12:13 PM

 Lehr, Theodore wrote:
  If I have mcs that are put on the same layer in the ide - how can I
 change their order (i.e. send to back, bring forward) in as3?

 They will still have different indexes on the display list. Just do the
 same old stuff as usual.
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] arranging

2010-04-28 Thread Henrik Andersson

Lehr, Theodore wrote:

ok - but what would container be for stuff just placed on the stage in the 
IDE??



The main timeline instance of course. It even has the class name 
MainTimeline unless you set an explicit document class.

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] arranging

2010-04-28 Thread Nathan Mynarcik
stage
-Original Message-
From: Lehr, Theodore ted_l...@federal.dell.com
Date: Wed, 28 Apr 2010 15:28:38 
To: Flash Coders Listflashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] arranging

ok - but what would container be for stuff just placed on the stage in the 
IDE??


From: flashcoders-boun...@chattyfig.figleaf.com 
[flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Juan Pablo Califano 
[califa010.flashcod...@gmail.com]
Sent: Wednesday, April 28, 2010 2:17 PM
To: Flash Coders List
Subject: Re: [Flashcoders] arranging

The display list is managed as a stack. New items go on top when you add
them by default. So the first item you added will have index 0. If you
addChild() again, the new child will be at index 1.

If you want to get the topmost child, you can do:

container.getChildAt(container.numChildren - 1);

Cheers
Juan Pablo Califano
2010/4/28 Lehr, Theodore ted_l...@federal.dell.com

 ok - so I am trying this:

 var curChild=getChildByName(e.currentTarget.namehttp://e.currenttarget.name/
 );
 var curIndex:int=getChildIndex(curChild);
 trace(curIndex);

 and it seems as though it is counting from the back up... so if I have 12
 mcs, then the one no top will trace 12... I would think the one on top would
 be 1 I would love to just set it to 1 to make it come to the top and
 then reset it back to it's original number to put it back any
 thoughts

 
 From: flashcoders-boun...@chattyfig.figleaf.com [
 flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Nathan Mynarcik [
 nat...@mynarcik.com]
 Sent: Wednesday, April 28, 2010 1:51 PM
  To: Flash Coders List
 Subject: Re: [Flashcoders] arranging

 Will getChildIndex and setChildIndex not work either for static objects?


 -Original Message-
 From: Lehr, Theodore ted_l...@federal.dell.com
 Date: Wed, 28 Apr 2010 13:38:39
 To: Flash Coders Listflashcoders@chattyfig.figleaf.com
 Subject: RE: [Flashcoders] arranging

 the issue is that these are mcs that are NOT put there in as but in the
 IDE I tried getChildIndex and it says that this is for display objects -
 not static objects... any way to change order with static objects?

 
 From: flashcoders-boun...@chattyfig.figleaf.com [
 flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Nathan Mynarcik [
 nat...@mynarcik.com]
 Sent: Wednesday, April 28, 2010 1:33 PM
 To: Flash Coders List
 Subject: Re: [Flashcoders] arranging

 addChild(mc) normally brings them to the top.
 --Original Message--
 From: Henrik Andersson
 Sender: flashcoders-boun...@chattyfig.figleaf.com
 To: Flash Coders List
 ReplyTo: Flash Coders List
 Subject: Re: [Flashcoders] arranging
 Sent: Apr 28, 2010 12:13 PM

 Lehr, Theodore wrote:
  If I have mcs that are put on the same layer in the ide - how can I
 change their order (i.e. send to back, bring forward) in as3?

 They will still have different indexes on the display list. Just do the
 same old stuff as usual.
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] arranging

2010-04-28 Thread Henrik Andersson

Nathan Mynarcik wrote:

stage


stage!=root as I always say.
The stage has only one object by default, the main timeline.

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] arranging

2010-04-28 Thread jonathan howe
This is also the part of the program where we discourage explicit references
to root, as it will break if the swf is ever loaded by another swf, etc.
etc.

On Wed, Apr 28, 2010 at 3:52 PM, Henrik Andersson he...@henke37.cjb.netwrote:

 Nathan Mynarcik wrote:

 stage


 stage!=root as I always say.
 The stage has only one object by default, the main timeline.

 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




-- 
-jonathan howe
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] arranging

2010-04-28 Thread Henrik Andersson

jonathan howe wrote:

This is also the part of the program where we discourage explicit references
to root, as it will break if the swf is ever loaded by another swf, etc.
etc.



Except that it wont. Root is always the main timeline of the swf file 
the code comes from. It is not always the first swf file. AS 3 acts like 
as 2 did with lockroot enabled.

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] gapless looping of external mp3's

2010-04-28 Thread Jim Andrews

I'm new to the list.

Does anyone have experience with gapless looping of external mp3's in Flash? 
I'm having probs with it.


I read http://www.compuphase.com/mp3/mp3loops.htm . There's even a section 
in there about gapless looping in Flash.


But I'm not sure how old that page is and if there are better methods now 
than what's described there.


I have done some previous work with gapless looping, but it was all in 
Director, such as at http://vispo.com/nio and http://vispo.com/jig/arteroids 
. I'm just learning ActionScript now.


ja 


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders