?
Solved

Help Please! Need to remove flash movie from webpage after clicking a button in movie

Posted on 2004-11-20
9
Medium Priority
?
168 Views
Last Modified: 2010-04-07
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
0
Comment
Question by:coma12
  • 4
  • 4
8 Comments
 
LVL 1

Author Comment

by:coma12
ID: 12635720
thanks
0
 
LVL 8

Expert Comment

by:sokhodom
ID: 12635738
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
0
 
LVL 1

Author Comment

by:coma12
ID: 12635959
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
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 8

Expert Comment

by:sokhodom
ID: 12636105
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
0
 
LVL 1

Author Comment

by:coma12
ID: 12636179
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

0
 
LVL 8

Accepted Solution

by:
sokhodom earned 2000 total points
ID: 12636258
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
0
 
LVL 1

Author Comment

by:coma12
ID: 12636340
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
0
 
LVL 8

Expert Comment

by:sokhodom
ID: 12636358
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
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question