actionscript

Flash: runtime complexity of the 'Sprite.contains'?

As the title suggests, what is the runtime complexity (eg, big-O) of the Sprite.contains method? ...

startDrag event on Movie Click only drags one layer flash actionscript3

I have a problem with the startDrag function I'm using in AS3. Right now I have a movie clip which is made up of 4 different layers. I export the movie clip, create and object of it, add in an event listener for mouse clicks that calls the startDrag function. However, instead of dragging the entire Movie Clip and all of its parts, it onl...

Dragging with inertia in AS3 for dummies

Hi, I'm trying to create an inertia effect for dragging that's constricted to the x axis. I know this questions was asked before here but I couldn't understand the answer! I'm currently using startDrag and stopDrag. I'm assuming I should add something to the startDrag function that captures the speed in which the user is moving the mo...

Passing reference types by ref - Flex/Actionscript

Hi I know that in C# when you pass an object (non primitive) to a method the following is true: A reference to the object is passed Changes made to the object in the method are reflected outside of the method. Also, you can pass a reference to a reference in C# e.g this.changeObject(ref myObject);, in which case: Changes to the ...

Flex application suspended while in the background using Safari on Mac

Users of my Flex application report that sometimes the application is freezed when the browser window is minimized or they select another active tab over it. In this suspended state, the application receives no CPU share and all network connections it uses are closed. When the browser window is restored, the application is resumed. This ...

[AS3] Call a public function (NOT in the MAIN) from another Class

hello! can i call a class public function from another class? what's the cleaniest solution to do that? for example: Main -------------------------- Menu |---------- buttonClicks -------------------------- Thumbs |--------- showTheThumbs a button wich is istanced ...

[AS3] convert a dynamic string name in a movieclip to make an addchild

i have to make an addchild to a movieclip, but i really don't know how to make it with a dynamic name. for example private function buttonClicked(nameOfTheButt:String):void { thumbs.addChild(nameOfTheButt); } buttonClicked("homepage"); obviously there's a casting error, im tryin to make an addchild to a string... how can i solve...

flash setinterval function slow in IE

Hi, why flash setinterval function is too slow in IE.. Pls help how to fix it . ? Best Regards, Satish Kalepu ...

The best scripting language for web audio / sound

Good day, I'm looking to start learning a scripting language for web audio and sound development. It needs to be able to handle simultaneous audio events, eg; to trigger a sound when another is playing (I'm not sure if and how this is possible, but have witnessed this kind of presentation: http://www.projectiva.co.uk/ (can this kind of...

[AS3] get stage.stageHeight or stage.stageWidth from imported class

hello! can you tell me a simple and clean way to pass the dimension of the stage to another class, imported in my documentclass? thanks a lot! ...

How can I create a blocking, synchronous file browser for my Actionscript AIR application?

I'd like for the user to select a file and then open it. Currently I have: protected var theFile:File; ... theFile.browse(); var stream:FileStream = new FileStream(); stream.open(theFile, "rb"); The problem is though, that browse() operates asynchronously and uses events. Is there a way I can do the same thing without using events? ...

How to save an image to disk without user interactive?

I see flash has a save call to do this job, but it requires user interactive. How to save it automatically? ...

Which Flash/Actionscript IDE to use -- if one should be used at all?

I've always used the built-in IDE, but I've been gone from Flash since ActionScript 2.0 in Flash MX... I'm coming back to Flash, and I notice there's a number of IDE's (some of which cost more than the Flash upgrade). So... question for Flash/Actionscript 3 developers -- which IDE to use, if at all? ...

Flash CS4 vs Flash CS5 Actionscript - Should I upgrade?

From the perspective of coding, what are the major improvements from Flash CS4 to Flash CS5? ...

How to play a sound every 2 seconds ?

I want to know how to play a mp3 sound every 2 seconds. Thanks :) ...

How to stop sounds ?

How to stop this sound ? : MySound.play(0,100,null); ...

Flex Pan & Zoom with vector images

I've looked at http://www.adobe.com/devnet/flex/samples/fig_panzoom/ for pan & zoom, and it does a very good job of it. However, it only works with raster images. Does anyone know how to modify this for vector images (SVG converted to SWF). My limited attempts have not gone well, as the Imageviewer.as class is clearly designed around ...

TileList creationComplete problem in Adobe Flex 3.0

I have made a tile list is Adobe Flex as follows <mx:TileList height="130" width="636" rowCount="1" columnCount="8" columnWidth="150" direction="horizontal" allowMultipleSelection="false" enabled="true" borderStyle="solid" id="profilelist" verticalScrollPolicy="off" dataProvider="{xmlListColl}" itemRenderer="PageImageRend...

Forcing custom item renders to refresh

I have an AdvancedDataGrid. One of the columns in the grid displayed with help of custom render. During the application run, I set another custom render to the same column. When I scroll data in the grid (change values for the custom renders) they display new view correctly. I want that they dispaly new view automatically (when I set th...

How to know if a software is installed using ActionScript

I'm doing a application using actionScript(Air 2). I want to know if a software is installed on user's pc, for example, I want to know if the user installed "Adobe Digital Editions", so I can open ebooks by that. How to do that? First I want read from the registry, but Air cannot read registry, and my boss said it's better not to run ano...