Skip to main content
Participant
December 8, 2007
Question

Loading external Images in MovieClips

  • December 8, 2007
  • 1 reply
  • 468 views
Dear All,

I am trying to load the external images in Dynamically created Movie Clips.

Can you please help me out from this.

I am trying something like this:


Container_mc.image_mc ( I want to load the Images inside the imag_mc clip)

Regards,
Sridhar B
Container_mc.image_mc imag_mc
This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
December 8, 2007
you load the images using the loader class. in as3, you do not load into a target movieclip.

however, if you want to add a child object (like your image) to a movieclip, you can use the addChild() method of displayobjectcontainers.
sribAuthor
Participant
December 8, 2007
Hi,

Following is my problem:

I am trying to trace the "idValue" property on runtime but it is showing error. Can you please tellme how add Images and properties runtime.



var loader:Loader = new Loader()
addChild(loader)
loader.load(new URLRequest("images/01.png"))

// Assigning a value to idValue property
mc_mainSWF.idValue = 40

mc_mainSWF.addChild(loader)
mc_mainSWF.addEventListener(MouseEvent.CLICK, checkID)

function checkID(event:MouseEvent)
{

// And i am geeting error here
trace(event.target.idValue)

}


Regards,
Sridhar B
kglad
Community Expert
Community Expert
December 8, 2007
if mc_mainSWF is a movieclip, type it in checkID: