Re: [Flashcoders] AS2 - Code not working in FP10

2008-11-06 Thread Charles Parcell
Is there a live link that shows this and we can test our FP versions on it?

Charles P.


On Thu, Nov 6, 2008 at 5:26 AM, FlashDev [EMAIL PROTECTED] wrote:

 Yeah its just wired how it works in FP9 and not FP10 and I was wondering if
 it was this code or if it could be something else!?
   - Original Message -
  From: sebastian
  To: Flash Coders List
  Sent: Wednesday, November 05, 2008 10:23 PM
  Subject: Re: [Flashcoders] AS2 - Code not working in FP10


  Hi,

  I'm sure someone else can give a reason, cause I wouldn't know; but
  short of that, you could use a tween engine to center it. AS2 has
  several good tween engines available.

  Seb.

  FlashDev wrote:
   Hi guys, ive got a bit fo code that works fine in flash player 9 but in
 10 it completely messes up!
  
   Its suppose to centre an image, any ideas why it no longer works?
  
   center_content.onEnterFrame = function() {
 // CENTER Y
 contentYTarg = Math.round((Stage.height - center_content._height)/2);
 contentYDist = contentYTarg - center_content._y;
 center_content._y += contentYDist/contentEase;
 if (contentYDist  0) {
  center_content._y = Math.ceil(center_content._y);
 }else{
  center_content._y = Math.floor(center_content._y);
 }
 if (Math.abs(contentYDist)  1) {
  center_content._y = contentYTarg;
 }
 // CENTER X
 contentXTarg = Math.round((Stage.width - center_content._width)/2);
 contentXDist = contentXTarg - center_content._x;
 center_content._x += contentXDist/contentEase;
 if (contentXDist  0) {
  center_content._x = Math.ceil(center_content._x);
 }else{
  center_content._x = Math.floor(center_content._x);
 }
 if (Math.abs(contentXDist)  1) {
  center_content._x = contentXTarg;
 }
 // WHEN CENTERING IS COMPLETE...
 if (contentYDist == 0  contentXDist == 0) {
  delete center_content.onEnterFrame
 }
}
   ___
   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] AS2 - Code not working in FP10

2008-11-06 Thread FlashDev
Yeah its just wired how it works in FP9 and not FP10 and I was wondering if it 
was this code or if it could be something else!?
  - Original Message - 
  From: sebastian 
  To: Flash Coders List 
  Sent: Wednesday, November 05, 2008 10:23 PM
  Subject: Re: [Flashcoders] AS2 - Code not working in FP10


  Hi,

  I'm sure someone else can give a reason, cause I wouldn't know; but 
  short of that, you could use a tween engine to center it. AS2 has 
  several good tween engines available.

  Seb.

  FlashDev wrote:
   Hi guys, ive got a bit fo code that works fine in flash player 9 but in 10 
it completely messes up!
   
   Its suppose to centre an image, any ideas why it no longer works?
   
   center_content.onEnterFrame = function() {
 // CENTER Y
 contentYTarg = Math.round((Stage.height - center_content._height)/2);
 contentYDist = contentYTarg - center_content._y;
 center_content._y += contentYDist/contentEase;
 if (contentYDist  0) {
  center_content._y = Math.ceil(center_content._y);
 }else{
  center_content._y = Math.floor(center_content._y);
 }
 if (Math.abs(contentYDist)  1) {
  center_content._y = contentYTarg;
 }
 // CENTER X
 contentXTarg = Math.round((Stage.width - center_content._width)/2);
 contentXDist = contentXTarg - center_content._x;
 center_content._x += contentXDist/contentEase;
 if (contentXDist  0) {
  center_content._x = Math.ceil(center_content._x);
 }else{
  center_content._x = Math.floor(center_content._x);
 }
 if (Math.abs(contentXDist)  1) {
  center_content._x = contentXTarg;
 }
 // WHEN CENTERING IS COMPLETE...
 if (contentYDist == 0  contentXDist == 0) {
  delete center_content.onEnterFrame
 }
}
   ___
   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] AS2 - Code not working in FP10

2008-11-06 Thread FlashDev
yeah view it hear...

www.maryjanefashion.com/index.php 

SJM
  - Original Message - 
  From: Charles Parcell 
  To: Flash Coders List 
  Sent: Thursday, November 06, 2008 2:26 PM
  Subject: Re: [Flashcoders] AS2 - Code not working in FP10


  Is there a live link that shows this and we can test our FP versions on it?

  Charles P.


  On Thu, Nov 6, 2008 at 5:26 AM, FlashDev [EMAIL PROTECTED] wrote:

   Yeah its just wired how it works in FP9 and not FP10 and I was wondering if
   it was this code or if it could be something else!?
 - Original Message -
From: sebastian
To: Flash Coders List
Sent: Wednesday, November 05, 2008 10:23 PM
Subject: Re: [Flashcoders] AS2 - Code not working in FP10
  
  
Hi,
  
I'm sure someone else can give a reason, cause I wouldn't know; but
short of that, you could use a tween engine to center it. AS2 has
several good tween engines available.
  
Seb.
  
FlashDev wrote:
 Hi guys, ive got a bit fo code that works fine in flash player 9 but in
   10 it completely messes up!

 Its suppose to centre an image, any ideas why it no longer works?

 center_content.onEnterFrame = function() {
   // CENTER Y
   contentYTarg = Math.round((Stage.height - center_content._height)/2);
   contentYDist = contentYTarg - center_content._y;
   center_content._y += contentYDist/contentEase;
   if (contentYDist  0) {
center_content._y = Math.ceil(center_content._y);
   }else{
center_content._y = Math.floor(center_content._y);
   }
   if (Math.abs(contentYDist)  1) {
center_content._y = contentYTarg;
   }
   // CENTER X
   contentXTarg = Math.round((Stage.width - center_content._width)/2);
   contentXDist = contentXTarg - center_content._x;
   center_content._x += contentXDist/contentEase;
   if (contentXDist  0) {
center_content._x = Math.ceil(center_content._x);
   }else{
center_content._x = Math.floor(center_content._x);
   }
   if (Math.abs(contentXDist)  1) {
center_content._x = contentXTarg;
   }
   // WHEN CENTERING IS COMPLETE...
   if (contentYDist == 0  contentXDist == 0) {
delete center_content.onEnterFrame
   }
  }
 ___
 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] AS2 - Code not working in FP10

2008-11-06 Thread Eamonn Faherty
Me too!

haha

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Eric E. Dolecki
Sent: 06 November 2008 15:46
To: Flash Coders List
Subject: Re: [Flashcoders] AS2 - Code not working in FP10

I opened that up at work and was presented was some chicks ass pulling jeans
up on it. Someone walking by thought it was humorous.

On Thu, Nov 6, 2008 at 10:26 AM, FlashDev [EMAIL PROTECTED] wrote:

 yeah view it hear...

 www.maryjanefashion.com/index.php

 SJM
   - Original Message -
  From: Charles Parcell
  To: Flash Coders List
   Sent: Thursday, November 06, 2008 2:26 PM
  Subject: Re: [Flashcoders] AS2 - Code not working in FP10


  Is there a live link that shows this and we can test our FP versions on
 it?

  Charles P.


  On Thu, Nov 6, 2008 at 5:26 AM, FlashDev [EMAIL PROTECTED] wrote:

   Yeah its just wired how it works in FP9 and not FP10 and I was wondering
 if
   it was this code or if it could be something else!?
 - Original Message -
From: sebastian
To: Flash Coders List
Sent: Wednesday, November 05, 2008 10:23 PM
Subject: Re: [Flashcoders] AS2 - Code not working in FP10
  
  
Hi,
  
I'm sure someone else can give a reason, cause I wouldn't know; but
short of that, you could use a tween engine to center it. AS2 has
several good tween engines available.
  
Seb.
  
FlashDev wrote:
 Hi guys, ive got a bit fo code that works fine in flash player 9 but
 in
   10 it completely messes up!

 Its suppose to centre an image, any ideas why it no longer works?

 center_content.onEnterFrame = function() {
   // CENTER Y
   contentYTarg = Math.round((Stage.height -
 center_content._height)/2);
   contentYDist = contentYTarg - center_content._y;
   center_content._y += contentYDist/contentEase;
   if (contentYDist  0) {
center_content._y = Math.ceil(center_content._y);
   }else{
center_content._y = Math.floor(center_content._y);
   }
   if (Math.abs(contentYDist)  1) {
center_content._y = contentYTarg;
   }
   // CENTER X
   contentXTarg = Math.round((Stage.width - center_content._width)/2);
   contentXDist = contentXTarg - center_content._x;
   center_content._x += contentXDist/contentEase;
   if (contentXDist  0) {
center_content._x = Math.ceil(center_content._x);
   }else{
center_content._x = Math.floor(center_content._x);
   }
   if (Math.abs(contentXDist)  1) {
center_content._x = contentXTarg;
   }
   // WHEN CENTERING IS COMPLETE...
   if (contentYDist == 0  contentXDist == 0) {
delete center_content.onEnterFrame
   }
  }
 ___
 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




-- 
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] AS2 - Code not working in FP10

2008-11-06 Thread Eric E. Dolecki
I opened that up at work and was presented was some chicks ass pulling jeans
up on it. Someone walking by thought it was humorous.

On Thu, Nov 6, 2008 at 10:26 AM, FlashDev [EMAIL PROTECTED] wrote:

 yeah view it hear...

 www.maryjanefashion.com/index.php

 SJM
   - Original Message -
  From: Charles Parcell
  To: Flash Coders List
   Sent: Thursday, November 06, 2008 2:26 PM
  Subject: Re: [Flashcoders] AS2 - Code not working in FP10


  Is there a live link that shows this and we can test our FP versions on
 it?

  Charles P.


  On Thu, Nov 6, 2008 at 5:26 AM, FlashDev [EMAIL PROTECTED] wrote:

   Yeah its just wired how it works in FP9 and not FP10 and I was wondering
 if
   it was this code or if it could be something else!?
 - Original Message -
From: sebastian
To: Flash Coders List
Sent: Wednesday, November 05, 2008 10:23 PM
Subject: Re: [Flashcoders] AS2 - Code not working in FP10
  
  
Hi,
  
I'm sure someone else can give a reason, cause I wouldn't know; but
short of that, you could use a tween engine to center it. AS2 has
several good tween engines available.
  
Seb.
  
FlashDev wrote:
 Hi guys, ive got a bit fo code that works fine in flash player 9 but
 in
   10 it completely messes up!

 Its suppose to centre an image, any ideas why it no longer works?

 center_content.onEnterFrame = function() {
   // CENTER Y
   contentYTarg = Math.round((Stage.height -
 center_content._height)/2);
   contentYDist = contentYTarg - center_content._y;
   center_content._y += contentYDist/contentEase;
   if (contentYDist  0) {
center_content._y = Math.ceil(center_content._y);
   }else{
center_content._y = Math.floor(center_content._y);
   }
   if (Math.abs(contentYDist)  1) {
center_content._y = contentYTarg;
   }
   // CENTER X
   contentXTarg = Math.round((Stage.width - center_content._width)/2);
   contentXDist = contentXTarg - center_content._x;
   center_content._x += contentXDist/contentEase;
   if (contentXDist  0) {
center_content._x = Math.ceil(center_content._x);
   }else{
center_content._x = Math.floor(center_content._x);
   }
   if (Math.abs(contentXDist)  1) {
center_content._x = contentXTarg;
   }
   // WHEN CENTERING IS COMPLETE...
   if (contentYDist == 0  contentXDist == 0) {
delete center_content.onEnterFrame
   }
  }
 ___
 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




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


Re: [Flashcoders] AS2 - Code not working in FP10

2008-11-06 Thread FlashDev
haha! some how you both managed to get the same random image!

nice ass tho isnt it! :o)
  - Original Message - 
  From: Eamonn Faherty 
  To: Flash Coders List 
  Sent: Thursday, November 06, 2008 3:52 PM
  Subject: RE: [Flashcoders] AS2 - Code not working in FP10


  Me too!

  haha

  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Eric E. Dolecki
  Sent: 06 November 2008 15:46
  To: Flash Coders List
  Subject: Re: [Flashcoders] AS2 - Code not working in FP10

  I opened that up at work and was presented was some chicks ass pulling jeans
  up on it. Someone walking by thought it was humorous.

  On Thu, Nov 6, 2008 at 10:26 AM, FlashDev [EMAIL PROTECTED] wrote:

   yeah view it hear...
  
   www.maryjanefashion.com/index.php
  
   SJM
 - Original Message -
From: Charles Parcell
To: Flash Coders List
 Sent: Thursday, November 06, 2008 2:26 PM
Subject: Re: [Flashcoders] AS2 - Code not working in FP10
  
  
Is there a live link that shows this and we can test our FP versions on
   it?
  
Charles P.
  
  
On Thu, Nov 6, 2008 at 5:26 AM, FlashDev [EMAIL PROTECTED] wrote:
  
 Yeah its just wired how it works in FP9 and not FP10 and I was wondering
   if
 it was this code or if it could be something else!?
   - Original Message -
  From: sebastian
  To: Flash Coders List
  Sent: Wednesday, November 05, 2008 10:23 PM
  Subject: Re: [Flashcoders] AS2 - Code not working in FP10


  Hi,

  I'm sure someone else can give a reason, cause I wouldn't know; but
  short of that, you could use a tween engine to center it. AS2 has
  several good tween engines available.

  Seb.

  FlashDev wrote:
   Hi guys, ive got a bit fo code that works fine in flash player 9 but
   in
 10 it completely messes up!
  
   Its suppose to centre an image, any ideas why it no longer works?
  
   center_content.onEnterFrame = function() {
 // CENTER Y
 contentYTarg = Math.round((Stage.height -
   center_content._height)/2);
 contentYDist = contentYTarg - center_content._y;
 center_content._y += contentYDist/contentEase;
 if (contentYDist  0) {
  center_content._y = Math.ceil(center_content._y);
 }else{
  center_content._y = Math.floor(center_content._y);
 }
 if (Math.abs(contentYDist)  1) {
  center_content._y = contentYTarg;
 }
 // CENTER X
 contentXTarg = Math.round((Stage.width - center_content._width)/2);
 contentXDist = contentXTarg - center_content._x;
 center_content._x += contentXDist/contentEase;
 if (contentXDist  0) {
  center_content._x = Math.ceil(center_content._x);
 }else{
  center_content._x = Math.floor(center_content._x);
 }
 if (Math.abs(contentXDist)  1) {
  center_content._x = contentXTarg;
 }
 // WHEN CENTERING IS COMPLETE...
 if (contentYDist == 0  contentXDist == 0) {
  delete center_content.onEnterFrame
 }
}
   ___
   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
  



  -- 
  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] AS2 - Code not working in FP10

2008-11-06 Thread Paul Andrews

LOL - it took me a few goes..  ;-)

- Original Message - 
From: FlashDev [EMAIL PROTECTED]

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Thursday, November 06, 2008 4:15 PM
Subject: Re: [Flashcoders] AS2 - Code not working in FP10


haha! some how you both managed to get the same random image!

nice ass tho isnt it! :o)
 - Original Message - 
 From: Eamonn Faherty

 To: Flash Coders List
 Sent: Thursday, November 06, 2008 3:52 PM
 Subject: RE: [Flashcoders] AS2 - Code not working in FP10


 Me too!

 haha

 -Original Message-
 From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Eric E. 
Dolecki

 Sent: 06 November 2008 15:46
 To: Flash Coders List
 Subject: Re: [Flashcoders] AS2 - Code not working in FP10

 I opened that up at work and was presented was some chicks ass pulling 
jeans

 up on it. Someone walking by thought it was humorous.

 On Thu, Nov 6, 2008 at 10:26 AM, FlashDev [EMAIL PROTECTED] wrote:

  yeah view it hear...
 
  www.maryjanefashion.com/index.php
 
  SJM
- Original Message -
   From: Charles Parcell
   To: Flash Coders List
Sent: Thursday, November 06, 2008 2:26 PM
   Subject: Re: [Flashcoders] AS2 - Code not working in FP10
 
 
   Is there a live link that shows this and we can test our FP versions on
  it?
 
   Charles P.
 
 
   On Thu, Nov 6, 2008 at 5:26 AM, FlashDev [EMAIL PROTECTED] wrote:
 
Yeah its just wired how it works in FP9 and not FP10 and I was 
wondering

  if
it was this code or if it could be something else!?
  - Original Message -
 From: sebastian
 To: Flash Coders List
 Sent: Wednesday, November 05, 2008 10:23 PM
 Subject: Re: [Flashcoders] AS2 - Code not working in FP10
   
   
 Hi,
   
 I'm sure someone else can give a reason, cause I wouldn't know; but
 short of that, you could use a tween engine to center it. AS2 has
 several good tween engines available.
   
 Seb.
   
 FlashDev wrote:
  Hi guys, ive got a bit fo code that works fine in flash player 9 
but

  in
10 it completely messes up!
 
  Its suppose to centre an image, any ideas why it no longer works?
 
  center_content.onEnterFrame = function() {
// CENTER Y
contentYTarg = Math.round((Stage.height -
  center_content._height)/2);
contentYDist = contentYTarg - center_content._y;
center_content._y += contentYDist/contentEase;
if (contentYDist  0) {
 center_content._y = Math.ceil(center_content._y);
}else{
 center_content._y = Math.floor(center_content._y);
}
if (Math.abs(contentYDist)  1) {
 center_content._y = contentYTarg;
}
// CENTER X
contentXTarg = Math.round((Stage.width - 
center_content._width)/2);

contentXDist = contentXTarg - center_content._x;
center_content._x += contentXDist/contentEase;
if (contentXDist  0) {
 center_content._x = Math.ceil(center_content._x);
}else{
 center_content._x = Math.floor(center_content._x);
}
if (Math.abs(contentXDist)  1) {
 center_content._x = contentXTarg;
}
// WHEN CENTERING IS COMPLETE...
if (contentYDist == 0  contentXDist == 0) {
 delete center_content.onEnterFrame
}
   }
  ___
  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
 



 -- 
 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 


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

Re: [Flashcoders] AS2 - Code not working in FP10

2008-11-05 Thread sebastian

Hi,

I'm sure someone else can give a reason, cause I wouldn't know; but 
short of that, you could use a tween engine to center it. AS2 has 
several good tween engines available.


Seb.

FlashDev wrote:

Hi guys, ive got a bit fo code that works fine in flash player 9 but in 10 it 
completely messes up!

Its suppose to centre an image, any ideas why it no longer works?

center_content.onEnterFrame = function() {
  // CENTER Y
  contentYTarg = Math.round((Stage.height - center_content._height)/2);
  contentYDist = contentYTarg - center_content._y;
  center_content._y += contentYDist/contentEase;
  if (contentYDist  0) {
   center_content._y = Math.ceil(center_content._y);
  }else{
   center_content._y = Math.floor(center_content._y);
  }
  if (Math.abs(contentYDist)  1) {
   center_content._y = contentYTarg;
  }
  // CENTER X
  contentXTarg = Math.round((Stage.width - center_content._width)/2);
  contentXDist = contentXTarg - center_content._x;
  center_content._x += contentXDist/contentEase;
  if (contentXDist  0) {
   center_content._x = Math.ceil(center_content._x);
  }else{
   center_content._x = Math.floor(center_content._x);
  }
  if (Math.abs(contentXDist)  1) {
   center_content._x = contentXTarg;
  }
  // WHEN CENTERING IS COMPLETE...
  if (contentYDist == 0  contentXDist == 0) {
   delete center_content.onEnterFrame
  }
 }
___
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