Welcome!

Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Adobe AIR Development

Reply
Developer
shawnblais
Posts: 410
Registered: ‎10-25-2010

Re: How can I make a sleep() function work in Actionscript on the simulator

[ Edited ]

import com.gskinner.GTween. :smileywink: Again BB SDK is not a special version of AIR, it is simply AIR 2.5 which runs the standard Flash runtime. QNX has added a few pure AS3 components, that's about it.

Forget about the mx transition **bleep**, they are just proxies for a true tween engine. You can tween any property of any display object..anything on the stage, flex or not, is just a display object at heart.

Please use plain text.
Developer
jtegen
Posts: 6,234
Registered: ‎10-27-2010
My Carrier: AT&T

Re: How can I make a sleep() function work in Actionscript on the simulator

Thanks, I will give the 3rd party library a shot since effects are natively supported yet.

(http://gskinner.com/libraries/gtween/).

 

Not all of 2.5 is supported in the BB SDK.  Maybe just the flash.* namespace, but not all components in the spark.* or mx.* namespace are supported.  For example, spark.components.Button, will not compile, you have to use the qnx button control.

 

 

Please use plain text.
Developer
shawnblais
Posts: 410
Registered: ‎10-25-2010

Re: How can I make a sleep() function work in Actionscript on the simulator

Spark button compiles fine over here using command line...

 

To answer the original question, Flash is not multithreaded so it can't emulate those Java API's, but you can use setTimeout(), setInterval() or Timer API's to do what you need.

 

Also, most tween libraries support a delay timer, so it might be easiest to just create all your animations at one, setting the delay's progressivley.

 

 

 

 

Please use plain text.