When You click it… it loads something in the the MC. Can I have the button disapear once I click it and it loads the new movie?
So far the code is:
on (release){
entrance.loadMovie (“bio.swf”)
}
Or if there is no way to do this, can I have the buttons IN the MC, and when clicked it loads the new MC in the same ‘entrance’ mc but from inside it… ?
If it is a movie clip symbol acting as a button you can swap it to a removable depth then use removeMovieClip() on it to remove it for good, but as far as I know, button symbols can’t be removed via AS, on hidden.
grandsp5: delete is used for deleting variables and dynamic event handlers, etc, etc. You can’t use it to delete a clip from the stage.
If I am wrong about any of this, sorry, the cold medication has kicked in :hangover:
Didn’t we talk about this already, Shane? :-
[AS]Button.prototype.removeButton = MovieClip.prototype.removeMovieClip;
Button.prototype.swapDepths = MovieClip.prototype.swapDepths;
//
myButton.swapDepths(100);
myButton.removeButton();[/AS]
Right… the Tylenol.
RussianBeer
Paste this code in the first frame of the movie:
[AS]Button.prototype.removeButton = MovieClip.prototype.removeMovieClip;
Button.prototype.swapDepths = MovieClip.prototype.swapDepths;[/AS]
It doesn’t necessarily have to be first frame, just make sure you put before you call those methods.
To remove the Button, use this code:
[AS]myButton.swapDepths(100);
myButton.removeButton();[/AS]
Where myButton is the instance of the Button you’d like to remove.
grandsp5
No, it doesn’t turn the Button into a MovieClip. I’m just copying the MovieClip methods, removeMovieClip and swapDepths, to the Button object. After that, yes, it swaps the Button to a removable depth (0 to 1048575) and removes it.