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
LVL 1
coma12Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

coma12Author Commented:
thanks
sokhodomCommented:
hi coma12,
You can use this attached to that button:

on(release){
removeMovieClip(_root.mc_name);   <---- mc_name is your movieClip INSTANCE name.
}

Cheers :)
SokhodoM
coma12Author Commented:
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.postitclip); <-------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
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

sokhodomCommented:
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
coma12Author Commented:
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

sokhodomCommented:
hi, in your case, after seeing your fla, you can use _visible property of the object also. like this:
on(release) {
_root.postitclip._visible=false;
_root.clickhere._visible=false;
}
and here is your fla with modified code:
http://www.ntu.edu.sg/home2001/n0069866/postitnoteflash1.fla
okay, i hope you can take it from there
cheer :)
SokhodoM

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
coma12Author Commented:
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
sokhodomCommented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.