03-29-2011 10:08 AM
Have you installed the QNX library (v 0.9.4)?
Those files get installed in the sdks directory in FB.
03-29-2011 10:12 AM
I did and I also added them to the Preferences - FlashBuilder - Installes SDKs. But I still have Hero set as the default. It would not let me create the project otherwise. Do I need to check BlackBerry as default?
Ideally, it would be nice to have an Android compatible app at the same time. i.e. don't use the embedded QNX stuff. I should be able to download one of the 3rd party Tweener libraries shouldn't I? I tried putting them in the libs folder of the project but I can;t seem to access them.
I'm sure I am missing something in terms of libraries in FB.
Thanks
03-29-2011 10:17 AM
Ah, yes, you should be able to include a 3rd party library. You need to add the SWC from the preferences panel for that project (Under Flex Build Path, select "Add SWC..." button).
03-29-2011 11:09 AM
Okay. Got the Tweener loaded so that the commands to not generate errors... But how do I get it to trigger???
I have an image:
<s:Image id="s1" width="150" height="300" source="assets/digit-{secs1}.png"/>
And I change the image every second in the script with:
secs1 = ("0"+currentTime.seconds.toString()).substr(-2,1);
I've added a Tween...
Tweener.addTween(s1, {alpha:100, time:1});But the image is still flipping crudely as before... How do I get the crossfade effect?
Sorry for being so thick.
03-29-2011 11:14 AM
Alpha is between 0.0-1.0. 0=transparent, 1=opaque
03-29-2011 11:35 AM
I think my problem is that the effect is working but not where I want it too. If I set alpha to 0, the first image pops in then fades to 0 and stays there. Maybe I should rewind and restate my problem...
The app is working but the images disapear and the new ones appear rather abruptly.
I need to rotate between arbitrary images and I want a nice transition between them. Like you would in a slide show. 0.png --> 1.png --> 2.png --3.png ... back to 0.png...
How would I accomplish this?
Thanks
03-29-2011 11:47 AM
I dont have the Tweener right in front of me, but it would be something like this:
private var _current_image : int = 0;
private var _images : Array = new Array();
//////////////////////////////////////////////////
private function init() : void
{
// fill image array
// set each image alpha to 0, except for 1st one
this.nextAnimate();
}
//////////////////////////////////////////////////
private function nextAnimate() : void
{
var next_index : int = this._current_image;
if( next_index == this._images.length )
{
next_index = 0;
}
Tweener.addTween( this._images[this._current_image],
{ alpha:0.0, time:1.0, onComplete: nextAnimate } );
Tweener.addTween( this._images[next_index],
{ alpha:1.0, time:2.0, delay:0.5, onComplete: nextAnimate } );
this._current_image = next_index;
}
You will have to play around with the values.