coma12
asked on
Help Please! Need to remove flash movie from webpage after clicking a button in movie
Hello,
I have made a flash movie on a layer that needs to disapper either with or without the layer when a button on the movie is clicked. You can see the demo page at www.reedh.com/newsletter/defaulttest.htm. if you click the click here button it goes nowhere for now.
Thanks a bunch!
Coma12
I have made a flash movie on a layer that needs to disapper either with or without the layer when a button on the movie is clicked. You can see the demo page at www.reedh.com/newsletter/defaulttest.htm. if you click the click here button it goes nowhere for now.
Thanks a bunch!
Coma12
hi coma12,
You can use this attached to that button:
on(release){
removeMovieClip(_root.mc_n ame); <---- mc_name is your movieClip INSTANCE name.
}
Cheers :)
SokhodoM
You can use this attached to that button:
on(release){
removeMovieClip(_root.mc_n
}
Cheers :)
SokhodoM
ASKER
SokhodoM,
I can't seem to get this to work correctly it is my lack of actionscript skills I am sure. Here is the script that I have for the button, maybe you can see what is wrong.
on (press) {
getURL("http://www.reedh.com/popup.htm", "_blank");
}
on(release){
removeMovieClip(_root.post itclip); <-------This is the name of the postit note movie clip instance. I did not have this in my script.
}
I'm not sure which movie clip you are refferencing to. I have 1 movie clip instance that is the postitnote on it's own layer then a second layer that is the invisible button instance called clickhere that is in another layer. Those are the only two layers I have. The actual fla and swf is called postitnoteflash. Again the demo is at www.reedh.com/newsletter/defaulttest.htm.
Thanks for help on this
Coma12
I can't seem to get this to work correctly it is my lack of actionscript skills I am sure. Here is the script that I have for the button, maybe you can see what is wrong.
on (press) {
getURL("http://www.reedh.com/popup.htm", "_blank");
}
on(release){
removeMovieClip(_root.post
}
I'm not sure which movie clip you are refferencing to. I have 1 movie clip instance that is the postitnote on it's own layer then a second layer that is the invisible button instance called clickhere that is in another layer. Those are the only two layers I have. The actual fla and swf is called postitnoteflash. Again the demo is at www.reedh.com/newsletter/defaulttest.htm.
Thanks for help on this
Coma12
the actionscript on the button is perfectly allright. What is wrong here , I believe is the (_root.postitclip)
You need to Name the INSTANCE of the Postitnote MovieClip as postitclip to get the above action to get working.
look here: http://www.ntu.edu.sg/home2001/n0069866/instance.jpg
Note on the instance name. and also make sure your movie clip is on the main timeline.
by the way, if you can't really get it working, you can the .fla to me
You need to Name the INSTANCE of the Postitnote MovieClip as postitclip to get the above action to get working.
look here: http://www.ntu.edu.sg/home2001/n0069866/instance.jpg
Note on the instance name. and also make sure your movie clip is on the main timeline.
by the way, if you can't really get it working, you can the .fla to me
ASKER
sokhodom,
I think I am all jacked up in my timeline/movieclips. I feel really bad having to send you the file and not being able to figure it out based on your help but since you offered and I am quickly running out of time...Here is the .fla file.
http://www.reedh.com/newsletter/postitnoteflash.fla
Thank you so much again...
Coma12
I think I am all jacked up in my timeline/movieclips. I feel really bad having to send you the file and not being able to figure it out based on your help but since you offered and I am quickly running out of time...Here is the .fla file.
http://www.reedh.com/newsletter/postitnoteflash.fla
Thank you so much again...
Coma12
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
SokhodoM,
Thank you, thank you. You have gone above and beyond what is expected at EE. and thanks again.
Just for future referrence why did the script change based on my file?
Thanks (yet one more time)
Coma12
Thank you, thank you. You have gone above and beyond what is expected at EE. and thanks again.
Just for future referrence why did the script change based on my file?
Thanks (yet one more time)
Coma12
you are welcome :)
In fact, there are many ways in dealing with flash. Just that for your case, to make simpler, it's better to use _visible. Well, usually, RemoveMovieClip is used when the movieclip is created dynamically.
Cheers :)
SokhodoM
In fact, there are many ways in dealing with flash. Just that for your case, to make simpler, it's better to use _visible. Well, usually, RemoveMovieClip is used when the movieclip is created dynamically.
Cheers :)
SokhodoM
ASKER