-
Silly Navagation
Basically i got my interface setup,music playing in the background,
I have 4 seperate swf's. I want to load each one into a "container" when a button is pressed.
Its sortof a navigation to seperate swfs without leaving Scene 1 of the main movie.Does that make sense?
Ex.
Button|Button|Button|
Container
Press the button and the associated swf would load in the container.
How is this done,if someone understands me
-
-
Code:
Button1.onRelease = function()
{
Container.loadMovie("1.swf");
}
Button2.onRelease = function()
{
Container.loadMovie("2.swf");
}
etc...
Microsoft .NET MVP
-
Ok,but when i use that for the button actions...the swf doesnt load in that particular conatiner,it replaces the main movie.
Any ideas??
-
post your code, i'm not following
Microsoft .NET MVP
-
Ok i make a movie clip-name it instance container...place the movie clip below the interface of buttons,attach this code to one button:
on (release) {
loadMovieNum("news.swf", container);
}
Now,when you push the button,instead of it loading in the container,it loads in place of the entire movie.
Any ideas,thankx for your help!
-
It's...
on (release) {
loadMovie("news.swf", _root.container);
}
-
also just as a side note the new recommended way to do this sort of thing in Flash MX is by putting all your code in the main timeline, so in your case you'd do this.
Code:
MyButton.onRelease = function()
{
container.loadMovie("news.swf");
}
the old way still works just fine, but doing everything on the main timeline makes it much easier to manage, so you never have to go searching for code, plus it makes it so you rarely (if ever) have to refer to _root But again, the old way still works, just thought I'd throw it out there since this is the Flash MX section
Microsoft .NET MVP
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
|