ActionScript 3.0 :: Reactive A Button After MoveClip Is Finished?

Feb 20, 2012

I have a button that is deactivated when it is clicked. The movie clip is played and the button is activated. But I don't know how to reactivate the button once the movie clip is complete.
 
readme.addEventListener(MouseEvent.CLICK, playMe1);
function playMe1(e:MouseEvent):void{
SoundMixer.stopAll();

[Code].... 
 
How do I reactivate the button after the movie clip is complete?

View 3 Replies


Similar Posts:


ActionScript 2.0 :: Moveclip Volume Up And Down Button?

May 7, 2005

I'm trying to create a movieclip that on mouseDown will decrease the volume by one as long as it is pressed.

I currently have a global variable called volPercent set to 100 initially and I have two buttons with the following code.

volumeup_btn.onRelease = function() {
if (volPercent != 100) {
volPercent += 1;

[Code].....

It works great but I need it to repeat the volume increase or decrease as long as it is pressed.

View 2 Replies

ActionScript 2.0 :: Control Timeline From Button Within Moveclip?

Sep 1, 2010

So im creating a site for a friend and I have placed the menu inside a movieclip so the buttons are inside the movieclip and want them to control the main timeline. This the script i have tried :

Code:
stop();
natural1.onRelease = function () {

[code].....

View 2 Replies

ActionScript 2.0 :: Nested Button / Moveclip Not Firing On(rollover)

Jan 11, 2011

I have made an entire website in AS2. Now suddenly the Client has decided that he wants to highlight multiple buttons, when the viewer rolls over any one of the buttons in a group. The buttons are all nested within a movieclip, which is within a separate .swf. This swf is loaded into a movieclip in the main file. I entered some code to under on(rollOver){} of the button but it never fired.

After some research I found that perhaps converting buttons into movie clips would solve it. There around 40 buttons in total, and 8 such files ...I decided to try with one first, and then also, the on(rollOver) did not work. I then found out that nested movieclips do not always call on(rollOver) and the only solution might be to convert to AS3. Now this is obviously a nearly impossible thing for me to do at this stage, as

1. I am not that experienced with AS3 and the website is quite extensive

2. I need to send out this website asap...

View 3 Replies

ActionScript 3.0 :: KeyboardEvent Cannot Reactive After GotoAndPlay

Jun 30, 2011

I had a problem with KeyboardEvent in ActionScript 3.0,I created a simple shooting game, the game has 2 Frame,

1. Title Game (Frame 1)

2. Game Playing (Frame 2)

The problem is in Frame 1 when Button is clicked playinggame then switched Frame to Frame 2 where the game takes place where the user can move the aircraft by using the keyboard, (Left Arrow, Up Arrow, Right Arrow & Down Arrow).But when a keyboard button is pressed, KeyboardEvent not react at all, and aircraft can not be controlled.Even more bizarre when the stage at the click KeyboardEvent can react and aircraft can be controlled.how to keep the button is clicked playinggame in Frame and the Frame 2, the aircraft can still be controlled using the keyboard [URL]

View 2 Replies

Button To Check If Movieclip Is Finished?

Apr 9, 2009

I'm using Actionscript 2 for this interactive.This is what I'm trying to get a button to do:on release:check "mainmovie1" mc on main timeline.If "mainmovie1" mc's timeline is at frame labeled "finished" go to label "1.0" on main timeline If not, go to label "fake_1.0" main timeline

View 2 Replies

Temporarily Disable Button Until Movieclip Finished?

Aug 3, 2009

I have a movieclip that plays on click of my 3 buttons I managed to get that working fine. When I click a button I want to temporarily disable all buttons until the movieclip finishes playing then enable the buttons to be clickable again.

my code looks like this:

stop();
but1.addEventListener(MouseEvent.CLICK,but1_onMous eClick);
function but1_onMouseClick(e:MouseEvent):void

[Code]....

Then same thing for but2 and but3 only with gotoAndStop(2 or 3 );

and then I have a stop(); at the 1st frame in my movieclip.

View 12 Replies

ActionScript 2.0 :: Disable Button Till Animation Is Finished?

May 18, 2007

I'm trying to make a script that will disable leftarrow till the animation is finished. I made a crude attempt myself but it doesn't work :/.

[AS]import mx.transitions.Tween;
allowChanging = true;
if (allowChanging == true) {

[Code].....

View 2 Replies

ActionScript 2.0 :: XML Thumbnails And Can't Click On The Button Till The Tween Is Finished

Dec 12, 2007

created the gallery and made thumbnails vertical everything works fine except my tween for the thumbnails. i need help disabling the hit_up and hit_down buttons for the amount of time the tween is going on so someone can't click on the button till the tween is finished.

[Code]...

View 5 Replies

ActionScript 3.0 :: Changing Stop Into Play Button After MP3 Finished Playing?

Sep 6, 2010

I have a simple Flash-player button (toggle play/stop) that plays MP3s. When I press play the MP3 starts and the button changes to stop. When I press again the music stops and the stop-button changes to play. I have several player-buttons on my page. How do I stop all sounds when I press play on one of the buttons? As of now, I can start several MP3 at the same time and I don't want that. I've tried this:
Code:
import flash.media.SoundMixer;
SoundMixer.stopAll();
But it doesn't work out. Do I need to number the players somehow?

Also, when the MP3 has finished playing it should turn into a play button. As of right now it's a stop-button when it's finished playing. How do I change it to a play-button? This is the Actionscript 3 code:
var flashVars=this.root.loaderInfo.parameters;
var loadSnd:URLRequest = new URLRequest(flashVars.myVar);
var thisSnd:Sound = new Sound();
var sndTrans: SoundChannel = new SoundChannel();
thisSnd.load(loadSnd);
[Code] .....

View 2 Replies

ActionScript 3.0 :: Reverse Timeline - Create A Button On New Scene After The Animation Has Finished

Jan 25, 2010

I have linked a button to another scene, in whic the second scene automatically plays some animation. I want to create a button on this new scene, after the animation has finished, which reverses the animation and then automatically goes back to the original scene. I have this code:

[Code]...

View 5 Replies

ActionScript 2.0 :: Direct That Movie To Go Back To Frame 299 Once It Is Finished Playing / Can Choose Different Button?

Nov 3, 2009

what happens is I have a movie that play out to a lets say frame 299 then 3 buttons will show up on the stage. now when I press button 1 it will start playing a movie starting on frame 300. How can I direct that movie to go back to frame 299 once it is finished playing so I can choose a different button?I know I can add another button at the final frame to do that but I'm not sure if I want to go that route.

View 1 Replies

ActionScript 2.0 :: Can't Locate MoveClip?

Jul 28, 2006

I have loaded an external .swf file on to the stage with multiple movieClips in it. From the main timline of which I load this external .swf file, I am moving the movieclip(s) around the stage (with the commands of the arrow key). On the main timeline I have this:

function this_function() {
trace(mc_holder.village._x);
}[code]....

When I trace the village on the onEnterFrame function, I am successful in viewing the value/position of the village in the in the external .swf file. However, if 'this_occurs' and I tell it to use the function 'this_function', where I tell it to trace the village again, it doesn't recongize the movieClip, or village. Instead of giving me a value, it just gives me 'undefined'. So why is it that the 'this_function' can't locate the external .swf file village?

View 2 Replies

ActionScript 3.0 :: Working With Frames - "If The Main Timeline Is Finished - Change To The Play Button"?

Jun 10, 2010

I am on the main stage. In a layer I create a button. I double click on this button to enter its layer. I then do some AS3 to say if the play button is pressed, to change to a pause button. How would I say "If the main timeline is finished, change to the play button"? I am trying

[Code]...

View 1 Replies

ActionScript 2.0 :: Make The Moveclip Appear And Disappear ?

Nov 7, 2008

I have a movieclip - instance name "popup clock" . The frame on which it is on has the following code:

Code:
popupclock._visible = false;

The movieclip starts off invisible like it should. I also have a button which has the following code:

Code:
on (release) {
if (popupclock._visible=true) {[code]..

The code should allow the button to make the moveclip appear and disappear but it doesn't work?

View 4 Replies

Actionscript :: Move A Moveclip Across The Screen?

Dec 14, 2010

I am making a small flash game where my character releases a balloon into the air. I can get everything to work but when the character produces a balloon it will not float towards the sky. The code is below:

Code:
stop();
var tobpos:int;
tobpos = toby.x

[code]...

I've tried doing a loop but it gives me an error telling me that the script has run for too long.

View 2 Replies

ActionScript 2.0 :: Make A Moveclip A Link?

Mar 24, 2008

I'm wanting to make a movie clip a link, the movie clip loads an image from a php file.

Heres the actionscript that loads the image, if it helps. Also, how do a load text into a dynamic text box with this script. The text I want to put into it is loaded from the php file.

[Code]....

Also is there any way to resize the photo in the actionscript. I want the photo to fit in a movieclip 190x120.

View 2 Replies

ActionScript 2.0 :: How To Duplicate Moveclip Automatically

Sep 8, 2003

In my flash file, I have a movieclip called target and one button used to duplicate the target movieclip.

[Code]...

View 2 Replies

ActionScript 2.0 :: Dynamic MoveClip Instance Can't Reference?

Nov 15, 2009

I have a script on frame 1 that onRelease of button should tell dynamic MovieClip instances which have been added by attachMovie on frame 2 and 3 to go to a particular frame , here's the code:Frame 1:numdests is set to 2pagesAmount is set to 4

btn_submit.onPress = function(){
for (var i = 0; i<numdests; i++){
for (d = 1; d < pagesAmount + 1; d++){

[code].....

View 9 Replies

ActionScript 2.0 :: Onload Unloadaing Moveclip Within Movieclip?

Dec 16, 2009

Ok so i have a movieclip called 'home' which is within the container called 'sections'. On the 'home' movieclip there are buttons which go to other movieclips e.g. 'health' which are within the container 'holder'. I want it so that when the 'health' button is clicked it unloads the home movieclip within the 'sections' container and open that movieclip. I have tried:

PHP Code:
on (release) {
if (_root.sections.home) {

[code]......

View 9 Replies

ActionScript 3.0 :: Removing Specific Instances Of A Moveclip?

Mar 9, 2010

I have a sell function for my towers that when you select them and click the "Sell button" it removes the turret from the screen and stops it from firing. This all works fine.

But my problem comes when i have placed two of the same tower types on the screen at once. What happens is that it deletes everything and not just one tower like i want.

Ive thought about how i could do this and so far i have been unsuccessful in doing this.

deal with deleting a specific movie clip from the stage.

The code in question with dealing with making the Turrets is Below.

function makeTurret(xValue:int,yValue:int):void{
var turret:Turret = new Turret();
turret.x = xValue+12.5;

[Code].....

View 1 Replies

ActionScript 3.0 :: Checking Moveclip Current Frame

Dec 6, 2009

im working on a small app and i have a question about checking the current frame of a movie clip. I have a movieclip and inside the movieclip i have a few frames on the timeline. I use myMovieClip.gotoAndStop(14); to move between the frames but what i want to know is if i can find out the current frame of a movieclip timeline.
 
If myMovieClip timeline is on frame 14 then do ....

View 1 Replies

ActionScript 3.0 :: Change Loaded Swf MoveClip Properties?

Dec 23, 2009

I'm loading a swf to my main stage and im adding a child to a childMovieclip in the loaded movieclip

but when i play the loaded swf and it goes back to frame 1 and starts plating again the changes i made aren't there?

View 5 Replies

ActionScript 2.0 :: Dynamic MoveClip Instance Can't Reference

Nov 15, 2009

I have a script on frame 1 that onRelease of button should tell dynamic MovieClip instances which have been added by attachMovie on frame 2 and 3 to go to a particular frame , here's the code:

Frame 1:
numdests is set to 2
pagesAmount is set to 4

[Code].....

Currently the movies that are added using AttachMovie don't move when button on frame 1 is pressed.

View 0 Replies

ActionScript 2.0 :: Setting An Interval For Duplicated Moveclip?

Nov 24, 2010

i have it when you land on the "ground" a dust cloud spawns, and goes away. Now i got that part under control, sometimes the "player" MC glitches and moves ever so slightly up and down unnoticeablly if it was for the dust cloud, Now my question, how would i go about setting an interval for the duplicated moveclip?

View 1 Replies

Actionscript 2.0 :: Load New Image In Moveclip Every 5 Seconds

May 5, 2009

I'm attempting to load a new image into a Movieclip from an Array assigned in KeyFrame 1 on the Main timeline and I am trying to use setInterval and clearInterval to get this working, but I think I may have layout or the function incorrect.[code]This loads a new image every time the panel is clicked on (Panel 2 - Trusted) but I can't get it to automatically cycle through the images in the array. Here's a link to the SWF in question: URL..And in case someone wants to see how I have it setup, here's a copy of the FLA: URL... (CSS and images are loaded externally)Does anyone see what I'm doing wrong? I need to apply this function to 2 other panels, so I need to streamline.

View 3 Replies

ActionScript 3.0 :: Scale Moveclip From Center Registration?

May 1, 2010

I am using a slider component to scale a movie clip. Currently it scales from the bottom right corner (I guess this is default). I would like the MC to scale out from the center.

Current Code

// slider
slider.addEventListener(SliderEvent.CHANGE, scaleObject);
slider.minimum = 1;

[Code]....

View 2 Replies

ActionScript 3.0 :: Adding A Moveclip To The Screen That Uses .as Code

Jun 27, 2011

I am having trouble accessing this movieclip and adding it to the stage.I have just started using external .as files to code game characters and this is the only part that gets me at the moment.The character works completely fine if they are already on the stage when the frame loads, but I cannot figure out how to access this movieclip and place it on the stage from the MAIN timeline, where I plan on running the main game code.I have tried tons of variations, is there anyone that can please tell me the proper way to do this with this linkage?

View 14 Replies

ActionScript 2.0 :: Stop Randomly Moving A Moveclip?

Nov 10, 2003

lets jsut say like were randomly moving a moveclip around how do i click on it and stop it?

View 3 Replies

ActionScript 2.0 :: Send Data From Moveclip 1 To The Main Movieclip?

Feb 16, 2009

i have main movie .. in the first frame i made " loadMovie " for 2 movieclips in diffrent places on the main movie but the problem is i need to send data from one of the loaded movieclips to text in the main movie .. how to made this ..

View 1 Replies







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