ActionScript 2.0 :: Explode All Six Balls On The Stage Clicking?

Jul 13, 2009

Following is the code I paste in the first frame of layer1..it was working before I added for loop..I am tring to explode all six balls on the stage clicking..but what is missing ?How can I get it work ?

for (var i = 1; i<6; i++) {
ball[i].onPress = function() {
ball[i].gotoAndPlay("explode");
};
}

View 2 Replies


Similar Posts:


ActionScript-3 :: Write A Game In Which There Will Be Some Balls On The Stage?

Jul 30, 2011

I want to write a game in which there will be some balls on the stage, that will move randomly. They must have unique starting speed and angle and should interfere with each other just like real billiard balls. Is there any physics engine in AS3 that might be useful for this purpose, or will I have to write and model their behavior from the scratch?

View 1 Replies

How To Get Instance Name Value By Clicking Object On Stage

Apr 30, 2011

I created four instance of movieclip on stage and named them t1_mc,t2_mc,t3_mc,t4_mc. Then I made and array and loaded them inside the array

var arr1:Array = new Array( t1_mc, t2_mc, t3_mc, t4_mc );
var names:String;
//function made to add event listener to each object
function addListner():void {
for ( var i:uint = 0; i < arr1.length; i++ )
[Code] .....

View 1 Replies

ActionScript 3.0 :: Drawing Line By Clicking On Stage?

Nov 5, 2010

I started working with AS3 a month ago, I know the basics and stuff, but I can't do that much. The user would draw lines by clicking on the stage. The code works exactly as I wanted it to, but it is on AS2 . I tried, but I can't 'convert' it to AS3. I would like to know how this code would work on AS3! Here's the download link of the .fla, so you can see better what I mean: [URL].

View 3 Replies

ActionScript 3 :: Clicking And Dragging Through Frames On Stage

Mar 15, 2011

I have a frame-by-frame animation. I want to be able to click and drag on the stage back and forth and traverse through the animation. I.e. I want to click and drag from left to right to make the animation go forwards and right to left to make the animation go backwards. How would I achieve this? I am making an assumption that there will be some maths involved in calculating mouse position and traversing to the correct frame, but how would I do this?

View 2 Replies

ActionScript 3.0 :: Clicking To AddChild To Stage Coordinate?

May 5, 2009

I have a function for shooting at the stage/baddies using the code below. This has two problems, one, when I click somewhere it fires their, but when I click a second time, it fires at 0,0 coordinates on the screen, then if I move the mouse and fire, it doesn't track accurately.

Code:
package{
import flash.display.*;
import flash.events.*;

[Code].....

View 4 Replies

ActionScript 3.0 :: Animate Across The Stage In Response To Clicking Various Buttons?

Jan 28, 2010

I have a small mask that I need to animate across the stage in response to clicking various buttons. It has to go a different distance each time depending on which button is clicked along the x axis. I can get at the starting and ending x co-ordinates. need to develop a set of x cordinates so that the mask starts moving fast and slows down as it gets nearer - kind of like the easing effect. I figured using some sort of simple 1/x^2 expression and have spent an hour or so fiddling in excel. Trouble is its a LONG TIME since I did maths, and I can't remember what formula to use. Have tried google with "parabola", "simple curves" etc etc

View 3 Replies

Professional :: Flash - Crashes On Clicking Import To Stage?

Aug 19, 2010

I'm having an issue with a blank open document, clicking on 'import to stage' will crash the program or clicking on 'import to library' will crash the program I have tried uninstalling CS4 and re-installing CS4. The problem remains the same

View 3 Replies

ActionScript 3.0 :: KEY_UP Won't Work For Key ENTER Without Clicking On Stage

Mar 21, 2012

I´m trying to catch KEY_UP event if I press ENTER, without clicking on stage.
 
I´ve already disabled keyboard shorcuts for flash player, and added stage.focus = stage.
 
Not succeeding.
 
It only works if I click on stage.
 
It seems that for the other keys the KEY_UP works.

View 8 Replies

ActionScript 3.0 :: Stage Click Listener Gets Called When Clicking MC?

Apr 1, 2011

I have a drop-down menu that stays open when I click it, until I click it again. I want it to close when I click away from it. So I created an event listener of type MouseEvent.CLICK and apply it to the stage.

The obvious problem is, though, that when I click the drop-down menu to make it open, I'm also clicking the stage, which prevents it from opening.

I think there's probably a simple solution to this but I'm stuck. I called stopPropagation() on the drop-down menu and that seems like it should help but it doesn't.

View 2 Replies

Actionscript :: Remove A Movie Clip From The Stage Upon Double Clicking

Oct 17, 2011

I'm just trying to remove a movie clip from the stage upon double clicking

[Code]...

View 1 Replies

Actionscript 3 :: Click Event Added To Stage But Fires When Clicking On A Movieclick?

May 19, 2011

I added a click event to the stage but this event also fires when i'm clicking a movieclip on the stage.How can i make this event fire only if i click directly on the stage?

View 2 Replies

Professional :: CS5 - Make An Object Explode?

Apr 4, 2011

is there something like timeline efects in CS5? i cant find them anywere, and if there arent, how can i make an object explode? thnks

View 1 Replies

Actionscript 3 :: Convert PHP Explode String To It?

Jul 7, 2011

How to convert this form PHP to AS3?[code]...

View 1 Replies

ActionScript 3.0 :: Array - Explode A Bitmap Image

May 11, 2010

I want to explode a bitmap image. so I created some Array but I can not go ahead. Her is the code:

[Code]...

ok when i say Tweener.addTween(arrayOfBitmaps[i]. the animation is just made from the last part o fthe array and not by the whole group.

View 1 Replies

ActionScript 3.0 :: Shape Tween And Explode Effect

Mar 3, 2011

I have some letters and would like to morph each one into a bubble - think clear floating bubbles and then have each one explode individually one by one. I tried breaking apart each letter and then doing a shape tween into a bubble shape. Then applying the Explode effect. It kind of works but when it's doing the shape tween there is some white space that looks weird during the transition depending on the letter being used such as "D." How to make this work more smoothly? I guess I could also just use a bubble type font but then that defeats the purpose of having each letter turn into a round bubble.

View 2 Replies

ActionScript 2.0 :: Text Pixel Explode Effect

Aug 11, 2003

I'm trying to do that exploding text effect when it gets converted into pixels and the pixels wander around and recombine to form another word.Themovieclip of a square 5pixels wide and high has instance name of 'a'. What I'm doing right now is to create an array of points and duplicate the movieclip of the pixel and make it move to those points.[code]

View 2 Replies

ActionScript 3.0 :: Looking For A Shatter Or Explode Effect / Class?

Dec 7, 2009

I have an mc, that I want to shatter and float away. I know I've seen classes that do this sort of thing. Have you heard of any?

View 2 Replies

Actionscript 2.0 :: Sound On Event Select All(explode) Is Triggered

Jul 23, 2009

I want a sound to play every time Code: Select all(explode) is triggered. I have had little success trying to attach audio when it happens, so i decided to make an empty 2 frame long movie clip, frame one has Code: Select allstop(); for obvious reasons, and frame 2 has no action but it has the sound "blast".

[Code]....

Is the code i'm using, i am getting no error reports but no sound is being played. What am i doing wrong? (the audio i want to play is named blast and has an export name of blast, the movie clip is named blastmc and has an export name of blastmc)

View 2 Replies

Actionscript 3 :: Change The Color Of One Shape By Clicking On Clicking Another Object Of Sprite?

Aug 30, 2011

I have drawn intersecting lines. The user can click on a region inside the angle formed by the two lines.When the user clicks inside the area, the small region formed by the arc between the two lines showing the angle should change. How can I do that.the region between the intersecting lines is sprite object to dispatch event listener, but the arc is shape object.

View 1 Replies

Professional :: Flash Timeline Effect - Explode Animation Backwards

Sep 20, 2011

I am looking to explode an image backwards. Example, I have an image and at frame 1, Alpha is zero. At frame 20, the image is at Alpha 100%. From frame zero to 20, I want to have an exploded view come together by the time it reaches frame 20. I am reading this on web, and I don't have the 'Insert - timeline effects - explode' on my file menu. Is this a plugin that I have to install? This is the site I am reading. [URL]

View 4 Replies

ActionScript 2.0 :: OOP: Balls That Bounce Off Each Other?

Dec 18, 2006

I have a simple ball class where it bounces and such and stays on the stage based on boundaries. right now im using a for loop to attachMovie("ball",...) in my main fla file
which is basiclaly my movieclip that has the AS 2.0 class pointed to it. It bounces fine using the tutorial on Kirupa(by senocular?) i want these balls to bounce off each other too?

View 1 Replies

Refer To Balls That Are Created By DuplicateMovieClip?

Dec 12, 2008

I have balls (...sounded pervert) that are created by duplicateMovieClip, yes, they spawn, but right on top of each other, and I don't seem to be able to do anything to them, I tried ball+i.onEnterFrame = function(){} typed in several different ways ("ball"+i, ["ball"+i] etcetc...) And I just couldn't find How to refer to them. i'm trying to spawn them to random positions and make them move in random directions (got the moving part already coded but like I said I can't name them -> can't use it atm.)

Short version: How to refer to balls that are created by duplicateMovieClip?

View 2 Replies

ActionScript 3.0 :: Predictive Collision Between Balls

Feb 9, 2012

I want to detect perfect collision between two balls. i mean. when balls move in ENTER_FRAME. their (x,y) are updated with such a large value that it sometimes miss the complete collision. and also how to find the collision point.

View 2 Replies

ActionScript 3.0 :: Making Two Balls That Bounce Into Each Other

Feb 13, 2009

I'm trying to make two balls that bounce into eachother and walls for a school assignment. My problem is I don't really know the maths to make this work myself so I've tried to get help from others who don't know AS but who do know the maths, but I couldn't get that to work. Then I found a site that had exactly what I was looking for, but it was in AS2. I've tried to translate it to AS3 but it doesn't work properly either. The balls either get connected to eachother and stay that way or go out of the stage. This example is here:[URL] Attached my files. Probably lots of redundant code in my code from previous attempts at solving it, but I don't think it affects anything as it is now.

View 2 Replies

ActionScript 2.0 :: Bouncing Balls Off Each Other Around Screen

Jun 15, 2004

I've got this ball that bounces around the screen. There are a bunch more that are made with the duplicate movie clip command. I want them to bounce off eachother, as well as the walls. The problem is, I cant just put the code on the original ball because then balls want to bounce off themselves which creates problems. So my question is, is there some kind of loop I can use to make it so each duplicate ball will bounce off the others but not itself?

View 5 Replies

ActionScript 2.0 :: Balls Bouncing Off Each Other, Resting On Each Other?

Jan 1, 2007

I've been trying to recreate the yugop examplewhere the balls seem to bounce off each otherbut the difference is, they can also rest on top of each other.click to add more balls.

Code:
main.fla
var ballcount:Number=1;

[code]....

View 3 Replies

Flash :: Existing Engine For Bouncing Balls?

Sep 28, 2011

I'm looking at creating a game which involves many bouncing balls on the screen, and the user can sortof select one of those balls and take it out... The balls should be able to bounce of eachother and the walls. I've tried implementing this from scratch, following the tutorials at [URL] - but it's not quite working for me, and if I need the game to become more complicated- probably best to use an existing engine. So is there an existing engine that will work very fast and well for this sort of thing? At a glance- it didn't seem like box2d or flixel would work for this... but what do you say?

View 2 Replies

ActionScript 2.0 :: Make Bouncing Balls Bounce Off Each Other?

Oct 19, 2004

I have a number of random balls bouncing around the stage.What I am having difficulty with is making them bounce off each other when they run into each other.The balls bounce off the walls just fine, but I can't seem to figure out the hitTest thing.

View 3 Replies

ActionScript 2.0 :: Show Balls Increasing And Decreasing?

Apr 24, 2011

I want to show the number of balls increasing as the frame numbers increase, and I also want to show them decreasing (reverse the frame no) how can I go about doing this? I also need the current frame to be in the middle of all the total frames so when I go to the right balls wil increase and go to the left balls will decrease..

View 3 Replies







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