-
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.
-
Senior Member
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;
-
But I would remove the container reference? Right?
-
Senior Member
Yes sorry, what was I thinking.
on(release){
loadMovieNum("7758backpan.swf",1);
}
-
Ok, many thanks, I will try that.
-
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?????
-
Senior Member
He is loading something that does not exist, that makes the loaded movie disappear.
You can also unload the movie.
unloadMovieNum(1);
-
That was too simple. Thanks for you help. Now hoisting that glass of Nils Oscar to you.
-
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|