ActionScript 2.0 :: Friction Swinging - Stars Hanging By Strings From The Top Of Flash Document

Dec 19, 2005

I have an idea for something at work. I want to have stars hanging by strings from the top of my flash document. if the user mouses over these stars I want the star to lightly swing in the direction the mouse went over at. Almost as if you had a cardboard star hanging from the ceiling and you tapped it with your hand. I know this probably includes friction but my tests don't seem to work out the way I want. Does anyone know how to achieve this?

View 8 Replies


Similar Posts:


ActionScript 2.0 :: Friction Equations - Tweaking The Friction Constasnt?

Nov 10, 2007

I have a billiard ball system, whic detects collisions between balls and modifies their x and y velocities accordingly.I have included a friction variable and I have a very basic system for applying the force of friction for each iteration of movement:

private static var FRICTION:Number = 0.94;
public function move() : Void[code]....

This works to a reasonable level of satisfaction, but it doesn't quite feel right. The balls seem to take just a little too long to stop when they've slowed down to a very small velocity. I've tried tweaking the friction constasnt, but I still can't get sometthing that feels exactly right.

View 3 Replies

ActionScript 2.0 :: Mouse Bumping A Swinging Object?

Dec 28, 2010

I have been scouring the internet for the past week and still have not found a solution to my problem... I created a birdcage and want it to swing when the mouse bumps it - and I want it to swing in a direction that is dependent upon the direction that the "bump" is coming from. If the mouse bumps it from the right, I want the cage to swing to the left and vice versa. This link shows what I want to happen, but I don't want the user to control the friction, etc. [URL]..

Ideally, I want it to move depending on the force (speed?) of the mouse hit, if that is even possible... I am just starting scripting and can do basic things, like create websites with buttons and animations,

View 0 Replies

ActionScript 3.0 :: Flash App Hanging In Ie7?

Apr 16, 2009

've made a Flash app in as3. When it's executed in Firefox everything works fine, but in ie7 it's hanging. When the app is executed an xml is loaded. When the xml is loaded from the server, everything works fine, but when the xml is loaded from te webcache, the app starts hanging.

View 5 Replies

Flash :: Preloader Hanging / Freezing With 'hiccups'

May 24, 2011

I've developed a flash-based site for a client who has an account with GoDaddy and have uploaded all files successfully to the hosting server. The site consists of an initial preloader named "preloader.swf", which loads an external SWF file named "main.swf" that contains different sections including an image-gallery section.However, I notice that at times (as not always this happens) the initial flash preloader for the main flash-based site loads faster than usual with "hiccups". This results in when having to view an image in the gallery section of the site (where each image is loaded externally from the server having a preloader of its own), the selected image loads in a jagged manner with "hiccups" (for instance from 22% it pauses then jumps immediately to 31%, then pauses again and jumps immediately to 47%, and so on).

Then, at a point in time, the preloader suddenly freezes/hangs the entire site, having no other choice but to refresh the site.Only then, once the preloader of the image has froze and the site is refreshed, or the cache is cleared, will the entire site work perfectly as supposed to - i.e. the initial preloader loads more slower and smoother, and the preloaders of when the images are loading are more smoother as well (no sudden jumps in the percentages as before; the preloader loads in normal increments).how I can make the site load smoothly always without having to encounter any hiccups, freezing and hanging, as I've been checking my code over and over again but I can't find anything wrong with it?I was doing some research and read that the cause might be because of the following line "ProgressEvent.PROGRESS" as it might not fire at times in IE or Firefox. Is that so? If so, what alternative must I take?[code]

View 2 Replies

ActionScript 3.0 :: Push Multiple Strings Into An Array, And Some Of The Strings Are The Same?

Aug 24, 2009

I work on AS3 one week, and then take a break for a few weeks, then work on it a day, take a break, etc.. So I forget some of the basics, and need refreshers. I think I need to stop taking breaks.

Problem: I push multiple strings into an array, and some of the strings are the same.

Code:
var myArray = new Array();
myArray.push (Snivvle);
myArray.push (Kirupa);
myArray.push (Snivvle);

I want to find out which element positions "Snivvle" hogs up. We can see that it would be using element 0 and 2, and if we do an "indexOf" we would only get to see element 0, and doing a "lastIndexOf" we would only see element 2. How do I find out ALL of the element positions "Snivvle" is located in, so that it returns: element 0, element 2.

View 2 Replies

ActionScript 3.0 :: Math Friction Over Time

Aug 19, 2010

I'm used to applying basic friction like this:[code]The problem is I don't know how to convert this to be described over time, so that can reduce the value based on the amount of time that has passed.Say I want to reduce the value to compensate for 1 second passing, or 500ms? How does that work in to the equation?

View 9 Replies

ActionScript 3.0 :: Alternate Keys To Speed Up - Friction

Apr 23, 2009

I'm attempting to make a racing game. I want to make it so the user has press two other keys alternately in order to speed up. While the user is not pressing those keys the player should slow down gradually. I'd also like to add friction. Right now, I have code for basic movement:

[Code]...

View 1 Replies

ActionScript 3.0 :: Friction Increase As Distance Decreases?

May 10, 2010

I for the life of me can't figure out this simple equation that I want for a camera-following function.As distance decreases, friction increases.Friction being a number between 0 and 1, where friction = 1 is no friction.

View 2 Replies

ActionScript 2.0 :: Adjusting Friction Higher When Object Slow Down

Jul 31, 2005

I wrote this 9ball game a while back (never really finished it), and was showing it to a friend today. When a pool ball is rolling fast, less of it's mass should be touching the felt, therefore, less friction. As it slows down, there should be more contact with the felt, and therefore, more friction. Any realistic algorithm to use to adjust the friction higher as the balls slow down? [URL]

View 11 Replies

ActionScript 2.0 :: CS3 Sliding - When Running And Not Holding Keys Down Then The Friction Should Slow Me Down

Nov 12, 2009

when I'm running and not holding my keys down then the friction should slow me down. That works but the speed never stops at zero. I can't see him moving but I've put a text that draws his speed, because if the speed isn't zero and I'm not pressing any button then he will slide and that doesn't work look here: [URL]
The code in the player I use is:

[Code]....

View 1 Replies

ActionScript 2.0 :: Stars Following Animated Mc

Apr 21, 2006

I want to create a dynamically star burst that follows an animated mc. I found this mouse trailer that do the things I want, except it's following the mouse and not a mc.How can I modify the code to make it follow a mc and not the mouse?

View 3 Replies

Make Flash Buttons Tell Ppt Document To Go To A Certain Slide After Embedding A Flash Exe Into PowerPoint Document

Mar 14, 2002

Is it possible after embedding a flash exe in to PowerPoint document that we can make flash buttons tell the ppt document to go to a certain slide.

View 2 Replies

ActionScript 3.0 :: Cascading Particles/stars Etc?

Feb 10, 2009

I need to get something similar to this done in a short period of time, so I don't have much time to play around.

Does anyone have a similar code/tutorial or anything that resembles this?

View 3 Replies

Flash :: Embedded Document Viewer - Show Documents (if Have URL For A Document) Within Flash

Dec 16, 2009

We have a requirement to show documents (if we have URL for a document) within Flash. We have a need use embedded document viewer for MS Office and PDF documents. Are there any Flash controls available to acheive this?

View 2 Replies

ActionScript 3.0 :: Dynamically Creating And 'zooming' Stars?

Jan 10, 2012

I'm interested in dynamically creating (duplicating) a movie clip of a star and placing it randomly on the stage. It should then grow in size and change it's x & y location so it moves off the stage. (I've attached a file to hopefully show what I'm interested in.)I can hack this out in AS 2.0 but it has to be in AS3 and my old high school programming education just isn't hacking it.

View 1 Replies

ActionScript 2.0 :: Stars/Space Zoom Effect?

Mar 4, 2005

Looking for a zoom through space & starfield effect. I've seen horizontal ones but I am looking for stars coming at you head on. Similar to the snow tutorial. Random generated stars zooming at you....

View 3 Replies

ActionScript 2.0 :: Stars / Space Zoom Effect?

Mar 4, 2005

Looking for a zoom through space & starfield effect. I've seen horizontal ones but I am looking for stars coming at you head on. Similar to the snow tutorial.

View 3 Replies

ActionScript 3.0 :: Get Rid Of Hanging Indent?

Dec 21, 2009

how to get rid of hanging indent?

I load a simple XML text into a dynamic TextField (Flash CS4):

HTML Code:
<?xml version="1.0" encoding="utf-8"?>
<xml>
<b>TITLE</b>

[Code]....

Maybe I could use myTxt.condenseWhite = true; but dont know how to aply line breaks there.

View 4 Replies

ActionScript 2.0 :: Can't Figure Out How To Make The Stars Slowly Decrease

May 31, 2005

I'm using the following code to spin a couple stars on the stage when the mouse rolls over them. Can't figure out how to make the stars slowly decrease in speed after the user rolls off though.

[Code]...

View 8 Replies

ActionScript 2.0 :: Random Movieclip - Tracing All Stars With _x Values

Apr 27, 2009

So. I have this relatively simple code

[Code]...

when I run it, there's this wierd random star just in the middle of the screen. I tried tracing all stars with _x values of 0, 200, undefined; _xscale values of 0, 100, undefined. There was nothing. I don't know why it's there. I don't even know if it has code in it. =/ Does anyone know what it is? Btw, I know it looks like crap ... sorta more like a glue gun than stars ... I have a better looking version, I just used this to try to disect the problem.

View 7 Replies

ActionScript 3.0 :: Pre-Loader Hanging At 99% In Firefox

May 13, 2009

URL...This pre-loader is working fine on IE and Safari, but for some reason it hangs at 99% on Firefox.[code]

View 15 Replies

ActionScript 2.0 :: Hanging The Value Of A Global Variable?

Mar 17, 2006

I'm having a problem changing the value of a global variable.

I'm using the xml photogallery thats available on Kirupa. I have 2 movies on the main timeline: the galley movieclip and a navigation movie clip. I want the buttons in the navigation clip to change the global varable 'section' and this to be passed to the galley xml load function. So far i have this for the button:

Code:
gallery1button.onRelease = function(){
_root.nav.select(0);
_global.section= "gallery1";
};

I am using php to deliver the xml data dynamically to flash so I only have one xml file for several galley section. the AS looks like this:

Code:
xmlData.load("photos_xml.php?section="+_global.section);

It doesnt seem to be working though.

View 2 Replies

ActionScript 2.0 :: How To Get Light Hanging From Top Of Page

Jun 12, 2007

I'm trying to get a light that is hanging from the top of the page by a chord to be drag-able and then for them to be able to let go and the light swing back and forth. Right now I've got a pretty cool as that is onLoad it will swing and gradually slows down until it is sitting still, but I'd like to have it have a little more elasticity added to it for them to be have some fun with the hanging light..

View 1 Replies

ActionScript 2.0 :: Loading Swf Hanging Browser?

Aug 4, 2008

I'm seeing a problem whereby a video playing in the FLVPlayback component is "hanging" periodically, where the download stops for several seconds, ultimately causing FLVPlayback component to think it's at the end of the video and auto-rewinding. I've managed to reproduce this by killing my network connection when the video hasn't finished downloading, so when the playhead plays up to what's been downloaded, it then auto-rewinds and stops.

This problem is exacerbated when a different swf is being loaded in the background. what might cause a browser to "hang" when loading the other swf. For example, if the server on which that swf resides is backed up, will the HTTP GET block other files from loading? I'd always assumed that the actual socket implementation was multi-threaded and the loading of one file shouldn't ever cause another to hang. However, I'm not sure if the bowels of flash just leverage the browser's socket implementation, or whether it has its own.? I can't find any documentation on the flash socket design.

This has been seen in numerous browsers, so I'm suspicious it's a Flash issue. The loading is done using the MovieClipLoader class, AS2.

View 1 Replies

IDE :: Hanging Indent When Displaying Xml Data?

Nov 24, 2008

This is the data, and you can see that it has an indent on its first line.

Where I would like to see this:

This is the data, and you can see that it does not have an indent on its first line.

Some of the code,

// Define variables
var xmlLoader:URLLoader = new URLLoader();
var xmlData:XML = new XML();

[Code]....

I suspect that it has to do with prettyIndent and prettyPrinting, and I could not make it to work.

View 1 Replies

ActionScript 3.0 :: Triangle Maths - Collecting Stars That Appear At Random Moments?

Jan 13, 2012

i want to finish it in the end! i have this code which generated 20 stars and an ai player collects all of them (going for the one which is closest to it). This code was courtesy of -lauri... the code was

ActionScript Code:
import flash.events.Event;
import flash.display.MovieClip;[code].........

what i have currently is a player who moves around with the arrow keys collecting stars which appear at random moments... i wanted to make it so that the ai can also collect these stars and i am pretty sure that the code for that would be linked to what.

View 6 Replies

ActionScript 2.0 :: Weight Hanging From The Mouse Cursor?

Apr 1, 2004

I have recently been trying to recreate the effect of a weight (ball?) hanging from the mouse pointer, suspended by a thread, elastic or chain and exhibiting inertia, etc. I am a newbie, so the outlook seems rather grim. Is this at all possible?

View 1 Replies

ActionScript 2.0 :: [FMX] Weight Hanging From The Mouse Cursor?

Apr 1, 2004

I have recently been trying to recreate the effect of a weight (ball?) hanging from the mouse pointer, suspended by a thread, elastic or chain and exhibiting inertia, etc.

View 1 Replies

ActionScript 3.0 :: Make A Reset Button That Re-generates Stars For User To Count Again

Aug 3, 2009

I made this simple AS3 game that generates a random amount of stars on the stage. The user has to count the number of stars, punch that number into the input box and hit submit.The problem is that if the user wants to play again, he/she will have to go through the hassle of closing and re-opening game. That's why i'm now wondering how to make a reset button that re-generates the stars for the user to count again.URL...

View 1 Replies







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