Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Movie Replays When Button Is Clicked Twice. MAKE IT STOP



I've made buttons that link to specific frames, but when each button is clicked twice, the entire movie starts over.

This is probably a super simple problem to fix. You can address me as "Moron" if you like.

Thanks!



FlashKit > Flash Help > Flash Newbies
Posted on: 03-21-2005, 08:02 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

How To Make Button Retain Movie Clip When Clicked?
I am making a flash navigation menu with sub menus for my site. As you can see in the action script below, I got the rollover, release and displaying the actual sub menu content with links.

on (rollOver) {
nosotros_mc.gotoAndPlay("rover");
}
on (rollOut, releaseOutside) {
nosotros_mc.gotoAndPlay("rout");
}
on (release) {
submenus.gotoAndPlay("nosotros");
}


The thing I don't know how to do is to have the parent menu button stay with its movie clip without rolling out after I click on it. Here is an exact example of what I am talking about... http://www.templatemonster.com/websi...tes/13405.html
When you click on a button, the blue animation actually stays, and is only removed when you click on another button.

Here is what I am working on... http://gestionycontratas.com/index.php
-I just want my blue square to stay on when I click on it, and to go away when I click on another button.

I would really appreciate your help here. Thanks in advance.

Button Replays Movie - Why?
Hello wise and wonderful Flash experts - As you can probably see from my recent posts, I am an idiot. BUT I am an idiot that needs to work so regardless of my limited FL experience I am jumping into Flash with both feet. New-ish to action script - using Flash 5.

SO here is my problem - In the attached file I have two mc - one (cpya)plays right away. On the button event ("more") I want "cpya" to stop and "BEE" to start. Simple right - I have the following code:

on (release) {
gotoAndPlay ("BEE");
}

but instead of going to BEE it replays from frame 1 of scene 1.

I have named the Instance BEE - the Frame Label BEE and even the symbol BEE - they are all on the same time line - WHY !!!!!????? Is my script for the typewriter effect wrong maybe?? If so why does it work for the first one?

Thank you so very much!!!

Stop Looping FLV When Another Button Clicked?
Hey all flash genius' out there.

Ive searched the blogs but cant really find a solution for my problem.

I spent alot of time searching for a solution to loop an FLV on my stage.. the best solution i found was from the Adobe site and that was
to put a appropriately sized flv component on the stage and use the following code..

import fl.video.*;

// Video component instance name
var flvControl = display;
var flvSource = "e.g/Users/url.flv";

// Loop the video when it completes
function completeHandler(event:VideoEvent):void
{
flvControl.seek(0);
flvControl.play()
}
flvControl.addEventListener(VideoEvent.COMPLETE, completeHandler);

// Set video
flvControl.source = flvSource;

This works great! so if anyone is still struggling with that specific problem.

My issue now is that when i click another button to load another clip, is that i can still hear it playing the movie on loop in the background, so to click back on this button just dobles up the clip and the audio..

Is there any additional script that i can write that will recognize that i have clicked another button so to stop it?

Any help will be much appreciated.

Cheers

Stop Button Movieclip's Clickability, Once Clicked.
If I use a movieclip as a button (like buttonMC.onPress = play(frame)) - is it then possible to make it unclickable?? I don't want people pusing it once its already been pushed.
make sense?

[CS3] Stop MC From Restarting When A Navigation Button Is Clicked?
Hi everyone.

its been so long, I can't remember how to do the simplest things

I am making a website... it has a MC of rotating skylines and the navigation is also done in flash.

Any time I click on any of the nav options, the MC with the rotating skylines resets itself.

is there a way of doing this so that it doesn't happen?

Tanks

Nina

How To Make A Button Known When Clicked
how do I make a button change a differant color when the user has clicked it, so they can see what buttons they have clicked already.

purley action script, so i don't have to re-design the button


PCRIDE

Make A Button That Moves When Clicked
I am trying to build a menu in my flash site that has buttons that slide to the right of the movie when they are clicked. I tried putting a movie clip within the 'DOWN' keyframe in the button, but the animation snaps back when the mouse is released and the playhead returns to the 'UP' keyframe.

What would be the best way to structure this?

How To Make A Button 'bold' When Clicked
Hello

I am creating a website in flash and have made a button based on a text string (e.g a "Home" button)
when user click this button I want to make the text "Home" in bold" so the user can se where he is on the page

How can I do this in Actionscript 3

I have tried using the button method "home_btn.setStyle(..)" and a lot of other things but I can't seem to get it to work.

please help

Thanks
Thomas Adrian
http://www.notessidan.se

How To Make Button Unclickable After Clicked
Hi,

I guess it's the basics, but I'm a newbie - I have a main.swf with navigation buttons, each loading a different external swf to an empty mc in main.swf on release of button. For example, the code I have on a button labeled "Gallery" is -

Code:
on (release) {
content.loadMovie("gallery.swf");
}
If I press a button, it works well - the matching external swf is loaded on release. The problem is, the button I've just pressed remains clickable - so by clicking it again, it reloads the same swf that's currently on the empty mc, and naturally, it creates unwelcomed visual effect.

I figure I need to make each button unclickable after it was pressed, and clickable again if another button was just pressed, or something similar. I also want the button (a static text inside) to change to another color after it is pressed, and revert to the original color if another button was just pressed.

I'm using flash cs3 with AS 2.0, but have a very meager knowledge in scripting - if the solution involves AS code, I would appreciate to know on which object to put it (e.g. "on each button" etc.) and where exactly inside the script to put it (e.g. "before/after the on (release) code" etc.).

Thanks for helping

Make Button Stay A Certain Colour Once Clicked?
I have my button which is red. On rollover, it fades to blue, and on rollout it fades back to red - fine. But what if i wanted it so that once the button had been clicked, it turned green and stayed green so a user would know that the button had been used (you often see this sort of thing in image galleries as you will have seen) Of course, on rollover and rollout the green button would not fade between red and blue as it does originally, but would still need to be active for loading in external swf files etc

Can you help me with this? an old fla or a tutorial perhaps?

I use mx - NOT mx 2004

Thank you.

Cant Make Apple Drop When Button Is Clicked
alright so what im trying to do is make the apple drop when i click the button. but right now whenever i drag it and let go it falls when i let go. and another thing i want to do it make the timer restart when i click the drop button. thanks bye

go here for the fla.

The Simplest Way To Make A Button Not Reset When Clicked
I've made a button that has an animation movieclip when mouse over, and when I click it (on mouse release) I want it to stop and show the "down" keyframe, not loop the movieclip once more.

Anyone?

When Menu Button Mc Clicked, Make It Non-clickable
Hi there. I have a movieclip with 6 movieclips inside, all these are basic text inside and act as menu buttons.

I'm trying to think of an AS 3.0 way to make it so when i click on one of the links, it can not be clicked again until another menu item is clicked.

How could i do this?

here is my code


Code:
stop();

//btn_link
main.btn_link.buttonMode = true
main.btn_link.addEventListener(MouseEvent.CLICK, btn_home_click_handler);


menu.btn_home.buttonMode = true
menu.btn_home.addEventListener(MouseEvent.CLICK, btn_home_click_handler);
function btn_home_click_handler(event:MouseEvent):void {
gotoAndPlay(2)
}

menu.btn_about.buttonMode = true
menu.btn_about.addEventListener(MouseEvent.CLICK, btn_about_click_handler);
function btn_about_click_handler(event:MouseEvent):void {
gotoAndPlay(3)
}

menu.btn_events.buttonMode = true
menu.btn_events.addEventListener(MouseEvent.CLICK, btn_events_click_handler);
function btn_events_click_handler(event:MouseEvent):void {
gotoAndPlay(4)
}

menu.btn_gallery.buttonMode = true
menu.btn_gallery.addEventListener(MouseEvent.CLICK, btn_gallery_click_handler);
function btn_gallery_click_handler(event:MouseEvent):void {
gotoAndPlay(5)
}

menu.btn_guestList.buttonMode = true
menu.btn_guestList.addEventListener(MouseEvent.CLICK, btn_guestList_click_handler);
function btn_guestList_click_handler(event:MouseEvent):void {
gotoAndPlay(6)
}

menu.btn_private.buttonMode = true
menu.btn_private.addEventListener(MouseEvent.CLICK, btn_private_click_handler);
function btn_private_click_handler(event:MouseEvent):void {
gotoAndPlay(7)
}

menu.btn_contact.buttonMode = true
menu.btn_contact.addEventListener(MouseEvent.CLICK, btn_contact_click_handler);
function btn_contact_click_handler(event:MouseEvent):void {
gotoAndPlay(8)
}

How Do You Make A Button Or Mc Move Its Position After Being Clicked
This is the code I have in my actions frame now. It works, but the button "george" only moves up one interval on each click. How can I make line 3 repeat the action until george._y = 40?




Code:
moveVar = 40;
george.onRelease = function(){
george._y += (moveVar - george._y) / 2;
}
I would appreciate any ideas or alternate solutions.

Want To Make A Button That When Clicked Launches Email
helpp i'm trying to make a button that when someone clicks it it will open up their email and have the given address in the address box already...i cant find a way to do this in actionscript 3

Make Button GotoAndPlay When Another Button Is Clicked
ok. next dilemma.

once the button is pressed it stops on frame 16. there will be several other buttons. what i'd like to happen is that when another button is pressed the previous button that was pressed (which would currently be on 16) will gotoAndPlay frame 17 which animates it and makes it known to the user that they have already clicked it.

here is the code i have right now which all it currently does is make the frame stop on 16 when it is clicked. i'm not sure what the best way to go with the code on making it jump to frame 17 when another button is clicked. i've included the fla file for reference.

if i used something like:
if (button1._currentframe==16)
gotoAndPlay(17)
then i would have to create this code for every instanced button...which could be time consuming if there are around 30 buttons or so.....


stop();
this.onRollOver = function() {
this.gotoAndPlay(2);
}
this.onRollOut = function() {
this.gotoAndPlay(3);
}
this.onPress = function() {
delete this.onRollOver;
delete this.onRollOut;
this.gotoAndStop(16);
}

Make A Button Stay In The Roll Over State When Clicked
Hi everyone,
Does anyone know how to make a button stay in the down position in CS3, Actionscript 3.0?

I have 3 buttons, each with the same roll over state. What I'd like to do is when the button is clicked, it remains in the roll over state until something else happens.

Thanks!!!!!

Make Square Snap Back To Different Position After Button Is Clicked.
I can't figure out how to do this, I have tried a bunch of different things and none of them work, maybe someone will have an idea. Basically, I have a navigation bar created in flash, you roll over a button, the square daintily floats over to it using code, not motion tween. Then when you roll off the button, the square floats back to home. I want, when I click on another button, for the square to then always snap back to the button that was clicked on, and float over the other ones on roll over. Below is the flash file of the nav bar. Thanks for your time.

Make Square Snap Back To Different Position After Button Is Clicked
No one could give me the answer in the Flash MX forum. This is either an actionscript issue or javascript, can't really tell the two apart. Anyway, I can't figure out how to do this, I have tried a bunch of different things and none of them work. Basically, I have a navigation bar created in flash, you roll over a button, the square daintily floats over to it using code, not motion tween. Then when you roll off the button, the square floats back to home. I want, when I click on another button, for the square to then always snap back to the button that was clicked on, and float over the other ones on roll over. Below is the flash file of the nav bar. Any suggestions including pointing me to tutorials will be greatly appreciated.

How To Make Button Stay Selected When Clicked (link To Webpage(
Hello. I have made a basic flash movie with several buttons. I have it currently to where each button, when you roll the mouse over the button, changes color. When you click on the button, it takes you to a webpage (the complete page is in an html frame, with the top frame being the flash movie, and the bottom frame, called "bottom" containing the linked webpage.

What I cannot figure out how to do keep the button in its selected state after it has been clicked (and the mouse leaves the button). I want each button to maintain it's "over" state when it has been clicked (its webpage is in the bottom frame) to show what page is currently loaded below. How can I do this? As is now, after clicking the button, the webpage loads below, but as soon as the mouse stops hovering over the button, the selected state goes away.

This is the code I have for each button for the link:

on (release) {

getURL("page.html","bottom");

}

Thank you very much for your help.
mhedges

How Do I Make A Button (rollover) Reveal A Link That Can Be Clicked [renamed]
Hi, I'm doing a group project and I need a bit of help. I'm planning to do a rollover button, and when i roll over the button it'll display a link. I've actually built one like that but whenever i want to move my mouse cursor from my mouse to the link, the link just disappear. how do i make it so that whenever i move my cursor from my mouse to the link it won't disappear and it'll only disappear only after i've click on the link? thanks in advance!

How Do I Make A Button (rollover) Reveal A Link That Can Be Clicked [renamed]
Hi, I'm doing a group project and I need a bit of help. I'm planning to do a rollover button, and when i roll over the button it'll display a link. I've actually built one like that but whenever i want to move my mouse cursor from my mouse to the link, the link just disappear. how do i make it so that whenever i move my cursor from my mouse to the link it won't disappear and it'll only disappear only after i've click on the link? thanks in advance!

How Do I Make A Movie Clip Appear Where The Mouse Is Clicked?
Hi,

I'm making a simple spot-the-ball the game and if the user clicks in the incorrect place then I would like to make a cross appear where they have clicked i.e a movieclip appears at the position the mouse has been clicked. I would prefer to attach the code to the button as I understand this a little better.

can anyone point me in the right direction?

Many thanks
Bev

How Do I Make It So That When One Of My Buttons Are Clicked A Small Movie Plays?
And also How do I make a little window as seen on http://www.scottmanning.com You see that little window within is movie?How do I do that ?

Button Replays OVER State On RELEASE
Sorry folks, I'm reverting to first grade here... some times the simplest things are the hardest to find in the book!

I've created a button which has a simple Movie Clip on the OVER state, then a static image on DOWN. All is well until I RELEASE the mouse and it REPLAYS the darned Movie Clip! Is this normal? Is there a way to stop this?

Button That Restarts Animation (not Replays)
Can anyone tell me what code to put in a button for it to start the application from zero. I know how to replay it (gotoAndStop(1) but I need it to load again. Help will be appreciated.

How To Make The Wings Of A Fly Stop When The Flash Movie Stop?
Hello,

I made a simple "Fly Flying" flash animation. The wings of the fly are moving up and down while the fly is flying from one location to the other. My problem is:

The wings of the fly are still moving up and down when the fly is landed on the ground. I tried to add a stop(); action script at the last frame. However the wings are still moving even the movie is stopped.

How can I make the wings stop moving when the flash movie is stop? Please download and take a look at my flash file (fly_flying.fla):

http://space.uwants.com/batch.download.php?aid=313219

Thanks and best regards

Alex

Back Button Replays Button Slide In.
I have a flash menu that the buttons slide in. When you click on one of the buttons it links off to an html page. When a user pushes the back button on their browser, the buttons slide in again, is there any way to stop this, when they go back it should just be the buttons in their final positions.

Thanks

Mike

Display Movie-clip With Image/text/button ..when Clicked On A Button
We had generated a template.

Template has 2 area
Buttons on left and right had side area is blank

on click of button we want to display a movie-clip having image/text and buttons for nvaigation.


We found that on click we can display the movie ...it displays image text is not diapled. Also we want to display buttons on the same.

Your help is great value addtion to us.

Thanks in advance

Ramesh

Animation Replays And Replays
When I test my project in flash it keeps playing. Here is my script. My teacher said it would do something like this but she could not figure out the problem. If you need any more info feel free to ask. thank you.

var myIntro:URLRequest = new URLRequest("intro.swf");

var myLoader:Loader = new Loader();
myLoader.load(myIntro);

var skipthis:skipit = new skipit();

skipthis.addEventListener(MouseEvent.CLICK, entersite);

function entersite(event:MouseEvent):void{
removeChild(myLoader);
removeChild(skipthis);
gotoAndStop(3);
}

myLoader.contentLoaderInfo.addEventListener(Progre ssEvent.PROGRESS, showProgress);

myLoader.contentLoaderInfo.addEventListener(Event. COMPLETE, showContent);

function showProgress(event:ProgressEvent):void{
var percentLoaded:Number = event.bytesLoaded/event.bytesTotal;
loading_txt.text="Loading - " + Math.round(percentLoaded*100) + "%";
bar_mc.width = 198*percentLoaded;
}

function showContent(event:Event):void{
removeChild(bar_mc);
removeChild(loading_txt);
addChild(myLoader);
}

Here are the errors it gave me.

1046: Type was not found or was not a compile-time constant: skipit.
1180: Call to a possibly undefined method skipit.

A Flash Movie That Replays From Where It Left Off
Can anyone think of how to make a flash movie play from the frame that the individual view last saw ?

i.e if a viewer stops watching a 1000 frame movie at frame 100, when they rewatch it - it will start at frame 100.

[MX] Transition Problem, Replays Same Movie
Hey everyone,
First I just wanted to thank everyone for thier contributions in these forums and tutorials. I'm a broke musician trying to assemble a website for myself and this site has been invaluable in getting me on my way.

OK - the structure of the site is there is a main movie, which loads a gallery section movie, which will load 2 different image sets. I am using the 'transitions between external SWFs' model to transition between image sets. When I play the gallery swf independently, it switched between image sets fine. When I play the main movie, which loads the gallery, then both buttons (which reside in the gallery movie) load whichever image set I choose first. So if I first click the 2nd set button, then the 1st set button also loads the 2nd set; conversly if I choose the 1st set first, then the 'set 2' button will load the 1st set. Wow, I hope that makes sense.

I'm really a newb at this, but I wonder if it has to do with the fact that the gallery movie is loaded into another parent movie? Does the code from the tute need to be changed to account for this? (since it works fine when it doesn't load into another movie) Also, I used the code for the 1st set to load automatically but it doesn't work.

Thanks people, have a good T-day
Krishna

[MX] Transition Problem, Replays Same Movie
Hey everyone,
First I just wanted to thank everyone for thier contributions in these forums and tutorials. I'm a broke musician trying to assemble a website for myself and this site has been invaluable in getting me on my way.

OK - the structure of the site is there is a main movie, which loads a gallery section movie, which will load 2 different image sets. I am using the 'transitions between external SWFs' model to transition between image sets. When I play the gallery swf independently, it switched between image sets fine. When I play the main movie, which loads the gallery, then both buttons (which reside in the gallery movie) load whichever image set I choose first. So if I first click the 2nd set button, then the 1st set button also loads the 2nd set; conversly if I choose the 1st set first, then the 'set 2' button will load the 1st set. Wow, I hope that makes sense.

I'm really a newb at this, but I wonder if it has to do with the fact that the gallery movie is loaded into another parent movie? Does the code from the tute need to be changed to account for this? (since it works fine when it doesn't load into another movie) Also, I used the code for the 1st set to load automatically but it doesn't work.

Thanks people, have a good T-day
Krishna

Play Movie When Button Is Clicked
I'm relativly new to Flash and I created a button (all four functions). I wanted to know how I can jump to the next scene when that button is clicked. I tried adding an action to the "down" frame of the button but the program wont allow me to. How can I accomplish this?

Play Same Movie When Button Is Clicked
I have a movie, but I want the movie to play whenever you click on a button.

Example: Whenever you click on the buttons "Home" "Products" "Enroll" and etc it will play that movie autmatically.

Thanks in advance.

Move Movie Out When Button Is Clicked
Hi,
It's been about a year and a half since I last used flash (MX 2004) so my skills are way rusty! Right now I'm looking for a tutorial on how to move a movie out when a button is clicked.

I'm creating a navigation menu that will move a movie clip into place (animation). When another button is clicked in the nav menu, I want the first movie to animate out before the new movie animates in. I'm not sure how else to explain it!

Anyone know of any good tutorials that can get me started?
Thanks,
Andrea

Movie Stops Untill Button Get Clicked
Hello,
I once saw (I ever do not remember what Flash it was) you can make a frame stop till a button get clicked.
Can somebody explain me how to make that?
Tnx & greetz,
Big_Boss_Man

When Clicked A Second Time Button Restarts Movie
When I set actions to a button the action works fine. However, if the button is hit a second time, the whole movie restarts. I can't figure out why? I have attached the file. Please some one help if you can..
Thanks

Load A Movie When A Button Is Clicked, Not In First Frame
Hey.
I have a little flash file.
It has three button, that when clicked, launch movie clips which play a video.
Thing is, all the videos load at the beggining, which makes loading time long.
How can i get it so each individual movie clip will only load when the button is clicked?

Cheers guys

Button Jumps To Next Frame In Movie When Clicked Twice
Hi, i have a small problem,
i have a button in level 0 with the code:

on (release) {
with (_level1) gotoAndPlay();
with (_level2) gotoAndPlay(7);
}


It loads movies into level 1 and 2, the problem i am having is that when the button is clicked twice it will jump to the next frame in the movie i.e when clicked once it jumps to frame 7 as it is supposed to do but then its clicked again and jumps to frame 8

any help appreciated thanks.

Button Jumps To Next Frame In Movie When Clicked Twice
Hi, i have a small problem,
i have a button in level 0 with the code:

on (release) {
with (_level1) gotoAndPlay();
with (_level2) gotoAndPlay(7);
}


It loads movies into level 1 and 2, the problem i am having is that when the button is clicked twice it will jump to the next frame in the movie i.e when clicked once it jumps to frame 7 as it is supposed to do but then its clicked again and jumps to frame 8

any help appreciated thanks.

Reverse Movie Clip When Clicked On Another Button
When you click on a button it loads the movie clip that is on the main timeline. What I want to be able to do is when you click on another button the movie clip that you are on reverses and the new movie clip loads up.

Button Keeps Jumping To Next Frame In Movie When Clicked Twice
Hi, i have a small problem,
i have a button in level 0 with the code:

on (release) {
with (_level1) gotoAndPlay();
with (_level2) gotoAndPlay(7);
}


It loads movies into level 1 and 2, the problem i am having is that when the button is clicked twice it will jump to the next frame in the movie i.e when clicked once it jumps to frame 7 as it is supposed to do but then its clicked again and jumps to frame 8

any help appreciated thanks.

Button Jumps To Next Frame In Movie When Clicked Twice
Hi, i have a small problem,
i have a button in level 0 with the code:

on (release) {
with (_level1) gotoAndPlay();
with (_level2) gotoAndPlay(7);
}


It loads movies into level 1 and 2, the problem i am having is that when the button is clicked twice it will jump to the next frame in the movie i.e when clicked once it jumps to frame 7 as it is supposed to do but then its clicked again and jumps to frame 8

any help appreciated thanks.

If This Button Clicked Load Mc With This Text If This Button(different One) Clicked L
if this button clicked load mc with this text if this button(different one) clicked load same mc, with different text...is this possible?

How Do I Enable A Button That Will Bring The Movie To The Next Scene When Clicked?
I tried usin "goto" in the actions menu and type "2" for the scene....but it does not work! clicking the button restarts the movie...am i supposed to type something else instead of just typing "2" (without the"")?

pls tell me how coz i need to do a project...

When A Button Is Clicked, Sound In External Movie Stops
Hi,

I was wondering about how I can prevent my sounds from stopping when I go to the next frame of my Flash site.


The way I have it all set up is this:


I have individual buttons that are to play a certain sound when clicked. Right now, I have it so that an external movie is loaded when the buttons are clicked but when I go to the Artwork section, the loaded sound stops.


This is the code:

code:
on release {
_root.Gates.loadMovie("http://www.geocities.com/valerian5200/Gates.swf")


Would changing loadMovie to loadMovieNum work?

Change Width Of Movie Clip When Button Is Clicked?
Hi guys, this one should be quite simple. Just want a bar (it's going to be a health bar) to decrease it's width by 10pixels when a button is clicked.

cheers, Dave

Movie Clip Button Up-state, Stay Up Until Clicked On Other Btn
hey everyone,

hey does anyone no where any tutorials that highlight how to keep a Movieclip Btn 'Over State' to stay in the over position until another button is clicked?

Copyright © 2005-08 www.BigResource.com, All rights reserved