:confused; Hello, I am attempting to create a website in Flash. I have several buttons with links on one layer and I need one of them to: onRelease, run a movie on another layer. So far I have been able to get the movie to run onRelease but not on a specific layer. Can this be done and if so, how? Thanks, Lilibeta
:o Let's see if I can explain this a little better. The website is your basic rectangle shape but it is subdivided into some rather interesting shapes like trapezoids and triangles. I need to run a movie in a specific shape, let's say a triangle, without the movie showing outside the triangle. Does that make sense? Lilibeta
It's an .swf file. About 10 mins after I posted it occurred to me to use a mask. I don't use them very often so I don't think to use them. :-) The mask seems to indeed be the solution, but I am having trouble writing the action script to trigger the movie to play onRelease of the desired button. I want the movie to be invisible until the button is clicked. Any suggestions? Lilibeta
Well, let's say you used this script to load your movie: createEmptyMovieClip("myHolder",1); myHolder.loadMovie("something.swf"); //Then you would add: myHolder.onLoad = function(){ myHolder.stop(); myHolder._visible = false; } //===================== //And then for your button: myButton.onRelease = function(){ //where myButton is the instance name of your button myHolder._visible = true; myHolder.play(); }
I get one error with that code: Scene=Scene 1, Layer=Lab button, Frame=1: Line 1: Statement must appear within on handler
I guess I'm just confused. Here's the code I added to the first frame my button appears on (I changed the names as necessary): createEmptyMovieClip("myHolder",1); myHolder.loadMovie("labMovie.swf"); //Then you would add: myHolder.onLoad = function(){ myHolder.stop(); myHolder._visible = false; } //===================== //And then for your button: labButton.onRelease = function(){ //where labButton is the instance name of your button myHolder._visible = true; myHolder.play(); } When I test the movie, my labMovie clips plays upon loading, rather than when the labButton is released.
Nevermind, I got it! I took the code off the frame where the button was, applied it to the button itself, added an onRelease and voila! It works just as I hope. Thanks a bunch for the help. I doubt I could have figure this out alone. Lilibeta
You cannot run a movie in a layer You can run one in a level, or in a clip .. but not in a layer. Maybe its your terminology that is confusing things .. can you explain more clearly what result you want? -- All the best, Jeckyl
Sounds like you need the shape to be in a mask layer over the layer that contains either the video (if it is video) or the clip playing the movie (if it is a loaded swf movie). -- All the best, Jeckyl
Don't see what you're looking for? Try a search.
|