A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: flash philosophy

  1. #1
    Member
    Join Date
    Apr 2002
    Posts
    52

    flash philosophy

    hi there

    i don't understand why my site is not working:
    i have a example.swf which navigates fine on its own, but when i load that example.swf through a another container.swf, the buttons won't work and i'm not able to navigate in that swf.
    -->
    i not sure if its because of this: but the example.swf is loaded (using loadMovie) by the container.swf which is on another.swf which has been loaded on a level (using loadmovieNum)

    can someone help me understand?

  2. #2
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    PATHS ( movieclip targets )

    Its probably a path problem. When you load a swf into a empty movieclip for example, the swf is regarded as that movieclip. And as movieclips dont have a _root any reference to the _root, ( that will work fine when the swf is viewed separately ) will point at the host swf's main timeline.

    Loading external swf's into a _level instead would avoid this problem.

    Or correct the paths.

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

  3. #3
    Member
    Join Date
    Apr 2002
    Posts
    52
    hi thanks for the help.

    the reason i used a container was because i needed to scale the loaded swf by 200%. Is this posible with loadmovieNum?

    script->
    _root.createEmptyMovieClip("container",10);
    _root.container.loadMovie("example.swf");
    _root.container._xscale = _root.container._yscale =200;

    Also how would i go about correcting the paths?

  4. #4
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Yes, and easiest is to put the scaling inside the external swf in the first frame of it, like.....

    this._xscale=200;
    this._yscale=200;

    If you want to scale it from the main timeline of the host swf you the external swf has to be fully loaded first.

    Your code might work locally but online I doubt the movieclip will resize.

    TYou could use absolute paths to correct the actions by adding the movieclips name after _root

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

  5. #5
    Member
    Join Date
    Apr 2002
    Posts
    52
    hey thanks a trillion.

    Works so much better now.

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