5 Replies Latest reply on Jun 14, 2006 10:14 AM by laura_shears

    EASY Question - But Hard for the Actioscript inept

    todditami
      Ok,

      So this is my first attempt at making a web page...
      I am trying to simply make my little button display my movie labeled "Content", I don't think I am doing somthing right...

      Doh....

      I have diffrent movies (p1 & p2) for button rollover effects... and I have a seperate clip named content with labels for "start1" and "start2" that I want to display when I click the buttons

      Anywho if you would like to take a look see I would be very thankful:

      http://www.itamidesign.com/test.fla

      Thanks for your help...

      -Todd
        • 1. Re: EASY Question - But Hard for the Actioscript inept
          laura_shears
          Something went wrong when I tried your link.

          Is your movie inside your flash program or is it an external movie?

          If you have named your button something like myBtn, then you can put in some actionscript to load an external movie such as:

          myBtn.onRelease = function():Void
          {
          movieHolder.loadMovie("content");
          }

          where movieHolder is the name of an empty movie clip that you place on the stage to hold external movies.

          Alternately, you can add the code to the button itself. In this case you don't need to give the button an instance name:

          on (release)
          {
          movieHolder.loadMovie("content");
          }

          If your movie is already part of your Flash program, instead of an external file, then you will need to go into the linkage properties of the movie and check: "Export for ActionScript". You do this by right clicking on the movie in the library. You must give the movie a name when you do this. You can still call it "Content". Next you use one of the formats listed above except change loadMovie to attachMovie. (Actually they might both still work, but I have been in the habit of using loadMovie for external content and attachMovie for internal content. Don't ask me why, I just try things and when they work, I tend to repeat that method of doing things.)

          For attachMovie, you will need to give your clip a level number. You can hard code in a number if you want any movie you attach to replace the prior movie or you can use: movieHolder.getNextHighestDepth() if you want your movie to be placed on top of anything else that you already have in the movie holder without replacing it.

          You can type loadMovie or attachMovie in the search bar of the built in help menu to see more examples. If you have further questions such as how to make the movie holder, be sure to ask a follow up question.
          • 2. Re: EASY Question - But Hard for the Actioscript inept
            todditami Level 1
            Well I am trying to play a certain portion of the movie. That is why I have labeled them etc... The link should work now for download.
            • 3. Re: EASY Question - But Hard for the Actioscript inept
              todditami Level 1
              Here is the code I am using
              • 4. Re: EASY Question - But Hard for the Actioscript inept
                todditami Level 1
                YES I GOT IT!!! AAAAHAHA ITS ALIVE!!!!!!!!!!
                • 5. Re: EASY Question - But Hard for the Actioscript inept
                  laura_shears Level 1
                  Oh, okay, it looks like from the code you have written that you didn't want to attach a movie at all, but instead you wanted to go to a different scene of your main movie. Anyhow, glad you were able to fix your problem.