dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Quick Question

  1. #1
    Member
    Join Date
    May 2001
    Location
    USA
    Posts
    53

    Quick Question

    I am trying to load a .swf into another one and I need to postion and scale the .swf. Can someone please tell me how to do this? I read the FlashTyper instructions but I am still not getting it.

    Thank you for your time.



    Blazin1
    Blazin1

  2. #2
    Member
    Join Date
    May 2003
    Location
    Belgium - Flanders
    Posts
    31
    I am not certain how to scale a swf file, but I suggest you load the second swf with the same dimensions as the swf you load it in, and put everything you need scaled in a movieclip on that swf. So instead of scaling the swf you position and scale the movieclip in the swf, which is easy.
    Sorosc

  3. #3
    Member
    Join Date
    Nov 2002
    Location
    at the corner of flotsam & jetsam, just within the walls of reality
    Posts
    91
    yes, what Sorosc said is most convenient.

    say your Main movie's dimensions are 600x400, and the toLoad movie content is only 50x50... you have two choices:

    1) make toLoad's document size 600x400 and place the actual content where you want it within that document in this case, you might want to make a copy of Main, place the actual content of toLoad where you want it to be when toLoad loads into Main, and then remove all the unnecessary content.

    2) if you only want toLoad's document size to be 50x50 (actual content size), when you load toLoad into Main, you have to specify coordinates, i.e.,

    myButton.onPress = function(){
    _root.createEmptyMovieClip("whatever",1);
    _root.whatever.loadMovie("toLoad.swf");
    _root.whatever._x = 250;
    _root.whatever._y = 100;
    }

    btw, if you were concerned about a bigger document size affecting file size, i can tell you that i tested loading a movie that has the same content but different document sizes (one just the content, the other 600x400, for e.g.), and there is no difference.

    hope this helps.
    best,

    Mos
    wei wu wei

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