ActionScript 2.0 :: GotoAndStop Or Play If MovieClips Clicked?

Nov 30, 2007

I am trying to build an app and stuck to this simple AS problem with movieclips. I have 5 movie clips with instance names d1_mc , d2_mc , d3_mc , d4_mc, d5_mc. If these movieclips are pressed (clicked) then I want the main timeline to gotoandstop or play else do nothing and stay on current frame.

View 3 Replies


Similar Posts:


ActionScript 3.0 :: If ButtonOne Is Clicked && ButtonTwo Is Clicked > Go To And Play?

Nov 6, 2011

What does the code look like if I want the user to click two specific buttons then go to a new frame. I've been trying different methods, but I am honestly not brilliant with conditional statements. This is what I've got so far...

about_btn.addEventListener(MouseEvent.CLICK, clickAbout);
home_btn.addEventListener(MouseEvent.CLICK, clickMain);
if (function clickMain(event) && function clickAbout(event))

[code]....

View 7 Replies

ActionScript 3.0 :: Nested MovieClips And GotoAndStop Function?

Feb 26, 2010

I have a movieclip "squareA" -- inside of squareA, on frame 2 is a movieclip called "squareB". I tried the following code:
Actionscript Code:
squareA.x = 10squareA.y = 10squareA.gotoAndStop(2)squareA.squareB.x = 10squareA.squareB.y = 10

But I get the following error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at problem_fla::MainTimeline/problem_fla::frame1()
If I put SquareB in frame 1 of SquareA -- it works.

View 3 Replies

ActionScript 2.0 :: CS3 GotoAndStop Won't Play The Clip That It Goes To

May 21, 2009

Hi, i have a problem :/

im making a fighting-style game, and need to make it so that when the left or right button is pressed, the character (which is on frame 1, standing still), switches to frame 2, an animation of him walking. However, with the code i have,

if (Key.isDown(Key.LEFT)) {
walk = true;
wspeed = -walkspeed;
this._xscale = -100;


} else if (Key.isDown(Key.RIGHT)) {
walk = true;
wspeed = wal

View 3 Replies

ActionScript 3.0 :: Play To Frame Instead Of GotoAndStop?

May 7, 2010

I've got some code and I'm using gotoAndStop but am in need of something to play to the frame instead of just jumping.

Code:

var beginX:Number;
stage.addEventListener(MouseEvent.MOUSE_DOWN, handleMouseDown);
stage.addEventListener(MouseEvent.MOUSE_UP, handleMouseUp);

[code]...

View 3 Replies

ActionScript 3.0 :: CS5 GotoAndStop / Play Not Working

Dec 7, 2010

i have 4 buttons like this

-past

-present

-future

-resume

i can click even one in order and get to the correct frame but they wont work afterwords. if i click future; past and present wont work but resume will. if i click resume; past, present and future wont work. get it?also in each frame the buttons have the correct names.[code]

View 5 Replies

ActionScript 2.0 :: Play To A Certain Frame, Stop Then Gotoandstop?

Aug 16, 2009

i need to gotoAndPlay then gotoFrame and stop at frameEXAMPLE: gotoAndplay from frame 2 then when it reaches frame 10, i want it to go to the Parent frame with a gotoAnd stop at frame ("willy")so far i have put this script on frame 10 but when it gets to frame 10 it just stops, it does not jump to the parent frame "willy"PLAYS TO FRAME 10 then: gotoAndstop this._parent._parent. ("willy)

View 4 Replies

ActionScript 1/2 :: GoToAndStop Or Play On Frame Label With Video Doesn't Work?

Mar 4, 2011

I have a video in a frame that corresponds with the label "eight".  i have a button on the timeline with the following code.  i've tried it both gotoAndStop and gotoAndPlay and it doesn't work. 
 
on (press) {
gotoAndStop(eight);
}
 

View 3 Replies

ActionScript 2.0 :: GotoAndStop - Team1 Movie Clip To GotoAndStop At Frame 10 On The Stage

Feb 8, 2007

I have a movie clip on the stage and have given it the instance name "team1". inside this movie clip there are two states. at frame1 it says one thing, then at frame 10 has an image. team1 stops at frame 1 and what i want to do is when the main time line reaches say frame 50, i want the team1 movie clip to gotoAndStop at frame 10, thus showing the image and not the text. i tried doing it by putting this on the main timeline at frame 50: team1.gotoAndStop("team");

View 2 Replies

Arrays :: Dynamically Removing Movieclips When Clicked

Oct 27, 2011

I have a game where i add some cartoonish ants, that when they are clicked, they need to be removed from stage. There are 4 differend kinds of ants, so im doing a Math.random for picking which one to add. (ant 1+2+3 have 50% chance to spawn and 4th 50%) rnd_nbr = (Math.random() * 5)+1;

I have a timer doing 10 tick, and i reset the timer to make neverending. Then i have a math random and if sentences adding mc' to the stage with movement from Tweener, and event listeners for clicks. But i cant figure out how to remove them when clicked. I have done alot of failed tries right inside the click_candy_anty function. I've left them commented out.

[Code]...

View 2 Replies

Actionscript 3 :: Trace A Message If 3 Movieclips Were Clicked?

Nov 8, 2011

I am building a simple game in flash in actionscipt 3. I want when the user click on the 3 movieclips on the stage to trace a message like "Thanks for clicking all 3 movieclips!"

this message have to appear once he click on the 3 not only on one.

View 2 Replies

ActionScript 2.0 :: Different Action To Occur If Any Of The Movieclips Get Clicked?

Oct 1, 2003

I have many movieclips -I have 10 movieclips for each type-and i have around 7 types of movie clips (ex. 10 red squares, 10 green triangles, 10 blue circles movieclips) now I want a different action to occur if any of the movieclips get clicked-but the same action should occur if the same type gets clicked (ex. if the user clicks on any of the blue circle-it should get dragged, if they click on any of the green triagles-it should get deleted and so on)what's an efficient way of doing it except for

if square1.onclick=square2.onlick=function()...

if triangle1.onclick=triangle2.onlick=function()...

there's a prototype-but that affects all the movieclips-is there a way for me to make each of the movie clips-sort of a different category (object) so that way I can use prototype keyword-or anything else-to have the same affect? and not have to write repetitious code?(maybe some sort of inheritence to movieclip)

View 4 Replies

ActionScript 1/2 :: Arrays N Loops - Movieclips To Hide Except For The Movieclip Similar To The Clicked Button

May 30, 2011

[Code]....

I'm stucked here. I want the font type "BauhausMedium" to apply when ft_01 is clicked, font type "Haettenschweiler" to apply when ft_02 is clicked, etc... at the same time I want all" ft_01a", "ft_02a", "ft_03a" movieclips to hide except for the movieclip similar to the clicked button. E.g. if "ft_02" was clicked ft_02a to be visible =true and rest to be visible = false (ft_01a, ft_03a).

View 5 Replies

ActionScript 3.0 :: Play The "out" Transition Than Unload The Current Swf Than Play The In Transition Than Load The Swf Of The Button That Was Clicked

Oct 11, 2009

i have looked everywhere for a tutorial on this - i have tried writing, and re-writing codes....i just cant get it. is there any tutorial i overlooked? here is what im looking to do - NO SHORTCUTS: have my main file that loads the buttons, my external swf container, my intro animations, and my swf "out" and "in" animations when a button is clicked i want it to point me to specific frame labels. i will have an "out" and "in" frame label and which will be the locations of the transitional starting points i want it to play the "out" transition, than unload the current swf, than play the in transition, than load the swf of the button that was clicked i want the animations to all be done using frame labels all within the MAIN swf file.... i have had no luck doing this....and i do NOT like the tween class....

View 10 Replies

Get A Movie Clip To Play When A Button Is Clicked ?

Apr 12, 2009

On looking into buttons, I understand that to get a movie clip to play when a button is clicked you simply place the movie clip on the buttons 'hit' state. Having done this it does not work? Have I read wrong? Also the movie clip has a background the full size of the stage area. So when I attach this to the button, the button changes size to the same size as the movie? (i.e. whole stage area). How do I keep the button in it's original size while still playing the movie clip with large background?

View 2 Replies

ActionScript 2.0 :: FMX - Play Animation If Other Button Is Clicked?

Aug 4, 2003

I have been searching for a way to do this for about 3 days but I have come to no conclusion. I need to find a way to get an animation playing when a button is clicked. It is a little more complicated so let me try and explain. I have an animation of two doors opening and closing. From frame 35 - 65 the doors open, on frame 65 I have text, then from 66 - 96 the doors close. Now my problem comes when I want to change pages. I need the animation on frames 66 - 96 to start playing when any other button is clicke except for the one that opens that page. I have the delay on the buttons and it is working fine but i have no idea how to test if the other buttons are clicked.

View 7 Replies

ActionScript 2.0 :: Play And Pause When The Button Is Clicked?

Mar 30, 2005

I have a flash program that needs to play and pause when the button is clicked, right now I have this code

Code:
var status;
status = stop
on (release)

[Code]....

this is of course is not right. my var is in the wrong place but i dont want to declair on every "on (release)"

View 2 Replies

ActionScript 2.0 :: Load Animation After Button Clicked Then Never Play Again [CS3]?

Feb 20, 2009

I am making a flash website were the logo will start out at the bottom and play a animation when someone clicks on a button(there will be about five so I don't which one they will click on), the logo will move to the sides. after this animation plays this one time I need to never be able to play again while they are in the website..

View 1 Replies

Professional :: Play Video At Cue Point When Button Is Clicked?

Jan 19, 2010

I've created a video player using the flv component. I have images of cue points. The user should be able to click on an image and the video should skip or start at that cue point

View 9 Replies

Professional :: Play SWF Animation When HTML Link Is Clicked?

Jul 20, 2011

How can i play SWF animation when html link is clicked?

View 3 Replies

ActionScript 3.0 :: Play Sound File From Object Clicked?

Apr 13, 2011

What I have are several items on a stage and when they are clicked I want to capture their names so I can use it to play a sound file that relates with the object clicked. For example: say I have a square, rectangle, and a square on the stage and when the user clicks on "triangle" it would play the sound "triangle_snd". This is what I have so far and the error I am getting from it.[code]...

View 2 Replies

ActionScript 2.0 :: Play The Movie Each Time The Button Is Clicked?

Oct 22, 2002

I have a mc inside a frame on the main time line. a button on the main time line. i want to play the movie each time the button is clicked. another situation is i hv loaded a movie using loadMovie command. i want to play it again. currently i m using unloadMovie & loadMovie in succession. is there any other way of doing it...

View 4 Replies

Automatically Start Buffering, But Don't Play Until Button Is Manually Clicked?

May 25, 2009

I'm trying to accomplish two things:
 
1)  Have an swf file automatically start buffering as soon as the webpage loads, without it also auto-playing the video.

2)  Implimenting a 'youtube' style play button which will manually start the playback (regardless of how much of the video has been buffered).
 
P.S.  I'm using CS4 if that matters.  I have a pretty solid html/photoshop/video background, but flash is almost entirely new to me.

P.P.S.  I'd like this to be compatible with older versions of the flash player as well, if at all possible.

View 3 Replies

Actionscript 3 :: Flash - CS4 Play A Movie Clip When A Button Is Clicked?

May 17, 2011

I want to play a movie clip when I click a button.I made 3 states: inicial (how it looks before anything happens) (up)hover (plays an animation after waiting 20 frames) (over)click (plays an animation right away) (down)I placed these movie clips inside of my button's up, over, and down frames. This works great except when I click, i'll need to click and hold for my animation to get past the first frame.

View 1 Replies

ActionScript 3.0 :: Button That Play Sound When Clicked And Be Controlled With Events?

Nov 8, 2011

I'm a flash beginner and I've been having alot of trouble figuring out how to make a button which can be controlled with the keyboard as well as the mouse and plays a sound when clicked but when the button is released the sound instantly stops. What I'm going for is a piano application, I made the button, I know how to create keyboard events with listeners and make the different button states up and down but I don't know how to control the button with the keyboard and play sound when the button is clicked but stop the sound when the button is released.

Also I'd like to have it where the space bar will cancel whatever makes the sound stop so it just rings out until the sound clip ends. Can someone explain to me how to do this, remember I'm a beginner so please explain everything.

View 6 Replies

IDE :: SwapDepths And GotoAndPlay - Play With A Navigation Swapping The Movies To The Front As Clicked

Oct 15, 2009

I am trying to get a FLA to work correctly. I have 4 movies that I want to play with a navigation swapping the movies to the front as clicked. When I use the navigation, the first few movies work great, but as I click through they start to get a little jumbled, and it breaks. I am using this script for the buttons to call on the movies:

[Code]....

View 1 Replies

ActionScript 2.0 :: Get The Video To Stop When Clicked, But Can't Get The Movie Clip Of The Flashing Hazards To Play?

Sep 27, 2009

We have a short video of a street, which we are looking to pause when it is clicked and then all the hazards turn into drawings and flash. Then when you hover over a hazard it tells you some info about it.I have managed to get the video to stop when clicked, using the below code but can't get the movie clip of the flashing hazards to play at the same time. Is it even possible?

ActionScript Code:
on (rollOver) {
Pause video[code]...

View 3 Replies

ActionScript 2.0 :: Looping Menu - Go Back To Frame And Play From There So It Would Loop All Until The Button Is Clicked

Apr 10, 2010

I've got an intro for a movie,and a single button appears around frame 58,and I've tried giving it a function so it will skip to fram 478 and play the whole movie from there on:

PlayCompl_btn.onRelease = function() {
gotoAndPlay(478);
}

but it keeps saying "statement must appear within handler" and I've got the same problem when the movie reaches frame 477 I want it to go back to frame 58 and play from there so it would loop all until the button is clicked:

PlayCompl_btn.onEnterFrame = function() {
gotoAndPlay(58);
};

View 9 Replies

ActionScript 3.0 :: Movie To Play The Tween That Spans From 25 To 35, Then Stop UNLESS A Button Has Been Clicked Back On Frame 24?

Jan 8, 2010

Normally, I want the movie to play the tween that spans from 25 to 35, then stop UNLESS a button has been clicked back on frame 24 - then I want the tween played from 25 to 35 then jump to 46.Problem is, in the button function code, if I have...gotoAndPlay(25); gotoAndPlay(46);the timeline jumps straight to 46 - it doesn't play 25-35. Why?I tried putting a timer in between the two gotoAndPlays, but itignored that too and jumped to 46.o how do I tell it - 'play from 25-35 and stop, unless but_a was pressed back on Frame 24 - then play 25-35, and then play 46' ?

View 7 Replies

ActionScript 3.0 :: Change Tint Of Movie Clip On Rollover, Play Sound File When Clicked?

Nov 9, 2009

Drag and drop game. I'd like the instance to tint red when rolled over after it's been successfully dropped. I'd also like to play a sound file when clicked after successful drop. Here's the code:

ActionScript Code:
addEventListener("dropped", dropper);
function dropper(e:Event):void {

[code]....

View 6 Replies







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