Actionscript 2.0 :: Play Button Continuous After Pressed?

May 4, 2011

I am learning Flash on CS3 and I have created a scrolling background image which works great. I found a simple play button that works fine using AS2, I use stop(); on frame 1 and on a separate layer and then on the same layer I have a drawn play button on frame 1 I use this

code

on(release) {
root.gotoAndPlay(2);
}

Works good but now the scrolling animation stops after frame 40. How can i get the animation to be continuous after I hit play?

View 2 Replies


Similar Posts:


ActionScript 2.0 :: Create A Continuous Movement When The Mouse Is Pressed?

Oct 1, 2004

I'm working for a client that wants me to create an interactive map, which I can zoom in/out, move the map around, have a minimap guide, and other goodies. I've got the bulk of it created, but I got stuck trying to create a gamepad type controller which the user can click on, and it will move the map.

What I'm trying to do is this: The gamepad graphic I created is like a typical Playstation/X-box style thumbpad controller. There are an up, down, left, and right arrows graphic which the user can click to make the map go up, down, etc. (I have created code to let the users use the keyboards, in case they don't want to use the graphics)

Is it possible to create a continous movement when the mouse is pressed, or will my poor user be stuck clicking the mouse ad-nauseum?

View 4 Replies

ActionScript 2.0 :: Button Is Pressed - Mc Starts To Play?

Mar 19, 2006

when button is pressed one mc starts to play. when another button is pressed the first button related mc is smoothly played to the end... after that only second pressed button related mc starts to play...

View 6 Replies

ActionScript 3.0 :: Make That Function Play When A Button Is Pressed?

Jan 4, 2009

I have a very basic question. I have a custom class called caurina. I've imported the class and it works great. What i did is use that as a function called slide().

What I would like to do is make that function play when a button is pressed. I can't seem to find out how to do this anywhere. I am using as3.

Summary: When btn is pressed go play function slide()

View 6 Replies

Professional :: Movie To Play Foward While One Button Keeps PRESSED?

May 12, 2011

Soo this is a simple problem, i have a 60 frames movie in a Layer, and another layer with 2 buttons.I want the movie to play foward while one button keeps PRESSED, and to play backward when we keep pressing the other button.i tryed this simple code but it didnt work out.on (press) {nextFrame();}
 
I used this code in the button that plays foward but it only moves 1 frame. I am realy new a this,

View 6 Replies

ActionScript 2.0 :: Create A Stopwatch That Starts At 00:00 When A Play Button Is Pressed?

Aug 6, 2009

I'd like to create a stopwatch that starts at 00:00 when a play button is pressed, and then stops whenever the stop button is pressed. After the stop button is pressed, I would like the time to be displayed on the next frame, and say something like "You pressed the stop button in x". I'm using flash CS3...so actionscript 2.

View 4 Replies

ActionScript 2.0 :: Creating A Stopwatch That Starts At 00:00 When A Play Button Is Pressed?

May 2, 2010

I'd like to create a stopwatch that starts at 00:00 when a play button is pressed, and then stops whenever the stop button is pressed. After the stop button is pressed, I would like the time to be displayed on the next frame, and say something like "You pressed the stop button in x".

View 1 Replies

ActionScript 2.0 :: Making A Movie Clip Play ONLY When A Button Is Pressed?

Jan 17, 2011

I have a button, labeled "Main1," in a scene, "Main." When I click said button, I want an animation to start. Said animation is a movie clip named "ArrowAnim."Now, I have done something similar before in another project, using a code which I thought would have worked with this movie clip as well. The code I used before (and which worked flawlessly) was:

Code:
on(release)
{

[code]......

View 4 Replies

ActionScript 3.0 :: Play A Certain Part Of MovieClips Timeline Depending On The Button Pressed

Nov 22, 2010

Right I only want to play a certain part of my MovieClips Timeline depending on the button pressed.

ActionScript Code:
stop();
CircleLineMC.KingsCross.addEventListener(MouseEvent.MOUSE_DOWN, KingsCrossBtn);
function KingsCrossBtn(event:MouseEvent):void {
BigSquare_MC.gotoAndPlay(1);
}

But I want it to play only up to frame 50 and then stop there and then loop instead of playing the whole timeline, does anyone know How to do that.

View 6 Replies

ActionScript 2.0 :: If Statement - Goto A Random Frame Which Will Play A Movie When The Button "one" Or The Button "two" Is Pressed

Jul 20, 2006

its a gambling game of chance and I want it to go to a random frame which will play a movie when the button "one" or the button "two" is pressed. so on each button, I have the code:

[Code]....

View 7 Replies

ActionScript 2.0 :: Make A Box That Fades In When Pressed On The Button And Fade Out When Pressed For The Second Time?

Nov 16, 2004

I have a function on root:

_root.fadeBox_mc.onEnterFrame = function (){
if (fade){
this.nextFrame();[code]....

This causes a mc to fade in and out on rollover/rollout. But what I wanna make is a box that fades in when pressed on the button and fade out when pressed for the second time. But if I say

on (press){
_root.fade = true;
}

the mc fades in, but I cant do another on (press) to fade out. Is this too confusing?

View 2 Replies

ActionScript 3.0 :: Cookie For Mp3 Player Continuous Play?

Nov 17, 2009

I have an mp3 player embedded in an include file on my site with swfObject. How do I set it up that it will continue to play the current song when clicking through to another page? I know there is some js involved but I havent been able to find the best info on how to accomplish this. My as3 here:

[Code]...

View 1 Replies

Professional :: Make A FLV File Play In A Continuous Loop?

Dec 30, 2009

i have succesfully managed to encode / create an .FLV file which now plays back in my .swf file. The picture and sound are great when streaming off the web!
 
how do i command the file to play back in a continous loop? at present it plays and then rewinds back to the begining.
 
i have investigated some of the .FLV parameters but can't seem to find the control / command i'm looking for.

View 1 Replies

ActionScript 2.0 :: Continuous Play Through Several Html Pages Without Going Back To First?

Aug 26, 2008

Is it possible for a flash header to play continuously through several html pages without going back to the first frame on each page load?

View 3 Replies

Professional :: Embed Flash/HTML, Multiple Files W/ Continuous Play

Dec 26, 2010

I'm trying to get a .swf (a game, with three total .swf files: main, title, game) onto my site and am having a problem. I understand how to actually do it and make it run (publish as HTML, copy/paste code in Dreamweaver, etc..), but my problem is having multiples .swf files and them not loading. When I embed code for one of the files, the page will play that .swf file and won't load the next .swf file (Main just contains a loader that loads title, Title will load the game .swf when prompted, Game will run). If I just 2x click the .swf files in my folder it will work, as will an .exe, but can I make it so each .swf file will play in HTML?

View 12 Replies

ActionScript 3.0 :: Continuous Scrolling With Button Hold

Aug 23, 2009

Im new to AS3 (like 5 hours new) and Im after getting stuck with something Im sure is very simple, but Im just not having much luck finding a solution. Basically I have a button which I want to click and hold and then make a movieclip move up and down the y axis. This is what I have so far...

[Code]...

Im sure Im probably going about it in a bizarre way, Im just trying to do it in a way which makes sense to me. So far its working fine for single clicks, so I click the button and the "upwards" function is called which moves the movieclip upwards by 10. The problem Im having is getting it to move continously when the button is clicked and held. Ive read a few possible suggestions relating to loops and setinterval but I just cant seem to make sense of them in a way that applies to what I want to do. Apologies if this is really simple but Ive literally been teaching myself actionscript for all of about 5 hours in total so far and I just cant seem to get past this hurdle.

View 9 Replies

ActionScript 2.0 :: Continuous Zooming OnPress Of Button?

Jan 29, 2009

I have created a buttons with setInterval so that it can call the function till the button will be pressed.onRelease of button I 'm clearing the interval.It is working fine. It gives problem when I'm pressing a button and moving the cursor out of that button area and releasing, it does not call the onRelease event and hence the function goes in the infinite loop.

_level0.main.btn_SizePlus.onPress = function()
{
if(plusint != null)

[code]....

View 2 Replies

ActionScript 1/2 :: Play Sound When Key Is Pressed?

Oct 9, 2010

Alright so I'm creating a car game, I have a soundclip in my library called "engine"And I want it to play all the time except when I press the up button. When I press the up button I want my other sound "engine_2" to play when the key is pressed down and when released "engine" should start again.Both sounds should loop all the time when played.I'm a beginner with AS2 so be easy

View 3 Replies

ActionScript 1/2 :: Play Gun Sound While Key Is Pressed?

Nov 14, 2010

I want my uzi sound to play when space is pressed and I know how to do that, but
I want the sound to play for 2 frames then the same sound should play again and stop the first one so it starts from the beginning when space is pressed down. Otherwise they just overlap eachother and it will sound wierd.And when the key is released the sound that's already beginned should play to it's finnish

View 3 Replies

ActionScript 2.0 :: Play Sound When Key Is Pressed?

Oct 9, 2010

Alright so I'm creating a car game, I have a soundclip in my library called "engine"And I want it to play all the time except when I press the up button. When I press the up button I want my other sound "engine_2" to play when the key is pressed down and when released "engine" should start again.

View 2 Replies

ActionScript 1/2 :: Play Movie/frame When Key Is Pressed?

Oct 8, 2010

I have a car that is a movieclip with 2 frames looping in scene 1 and I want the car to switch to another movieclip when I press the space  button and go back to the oroginal car clip when space is released and if possible add a sound when space is pressed.

View 4 Replies

ActionScript 1/2 :: Make A Movieclip Play Only While A Key Is Pressed?

Mar 21, 2012

this is the code i am using, i get what flash is doing, after i release the key it starts to play the "walking" frames- only i include the gotoAndStop("idle") so it doesn't get to play "walking".but what i am looking for it to do is play the  walking only when the key is pressed and stop when released.

onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT))//68
{
this._x += moveSpeed;
this.legs.gotoAndPlay("walking");

[code]....

View 1 Replies

ActionScript 2.0 :: Play Movie/frame When Key Is Pressed?

Oct 8, 2010

I have a car that is a movieclip with 2 frames looping in scene 1 and I want the car to switch to another movieclip when I press the space button and go back to the oroginal car clip when space is released and if possible add a sound when space is pressed.

View 1 Replies

ActionScript 2.0 :: Play Sound When Space Is Pressed Down?

Oct 10, 2010

I want my sound to start when I hold the space button and stop when I release it.It should loop all the time when space is pressed down.

View 1 Replies

Actionscript 3.0 :: Automatic Fullscreen FLV When Play Is Pressed?

Feb 26, 2010

I'm developing a flash presentation which has a FLVPlayback component in the middle. I was wondering if it was possible to make the FLV clip automatically go fullscreen when the PLAY button is pressed, and of course play the video - once finished exiting fullscreen mode.

OR

If a fullscreen version of the FLV file is played when a graphic is clicked.

View 2 Replies

ActionScript 2.0 :: Continuous Play Of Several Movie Clips From One Main Movie Clip?

Jun 20, 2006

i'm trying to play several movie clips, one after the other from one main movie clip.i've got 8 movie clips, "m1.swf", "m2.swf", etc. "m8.swf", and one main movie clip, "play.swf".i've tried using loadMovie, but it only plays the last movie clip. this is what i've got. in the main movie clip, i've put a play button, and the actionscript i have in the button is:

on(release)
{
this.loadMovie("m1.swf",play);
//this.unloadMovie("m1.swf");[code]....

is this wrong? how can i get this to work correctly.

View 4 Replies

ActionScript 2.0 :: Motion Tween The Button To Return Up To Its Original Spot When Another Button Is Then Pressed?

May 26, 2005

I'm trying to create a set of 4 vertically arranged buttons that 'split' apart when those buttons are pressed. For example, if you click the topmost (1st) button, the bottom three buttons will drop down so submenus (for the 1st button) can now be revealed beneath. Again, when you click the 2nd button from the top, the bottom two buttons drop down, revealing submenus, and so on.

Now, is there a way that I can use actionscripting to tween the buttons to not only motion tween a drop down when a button is first pressed, but also to motion tween the button to return up to its original spot when another button is then pressed? Right now, I have two keyframes, side-by-side which each containing a different y-scale value for an object. Can I do some actionscripting to get the object to motion tween upward to its original spot instead of "clicking," or snapping back to is original spot when another button is pressed?

View 1 Replies

ActionScript 2.0 :: Snap - Press Button To Detect The Last Button Pressed And If The Shapes Match

Jan 12, 2009

I want the press button to detect the last button pressed and if the shapes match, make them do something...obviously. I think I'm going at it the wrong way. I need to stick a "triange" id into the button/mc then if compares that and then if there is a match works then... right?

[Code]...

View 1 Replies

What Button Event Should Use To Make The Program Understands To DO SOMETHING Only When The Button Is Pressed / Dragged

Aug 4, 2009

What button event should I use to make the program understands to DO SOMETHING only when the button is pressed/dragged. In my sample code below, I want something to happens only if the button is dragged beyond 200 in y axis. I tried onRelease, onRollOver and onDragOver but still not working

[Code]....

View 6 Replies

ActionScript 2.0 :: FLASH 8 - Toggle Button/released State/pressed Button

May 18, 2007

I have a series of buttons inside an array. I am trying to get the buttons so that once they are pressed, they remain in the over state. Which is a darker color than the up state. So that people know which button they have pressed. Is there an easy way to do this for buttons?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved