ActionScript 2.0 :: How To Recreate Gravity
Jun 24, 2003
i'm trying to recreate gravity. this is what i have so far:
[AS]G = 0.005;
m1 = ball1._width;
m2 = ball2._width;
scrnW = 550
scrnH = 400
[code]....
the script looks alright to me but when run, the effect is wrong...
View 14 Replies
Similar Posts:
Aug 27, 2009
I am trying to recreate an xml through php as I am pulling information from a database. I know the problem is with the php code as the actionscript code works with a normal xml file[code]...
View 0 Replies
Apr 8, 2008
Im trying to convert my company's logo from a jpg to a flash movieclip...I need to do this because the jpg has a static background of white...but I need the background to be transparent so that only the text graphix show up above everything else...assuming I can get a hold of the font used for the logo...how would I do all the fancy shading/lighting with the "bent horizon" look across it? I am by no means a designer...merely a wannabe developer...so I know nothing as far as the pretty part of flash is concerned...here is the logo I am trying to duplicate..
View 2 Replies
Jul 4, 2009
I want to load in external swfs into an mc on the root called 'holder'.In As2, I would just do loadMovie("whatever.swf", this.holder); And if I loaded another swf into that same holder it would replace the contents with the new swf.
But now, I'm trying As3 and doing..var i =new Loader();i.load(new URLRequest("contact.swf"));this.holder.addChild(i)
When I repeat this code, for another external swf, I want it to replace the first one, but it appears to not be doing that. I fear that this addChild, is simply adding more mc's within my main holder mc.
So I don't know how to match the functionality that I liked from As2.
View 2 Replies
Aug 30, 2009
I'm trying to recreate the sky with a rotating clip in the shape of an arc. I've tried the built-in timer that changes the rotation, I've tried the TweenMax class, and I've tried hand-building the animation with a motion tween. In all cases, the movement is jerky--smooth for about five frames, then a sudden jerk of motion. What can I do to make this animation smoother? Clip is about 2400px wide, 400px high, with a reg point about 3000px away that it rotates around.
View 3 Replies
Mar 4, 2012
I've been looking all over with no luck for a way to code the pen tool in AS3. What i want is, in the flash application, the pen tool as it functions in Flash itself. So, for example, i push Ctrl + Enter and test my program, then can use the mouse to click and create a point, click again and it connects with a straight line, or click and drag to create a curve. I don't need anything like hinges where you can go back and edit curves, i just want the click/click drag line functionality.
View 6 Replies
Oct 20, 2003
Does anyone know how to recreate the TV snow effect, you know when you're trying to tune in a tv channel and all you get is the 'fuzz'?
View 10 Replies
Sep 14, 2009
I worked on a new Flash project, but I cant seem to find a good solution for how I want my objects to collide. In my project I have: a Ball(moving object) and a Floor(not moving).
The ball is positioned over the floor and drops onto the floor through the gravity that is applied with the code.
[Code]...
Is there a way to have a global gravity in flash AS3. In which you could choose what objects you want to be affected by it? Is there a way to have a block of code that separates moving from still objects and will not let any objects collide(not overlap)?
View 1 Replies
Sep 14, 2009
In my project I have: a Ball(moving object) and a Floor(not moving).The ball is positioned over the floor and drops onto the floor through the gravity that is applied with the code.
[code]....
First: the -23 in the code is what I don't like. Second: every single object that deals with collisions would need to be put into the if statement.Is there a way to have a global gravity in flash AS3. In which you could choose what objects you want to be affected by it?Is there a way to have a block of code that separates moving from still objects and will not let any objects collide(not overlap)?
View 2 Replies
Feb 12, 2009
I have flash and i wat to recreate a dragable object that will blur anything behind it.
View 3 Replies
Mar 17, 2010
Im working on a project where i have 5 buttons on one side and a blank window in the middle of the screen. when a button is clicked an external swf is loaded with movieclips of text based on each catergory. 2 of these movieclips of text are long and a request for an index at the top of the page has been made. everything in the movie is working so far except the page index. i wanted to create this similiar to the way an html index works with page anchors.
i have made all the letters and converted them to movieclips. ive added event listeners to those buttons so that the main window's y position is moved when they are clicked. the main swf window will jump down to the desired position but the scroll button remains at the top and theres no way to scoll back up to the top of the page.
View 1 Replies
Sep 4, 2010
I came a across a really sharp intro effect I'd like to try and create in jQuery, mootools or prototype[url]... (Just the spin in effect) So in a sense, I want to spin in the main content div of the page.
View 3 Replies
Jan 9, 2006
I have been trying to recreate the rollOver swapdepth effect (above). Works OK but slow using mc's on the main timeline using the swapDepth behaviors.It appears (on the [URL]) that each swf is loaded independently on top of the main with their own preloaders.This seems vastly more complicated than just swapping depths on a single timeline.
View 1 Replies
Sep 14, 2009
In my project I have: a Ball(moving object) and a Floor(not moving).The ball is positioned over the floor and drops onto the floor through the gravity that is applied with the code.
Code:
var gy:Number = 0;
var gravity:Number = .2
function ballMovement(event:Event):void{
[code]....
First: the -23 in the code is what I don't like.
Second: every single object that deals with collisions would need to be put into the if statement.Is there a way to have a global gravity in flash AS3. In which you could choose what objects you want to be affected by it?Is there a way to have a block of code that separates moving from still objects and will not let any objects collide(not overlap)?
View 1 Replies
Jun 14, 2005
referring to Pom's tutorial on gravity (up and down), I was wondering how to alter the code to make it so that the object moved and bounced along the x-axis. I tried this:
Code:
onClipEvent (load) {
gravity = 2 ;
// We get the time when the ball is released for the
[Code].....
View 5 Replies
May 14, 2010
I am using Box2d 2.02, and am having trouble with setting linear velocity of a body in 0 gravity. When I trace GetLinearVelocity() when left is pressed, it reports the correct vector (-20.0, 0.0) but the body does not move. It is a dynamic body.
Code:
if (Key.isDown(Keyboard.LEFT)) {
if (mover.IsSleeping()){
mover.WakeUp();
}
mover.SetLinearVelocity(new b2Vec2( -20.0, 0.0));
}
View 1 Replies
Mar 5, 2010
So I'm using PixelFume's Active Blur class to recreate the effect, though somewhat simpler so I rewrote some of it and it seem screwed up to me. I have it on the first frame of an .swf that gets loaded into and container clip in the main .swf via loadMovie. It does what I want it to do, but everytime you load the page it comes up slower and slower. If you click the button to load it like 15 times, it's pretty much 1fps.
The code is as below:
Code:
import flash.filters.BlurFilter;
import flash.display.BitmapData;
import flash.geom.Point;
var bottom = bg.getDepth();
this.createEmptyMovieClip("bgBlur", bottom+1);
[Code] .....
View 2 Replies
Nov 19, 2009
i want to send an object and its properties (that have been manipulated) to my server. I then plan to re-create this object and automatically create a screenshot of the object (i do not want to do this client side). i'm planning to use POST and some php for each property as its changed, and then load this data into a server side as3 script. i would like this server side script to take the object in automatically, and create an image server side - is there anyway to doing all this while not prompting for any input (from what i've learnt, flash needs a prompt before saving a file)? i haven't used flex, could it be used here?
View 10 Replies
Jan 30, 2011
Effect is generally in mostly vertical with slight horizontal offsets looks like: often used by paintors in sky painting like here
View 1 Replies
Apr 25, 2008
I've recently created a Super Text Transition class - its pretty much perfect, except theres on thing that niggles me.
It works by splitting up dynamic textfields into many movie clips, one for each letter - but I cant work out how to position the newly created letter movie clips (each containing a dynamic textfield with only one letter in them) in the right way so it looks exactly like the original text would in the textfield.
Im assuming Im not taking into account certain variables - between textWidth/textHeight, _width and _height of the letter movie clips, leading, letterSpacing blablabla. know the variables to use to recreate a text field with lots of letter mcs?
View 2 Replies
Apr 15, 2009
I am trying to recreate the following website except using different graphics but with the same navigation elements and the same motion and tweening and animation effects going on in the stage.[URL]
View 1 Replies
Apr 21, 2009
I would like to recreate the flash selection tool's functionality. To clarify, I created a drawing program that uses the drawing api. Now if a user draws a circle, I would like them to have the ability to stretch and mold it like you can in flash by hovering close to the edge so the ) cursor shows up.
View 3 Replies
May 11, 2009
I need to recreate 2 buttons inside a mc or a main button in AS 2.0 [URL]rollover "portfolio" then rollover faith in chaos you will see a set of buttons in what looks like the main button overstate I know this was done with a javascript menu in this case but there has to be a way to do it in Flash I need to create that overstate with accessible buttons inside.
View 10 Replies
Feb 5, 2012
First time on the site. I have been desperately looking for information on this transition, but I have only gotten so far. I was wondering how to recreate the effect that this site has when transitioning between pages. [URL] As you can see, there is a very nice fade out, then in effect. I know that u can fade in with a motion tween, but when u click the next link, the page just jumps into the next one instead of fading. How can I get that fading both in and out effect?
View 2 Replies
Oct 15, 2010
I'm making a game were parts of the level are randomly generated and move across the screen and while I have made it so all that works correctly I am having trouble running a hittest on them to allow for gravity. Below is the piece of code attached to the player movieclip that I think is causing the issue (shortened for sake of space)
[Code]...
View 3 Replies
Oct 5, 2003
I am creating a flash animation for my physics class. I am demestrating free fall. I know how to create a free fall object, but how would I make it so that the user can change the gravity?
View 12 Replies
Sep 15, 2004
check this code onClipEvent (load) { k = .2; damp = .9; grav = .1; } onClipEvent (enterFrame) { ax = (_root._xmouse-_x)*k; ay = (_root._ymouse-_y)*k; vx += ax; vy += ay; vy += grav; vx *= damp; vy *= damp; _x += vx; _y += vy; } tell me where am i going wrong??? cos after giving the code to mc its not responding in any terms except the drag and drop to the invisible button.
View 4 Replies
Aug 16, 2005
i have a game where fish fall out the sky and a penguin on ice skates has to catch them before the fish get to heavy for the ice, the ice cracks and the ice skating penguin falls into the water and freezes. I have all the code but cant work out how to set the random location along the Y axis for the fish to fall. I have a gravity script but cant work out how to include the random position for the fish. There are 30 fish and i want to be able to have one fish fall wait a half a second and have another fall and so on....until all 30 have been dropped...
My gravity script is this:
ymov = 0;
grav = 2;
_root.onEnterFrame =function() {
ymov += grav;
[Code].....
Anyone know how i could set a random location in this or something similar?
View 1 Replies
Jan 19, 2006
I want to do gravity effect on a ball . I found some thing do this but I need to make the ball goes to the floor direction actually I want it to follow the sloping of the floor with the gravity effect .
View 14 Replies
Oct 2, 2008
I'm trying to find a way to do a cable in papervision(great white) that has the behavior(gravity and elasticity) like the following two links:url... Any clues as to how should I approach this?
View 2 Replies