actionscript-3

event listeners and syntax for the actionpanel

I've done most of my code in as3, working from either document class or classes. I've never done action script from within the actions panel (within Flash cs4). My question is do I need to follow the as2 manual in order for majority of code to work ? for example. If I want to do a loop. I can't do a addEventListener(Event.EnterFrame,lo...

Actionscript 3 TextField bug with htmlText?

I embed text in textfield, but sometimes it does not render using htmltext. if I use text it renders fine. ...

Where do i find some AS3 resources for a Newbie to AS3, not to programming.

I'm a fairly experienced Web Developer. I know the LAMP stack, I can work with Javascript from a procedural level. What I'm looking for is a good resource for someone without previous Action Script experience to get his head in the game. These days for JS I usually just use jQuery and it solves most all of my UI needs. However, as time g...

Can't fetch connection from javascript

When a user has logged in in javascript I'm trying to use that session in my actionscript-3 code. On connect my e(FacebookEvent).error.reason returns null though. Here is my code. stage.loaderInfo.parameters["fb_sig_session_key"] = getFlashVars().session_key; stage.loaderInfo.parameters["fb_sig_ss"] = getFlashVars().secret; st...

AS3: How to force parameters in callback functions

Hello, I am currently doing something like this: myFunc(tracer); function tracer(message:String):void{ trace(message); } function myFunc(callback:Function):void{ callback("Hello"); } Now, this works fine. But how can the function myFunc know, if the given callback function accepts the correct number and type of arguments in its si...

When writing iphone applications with actionscript, is it possible to read from devices such as the gps?

As announced, it is now possible to develop Iphone applications with Actionscript. My question is: is it possible to control iphone devices such as the GPS receiver and/or camera using actionscript? Is there somekind of "AS3 for the Iphone"-framework? I know my question is short, but this is all I need to know for now. ...

Tweening Pixel Bender Filter Using Number Value With Basic Tween Class in Actionscript 3.0

i'm studying Pixel Bender. i have a filter who's parameter i want to tween. as far as i know, in order to tween a pixel bender parameter, i need to tween a number object and assign the tweening number object as the array value for the shader data. i was convinced the following would work, but it seems that Number class doesn't have a ...

Understanding Actionscript Garbage Collection

in an attempt to see and hopefully understand actionscript's garbage collector, i've set up a sample project that loop-tweens the value of a pixel bender parameter on stage. my first concern was the amount of memory that was being used at launch (~26 MB). while i like to believe i'm cautious about memory by removing event listeners and...

Actionscript 3 Scrollbar

I am very new to ActionScript and Flash development so excuse any incorrect terminology that I may use. I'm just playing around in some spare time. I'm developing on Ubuntu, using AS3, and compiling with the flex sdk using the ANT tasks (flexTasks-4.0.0.10485). I am looking for a way to scroll content within a sprite. So, say I...

Flash: BitmapData.draw(Video) ignores video height.

Hi there...I'm pretty much the rookiest rookie when it comes to Flash. Here's the actionscript (3): // Here's the dumb-dumb: /*****************************************************************/ /*****************************************************************/ function captureImage(e:MouseEvent):void { // The video still-image is c...

Accessing Uza's global object from an loaded external swf

I am using the 1.2 version of Uza's Global singleton (http://www.uza.lt/codex/as3-global-object/). The container swf stores some data and a link to a function in the "global" object. Then another swf is loaded inside the container, it gets it's global instance with Global.getInstance();, and i suppose i can access the data and function...

"one frog jumps" arrays and displayList AS3

I've got an array of 10 frogs, and only one jumps. I want them all to jump together or sequentially. Anything is better than one frog jumping. How do I get all the frogs in my array to jump? WHAT I WANT Selectable frogs I can control //Creates 10 frogs var enemyArray:Array = new Array(); for (var i:int = 0; i < 10; i++) { var no...

Flash FLVPlayback CuePoint problem

Hello I have a flash app that plays movies. It loads subtitles and subtitle times from an xml file. Now the problem is this: in one or two of the films the first subtitle disappears after only one second even though it's in and out times are correct and it should be displayed for 5 s. I have no idea why this is happening since all the ...

Restrict AS3 FileFilter to directories only

I have a flex app that needs to import and export flies. The filefilter needs to restrict to only directories for output. The input can be filefilterlist, making it able to select multiple files. ...

Flash Components with Flex SDK

I am using the flex SDK to compile actionscript 3 classes into an swf. Some components are not included with the SDK like the fl.controls components. What options do I have for getting access to the flash components? I've seen others mention that I can export them to a swc file within Flash Pro, but I would rather not have to purcha...

"multiply frog enemy" timer and array AS3

How can I use the counter value to multiply the frogs in the array? My counter goes from 0-100. I want to prove that I can increment the enemies using a counter. EXPLAINED BETTER I have 10 frogs in an array. I want to use a timer to add 10 more frogs on each iteration of the TimerEvent.TIMER firing. //currentCount var timer:Timer = n...

From Flex, change the value of an Actionscript 3 property inside a Flash SWF that has been Embedded into an icon.

Ok, so I've been toying with using Flash SWFs in Flex objects as icons and the like. I can embed it just fine, but I would like more control over certain flash Actionscript 3 properties WITHIN the embedded icon - for example, to change the size of the icon (icon used in two spots, one should be small, the other large). Once I get that ...

How can I access the implicit event dispatcher of a bindable Flex object?

If I create an object like so: class Foo { [Bindable] public var property: String; } The class Foo has an implicit event dispatcher to handle property change events. How can I access that without making Foo explicitly extend EventDispatcher? ...

Setting dynamic TextField.text from a parent MovieClip in ActionScript 3

Hi, folks! Easy question, that I can't quickly find an answer to online - it seems this would be in tutorials everywhere - and probably is... I have a MovieClip that has a Dynamic TextField: let's call the instance of the field txtName. I want to set the text field on the fly for txtName, so I add a little ActionScript (3!) that does ...

Can we use compiled HAXE swf's swc's in Actionscript as normal libs?

Can we use compiled HAXE swf's swc's in Actionscript as normal libs? I have a swf compiled from haxe code (I can try to compile it into something else SWC for ex) I want to use it as lib in AS3. Is it possible? If yes how to do it? ...