Couple of questions here. I am using the tween: easeInOut function to fade an object in in my news rotator as it cycles through the different RSS items. I can get the image fade in, but it doesn’t seem to want to fade out. I thought the easeInOut faded objects in AND out. Myabe I’m wrong. My code for that looks like this:
var imageIn:Tween = new Tween(ImageLoader, "alpha", Strong.easeInOut, 0, 1, .5, true);
My second question is, I can’t seem get to get the Text elements to respond to the tween at all. My code for them looks like this:
function timerHandler(e:TimerEvent):void
{
removeChild(ImageLoader);
xmlItem = newsInput.channel.item*;
dstring = xmlItem.pubDate;
ar = dstring.split(" ");
parsedDate = ar[2]+" "+ar[1];
NewsBox.organization.htmlText = xmlItem.organization;
NewsBox.title.htmlText = "<b>"+xmlItem.title+"</b>";
NewsBox.description.addEventListener(TextEvent.LINK, textFieldLinkHandler);
NewsBox.description.htmlText = "<b>"+parsedDate+" - </b>"+xmlItem.description.toString()+"<a href='event:"+xmlItem.link+"'><b> More>> </b></a>";
NewsBox.itemCount.htmlText = (i+1) + " of " + NumItems;
var url:String = xmlItem.image;
var urlRequest:URLRequest = new URLRequest(url);
ImageLoader = new Loader();
ImageLoader.load(urlRequest);
var imageIn:Tween = new Tween(ImageLoader, "alpha", Strong.easeInOut, 0, 1, .5, true);
addChild(ImageLoader);
ImageLoader.x = 10;
ImageLoader.y = 30;
//trace(xmlItem);
if (i < 3)
{i++;}
else {i=0;}
}
The NewsBox.title and NewsBox.description are the objects that I would also like to tween the alpha to have them fade in and out in synch with the imageLoader object. When I try it them same way I did for the imageLoader, it doesn’t respond. Any ideas?
Thanks