Loading swf's into scenes ... (MX)

Okay.

I have several buttons, that link to several scenes, containing swf files. Using the loadmovie command I can get these swf’s playing on-screen. That’s good.

Question 1)

How can I control where they appear on my document (I’d guess these require some x or y values, but not sure how this is done) as they all appear in the top left-hand corner.

Question 2)

When I mouse over another button (link to scene/swf) how can I remove the previous swf from the page, then load the new swf -as they all appear in the same spot/all over each other? Is this an unload movie command?

I was hoping to counter this problem by using different scenes (no luck there) and all I really need to do is remove the previously loaded swf, when the new one is loaded.

appreciate any help …

head_injury
[ouch - I hurt my HeAD]

Solution for both problems: load to an empty movie clip.

Create an empty movie clip. Drag it to where you want it. Give it the instance name “container” (no quotes).

Now on your button your code will look something like this…

on (release){
_root.container.loadMovie("yourfile.swf");
}

Your loaded clip will attach its upper left corner to the container clip, so position it according to that :slight_smile:

Now when you load another movie to that clip, since it is on the same container clip, the old movie will be removed to make way for the new one :slight_smile:

ok lost, i know this has been asked a million times prolly, but, the way you described there will make the first .swf just disapear as the second one loads in, correct?

what is the code or process for having a smooth transition between each .swf?

like, for example, when another button is pressed, the previously loaded .swf animates out, and THEN the new.swf loads up

I have tried this … I am beyond trying again (until at tomorrow) but … am I attempting this from the correct angle?

  • I have 3 buttons, located in three positions on the stage.
  • When a user mouses over each one, I would like the button image to be replaced with a (pre-made) swf file that they can 'interact with".
    *When they have had their fun, they move over to another button - when moused-over, the previous swf disappears and a new swf plays where the mouse is now located on-screen.

As mentioned, I tried this by copying the lay-out in different scenes, with the the swfs in each, using the buttons to move between these. In each scene I wanted the swf to replace the button ( they had just moused-over) … and so-on around the screen of 3 buttons/swf’s.

Can this be done? At this point, it dosen’t have to look pretty, just function.

thanks. … . . … . . . . … . . . . . . . . …

head_injury

NeoClone… this method COULD work for transitions, but you will have to set a variable and call the loadMovie at the end of the transition in your already loaded movie.

head_injury… no need to use scenes, just use one scene and one container clip.

Check my attachment. I didn’t include the .fla files for the sub files, because all they are are 25x25 files with a number in it… nothing fancy…lol.

Roll Over each of the buttons and see how it works. Is this what you were trying to do? I supplied the .fla for the main.swf file if it was what you wanted to do so you can see.

Thanks Lost … . . … . . … although this wasn’t the concept I had invisioned, it was by far the esiest and it works extremely well for my requirements! As I mentioned - nothing fancy was all I needed.

I appreciate your patience and the inclusion of the .fla file with your last respose.

until next post …

head_injury

Well I am glad I could help :slight_smile:

Sorry it wasn’t exactly what was invisioned, if you can, you might be able to change things around to make it more like you wanted :slight_smile: