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?
i would like to see if it is possible to have a user permanently change a variable that is utilized in the website. for instance, the width of a line is set to 1.0 in the script - through a keystroke the user can change that width to 2.0. what i would like to happen is have the value of 2.0 be permanently set so that when the next person visits the site, the width is set to 2.0. i know this is a simple example, but i would like to get the concept down first before i venture into writing out the script and doing something more interesting with it.
I'm trying to change Flex 3 ToggleButtonBar dataprovider on user or admin log in. I'm trying to use 2 viewstack, and I've got a component where the login form is in the component. What should I do to define the dataprovider based on user log in?
I am trying to change the z-index when you a user clicks on one of my movieclips. I get this error and am not sure how to resolve it. If anyone has a few minutes to view the code I posted below that would be awesome.
Here is the error I am getting: TypeError: Error #2007: Parameter child must be non-null.
instead of setting the intervals, i want to change it into something like adding a textbox for users to enter the intervals. and i also want to try to change the codes so that only when the user click, then the arrow would move. so its two separate favors.... 1.adding textbox.... 2.using onMouseDown function to move the arrow.
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)?
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)?
I have a PopUpButton that only contains 2 actions. Both actions are complete opposites of each other and switches a boolean property on an object from true to false or false to true. To avoid redundancy, I've only displaying one action at a time. So, if the property is true, the action to change it to true is not shown.
If my PopUp menu has a single option, I would like to remove the menu from being shown and basically revert the PopUpButton to act and look like a regular button. So far, I haven't really found a good way to do that in ActionScript without adding, removing or modifying styles for the button.
Is there a nice way to simply tell the button to hide the PopUp toggle? PS: In my specific example, YES it might be easier if I just used a toggle button. However, I want to reuse this button when dealing with an Array of objects. If I have more than one, the property could be true and false at the same time. In that case, I want to show the menu so they can choose what option to set all the object's properties to.
Is it posible to make a flash site, which will change the size when the vistors resolution is diferent? Practicly, every visitor will see the same size of the site, even if he has 800x600 or 1280x1024??Maybe making html go fullscreen but make the swf occupy only 80% of the screen, so it always have the same proportion to the users monitors.Do you have any example?
How do i get the font to change when the user types encode in the Input box then presses enter and then it changes the font in the Output box (which is dynamic) and also embed the font in the output box. So when they type inteh input box the font changes in the Output box.
On (keyPress ("Enter") { if (_parent.Input.text == "encode") { tf = new TextFormat();
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)?
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
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)); }
If the persons name is only 3 letters I want the font size to be 120 but based on the amount of characters, I would like to shrink the font size in order to fit the whole name inside the text field. I was playing with autosize, but couldn't get it to work.
making a textfield font size auto adjust accordingly?
I'm looking at some requirements for an upcoming flash project. One requirement is for the browser url in the address bar to change as a user clicks around in the flash movie so that a user might copy/paste said address into an email and another visitor will be brought to the same location. Is this possible?
I have a separate html page that does this with a php script,reating that php file which is just a form that allows users to enter a passcode that I provide them which will then simply link them to an external html page. Since I don't know about php, I am thinking a possible work around would be to have a text input box which would allow a user to enter (passwordA) then click Submit to load (pageX.hmtl) or they could enter (passwordB) and Submit would load (pageY.html)
This seems like someting I should already know but I am working on a user interface that I want to be skinable. I have about 8 different graphical elements and I want to change the appearance of these 8 different movieClips just by clicking a single button. I thought I would just create a new keyframe in my main time line and then manipulate the movieClips but that changed the appearance of the movie clip on frame 1 as well. Clarification: I want to change the color of my user interface background and I want to change the color of some clickable images as well. I want frame 1 to have a white background and I want frame 2 to have a red background. Do I need to create more movie clips and drag them onto my stage or can I just use the existing movieClips since all I really want to do is change colors?
I can't set a picture as a user-created page wallpaper and i also cant "like" this same page using a Facebook Desktop Graph API request.how to use the Facebook Graph API for AS3 to change the wallpaper on a user created page and also set the "like" status for that page of a user? Is this even possible?
How can I change the speed of a moving car based on values input by user? Also, how can I make Flash calculate values of a function based on those input values?
I have a scroll pane component with SWFs loaded in them vertically like a PDF viewer. I need to be able to change the page indicator when the user scrolls. I have an event listener on the scroll pane listening for scroll. I have an array of the Y values of each page; looks something like this: 0,800,1600,2400,3200 etc What kind of equation would I do to determine the correct number. My scroll event looks like this:
At run time, Is it possible to detect the 'Connection Speed of the user' and change the way my preloader works? Say If the user is on a Dial up connection then play the initial 50% of the movie that has been loaded while loading the remaining 50% in background, If the user is on DSL or cable then load the entire 100% movie and so on.
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)
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.
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...
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 .
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?
I'm making an interactive kind of game, and I want a number of scenes to change once the user has looked at each once.For example, they go into three different scenes. When they finish looking at them all, Flash records this, and then when they look back at each scene again, they've all changed.
Code: var spring:Number=.1; var frizione:Number=.98; var gravita:int=1; var limite:Number=stage.stageHeight; stage.frameRate=31; var colorsArray:Array = new Array(); [Code] .....
I've made a character, and used the bone tool to make it move in runtime.This works fine, but now I want to add gravity/physics, so I can throw my character and it lands on the ground like a real ragdoll. How do I do this in actionscript 3 ? And is it possible to do this within the fla (no class file).