A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Silly Navagation

  1. #1
    Member
    Join Date
    Jul 2001
    Posts
    43

    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

  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Makes sense.

    Check the loading of movies here:

    http://www.kirupa.com/developer/mx/full_site.asp

  3. #3
    Junior Member
    Join Date
    Sep 2001
    Location
    Decatur, IN USA
    Posts
    21
    Code:
    Button1.onRelease = function()
    {
         Container.loadMovie("1.swf");
    }
    
    Button2.onRelease = function()
    {
         Container.loadMovie("2.swf");
    }
    etc...

    Microsoft .NET MVP

  4. #4
    Member
    Join Date
    Jul 2001
    Posts
    43
    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??

  5. #5
    Junior Member
    Join Date
    Sep 2001
    Location
    Decatur, IN USA
    Posts
    21
    post your code, i'm not following

    Microsoft .NET MVP

  6. #6
    Member
    Join Date
    Jul 2001
    Posts
    43
    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!

  7. #7
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    It's...

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

  8. #8
    Junior Member
    Join Date
    Sep 2001
    Location
    Decatur, IN USA
    Posts
    21
    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center