Guys,
Need your urgent help in cracking this quiz:
1. Q.
For a default DisplayObjectContainer with a width of 240 pixels and height of 180 pixels, how would you position a default DisplayObject with a width of 54 pixels and height of 78 pixels within the center of the container? What would the new x/y coordinates of the DisplayObject be?
2. Q.
With the following XML, what would the syntax of the trace() statement below be to produce a value of 33623232323 ?
var _val:String = "foobar";
var _xml:XML = <clouds>
<cumulous><elevation key="336">Cumulous</elevation></cumulous>
<cirrus key="23232323"><elevation key={_val}>Cirrus</elevation></cirrus>
<nimbus><elevation key={_val}>Nimbus</elevation></nimbus>
</clouds>
trace(?????);
3. Q.
Whats the fastest method to remove a DisplayObject from a DisplayObjectContainer if all you know is that the child DisplayObject name is "firetruckAsset"?
4. Q.
What would be a few good ways to unit-test the previous operation?
5. Q.
In the context below, flag the 'foo' object available for ASVM Garbage Collection.
var foo

isplayObjectContainer = new Sprite();
var bar:MovieClip = MovieClip( foo );
foo.addEventListener( new Event( Event.CHANGE, this.onChange, false, 0, true ) );
6. Q.
How would you go about finding the index of "myjelly" in this scenario?
var myjelly:*= { key:"orange" };
var list:ArrayCollection = new ArrayCollection( "strawberry", "lime", "orange" );
7. Q.
Given the following scenario:
var times_chewed:int;
function chew():void {
}
function swallow():void {
}
If you wanted to chew() and then swallow() a total of 3 times in the prior code using "times_chewed", what is the cleanest approach?
8. Q.
What one of the best ways to reduce the overall byte size of a compiled SWF using MXMLC?
Thanks a ton,
Ari