A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Embeding a swf

  1. #1
    Member
    Join Date
    May 2005
    Location
    Leeds UK
    Posts
    79

    Embeding a swf

    Hi guys!

    Does anyone know how I can place a swf inside another swf?

  2. #2
    Get Squared Away.
    Join Date
    Feb 2000
    Location
    Allentown, PA
    Posts
    543
    sure...the easiest way is from within flash to use target.loadMovie("yourmovie.swf");

  3. #3
    Member
    Join Date
    May 2005
    Location
    Leeds UK
    Posts
    79
    awesome cheers that seems to work,

    just wondering if i can make it so that the script inside the loaded movie doesn't effect the overall script

    when I click a "nextFrame" button it takes the main movie to the next frame instead of the loaded in swf.

    cheers

  4. #4
    Get Squared Away.
    Join Date
    Feb 2000
    Location
    Allentown, PA
    Posts
    543
    you can try using this.nextFrame() in the loaded .swf...or make the call from the movie that is loading the .swf using target.nextFrame();
    Either of these will advance the loaded movie's playhead to the next frame.

    Hope this helps...

  5. #5
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    ...or you can use target._lockroot = true; in your parent movie.
    - The right of the People to create Flash movies shall not be infringed. -

  6. #6
    Member
    Join Date
    May 2005
    Location
    Leeds UK
    Posts
    79
    Quote Originally Posted by cancerinform
    ...or you can use target._lockroot = true; in your parent movie.
    awesome!! that works really well!

    This sounds really stupid now but is it possible to send variables to the main swf another way after using lockroot?

    Thanks!

  7. #7
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    _level0 instead of _root
    - The right of the People to create Flash movies shall not be infringed. -

  8. #8
    Member
    Join Date
    May 2005
    Location
    Leeds UK
    Posts
    79
    awesome! Cheers, ill give that a go!

    thanks for a quick reply!

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