Skip to main content
Inspiring
June 14, 2006
Answered

EASY Question - But Hard for the Actioscript inept

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
This topic is closed to new replies. Start a new post to keep the conversation going.
todditamiCorrect answer
Inspiring
June 14, 2006
YES I GOT IT!!! AAAAHAHA ITS ALIVE!!!!!!!!!!

5 replies

Participating Frequently
June 14, 2006
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.
Translate
todditamiAuthor
Inspiring
June 14, 2006
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.
Translate