Quick Tip
Problem with Flash Player 9.0.28 or below?
Tuesday, May 5th, 2009 | Actionscript 3, Quick Tip | No Comments
Try adding this little line in your document class constructor to create the ADDED_TO_STAGE constant as this was not present in players 9.0.28 or below.
Bit of a hair puller this one.
if (Event.ADDED_TO_STAGE == null)
{
Event["ADDED_TO_STAGE"] = “addedToStage”;
}
Quick Tip: AS3 Function parameters…..
Tuesday, September 2nd, 2008 | Actionscript 3, Quick Tip | No Comments
In old AS1 / AS2 you could get away with not passing all the parameters to a function, AS3 on the other hand has none of it.
But what you can do is asssign default values for each parameter so you don’t need to pass a value it.
i.e.
function hideObject(child:DisplayObject,fadeOut:Boolean=false):void
{
if(fadeOut)
{
//fadeout Tweener code
} else {
child.visible = false;
};
}
hideObject(target);//would instantly hide target
hideObject(target , true);//would override default value and so fade
Search
Recent Posts
Categories
@AdenForshaw
- On the train back from london, sat next to a portly chap wearing double denim rocking a pungent aroma of Eu de sweaty man. #BadTimes
- Presenting new @Coull Affiliator in #Cocoon lounge bar Picadilly. Only snag is it's soft drinks only... torture!
- The old boys rockin it hard over at the #OldDuke http://twitpic.com/1mrsn2
- Strong set from #GazBrookfield over at Mr Wolfs, shame about the cider selection.
- Doing the pub quiz over at #theorchard , the questions are pretty hardcore tonight http://twitpic.com/1l1uf1