How To Make A Button Play
How can i make my button play a sound without stopping ?
I want to press a button and play sound until i release .
Thank you.
Eldar52
FlashKit > Flash Help > Flash ActionScript
Posted on: 08-09-2002, 10:42 AM
View Complete Forum Thread with Replies
Sponsored Links:
Make A Button Play()
how do i use AS to control a button to activate.... (re-play the movie that is in it's up state)...
myButton.gotoAndPlay(1);
doesn't seem to do anything. I just want to make a button play the movie in it's up state in a frame action.
Does this make sense?
I have also tried referring to the movie inside of the button state...
myButton.myMovie.gotoAndPlay(1);
that doesn't do anything either...
please help... thanks....
View Replies !
View Related
How To Make A Play Button
well not really a play button but i don't really know how to describe it umm i want to make a flash where there is just a page in the begging with some words and when you click the words i want the thing to start, but i dont want it to say play
any help would be appreaciated as i am nw at this.
View Replies !
View Related
How Do I Make A Play Again Button :-)?
hey, im a noob. Just bought a book on flash and got into it, its day 3 and already im making awsome movies! now all i need to know is how can i make a play again button :-) can somone throw me some step by step instuctions or a link to a tutorial for 1 :-) thanks guys, I appreciate it!
View Replies !
View Related
Can't Make Button Play Movie :(
I have Flash MX 2004 and am using actionscript 2. I made a button for my movie to play but somethings wrong with the script and it wont play. Heres all the action script for the button:
on (press) {
//stopAllSounds Behavior
stopAllSounds();
}
on (release) {
//Play Internal Sound Behavior
if(_global.Behaviors == null)_global.Behaviors = {};
if(_global.Behaviors.Sound == null)_global.Behaviors.Sound = {};
if(typeof this.createEmptyMovieClip == 'undefined'){
this._parent.createEmptyMovieClip('BS_back',new Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000) );
_global.Behaviors.Sound.back = new Sound(this._parent.BS_back);
} else {
this.createEmptyMovieClip('_back_',new Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000) );
_global.Behaviors.Sound.back = new Sound(this.BS_back);
}
_global.Behaviors.Sound.back.attachSound("school is back");
if (true) {
_global.Behaviors.Sound.back.start(0,1);
}
//End Behavior
}
on (rollOver) {
//Play Internal Sound Behavior
if(_global.Behaviors == null)_global.Behaviors = {};
if(_global.Behaviors.Sound == null)_global.Behaviors.Sound = {};
if(typeof this.createEmptyMovieClip == 'undefined'){
this._parent.createEmptyMovieClip('BS_menue',new Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000) );
_global.Behaviors.Sound.menue = new Sound(this._parent.BS_menue);
} else {
this.createEmptyMovieClip('_menue_',new Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000) );
_global.Behaviors.Sound.menue = new Sound(this.BS_menue);
}
_global.Behaviors.Sound.menue.attachSound("click") ;
if (true) {
_global.Behaviors.Sound.menue.start(0,1);
}
//End Behavior
}
goScene_btn.onRelease = function (){
gotoAndPlay("Scene 1", 97);
};
---------------------------------------------------------------
Its that last line up there ^ that doesnt want to work, everything else works fine. When i do a check on the code the error says:
**Error** Scene=Scene 1 movie start, layer=Button1, frame=96:Line 49: Statement must appear within on handler
goScene_btn.onRelease = function (){
Total ActionScript Errors: 1 Reported Errors: 1
So can anyone help me make this button work? thx
View Replies !
View Related
Trying To Make A Button Play A Clip - How?
hi
I am trying to use a button to play a movie clip (it's a drawer opening in a filing cabinet - when you click the front of the drawer it should slide open). I tried to atach an action but it doesn't seem to work. Does anyone know how I do this? you can download/see my flash file here
http://www.russellsteedman.pwp.bluey...ash_advert.fla
many thanks if you know how to do it
cheers
Russell
View Replies !
View Related
Button Make Movie Play?
I'm trying to make a button on (release) play a frame inside of a movie symbol i made? like what if i have a symbol that i make a movie and i have an animation in it, when i click the button i want the movie to start playing on "frame 10".. i see how to start playing a new scene but cant figure out how to make a movie play.
on (release) {
_level0.gotoandplay(movie, 10)
}
can anyone help?
Joel
View Replies !
View Related
How To Make A Button Play A Toon.
Alright, I have a button (named "button1") and a cartoon after the button. Currently, the only AS I have is Stop(); so the toon doesn't play, but I want it to play...just with the button making it play.
Soooo, how do I make it so when I click the button the toon plays?
And does anyone know why you can't apply actions to buttons anymore. I think it's stupid because it seemed so much easier that way in the tutorials I read and here I am with CS3 as my first Flash program and I have no idea what to do.
Help?
View Replies !
View Related
How To Just Make A Button Play The Movie.
I'm making a flash animation with some simple objects moving. I need the animation to stop at key points so the viewer can read some instructions on what i'm teaching. I have no problem making the animation but after about 3hrs and reading everything i can find on flash I can't make a simple play button work. I'm using flashmx 04 pro. I've been through the tut on there about creating another scene etc. I dont' want to make another scene as my animation looks fine the way it is. I just want it to 1. open and not play at first. 2. when the viewer hits the play 'button' i want the animation to start. 3. i want it to stop at key points 4. i want the viewer to be able to hit the play button again to resume the animation. I did this before with earlier version of flash and It seems like it was simple but with mx I can't for the life of me figure out how to make the stupid buttons work. I obv dont' understand all the tuts on this subject so if someone could give me a no nonsense way to do this it appreciate it greatly. I've been trying to make the buttons work for 3 hrs now with no luck.
Please help before I break my computer...lol
View Replies !
View Related
Make Button Play MovieClip
Hi, I have a movie clip on my main stage with 5 buttons to the right. I want to make each button trigger a unique animation contained in that movie clip, and then reset. Anyone have experience with this?
thanks---MJensengs
View Replies !
View Related
Make A Button Play A Movie
Built a button that increases in size when you rollover it. Then built a movie (it's text that relates to that button) that fades in when you rollover it and out when you rolloff. How do I make the movie play when the user rolls over the button? I'm talking about the action script specifically. Your help is greatly appreciated!
View Replies !
View Related
Make A Button Play A Movie
Need the action script that makes a button (when rolled over) play a movie. I have a stop action in the first frame of the movie and know to point the action FROM the button to the second frame, but I need the rest of the script.
Imagine four buttons next to each other, each, when rolled over, make text movies fade in and out when user rolls off the buttons. Each text movie would play in the same spot on the page. Hope we can start a discussion if this is unclear.
View Replies !
View Related
Make Button Play MovieClip
Hi, I have a movie clip on my main stage with 5 buttons to the right. I want to make each button trigger a unique animation contained in that movie clip, and then reset. Anyone have experience with this?
thanks---MJensengs
View Replies !
View Related
Need To Know How To Make Movie Play Upon Pressing One Button...
Hello,
I need to know how to make my movieclip "DropBox_mc" play when you press the profile button. just check out the attached flash mx file to see what im talking about. also, i need to know how to go about making the dropbox sort of rewind if you will, when you press the home button. i basically want it to go back up into its shape as a single black line (study the mc and look at frame 1 on it, you'll see what i mean) when you press the home button because i will have other graphics fill that space.
let me know if more info is needed. i really need to figure this out.
thanks!!
View Replies !
View Related
How Do I Make A Play/Pause Button For A Video?
Hi, I'm wondering how I would go about making a button that would enable a user to pause a video while playing, and then play it at will again.
I just need the coding for the buttons really, that's all.
Also, I'm using Flash MX 2004 because I've yet to learn the new features of my Flash 8. There's no sound during the section in which I want to put the button, in case that would have been a problem.
What I really want it a button that shows the pause sign "||" and then when it is clicked it pauses the video, but at the same time the sign changes to the play sign ">" and then they can click that to resume from where they left off.
Can anyone explain to me how to do this? I'm not too good with Flash, and I'm not really good at all with ActionScript. If you could just give me the coding and step-by-step easy instructions it would be much appreciated!
Thanks alot!
View Replies !
View Related
How Make Button Go To Play Beginning Of Scene
i have created a project with one scene about 1:30 long. It contains moving pictures then an embedded movie plays. On the frame the movie ends i put a stop action. I then created a new layer for a button which I took from the common library. For the actions of this button i put the on release action then the goto and play frame 1 action but the button still doesnt work. Now how do i make it so when you click on this button it goes back to frame one to start the whole project over?
View Replies !
View Related
How To I Make It Play A Sound On Button Press?
Hi, basically I want it so that when I press the ctrl button it will play a short sound, how do I do this?
I have the sound file (laserSound)
(Basically in context I am trying to follow a tutorial to make a game and ctrl makes the laser gun fire, and I would like to attach a sound to this action)
View Replies !
View Related
[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?
View Replies !
View Related
[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?
View Replies !
View Related
Make Button Play Few Frames From One Movie Before Another
Hi all,
I think this is a hard one for you
I have my buttons done and each button loads a movie into my main movie.
Now what i want is for my button to play the last few frames of one movie before auto opening a new one so.....
Say i was on my main screen and i clicked "contact" this would then start my animation for the contact page and stop when the page is fully on screen now what i want is when i click "portfolio" for instance it will play the last few frames of the current movie it is showing first hen load up the portfolio (The last few frames will be a closing of the contact page)
Contact button is as follows
Code:
stop();
this.onEnterFrame = function(){
if(rewind == true){
prevFrame();
}
}
this.onRollOver = function(){
rewind = false;
play();
}
this.onRollOut = function(){
rewind = true;
}
this.onRelease = function(){if (_root.mainbox_MC._currentFrame >=1 && _root.mainbox_MC._currentFrame !=6){
_root.mainbox_MC.gotoAndPlay(2);}
else if (_root.mainbox_MC._currentFrame == 30){
_root.mainbox_MC.stop();}
Portfolio button code is
Code:
stop();
this.onEnterFrame = function(){
if(rewind == true){
prevFrame();
}
}
this.onRollOver = function(){
rewind = false;
play();
}
this.onRollOut = function(){
rewind = true;
}
this.onRelease = function(){if (_root.portfolio_MC._currentFrame >=1 && _root.portfolio_MC._currentFrame !=6){
_root.portfolio_MC.gotoAndPlay(2);}
else if (_root.portfolio_MC._currentFrame == 30){
_root.portfolio_MC.stop();}
Any help would be greatly appreciated
View Replies !
View Related
How To Make Button Wait For 1st 28 Frames To Play
i have a movie with two sections. im trying to get it so that when a user presses a button to see the second section, it waits and checks to make sure the first section has completed before going to the 2nd section.
so basically right now this is the code i have on the button. it will only work if the MC is already at frame 28.. but if not it of course does nothing. I want the button to always make the movie go to the 2nd section, but only if the MC has played and stopped at frame 28. how would i go about having it *wait* for frame 28 to play when the button is clicked before going to the next section?
on(release) {
if (janiceMovie._currentframe == "28") {
janiceMovie.gotoAndPlay("wave");
}
}
View Replies !
View Related
Make A Button Play A Movie Clip?
I followed the tutorial on how to make an animated button, but it didn't say how you assign the button to do anything. Is it possible to assign a button to start a movie clip on another part of the site? A movie clip that's not embedded in the buttons movie clip?
View Replies !
View Related
How To Make A Start/stop Button For A Swf To Play In Dreamweaver
I have a video that I created in Adobe Premiere and exported as a avi then compressed to a swf in Sorenson Sqeeze. My problem is that I'm trying to figure out a way to add some sort of start/stop control button to the video when I bring it into Dreamweaver. Since it's a swf (published file) I can't bring it into Flash to modify it. As it is right now, the movie clip (swf) plays as soon as you open the web page. So, my question is: Is there a way to control the clip with a start/stop button?
Thanks,
Mike
View Replies !
View Related
Script To Make Animation Play Before Going To Link On Button.
I am new to flash ad i need to make a website for comp class and i decided to use flash because i like it and i'm stuck doing buttons, i made a button called "Home" and basicly all it is
Up state = Shuriken and text HOME next to it
Ovr State = Shuriken spins at normal speed.
Dwn State = Shurkens spins faster and fly through the txt HOME.
I want the shuriken to fly through HOME then it goes to the next page, but i dont know exactly what actionscript i need to use. like could someone give me an example of it but use the Button "Home" and the movieclip instace name for the shuriken to spin and fly through is " Shuriken Ds". like where would i put the names in actionscript? Oh, sorry for one more thing, could someone break down the actionscript and explain what each means? sorry if thats asking too much.
View Replies !
View Related
Make Button Invisble When Movie Starts To Play
I have a FLV file in a FLVplayback component. Once it has played and reaches the end I have a button become visible. But my delimma is if I want to watch the movie again and click play, the button remains. How can I make it go back to being invisible until it reaches the end again?
Any help would be greatly appreciated.
thepopguy
View Replies !
View Related
Equalizer Plays At Startup, How To Make Button To Stop It And Play It Again
hi
i have this equalizer movie clip, which start at the startup, if you choose different loops, the equalizer has to keep on playing.. but if you choose the "stop loop" button, the equalizer has to stop.
i did make a movie clip in which frame one was the equalizer, and adding a stop script, frame 2 is an empty clip with a stop.
still when testing, it operates really jerky. if you push the stop button, the equal. stops, but if you push it AGAIN it start playing again... :O/
View Replies !
View Related
SUPERHARDproblem:How To Make A Button,play A MC That Was Attatched To A "container MC
Hi if you look at my game (I know how to animate but Im totally screwed on actionscript if anyone can help I'll really appreciate it..)
http://www.artic.edu/~sdodso1/fighting8.swf
You can tell in the middle there is a Movie clip that is at 0% alpha and then shifts to the right. Everytime you roll over a button, it includes attatched a MC of that "character" into that empty MC.
now here is the problem.
the character has an animation that I'd like to play when clicked on, but it doesnt.
ROLL OVER TO ATTACH CHARACTER
on (rollOver) {
_global.notGone=false;
_root.femp.femp2.attachMovie("mc1", "fighteremp2", 1);
_root.femp.gotoAndPlay(1);
}
And when its the 2nd fighter its MC2, MC3, MC4 and so on.
now what I dont is why the animation inside MC1 wont play (other than the first frame which as you can see just has the characters breathing) I told it so it goes
_root.femp.femp2.mc1.gotoAndPlay(2);
but it doesnt play.
since I attatched the movie clip "mc1" (player 1) to the movie clip shouldnt it just play the 2nd frame of MC1, which is inside femp.femp2?
sorry if this is confusing but please ask questions if you dont understand what I mean because Im in dire neddof help as of now!
View Replies !
View Related
Make Button Not Play Sound On Click, Only On Rollover, With Out Screwing Up Anything
okay, here is my problem, and no one has been able to give me a solution that really works,
I can't figure this out. The home button works perfectly, the other buttons arn't working the same way. I don't want to use stopallsounds, because I am going to be adding in sounds on click and I don't want stopallsounds to be interfering. When I had the other buttons the exact same way as the home button the other buttons would play the sound continuously. I changed them and now the best I can do is that they play once on roll over, but will play once when I click as well, which I of course do not want. I want to get rid of the sound playing on click.
Can anyone help me with this with out either making the animation not play on click, or rearanging resetsubbuttons so that the buttons are reset after or during the animation taking place. Thank you.
View Replies !
View Related
Help:make Button Play Frame From Seperate Movie Symbol
I am trying to make an animation for my TEE Physics class as we are going to do a report & talk on something. For some strange reasons I chose airconditionares
so the intro to this animation is of side on view of an airconditionare (really scabby looking) with what is meant to be ribbons hanging off it. in the center is a "controller" basically a square with airconditionre control written on it and a button saying "on"
all of the ribbons are copies of a movie symbol and i want to make it so that when the on button is pressed then the ribbon movie symbols will go to frame 2 and start fluttering in the breeze.
My problem is that my limited knowlede of scripting animations is makes it so that i have no idea how to do this
I've tried searching for help but can't find any.
thnx in advance for any help I get
View Replies !
View Related
How To Make A "play" Button
Okay, so i haven't used Flash in forever and i can't remember how to get any actions to work on a button. is there something that i have to do for that to work? because it's really confusing me. when i try to assign actions to the button (eg: play, stop, goto, stuff like that) all of the actions are in gray in the actions menu and i can't select them and i can't type anything in the little actions textbox.
btw, i'm on Flash MX, if that matters.
View Replies !
View Related
Play Button+ 1loop +play Button Again (the Definitive Question)
Hi!
I´m using the attachSound method in my movie. I have a play button and a stop button. When you click on the play button a sound begins to play. And the stop button stops it. After this,if you click on play button again, the sound begins. Here´s all right. I use the following code to avoid the sound plays more than once at same time if you click on play button while it´s playing:
Code for play button:
on (press) {
if (!playing) {
sound1.start(0, 1);
playing = true;
}
View Replies !
View Related
|