Question : AS3 MovieClip Properties Question

Hi -

Here's the situation.  I have a movieclip that I want to swap embedded bitmaps within - and I'm not quite sure what the proper procedure is for that.

Here's what I have now...which is pulling the images from the web server.

I don't want to do that.  Instead - I want to use bitmap images which are embedded in the .swf file.

Say the graphics are called "graphic1.gif", "graphic2.gif", "graphic3.gif" within the library.  How would I go about swapping them and what would be the right syntax for that?  

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
var rbg:Object=user.group;
var UserClicked:String = "";

var ldr:Loader = new Loader();
ldr.load(new URLRequest("http://www.sample.com/design1.gif"));

var mc:MovieClip = new MovieClip();
mc.addChild(ldr);
ldr.x = 300;
ldr.y = 100;
this.addChild(ldr);



user.group.addEventListener(MouseEvent.CLICK, checkAnswer);

function checkAnswer(evt:MouseEvent):void {
	UserClicked = String(rbg.selectedData);
	trace(UserClicked);
	ldr.load(new URLRequest("http://www.sample.com/design2.gif"));

}

Answer : AS3 MovieClip Properties Question

Random Solutions  
 
programming4us programming4us