I have a openspace map who's background movieclip has got different frames (each with different bg's),
At first i have first frame bg, but how to change it to 2nd or other on button click???
Thanx...
Code: Select all
var bgParts:Array2 = openSpace.getBackgroundParts();
for (var r:int = 0; r < bgParts.height; r++)
{
for (var c:int = 0; c < bgParts.width; c++)
{
var part:DisplayObject = bgParts.get(c, r) as DisplayObject
if (part != null)
{
// YOUR CODE TO CHANGE THE DisplayObject FRAME (CHECK THE AS3 DOCUMENTATION)
}
}
}