| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
Join Date: Oct 2005
Posts: 9
|
Is there any actionscript to remove a button from the timeline? I have an external preloader where I press "load" and it loads the flash page ON TOP of the button....unfortunately you can still access the load button once the page is loaded on top....is there a way to completely remove it from the timeline after it is pressed?
Thanks in advance, F3ar |
|
|
|
|
|
#2 |
|
is my last name...
Join Date: May 2004
Posts: 964
|
You would use destroyObject():
Code:
btn.onPress = function() {
destroyObject(this._name);
};
|
|
|
|
|
|
|
|
|
#3 |
|
Registered User
Join Date: Oct 2005
Posts: 9
|
That didn't work, here is the AS I have for my button instanced movie1_btn...
movie1_btn.onPress = function(){ startPreload("home.swf"); destroyObject("movie1_btn"); } I also tried destroyObject(this._movie1_btn); What gives? ![]() |
|
|
|
|
|
#4 |
|
is my last name...
Join Date: May 2004
Posts: 964
|
destroyObject() is for components. If you manually created a movieclip on the stage then you use movie1_btn.unloadMovie();. It must be a movieclip and not a button instance. If you have to have a button instance, then make sure it is inside a movieclip instance and you can unload the movieclip instance and it will take the button with it.
|
|
|
|
|
|
#5 | |
|
Registered User
Join Date: Feb 2007
Posts: 5
|
Hi, Im new here, from sweden.
Quote:
And yes I´m a beginner, almost anyway ![]() |
|
|
|
|
|
|
#6 | |
|
ascript noobster :)
|
I use 2 ways:
Quote:
__________________
chaos is everywhere. |
|
|
|
|
|
|
#7 |
|
Registered User
Join Date: Feb 2007
Posts: 5
|
I´m sorry but I cant make it work, where should I put the code, on the timeline? What I want to do is, first to load a movieclip with a button on release that unloads the movieclip and the button at the same time, you know like an ordinary pop up window. my brain is about to explode soon
![]() |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|