A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: Scrolling swf inside of main swf- Advice from pellepiano & flashjunkie

  1. #1
    Senior Member
    Join Date
    Aug 2002
    Location
    Colorado
    Posts
    161

    Scrolling swf inside of main swf- Advice from pellepiano & flashjunkie

    I am conquering slowly the ability to run a scrolling 360 panorama swf on my main time frame. But am not quite there yet.
    Flashjunkie gave me a scrolling pic or the HongKong harbor which I dissected, inserted my panorama of a backyard scene and it works great. Even though I am having trouble understanding just how the algebra of the actionscript does it.

    www.dittomark.com/360a

    Now I need to insert that swf into the main time line at

    www.dittomark.com/360

    Pellepiano explained how "to load an external swf into a target clip from a button (both being on the main timeline)" using an empty container.

    on(release){container.loadMovie("7758backpan.swf") ;
    }

    But this has not worked yet and one other kind soul suggested:

    --- * speed of scrolling is determined by the position of the cursor * --

    Because you moved the location of your movie you may not be targeting the mouse properties properly...
    check your code on your panorama and make sure you are referencing the _root.mouse
    ie....
    Speed = _root._xmouse;

    I checked the panorama and speed=45. So I am going to experiment with that. Any comments anyone.
    Dave S.
    Creating, the ultimate passion
    www.dittomark.com

  2. #2
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    I suggest you load into a _level instead as loading into a movieclip changes all references to the _root ( the movie you load is redarded as the movieclip you are loading into, and as there are no _root in movieclips codes wont work ).

    Loading into _levels is safer that way.

    on(release){
    container.loadMovieNum("7758backpan.swf",1);
    }

    To change its position you can either have that code in the first frane of the panorama swf or in the main movie.

    _level1._x=245;
    _level1._y=236;

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

  3. #3
    Senior Member
    Join Date
    Aug 2002
    Location
    Colorado
    Posts
    161
    But I would remove the container reference? Right?
    Dave S.
    Creating, the ultimate passion
    www.dittomark.com

  4. #4
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Yes sorry, what was I thinking.

    on(release){
    loadMovieNum("7758backpan.swf",1);
    }

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

  5. #5
    Senior Member
    Join Date
    Aug 2002
    Location
    Colorado
    Posts
    161
    Ok, many thanks, I will try that.
    Dave S.
    Creating, the ultimate passion
    www.dittomark.com

  6. #6
    Senior Member
    Join Date
    Aug 2002
    Location
    Colorado
    Posts
    161
    OK, it is working. Only strangeness is how to unload the swf on level 1 and return to level 0.

    A friend of mine NC Smart Art came up with this code and it works but sure doesn't look right.

    Original button script to go to level 1 was

    on (release) {
    nextFrame();
    loadMovieNum("361.swf",1);
    }

    But the unload and go back to level 0 code looks like this

    on (release) {
    nextFrame();
    loadMovieNum("0.swf",1);
    }
    How does this make sense?????
    Dave S.
    Creating, the ultimate passion
    www.dittomark.com

  7. #7
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    He is loading something that does not exist, that makes the loaded movie disappear.
    You can also unload the movie.

    unloadMovieNum(1);

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

  8. #8
    Senior Member
    Join Date
    Aug 2002
    Location
    Colorado
    Posts
    161
    That was too simple. Thanks for you help. Now hoisting that glass of Nils Oscar to you.
    Dave S.
    Creating, the ultimate passion
    www.dittomark.com

  9. #9
    Senior Member
    Join Date
    Aug 2002
    Location
    Colorado
    Posts
    161
    I want to thank Pellepiano for his help on this web site. I works and for anyone interested in viewing it take a look at
    www.dittomark.com/SPark
    Dave S.
    Creating, the ultimate passion
    www.dittomark.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