A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: loadMovie problems

  1. #1
    Junior Member
    Join Date
    Jun 2002
    Location
    Ireland
    Posts
    9

    loadMovie problems

    Hi, I'm trying to follow a tutorial in the Flash 5 Bible although I'm using Flash MX.It involves loadMovie. The tutorial states that if you use loadMovie to import a swf into an empty movie holder the loaded movie should take on the same dimensions as the movie holder. However when I test the fla the loaded movie is still it's original size. The code (which is identical to the code in the example fla on the accompanying cd) is attached to a button on the main stage:
    loadMovie("whatever.swf","movieHolder");
    I am about to take on some contracted work involving this scripting and it's been driving me nuts. Can anyone help and tell me what I'm doing wrong
    Cheers derekc

  2. #2
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Its the other way around. The empty movieclips will get the dimensions of the loaded swf.

    To target the loaded swf , you call it with the name of the empty movieclip ( container is often used as a name for it ).
    So to change the dimensions of the loaded swf...

    container._width=350;
    container._height=350;

    The dimensions can only be changed after the external swf has started to load.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

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