eh, I thought I knew how to do this...it seems so simple but for some reason my method is not working.
I want to play a simple two frame movie clip(stop action included inside of it, yes, so it doesnt repeat over and over again) on release of a button. so i figure the script should look something like this, where no01 is the instance name of the movie clip and (1) is the first frame of the movie clip.
on (release) {
no01.play(1)
}
that is on release and play(MovieClip) actionscript commands there...but it's not working. i don;t understand why, seems simple enough. so if any one has any ideas and can point me in the right direction, it'd be much appreciated. the sooner the better too. thanks a bunch in advance!!!
I don't know what you could be doing wrong. Check to make sure you gave the object an instance name, make sure you're spelling it EXACTLY the same way in both places (properties panel and in your actionscript). I made a quick simple file that contains a movie clip and a button. On release of the button, the movie clip plays. Hope it helps.
it seems like my problem is that I don;t have the movie clip on the stage...doi...I thought Flash could call it from the library but no, the movie file is separate from the flash file so I guess not. well, that adds a new layer to my question now.
so what action should I take if I want the button to play the movie clip on release, keeping in mind that the movie clip has to be on the stage but it can only be seen once you press the button? i have no clue. anyone?
(so for example, Mazoonist's file is good except i would want the red ball to not be seen unless you press the button, which plays it.)
and you need to right click the mc in your library, go to linkage, and call it the approproate name. In this case it is "art01_mc"...also, check the boxes "export for actionscript" and "export in first frame". yay~~~
yes, actually it was good that you posted that last bit about making clips invisible on stage because after I did all that work using the script I mentioned I realized that when I go to a new scene, the last movie clip i clicked to see stays on stage! it doesn't go away...*sigh* why is Flash so friggin complicated sometimes???
but I will try your invisible script and see how that goes!!! thanks so much~
Oh I just tried putting this code on a button to see if clicking the button would make the movie clip go away...
on (release) {
art01_mc._visible = false;
}
...and it didn't work.
Monkey or anyone else, would you know what code I could use to make it so when you click the button the movie clip goes away? of course, this button is not th same button I clicked to make the movie clip appear;that button which had the attachmovie actionscript. i think it would have to be a separate button, within the movie clip itself...
if anyone knows, holla please~!
Last edited by foxyflashfemme; 06-12-2006 at 10:28 PM.
As for _visible not working... Can you tell me if it's inside another movieclip?
Also, I should have mentioned before...
For efficiency sake... if you attach a movie, you can also remove the movie... so instead if using _visible, you are better off using
removeMovieClip(myMovie_mc); //one way of writing it...
myMovie_mc.removeMovieClip(); //Another way of writing it!
If you think you will use the movie again, use _visible otherwise use removeMovieClip();
"I'd only told them the truth. Was that so selfish? Our integrity sells for so little, but it is all we really have. It is the very last inch of us, but within that inch, we are free."
Yes, Tidusen, checking back to my last post I did put it in right..the visible script I mean. thanks~!
Thanks again, Monkey. I tried the removeclip script but it's still a no go...
you said: As for _visible not working... Can you tell me if it's inside another movieclip?
yes, the button that I put the visible=false script on was inside a movieclip.the movieclip that I wanted to disappear once you press this button with the visible=false script.
Actually, I decided to just do a slideshow instead of what I was trying to do so no worries...it would have been nice to figure out though just in case in the future I absolutely had to do something like this.
I am sending you a PM of the link to where this all is in case you were wondering what I was trying to do...so if you go to the work section on the link I sent, you'll see the slideshow. what i was trying to do though was have a set of buttons that called a movie clip of each individual piece of art. slideshow much easier for now though
oh and they don't have bananas available here yet so here's a donut for all your help... ke ke ke~