actionscript-3

as3 rotational drag / acceleration

Sprite.rotation+=10; Sprite.rotation*=0.97; because in as3 the system goes from 180 to -180 I don't know how to apply a drag to a constantly rotating object if it moves either direction. Do I have to convert to radians somehow and then do something? I am pretty bad with math. ...

AS3 and mySQL or XML: Saving user votes on server from a flash movie.

Hi, A project of mine involves a flash movie (.swf) in a webpage, where the user has to pick from a number of items, and has the option to thumbs up or thumbs down (vote on) each item. So far I have gotten this to work during each run of the application, as it is currently loading the data from an XML file - and the data is still stati...

accordion menu error 1010

Hey guys, I'm trying to create an accordion menu off of an online tutorial. I followed every step (i think) on Original Tutorial but changed things according to my size, as well as make the instance names end with _mc or _txt accordingly. But for some reason it doesn't seem to be working. I'm getting the #1010 error and it doesn't re...

red5 server-side sharedObject

I'm trying to store all the users inside a sharedObject thats created on the server-side, so all the users get a synchronized list of all the online users. I think I create the sharedObject correct on the server-side but I cant "find" the sharedObject in the flash application. Inside the Java Red5 Application class: ISharedObject user...

Actionscript3 alpha masking?

Hi all, I was trying to apply a spotlight effect on a google map application. Specifically, I draw a circle that follows the mouse and set it as a mask over the map. The problem is only the map area within the circle shows up, I know it's what mask is supposed to look like, but is there a way to make the area outside the circle some kin...

splitting function attributes

Hi would it be possible to correctly split function attributes using regex ? i want an expression that splits all attributes in a comma seperated list. But the attributes themselves could be an Array or Object or something that can also contain commas : ex : 'string1','string2',sum(1,5,8), ["item1","item2","item3"], "string3" , {a:"tex...

How do I load multiple large images and video in Actionscript 3.0?

I am creating a Flash site for a client who wants to display many (about 15) fairly hi-res photos as well as a video. I am using the Video class to display and control the video, and the Loader class to load the photos. I preload them from an XML file up front, while "loading..." is displayed. The video plays immediately after the loade...

AS3 actionscripting

Hi, I'm embedding a flash file from an external domain and there is some JSON data in the page I would like to use in the movie. Whats the best method to get these variables without passing them on as a flashvars (I don't have control of the page it's embedded in). My only idea is to enable script access to 'always' and then get the ful...

rotating centered content

Ok, so I've been trying to get this concept to work for the day now and have had zero luck. I am not so good with math, so any help will be appreciated. I am trying to rotate a centered container from it's center. The problem with this code is when I use the rotatePicture method, it doesn't rotate from the center, instead it rotates from...

actionscript 3 - how to hide default cursor in chrome?

is there a way to hide default cursor[flash]when it's opened using chrome? i can hide it using ordinary way when it's opened using firefox/IE but somehow it doesn't work when it's opened using google chrome. Many thanks ...

Databinding in AS3 to a slider

Hi, I am creating a datagrid in AS3, and want to pass the value of a slider to an item renderer var column : MyDataGridColumn = new MyDataGridColumn(); column.sliderValue = mySlider.value; ... This works fine initially, but when I move the slider, I would like the datagrid to assign the new value to the column. This worked fine when...

convert dynamic drawing page in Flash into .dxf or .dwg format

Hi , I want to convert my dynamic Drawing (that I created in a Flash Dialog using AS 3) into the .DXF and .DWG format.Is there any way by which I can give the export functionality on the flash page so that the dynamic drawing that created in flash code will export into .DXF and .DWG format. Please Help Thanks, Simon ...

Is there a lighter version of Google Analytics for Flash

40k of compiled code seems like a lot to me to be making some straightforward flash-javascript calls and makes GA unsuitable for banner ad work as well. Does anyone know if there is a 'lite' version of Google Analytics for Flash? ...

Fluid flash layouts

I'm trying to get my main class to resize to the browser window size. I'm listening on the stage to Event.RESIZE, updating my width/height to match the stageWidth/stageHeight, and drawing a rectangle to show me how big it is. When I resize, it flashes between a small and big size every other time the event fires. The width and height a...

Flash AS3: How to gradually limit rotation of an object influenced by y position of mouse

Hi, I have created a flash app in which there is a circle with circles plotted along it's circumference, it is rotated when the mouse is moved up or down. The rotation is drawn directly from the y position of the mouse pointer. What I would like to do is grade the movement some how so that the further down the mouse pointer goes the les...

Google Map API: How to center dynamicly markers in AS3?

I have several markers on my map and want to center dynamily each time I click on a selected point which show a bunch of markers group. Does anyone know how to do that in As3? ...

Error:Classes must not be nested --> Actionscript

Hi All, I write a actionscript fileIncludeMyFile.as : package CustomComponent { public class IncludeMyFile extends Object { public function computeSum(a:int, a:int):Number { return a+b; } } } When i add package, i am getting Error: Package cannot be nested And My Mxml file: <?xml ver...

Importing SWF into FLA in AS2

Hello everyone. i am trying to load a swf coded in as2 into an fla that is in as2. When i import the code, certain components are missing. The first set of code is for the video player. The second block of code is the code i am using to embed it (unsuccessfully) ----Code Used To Create Video---- import cn.com.webstudio.util.*; Stage....

Dispatch an event from a class that inherits from EventDispatcher

I've got a class that extends EventDispatcher. What I want to do is to dispatch the click event when the component is clicked. (The class is essentially some text in a textfield that needs to be able to do certain things, and it needs to be able to respond to a click). Sounds easy enough... I want the event dispatched when that portion...

Reading in a File (AS3) and repeatedly/dyamically accessing the data

This may be a tired old question, but I have yet to find a good answer. Say for instance you have a class that reads in an xml file to get information such as a grocery store items, prices, etc. This class also allows you to retrieve the information about a grocery store item with a get() function. var grocery:GroceryStore = new Grocer...