A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Adding a Child to a Movie Clip and Resizing

Hybrid View

  1. #1
    Junior Member
    Join Date
    Mar 2005
    Posts
    18

    Adding a Child to a Movie Clip and Resizing

    Hey all,

    I am transitioning into AS3 and I'm working a block that I can't quite figure out. I need to add a child (external image) to a movie clip and resize it. This is what I have thus far and it loads the image just fine:

    var imageLoader:Loader = new Loader();
    imageLoader.load(new URLRequest(myOBJ.image));
    productImage_mc.addChild(imageLoader);

    Problem is that I can't seem to resize the added image without it disappearing or just not showing up. Any suggestions on how to resize the added child to 164 x 164 would be much appreciated.

    - MT

  2. #2
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    You need to add an eventlistener
    imageLoader.contentLoaderInfo.addEventListener etc
    Then within the listener function you can resize the image. When you want to resize it, it is not yet loaded.
    - The right of the People to create Flash movies shall not be infringed. -

  3. #3
    Junior Member
    Join Date
    Mar 2005
    Posts
    18
    Thanks, I'll give that a shot.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center