A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: external swf question

  1. #1
    Member
    Join Date
    Dec 2000
    Posts
    78
    I have a page that when you click on a certain object it loads an external swf. In the external swf, the animation goes off the edge of the stage, but when you view the html of course you only see what is on the stage. But, when I load the movie into a level of a main movie, It shows what goes outside of the stage area. I dont get it. You can click the link to see an example of what Im talking about. http://www.geocities.com/aanasazi/visual.html
    Also, I have just one other question. How can I position the swf when it loads into the main swf? Any help is greatly appreciated. If you would like to see the fla of my example just let me know where to send it. Thanks for the help.

  2. #2
    Junior Member
    Join Date
    Jan 2001
    Posts
    24
    are your movies both the same size?

  3. #3
    Senior Member
    Join Date
    Apr 2001
    Posts
    165
    One way you can easily size & position the external movie is to load it into an empty movieclip instead of a level.
    1. Create a box the same color as your background color.
    2. Convert this box to a movieclip symbol called "mholder".
    3. Give the instance of the holder an name like "holder".
    4. loadmovie("mymovie.swf",holder);
    5. onclipevent(load)
    {
    this._x = 200;
    this._y = 200;
    this._width = 400;
    }
    etc etc etc
    Now you have total control on where it is positioned as well as the size.

  4. #4
    Member
    Join Date
    Dec 2000
    Posts
    78
    Originally posted by uberflash
    are your movies both the same size?
    Actually I was wanting to be able to load swfs of different sizes..

  5. #5
    Member
    Join Date
    Dec 2000
    Posts
    78
    Originally posted by adsalive
    One way you can easily size & position the external movie is to load it into an empty movieclip instead of a level.
    1. Create a box the same color as your background color.
    2. Convert this box to a movieclip symbol called "mholder".
    3. Give the instance of the holder an name like "holder".
    4. loadmovie("mymovie.swf",holder);
    5. onclipevent(load)
    {
    this._x = 200;
    this._y = 200;
    this._width = 400;
    }
    etc etc etc
    Now you have total control on where it is positioned as well as the size.
    Wow!...thanks for the help. That really cleared all of that up for me. Cheers

  6. #6
    Member
    Join Date
    Dec 2000
    Posts
    78
    Originally posted by adsalive
    One way you can easily size & position the external movie is to load it into an empty movieclip instead of a level.
    1. Create a box the same color as your background color.
    2. Convert this box to a movieclip symbol called "mholder".
    3. Give the instance of the holder an name like "holder".
    4. loadmovie("mymovie.swf",holder);
    5. onclipevent(load)
    {
    this._x = 200;
    this._y = 200;
    this._width = 400;
    }
    etc etc etc
    Now you have total control on where it is positioned as well as the size.
    Well...I tried what you had said, but Im having a hard time. Im not very good with action scripting yet, but im trying. Where on the timeline does the instance of the Holder MC go? Does the instance go into the main movie or the external one? When i tried putting it in the main movie I got an error..could not find visual.swf,holder. Thanks for your time and patience. should I select load to target, instead of level? any help is greatly appreciated.

  7. #7
    Junior Member
    Join Date
    Nov 2000
    Location
    Bay Area California
    Posts
    20
    The simpliest thing to do is to just put a mask on the external swf that covers the stage

  8. #8
    Member
    Join Date
    Dec 2000
    Posts
    78
    Originally posted by joewnhu
    The simpliest thing to do is to just put a mask on the external swf that covers the stage
    thats what I was thinking... but how exactly would I do that?.. My external swf has multiple layers in the timeline, which one do I mask?... or can I mask all of them?

  9. #9
    Junior Member
    Join Date
    Nov 2000
    Location
    Bay Area California
    Posts
    20
    sure can, mask them all

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