Making A Button Play A Movie Clip
How do you make a button go-to-and-play a certain frame on a movie clip on rollover, and rollout?
I need the actionscript.. thanks.
FlashKit > Flash Help > Flash Newbies
Posted on: 06-23-2004, 11:47 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Making More Than One Movie Clip Play From Another Clip
Hello,
It's been a while since my last post and I am afraid I am just as oblivious as I was before. Here is my dilema: on the main stage I have movieclip a,b,c,d I click on "a" to make the movie play. Now I want to click "b" to make that movie play but I would like a to go back to it's original position by finishing it's timeline which sends it back to the original position. Then I would like to be able to click on "c" and it would send "b" back to it's original position not in this order but randomly depending on which movieclip you select. How can I make this happen? Thanks for any help.
Anthony
Making A Movie Clip Play A Scene.
Ok basically here is my problem.
I have designed a movie clip for a button. And i need the movie clip to play something outside of the movieclip.
Ive made an invisible button. the code i have done is
Code:
on (release) {
gotoAndPlay ("Scene 1", 116);
}
but when i test it out. nothing happens. could someone please help me out.
Thanks in advance.
zoot
Movie Clip - Making It Play Continuously
Hi,
Once my homepage launches, I have a couple of movie clips playing ie. an animated car moving in the background, it has a timeline within the movie clip to make it move slowly across several hundred frames. I also have a stop action on the last frame of my main timeline which makes the car stop once the homepage has launched & moves to that stop action. How do I make the animated clips continue to move or play - is there code to place on the clip or a way to loop it to play continuously until someone chooses to move off the home page?
thks
Making A Movie Clip Copy Play At Certain Times.
What happens is the movie clip does not leave the designated spot and travel to the other side, I was wondering if there would be a way to time each copy, so that like every 2 secs it will reproduce a copy, not just all at once. I hope I explained this well enough to undrstand.
--------------CODE--------------------
onClipEvent (load) {
maxLaser = 6;
depthCount = 1;
_root.laserTwo._visible = 1;
laserCount = 1;
}
onClipEvent (enterFrame) {
if (laserCount<=maxLaser){
laserCounter++;
_root.laserTwo.duplicateMovieClip("laserTwo"+depth Count, depthCount);
_root["laserTwo"+depthCount]._visible = true;
depthCount++;
}
if (depthCount>maxLaser) {
depthCount = 1;
}
}
--------------CODE--------------------
Making An ActionScripted Movie Clip Play Behind Other Graphic Elements
I have created a rotating helix using ActionScript, and everything is working fine except that the helix is playing on top of all the other graphics in the movie. I have the graphic that creates the basis of the helix on a layer arranged below the other graphics, but it still play on top of everything else.
Is there a way to make the helix play "behind" anything else that is arranged on the stage?
Help!
tim
Making A Movie Play Button?
I'm trying to get a movie clip to play from a play button but i'm having a little trouble with what actionscript I should use an where.
I have a button which looks like this:
Theirs an instance of that movie on 'down' so that it plays when you click on it. Trouble is it will only play right the way through if you hold your button down on the mouse.
I deally I would like it to sit transparent until you click on it.
[CS3] Making A Gif Button Play A FLV Movie
Hi guys!
I'm new to Flash and have a problem...I've tried countless tutorials and hours of trying to work out this simple problem - I just want a button I have to play an FLV movie. Here's the code I'm using:
myButton_1.(MouseEvent.MOUSE_DOWN);
gotoAndPlay(splashvid);
and here's the error:
TypeError: Error #1123: Filter operator not supported on type mybuttonplay.
at Splashposs_fla::MainTimeline/Splashposs_fla::frame1()
Your help will be very appreciated! Thanks!
Making A Press Button Then Play Movie
Ok i was wondering how to put a play button b4 my animation starts where the user have to click the button then the movie plays???
Any ideas plzz hlp
Making A Movie Play On A Click Of A Button
Hi I want a feature, that when the user clicks on a button a movie plays, what would i need to put into the actions for that button? Ps I don't know **** about flash so explain it like I am a baby!
Making Movie Play From Mouse Click (but Not A Button)
Hello,
I have a flash movie, what i want is this..
when u eneter a frame.. the animation stops, the mouse hides... Then if u click the mouse anywhere or touch any key on keyboard, it starts to play again...
stop();
Mouse.hide();
onClipEvent (mouseDown) {
play();
}
that doesnt work....
Also, how can u make your action script in simple mode in MX 2004, i cant find it anywhere, only advanced....
Some of my scripts from older files seems to be hidden too
Stop And Play Button For Movie Clip Within Moive Clip
hi i have problems with my buttons. i have got 2 fla files. 1) shell.fla 2) content.fla.
The shell.fla has a movie clip(name:holder) to load the content.swf. And within the content.swf i have got movie clip within movie clip.
Thru a search from the forum i came across this script
first frame:
Quote:
function stopAllClips(clip) {
clip.stop();
for (var i in clip) {
if(typeof clip[i]=="movieclip") {
if(clip[i]!=clip) {
stopAllClips(clip[i]);
}
}
}
};
function startAllClips(clip) {
clip.play();
for (var i in clip) {
if(typeof clip[i]=="movieclip") {
if(clip[i]!=clip) {
startAllClips(clip[i]);
}
}
}
};
for the button:
Quote:
on (release) {
if(!_root.stopped){
_root.stopAllClips(_root.holder_mc);
_root.stopped = true;
} else {
_root.startAllClips(_root.holder_mc);
_root.stopped = false;
}
}
everything works fine except after i pause and play, i doesn't play from where it has stopped. Anyone has got any ideas as to how i can solve this problem. Thanks very much.
[CS3.AS2] Button In A Movie Clip Link To Another Movie Clip And Play
what im doing is that making a button in a movie clip link to another movie and play/stop certain parts of that clip
lets say that there are 4 buttons are in movieA, and the other clip is called movieB
when the user clicks button1 in movieA, movieB will play from frame 1 to 5 and stop.
when user clicks button2 in movieA, movieB will play from frame 5 to 10.
and so on
so far my code for button1 is:
on (release){
this._parent.movieB.gotoAndStop(5);
}
on (release){
_root.movieB.gotoAndStop(5);
}
button2:
on (release){
this._parent.movieB.gotoAndStop(10);
}
on (release){
_root.movieB.gotoAndStop(10);
}
with this code, it just jumps to the designated frame.
what i want is to have it play from current frame to a designated frame
can anyone shed some light on this?
Making A Button Go To Somewhere In A Movie Clip...
...as opposed to somewhere in the "scene" timeline?
I just started working with movie clips.
I made a movie clip, and i want to make a button that goes to a place in the movie clip timeline as opposed to the scene timeline.
Please be gentle, i am fairly new to Flash, and very new to working with movie clips.
Thanks for any help and/or patience!
Making A Button Manipulate A Movie Clip.
Hi guys, im making a game, and I need it so that when I push a button it plays the next frame of my wheel movie clip so that the wheel becomes bigger.
Any ideas?
Making A Movie Clip Go T R L B On Button Presses?
Hi i want a moveclip to go up down left and right on the press of the keyboard keys whats the simples way of doing this using correct actionscript 2.0 practices?
The way i know is to do this for each direction:
var ballListener2:Object = new Object();
var ballListener:Object = new Object();
ballListener.onKeyDown = function() {
clearInterval(nInterval);
if (Key.getCode() == Key.RIGHT) {
nInterval = setInterval(ani, 1);
}
updateAfterEvent();
};
ballListener2.onKeyUp = function() {
if (Key.getCode() == Key.RIGHT) {
clearInterval(nInterval);
}
};
Key.addListener(ballListener2);
Key.addListener(ballListener);
function ani():Void {
if (ball._x<=0) {
clearInterval(nInterval);
} else {
ball._x -= 10;
updateAfterEvent();
}
}
but isnt there a much simpler way than this for 4 keyPresses such as recyleing setinterval etc
[F8] Making A Movie Clip Into A Button Or Link?
I have a movie clip that's used to show an email address. The reason I made it a movie clip was so that I could animate via actionscript.
The problem I'm having is a way to be able to click on that mc to make the regular mailto: feature work. Pretty much I want to make it a link. Any suggestions?
Making A Movie Clip That Acts As A Button
I am having a problem making a Movie clip that acts as if it was a button. Can someone please describe how to make the 4 different button states on a MC??
Thanx in advance!
Making A Movie Clip Not Behave Like A Button?
Hi i would like to make a movie clip not act like a button i.e i don't want the finger to come up during roll over can anyone help, i have the following script on the movie clip so that the sprite animates and reverses on roll over
stop ();
this.onEnterFrame = function(){
if(rewind == true){
prevFrame();
}
}
this.onRollOver = function(){
rewind = false;
play();
}
this.onRollOut = function(){
rewind = true;
}
Making A Movie Clip That Acts As A Button
I am having a problem making a Movie clip that acts as if it was a button. Can someone please describe how to make the 4 different button states on a MC??
Thanx in advance!
Making Button Start Movie Clip
This is a pretty straightforward question: I have a button to which I'd like to assign an action which starts a movie clip. I can get as far as moving the playhead to the frame which contains the movie clip...what next?
Thanks,
Button To Play Movie Clip
I am building a website and I have a movie clip that I have placed on the main timeline. I need the movie clip to play all the way through and then stop at the end, when a button on the main timeline is pushed. I know it is probably really simple but I have looked all over the web and have had no luck getting anything to work. I would appreciate any help
Play Movie Clip On Button Hit
I've been trying to use the search but it doesn't seem to work from me right now!
I'm trying to make a button that has a movie clip in the down state.
I've found out that the button goes back to the over state once the button is pressed so I'll have to make an invisible button over the movie clip and use some actionscript to make the movie clip play when the button is pressed.
Is this correct or am I heading down the wrong path?
My movie clip is called "slider_bottom" and the button is called "bottom_slider", do I have to give the movie clip an instance name?
How do I stop the movie clip from playing until the button has been pressed?
Thanks for your time, I'm sure that this is a simple problem, but I'm a newbie!
S
Button To Play Movie Clip
Hello,
I am hoping someone can help me out I am not knowledgable with flash especially CS3 but that is what I have. My page is a website I have several buttons on my main timeline. I would like it so that when the user clicks on a button it will play a movie clip (from the library). Also can the movie clip be on a particular frame (example frame 30). Does anyone know if this is possible and how to make it work?
Thanks,
Desperate
Play Movie Clip Without A Button.
I had posted this issue in another thread, but i didn't get a solution, then i decided to write another one, and reformulate my question.
If i can, i'll close the old thread. Ok?!
I have a stage with a movieclip. This movieclip has an internal animation.
The presentation is: at the frame 146, the main timeline stops, when i'm able to click on main menu (main menu = movieclip on main timeline), and when i do this, it opens a submenu. This submenu is a child movie clip.
But now my boss told me to change this, he wants that this animation doesn't stop, and opens the submenu whithout clicks.
I don't wanna lose much time reorganize my animation, i need to use AS. Can anyone help me? Thanks in advance =)
Here is the link to the file .fla:
http://www.4shared.com/dir/9953408/7d0d3ee8/Tasker.html
**Making A Button Control More Than One Movie Clip On Different Occasions?**
Okay... here's the deal, as best as I can explain it.
I am doing an interactive portfolio for a class. I am using movie clips to display each piece. The movie clip is set up as follows:
1. A stop on frame one.
2. Five frames of fade in.
3. Five frames of still.
4. Frame 11 has "gotoAndPlay(6)" to cause the still image to loop.
5. Frames 12-15 the image fades out and loops back to the stop on one.
So I have a series of movie clips set up in this same way. Each with thier own instance name. While each piece is up, a back button appears. On the back button, I have the following:
code:
on (release) {
if (_root.movieclipa._currentframe<=11) {
tellTarget (_root.movieclipa) {
gotoAndPlay(12) {
// etc etc....
Which should then play to the end and put the movie clip back to stop, and therefore invisible.
This works great with one image- exactly how I want it to go. But when I put the second images' script on the button- ex:
code:
on (release) {
if (_root.movieclipa._currentframe<=11) {
tellTarget (_root.movieclipa) {
gotoAndPlay(12) {
}
}
}
}
on (release) {
if (_root.movieclipb._currentframe<=11) {
tellTarget (_root.movieclipb) {
gotoAndPlay(12) {
// etc. etc....
Now, when I click the "back" button, it shows BOTH pieces fading out on top of each other. I was under the impression that the "if" statement would mean that the direction would only be carried out if that clip was currently being played.
I've checked and double checked, and the code checks and doesn't report any errors.
I'm sure this is something simple and stupid, but the resources on this site are huge, and I haven't found anything that's handling this exactly how I'm trying to handle it. I am relatively new to Flash.
Can anyone help me out with this one?? Thanks in advance!
Button On Roll Over Should Play A Movie Clip
what i mean to say is that.. i m making a flash site..and the link have a roll over effect. now when a person roll's his mouse over the link ..the link should play a movie clip(object not a swf file)
now what should i give the script for it!!!
On Button Press, Play Movie Clip ?
I have a scene with several buttons, each of which play a different movie clip, but I am having trouble with my action scripting - calling the clip.
I had the action in a frame label, but I want the clip to play without sending it anywhere, just to pop up and play, and go away when it's over...
can someone help me with the actionscript for this...
D..
Play Movie Clip Within Button On Mouseout
Hey, i did a search for this, but couldn't find anything that matches the description.
I have a button, and in the button's 'OVER' keyframe, i have a movie... So the movie plays (basically an object tween) and it gets to a stop frame within the movie. When the user takes the mouse off the button, i want the movie to start playing again, so it finishes it's tween back to normal.
So the user mouses over the button, it fades frame orange to blue, (for example.) Then when they mouseout it fades back to orange again.
Bit complicated, but thanks in advance
Play And Pause A Movie Clip With Button
Ok, I'm trying out a new navigation, and I need help. I have 5 buttons, and an animated movieclip next to the buttons. When you roll over any of the buttons, I want the movie clip to play. When you roll off, I want it to stop where it is. The buttons will lead to different HTML pages, (or a frameset, if that will make it easier for the header .swf file to keep from reloading--any thoughts on this would be helpful as well.) Seems simple, but I can't seem to find an answer anywhere. Thanks for the help.
How To Play Movie Clip On Release Of A Button?
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!!!
Rigging Button To Play Movie Clip
Hi,
I have a grey box w/ text over it(actually its a list of prices) in which I have converted into a Movie Symbol. I have the movie animated to slide IN and OUT of the flash movie. So its two parts labled in and out.And I have a button labeled "prices".
How do I Rig the button up so that onRelease. the prices slide on screen. And then when another button is clicked. It slides off and another box of info slides on?
[F8] How Do I Make A Button Play A Movie Clip?
How do i make a button i made, play a particular movie clip i want it to play and also reveal a set of more buttons. so i have a button that says "Ontario", then when i press it, a picture of the province will fade in(which i already set the fade in through transistion in the movie clip) and then a set of buttons that are major cities llike "Toronto", "Ottawa", "Hamilton", and so on appear as well. and that all happens from clicking the one button "Ontario". is this possible. if so how do i go about doing this?
[F8] How Do I Make A Button Play A Movie Clip?
How do i make a button i made, play a particular movie clip i want it to play and also reveal a set of more buttons. so i have a button that says "Ontario", then when i press it, a picture of the province will fade in(which i already set the fade in through transistion in the movie clip) and then a set of buttons that are major cities llike "Toronto", "Ottawa", "Hamilton", and so on appear as well. and that all happens from clicking the one button "Ontario". is this possible. if so how do i go about doing this?
Help With Button Coding To Play A Movie Clip
I have three buttons (instance names are: redbutton, yellowbutton, and bluebutton) and three basic movie clips (instance names are: redmovieclip, yellowmovieclip, and bluemovieclip).
How do I code the AS3 to get the buttons to play each movie clip for the corresponding color at X:265 and Y:108?
Basically, I want the buttons to play the movie clips (which are just squares) on demand, and then make them disappear and show the next movie clip at the same X and Y positions (X:265 and Y:108) accordingly.
If someone could paste the proper code and help me out, it would greatly appreciated. And, I would be able to get on with the rest of my hard life
Movie Clip To Play After Pressing A Button
a bit basic but im stuck
i have a button that when the mouse is over the button it runs a movie clip,
but i want it to continue to play when the mouse goes off the button
help!
Button With Mouse Over To Play A Movie Clip...
wonder if someone can help me out?
I am trying to create a button that will do the followings:
step 1 - the button can play a short moive clip when it first appears
step 2 - stop and stay as the last frame image
step 3 - when the mouse over, it will play that short movie clip again
step 4 - when it is hit, it will go display a new url on the same window
i have made the movie clip and the button symbol. but when i put them together, it can only do the first 2 steps...
i am putting this button on my main movie as the front page of my website.
would be much appreciated if someone could help.
|