RE: [Flashcoders] movement

2008-04-10 Thread Lehr, Theodore M (N-SGIS)
No - on a PC viewing it in IE



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David
Rogers
Sent: Tuesday, April 08, 2008 4:13 PM
To: Flash Coders List
Subject: Re: [Flashcoders] movement

are you using safari?

On Apr 8, 2008, at 2:41 PM, Lehr, Theodore M (N-SGIS) wrote:

 I have a mc I am moving via AS - it moves at a fine pace in the player
 inside flash - but when I view it via the browser, it really slows
 down... why would this happen?



 ted

 ___
 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] movement

2008-04-10 Thread mario gonzalez

Make sure you set the window mode to opaque OR transparent... not default.
That seems to make a huge difference:

wmode not set:
http://hugo.wddg.com/blogfiles/wmode/wmodedefault.html

wmode set to opaque:
http://hugo.wddg.com/blogfiles/wmode/wmodeopaque.html


Both are using the same swf only difference between the two is the tag 
as you can see in the source.

Hope this helps, cus it sure has helped me a ton.


Mario Gonzalez.


Cory Petosky wrote:

My buddy and I were playing with some performance benchmarks we wrote
(put 100 bitmaps on the screen by manual blits to a backing
BitmapData). We weren't surprised that it ran stably at 120 FPS in the
Flash IDE. We were alarmed to discover, however, that the same SWF ran
at a mere 80 FPS in the Flash standalone player and was just under 60
FPS when viewed in the browser.

Windows XP, Flash CS3 Professional, IE7.

On Tue, Apr 8, 2008 at 3:20 PM, David Rogers [EMAIL PROTECTED] wrote:
  

if you are on a mac, try enabling or disabling rosetta in the info panel of
the application icon

 On Apr 8, 2008, at 2:41 PM, Lehr, Theodore M (N-SGIS) wrote:





I have a mc I am moving via AS - it moves at a fine pace in the player
inside flash - but when I view it via the browser, it really slows
down... why would this happen?



ted

___
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






--
Cory Petosky : Lead Developer : PUNY
1618 Central Ave NE Suite 130
Minneapolis, MN 55413
Office: 612.216.3924
Mobile: 240.422.9652
Fax: 612.605.9216
http://www.punyentertainment.com
___
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] movement

2008-04-10 Thread Lehr, Theodore M (N-SGIS)
You are right - that does seem to make a difference - except I am
noticing that set default it runs fine - it is when I make it
transparent (which I need it to be) it then slows down

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of mario
gonzalez
Sent: Thursday, April 10, 2008 9:30 AM
To: Flash Coders List
Subject: Re: [Flashcoders] movement

Make sure you set the window mode to opaque OR transparent... not
default.
That seems to make a huge difference:

wmode not set:
http://hugo.wddg.com/blogfiles/wmode/wmodedefault.html

wmode set to opaque:
http://hugo.wddg.com/blogfiles/wmode/wmodeopaque.html


Both are using the same swf only difference between the two is the tag 
as you can see in the source.
Hope this helps, cus it sure has helped me a ton.


Mario Gonzalez.


Cory Petosky wrote:
 My buddy and I were playing with some performance benchmarks we wrote
 (put 100 bitmaps on the screen by manual blits to a backing
 BitmapData). We weren't surprised that it ran stably at 120 FPS in the
 Flash IDE. We were alarmed to discover, however, that the same SWF ran
 at a mere 80 FPS in the Flash standalone player and was just under 60
 FPS when viewed in the browser.

 Windows XP, Flash CS3 Professional, IE7.

 On Tue, Apr 8, 2008 at 3:20 PM, David Rogers [EMAIL PROTECTED]
wrote:
   
 if you are on a mac, try enabling or disabling rosetta in the info
panel of
 the application icon

  On Apr 8, 2008, at 2:41 PM, Lehr, Theodore M (N-SGIS) wrote:



 
 I have a mc I am moving via AS - it moves at a fine pace in the
player
 inside flash - but when I view it via the browser, it really slows
 down... why would this happen?



 ted

 ___
 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

 



 --
 Cory Petosky : Lead Developer : PUNY
 1618 Central Ave NE Suite 130
 Minneapolis, MN 55413
 Office: 612.216.3924
 Mobile: 240.422.9652
 Fax: 612.605.9216
 http://www.punyentertainment.com
 ___
 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] movement

2008-04-09 Thread EECOLOR
Why does Flash act the way it does? More information can be found here on
the blog of one of the Flash Player engeneers:

http://www.kaourantin.net/2006/05/frame-rates-in-flash-player.html


Greetz Erik


On 4/8/08, Cory Petosky [EMAIL PROTECTED] wrote:

 My buddy and I were playing with some performance benchmarks we wrote
 (put 100 bitmaps on the screen by manual blits to a backing
 BitmapData). We weren't surprised that it ran stably at 120 FPS in the
 Flash IDE. We were alarmed to discover, however, that the same SWF ran
 at a mere 80 FPS in the Flash standalone player and was just under 60
 FPS when viewed in the browser.

 Windows XP, Flash CS3 Professional, IE7.


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


Re: [Flashcoders] movement

2008-04-08 Thread Jason Van Pelt
Are you on a mac? I've had lots of problems with swfs playing back slowly
on macs, but fine on pcs.

Otherwise, macs just work. ;-)

Jason Van Pelt
Interactive Developer
504.210.1232 (p) / 504.581.2731 (f)
Peter A. Mayer Advertising, Inc.


I have a mc I am moving via AS - it moves at a fine pace in the player
inside flash - but when I view it via the browser, it really slows
down... why would this happen?



ted

___
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] movement

2008-04-08 Thread David Rogers

are you using safari?

On Apr 8, 2008, at 2:41 PM, Lehr, Theodore M (N-SGIS) wrote:


I have a mc I am moving via AS - it moves at a fine pace in the player
inside flash - but when I view it via the browser, it really slows
down... why would this happen?



ted

___
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] movement

2008-04-08 Thread David Rogers
if you are on a mac, try enabling or disabling rosetta in the info  
panel of the application icon

On Apr 8, 2008, at 2:41 PM, Lehr, Theodore M (N-SGIS) wrote:


I have a mc I am moving via AS - it moves at a fine pace in the player
inside flash - but when I view it via the browser, it really slows
down... why would this happen?



ted

___
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] movement

2008-04-08 Thread Cory Petosky
My buddy and I were playing with some performance benchmarks we wrote
(put 100 bitmaps on the screen by manual blits to a backing
BitmapData). We weren't surprised that it ran stably at 120 FPS in the
Flash IDE. We were alarmed to discover, however, that the same SWF ran
at a mere 80 FPS in the Flash standalone player and was just under 60
FPS when viewed in the browser.

Windows XP, Flash CS3 Professional, IE7.

On Tue, Apr 8, 2008 at 3:20 PM, David Rogers [EMAIL PROTECTED] wrote:
 if you are on a mac, try enabling or disabling rosetta in the info panel of
 the application icon

  On Apr 8, 2008, at 2:41 PM, Lehr, Theodore M (N-SGIS) wrote:



  I have a mc I am moving via AS - it moves at a fine pace in the player
  inside flash - but when I view it via the browser, it really slows
  down... why would this happen?
 
 
 
  ted
 
  ___
  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




-- 
Cory Petosky : Lead Developer : PUNY
1618 Central Ave NE Suite 130
Minneapolis, MN 55413
Office: 612.216.3924
Mobile: 240.422.9652
Fax: 612.605.9216
http://www.punyentertainment.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] movement question

2007-01-19 Thread Rost, Andrew
this.onEnterFrame=function():Void
{
if(myClip._rotation != -90){myClip._rotation--};
}

Quick and simple...

Andrew

-Original Message-
From: Gustavo Duenas [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 19, 2007 1:58 PM
To: Flashcoders mailing list
Subject: [Flashcoders] movement question

Hi, I'm not a much a programmer guy. I'm trying to do something, I  
have a movie clip which is rotating --, this is supposed to stop  
when  the rotation is -90, but it seems hard for me to write this.
Anyone of you guys knows a  way to write when this movie clip has  
rotated to -90, and the start a command...


I'll appreciate any help


Gustavo Duenas

___
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] movement question

2007-01-19 Thread Keith Reinfeld
Gustavo, 
 
function rotateMC(mc, increment, targetDegree){ 
mc.onEnterFrame = function(){ 
this._rotation = this._rotation + increment; 
if(this._rotation == targetDegree){ 
delete this.onEnterFrame; 
} 
} 
} 
 
// Clockwise rotation 
rotateMC(someMovieClip, 10, -90); 
 
// Counter-clockwise rotation 
rotateMC(someMovieClip, -10, -90); 
 
HTH 
 
-Keith 
http://keithreinfeld.home.comcast.net
 


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gustavo
Duenas
Sent: Friday, January 19, 2007 1:58 PM
To: Flashcoders mailing list
Subject: [Flashcoders] movement question

Hi, I'm not a much a programmer guy. I'm trying to do something, I  
have a movie clip which is rotating --, this is supposed to stop  
when  the rotation is -90, but it seems hard for me to write this.
Anyone of you guys knows a  way to write when this movie clip has  
rotated to -90, and the start a command...


I'll appreciate any help


Gustavo Duenas

___
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] movement question

2007-01-19 Thread Gustavo Duenas

thanks guys...you are good.


Gus

On Jan 19, 2007, at 3:24 PM, Rost, Andrew wrote:


this.onEnterFrame=function():Void
{
if(myClip._rotation != -90){myClip._rotation--};
}

Quick and simple...

Andrew

-Original Message-
From: Gustavo Duenas [mailto:[EMAIL PROTECTED]
Sent: Friday, January 19, 2007 1:58 PM
To: Flashcoders mailing list
Subject: [Flashcoders] movement question

Hi, I'm not a much a programmer guy. I'm trying to do something, I
have a movie clip which is rotating --, this is supposed to stop
when  the rotation is -90, but it seems hard for me to write this.
Anyone of you guys knows a  way to write when this movie clip has
rotated to -90, and the start a command...


I'll appreciate any help


Gustavo Duenas

___
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



Gustavo Duenas
Creative Director
LEFT AND RIGHT SOLUTIONS LLC
1225 w. Beaver St. suite 119
Jacksonville, FL 32204
904 . 2650330
www.leftandrightsolutions.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] movement question

2007-01-19 Thread Steven Sacks | BLITZ
Need to clean up that enterFrame once it's finished.  This is about as
compact as it can get.

this.onEnterFrame = function()
{
if (--myClip._rotation == -90) delete this.onEnterFrame;
}

___
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] Movement in an oval shape

2006-08-11 Thread Ravi Marella
The following code worked for me perfectly:





onClipEvent (load) {
speed = 5;
radius = 100;
xcenter = 250;
ycenter = 200;
ellipticalOrbitX = 2;
ellipticalOrbitY = 1;
angle =120;
_root.lineStyle (2);
}
onClipEvent (enterFrame) {
_x = Math.cos (angle * Math.PI / 180) * radius *
ellipticalOrbitX + xcenter;
_y = Math.sin (angle * Math.PI / 180) * radius *
ellipticalOrbitY + ycenter;
_root.lineTo (_x, _y);
angle += speed;
if (angle  359)
{
angle -= 360;
}
}






u can write the same code on the 1st[onClipEvent (load)] and 2nd frames
[onClipEvent (enterFrame)] and write 



gotoandplay(2) 



on 3rd frame...


if u 10 objects then all u hav to do is 



angle=0;
angleShift=360/10;



and in each object,


angle=angle+angleShift;



this will keep the objects at a perfect distance in the orbit...

hope it'll be helpful 4 u...

best regards
RaviKiran Marella



 


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Rutul
Patel
Sent: Thursday, August 10, 2006 9:01 PM
To: Flashcoders mailing list
Subject: [Flashcoders] need help in drawing arrow

Hi people,
anybody know how to write AS of drawing arrow.
if anybody has can anybody tell me how?.
thanks
Rutul Patel
___
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

best regards
RaviKiran Marella



 


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Andy
Stone
Sent: Thursday, August 10, 2006 7:04 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Movement in an oval shape


You can fake in with _xscale/_yscale changes...

var inc = 3;

_root.onEnterFrame = function() {
vStar_Object._x =
(Math.cos((vStar_Object.circlePos/180)*Math.PI))*160+vStar_Object.center
X;
vStar_Object._y =
(Math.sin((vStar_Object.circlePos/180)*Math.PI))*160+vStar_Object.center
Y;
vStar_Object.circlePos =
vStar_Object.circlePos+vStar_Object.speed;
//
if (vStar_Object.circlePos180) {
vStar_Object._xscale -= inc;
vStar_Object._yscale = vStar_Object._xscale;
} else {
vStar_Object._xscale += inc;
vStar_Object._yscale = vStar_Object._xscale;
}
if (vStar_Object.circlePos == 360) {
vStar_Object.circlePos = 0;
}
if (vStar_Object._alpha100) {
vStar_Object._alpha += 1;
}
};


-Andy

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul
Steven
Sent: Thursday, August 10, 2006 9:06 AM
To: 'Flashcoders mailing list'
Subject: [Flashcoders] Movement in an oval shape

I have written some code to move some stars in a circle.

This is a snippet of the code:

vStar_Object._x = (Math.cos((vStar_Object.circlePos/180)*Math.PI))*160 +
vStar_Object.centerX;
vStar_Object._y =
(Math.sin((vStar_Object.circlePos/180)*Math.PI))*160 +
vStar_Object.centerY;


vStar_Object.circlePos =
vStar_Object.circlePos + vStar_Object.speed;


if (vStar_Object.circlePos == 360) {
vStar_Object.circlePos = 0;
}

if (vStar_Object._alpha  100) {
vStar_Object._alpha +=1;
}

This seems to work just fine.

Anyway I need to change this so they move in an oval shape (like an egg
on
its side)

Not being a mathematics expert I wondered if anyone can suggest how I
can
amend my code to do so.

Thanks

Paul

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

RE: [Flashcoders] Movement in an oval shape

2006-08-11 Thread Paul Steven
Thanks Ravi and others - that is very helpful indeed.

Cheers

Paul

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ravi Marella
Sent: 11 August 2006 07:08
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Movement in an oval shape

The following code worked for me perfectly:





onClipEvent (load) {
speed = 5;
radius = 100;
xcenter = 250;
ycenter = 200;
ellipticalOrbitX = 2;
ellipticalOrbitY = 1;
angle =120;
_root.lineStyle (2);
}
onClipEvent (enterFrame) {
_x = Math.cos (angle * Math.PI / 180) * radius *
ellipticalOrbitX + xcenter;
_y = Math.sin (angle * Math.PI / 180) * radius *
ellipticalOrbitY + ycenter;
_root.lineTo (_x, _y);
angle += speed;
if (angle  359)
{
angle -= 360;
}
}






u can write the same code on the 1st[onClipEvent (load)] and 2nd frames
[onClipEvent (enterFrame)] and write 



gotoandplay(2) 



on 3rd frame...


if u 10 objects then all u hav to do is 



angle=0;
angleShift=360/10;



and in each object,


angle=angle+angleShift;



this will keep the objects at a perfect distance in the orbit...

hope it'll be helpful 4 u...

best regards
RaviKiran Marella



 


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Rutul
Patel
Sent: Thursday, August 10, 2006 9:01 PM
To: Flashcoders mailing list
Subject: [Flashcoders] need help in drawing arrow

Hi people,
anybody know how to write AS of drawing arrow.
if anybody has can anybody tell me how?.
thanks
Rutul Patel
___
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

best regards
RaviKiran Marella



 


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Andy
Stone
Sent: Thursday, August 10, 2006 7:04 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Movement in an oval shape


You can fake in with _xscale/_yscale changes...

var inc = 3;

_root.onEnterFrame = function() {
vStar_Object._x =
(Math.cos((vStar_Object.circlePos/180)*Math.PI))*160+vStar_Object.center
X;
vStar_Object._y =
(Math.sin((vStar_Object.circlePos/180)*Math.PI))*160+vStar_Object.center
Y;
vStar_Object.circlePos =
vStar_Object.circlePos+vStar_Object.speed;
//
if (vStar_Object.circlePos180) {
vStar_Object._xscale -= inc;
vStar_Object._yscale = vStar_Object._xscale;
} else {
vStar_Object._xscale += inc;
vStar_Object._yscale = vStar_Object._xscale;
}
if (vStar_Object.circlePos == 360) {
vStar_Object.circlePos = 0;
}
if (vStar_Object._alpha100) {
vStar_Object._alpha += 1;
}
};


-Andy

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul
Steven
Sent: Thursday, August 10, 2006 9:06 AM
To: 'Flashcoders mailing list'
Subject: [Flashcoders] Movement in an oval shape

I have written some code to move some stars in a circle.

This is a snippet of the code:

vStar_Object._x = (Math.cos((vStar_Object.circlePos/180)*Math.PI))*160 +
vStar_Object.centerX;
vStar_Object._y =
(Math.sin((vStar_Object.circlePos/180)*Math.PI))*160 +
vStar_Object.centerY;


vStar_Object.circlePos =
vStar_Object.circlePos + vStar_Object.speed;


if (vStar_Object.circlePos == 360) {
vStar_Object.circlePos = 0;
}

if (vStar_Object._alpha  100) {
vStar_Object._alpha +=1;
}

This seems to work just fine.

Anyway I need to change this so they move in an oval shape (like an egg
on
its side)

Not being a mathematics

Re: [Flashcoders] Movement in an oval shape

2006-08-10 Thread Jim Berkey
Check out the '3d Carousels' tutorials
http://www.gotoandlearn.com/

jimbo

*** REPLY SEPARATOR  ***

On 8/10/2006 at 2:05 PM Paul Steven wrote:

I have written some code to move some stars in a circle.

This is a snippet of the code:

vStar_Object._x = (Math.cos((vStar_Object.circlePos/180)*Math.PI))*160 +
vStar_Object.centerX;
   vStar_Object._y =
(Math.sin((vStar_Object.circlePos/180)*Math.PI))*160 +
vStar_Object.centerY;


   vStar_Object.circlePos =
vStar_Object.circlePos + vStar_Object.speed;


if (vStar_Object.circlePos == 360) {
   vStar_Object.circlePos = 0;
}

if (vStar_Object._alpha  100) {
   vStar_Object._alpha +=1;
}

This seems to work just fine.

Anyway I need to change this so they move in an oval shape (like an egg on
its side)

Not being a mathematics expert I wondered if anyone can suggest how I can
amend my code to do so.

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] Movement in an oval shape

2006-08-10 Thread Andy Stone

You can fake in with _xscale/_yscale changes...

var inc = 3;

_root.onEnterFrame = function() {
vStar_Object._x =
(Math.cos((vStar_Object.circlePos/180)*Math.PI))*160+vStar_Object.centerX;
vStar_Object._y =
(Math.sin((vStar_Object.circlePos/180)*Math.PI))*160+vStar_Object.centerY;
vStar_Object.circlePos = vStar_Object.circlePos+vStar_Object.speed;
//
if (vStar_Object.circlePos180) {
vStar_Object._xscale -= inc;
vStar_Object._yscale = vStar_Object._xscale;
} else {
vStar_Object._xscale += inc;
vStar_Object._yscale = vStar_Object._xscale;
}
if (vStar_Object.circlePos == 360) {
vStar_Object.circlePos = 0;
}
if (vStar_Object._alpha100) {
vStar_Object._alpha += 1;
}
};


-Andy

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul Steven
Sent: Thursday, August 10, 2006 9:06 AM
To: 'Flashcoders mailing list'
Subject: [Flashcoders] Movement in an oval shape

I have written some code to move some stars in a circle.

This is a snippet of the code:

vStar_Object._x = (Math.cos((vStar_Object.circlePos/180)*Math.PI))*160 +
vStar_Object.centerX;
vStar_Object._y =
(Math.sin((vStar_Object.circlePos/180)*Math.PI))*160 + vStar_Object.centerY;


vStar_Object.circlePos =
vStar_Object.circlePos + vStar_Object.speed;


if (vStar_Object.circlePos == 360) {
vStar_Object.circlePos = 0;
}

if (vStar_Object._alpha  100) {
vStar_Object._alpha +=1;
}

This seems to work just fine.

Anyway I need to change this so they move in an oval shape (like an egg on
its side)

Not being a mathematics expert I wondered if anyone can suggest how I can
amend my code to do so.

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