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
Similar Posts:
Feb 17, 2010
how to code is a small 12-step volume bar. For each increasing step a white dot should show, so when the volume reaches maximum 12 dots would be shown. Same goes for when the volume is decreased, each step will remove a dot (from right towards left) until the mimimum of 1 step is reached. To turn the volume up/down two buttons should be used, a "-" and "+". I'm not asking for a design or complete code, "just" a hint or walkthrough. Been trying for several hours now.
View 8 Replies
Jan 20, 2010
I have this code that I found online that does an infinite rotating gallery, now my problem is that on enter frame it jumps and too fast. I want it to be as fast at after you hover out of the logo.
Here is the code:
//Import TweenMax
import com.greensock.TweenMax;
//Save the horizontal center
[Code].....
View 1 Replies
Jun 11, 2006
I was wondering if there's any way to modify the kirupa infinite menu tutorial AS so that the middle button is the largest, and the buttons on either side of it are smaller, and so on for the rest of the infinite menu??? I though I'd try asking this question in the Actionscript forum, since no one answered me in the Flash MX area.
View 3 Replies
Apr 10, 2007
I have a movie that, when a button is pressed, a specific movieclip (named revealbar) moves a certain increment (in this case 25 pixels):
Code:
on(press){
gotoAndStop(2);
_root.revealbar._x = _root.revealbar._x+25;
}
What I'd like to do is have the bar decrease in size instead of just move.
View 4 Replies
Nov 15, 2011
How to decrease color depth of my flash app from 32byte to 16 or 24? I am using Adobe Flash CS5, and I can't find anywhere this option.
View 0 Replies
Mar 23, 2012
I have a problem with scaleX and scaleY. When I use them for images created by photoshop their graphic decrease a lot. I use scaleX and scaleY for changing the size of image so scaleX equal with scaleY. Is there another way to change the size of image in actionscript without decreasing graphic?
View 9 Replies
Apr 12, 2012
I seem to be having problems with rectangles moving from their assigned positions when all I want to do is decrease their width.A game I'm working on simulates an explosive with a fuse. The fuse decreases in size as a clock counts down to 0.I think the problem has to do with local coordinates vs. global coords, but I'm not sure how to rectify the problem. Here is some code:
//fuse
_fuse = new Sprite();
_fuse.graphics.beginFill(0x000000);[code]........
Nowhere in my code does the x position of the fuse change.Aside from this one issue, the rect functions exactly how I want it to.
View 1 Replies
May 27, 2010
I am trying to decrease a graphic symbols width by a percentage based on two external variables.
Code:
var currentHealth:Number=70
var totalHealth:Number=70
[code].......
View 6 Replies
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
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
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
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
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
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
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
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
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
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
Oct 11, 2009
I have a MC (a ball) with this AS on it:
[Code]...
This bounces the ball off each 'wall'. how to add more balls (using actionscript - ie not copying and pasting on the stage) and to make the balls bounce off eachother too?
View 1 Replies
Mar 31, 2012
I now have this but only one ball bounces when the flash movie is runvar array:Array = new Array;var dx:Number = Math.random() * 20;var dy:Number = Math.random() * 10;var velX:Number = 5;var velY:Nu
View 2 Replies
Mar 25, 2011
I wish to have a numeric stepper which allows me to choose the no of balls I want, then when i press the button I want all these balls to fall down..but when I press the button the x no of balls are generated but not falling down.
View 6 Replies
Jun 6, 2010
I was wondering which is the best way to create 3d graphics in flash like cubes, balls, a 3d cake or anything.
View 2 Replies
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
Apr 29, 2010
im building a sound toy that has four balls that can be thrown around and will bounce of each other. when each ball collides i have a chord to be played through a hit test for each pair. im having a problem with getting good collisions between balls and also using hit tests to trigger sound.
View 1 Replies
Jun 7, 2010
I have a machine that shoots canon balls into three different barrels, each on a different x axis, I need to be able to shoot at an arc into the target barrel, the target barrel will be randomly determined right before the ball is fired, the barrels will be randomly placed from stage to stage
the friction and gravity applied are constant variables, how can i determine both the correct x and y veleocity to shoot the balls out so that they end up in the correct barrel. I don't want to hard code any variables
View 2 Replies
Nov 30, 2010
I'm trying to make a program that grabs info from a text file then uses the info in the file to assign where certain balls will rotate (eventually I'll configure it to looking like dots rotating around an invisible sphere)Now, I can do these two things separately, load info from a file and make blue balls rotate around given points... but I've been tripping up hard on making them work together, and I think my problem is in how I handle the events and events listeners to work with the code, you'll need to start a new flash AS3 file Then on the stage create a circle with the oval tool convert the circle to a symbol named "BlueCircle" and name the linkage class as "BlueCircle" then paste this code...
Code:
var longLatLoader:URLLoader = new URLLoader();
longLatLoader.dataFormat=URLLoaderDataFormat.VARIABLES;
longLatLoader.addEventListener(Event.COMPLETE, onLoaded);[code]....
View 3 Replies
Aug 10, 2010
I'm editing a scoller and have removed a photo from it however as the scroller scrolls a gap slowly appears where the original photo was. I can't seem to stop this happening?
View 1 Replies
Jul 7, 2009
I've been working on a flash animation that has been set to 12frames per second, but now my boss has told me it needs to be 25fps - but when i change the frame rate in 'modify>document' the whole thing just speeds up. Is there a way to increase the fps whilst retaining the original speed?
View 1 Replies
Nov 6, 2009
I am working on the following code and I keep getting a cut off at around the 'C' of Dave's computer.I know this is going to be a simple answer but I for the life of me cannot figure out HOW to extend the string visual field. I am pretty sure the secret lies in the variable len.
Code:
import flash.text.TextField;
import flash.events.Event;
var txtFld:TextField = new TextField();
[code]....
View 2 Replies