View Single Post
  #2 (permalink)  
Old Feb 25th, 2008, 13:20
zekechan zekechan is offline
New Member
Join Date: Feb 2008
Location: Malaysia
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How do I make Button Open new window in flash?

Based on your script, I would assume you just want to load a movie so that it overlaps the current playing movie rather than opening a new window.

Here's how you can do that using levels ( or layers ):

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

The number 1 in the above script is the "layer" or the level that you load the .swf file into. The higher the number the nearer to the front of your screen it will be. For example, level 10 will be on top of level 1. If you need to use that level, for example telling TWtester.swf to gotoAndPlay at frame 10, you would use this script:

_level1.gotoAndPlay ( 10 ); // for level 1
_level5.gotoAndPlay ( 10 ); // for level 5

Here is another method that uses a movieclip:
1) Create an empty movieclip and drag it onto the stage.
2) Select the movieclip and give it an instance name in the properties panel. Example: myMovieClip
3) Now add the following script on your button:

on ( release ) {
myMovieClip.loadMovie ( "TWtester.swf" );
}

Personally I prefer to use the movieclip method as it is easier to move the movieclip around manually to adjust the position of the loaded .swf file.
Reply With Quote