actionscript-3

Flash ExternalInterface and function callbacks question

I'm about to write a spec for a Flash developer to build a player control that works similar to the HTML5 <audio> tag. One of the key points is how to add callbacks, for example, with the audio tag you would do something like: getElementById('flashAudioPlayer').addEventListener('timeupdate', function() { // Do stuff }); Is it possi...

Passing an AIR file to ActionScript as a FileReference?

Hello, This might be an awkward question, I apologize in advance. I made a program to upload files and it uses FileReference. I want to have an AIR version of this program, but allow to pick a whole folder. So far, I was able to get this behavior through AIR using AIRAliases.js in JavaScript. I am able to create File objects but I won...

Color Matrix VS PixelBender

Whats the difference between these two? They seem to both do the same thing not to mention both applied to the bitmap through applyFilter(). ...

Flash and JavaScript communication within IE

I am having in issue with IE passing a string back into an swf using the EternalInterface class in Flash CS4. I have an swf with the following code: var externalString:String = ExternalInterface.call("IncomingJS") which is inside an event listener attached to an Event.ENTERFRAME and an if statement waiting for ExternalInterface.avai...

Equivalent of PHP's crypt function in actionscript

I am migrating my PHP code to Google App Engine - Java. Since I couldn't find an equivalent function of crypt in Java, I can do without it if I find an equivalent function in actionscript. Edit 1: Here is my php code for encrypting passwords : $password = "test123"; $pwd = crypt($password,$password); echo $pwd; Output is (On Windows...

flex tree selection color just on double click

How could i disable the selection color on single click and enable it just to double click. ...

FLVPlayBack component, how to built-in skin in project?

FLVPlayBack asks a link for it's skin. How can I bult-in skin in project, so I will have only one swf in result? ...

Best online source for learning C

Hi Im an experienced actionscript developer, and relatively new to Objective C. I decided a good investment of my time would be to master the C language (not C# or C++). Can anyone recommend the 'best' online tutorials for learning C? ...

Best ORM for Adobe Air / Flex

I'm not sure what I'm missing here, but I can't find a reliable ORM for AIR. The ones I find are not documented well and don't seem to have a solid following. Is a solid ORM non-existant at this point? Ones I'm aware of: http://flexorm.riaforge.org/ http://code.google.com/p/airorm/ http://code.google.com/p/air-activerecord/ ...

16 bit tiff decoder for flex

Hey guys I am trying to open a 16 bit tiff image in my AIR app. What I have found is a baseline decoder which supports only 8 bit images. Here are my options: Extend its functionality to open 16 bit images but I dont know how to do that and how trivial it is. Open my images as 8 bit but I need to do that automatically within Flex. Do...

Loaded swf does not display

I am trying to use the Loader class to load an swf animation. If I do addChild(ldr); the animation is displayed and perma-looped, but if I try it as below, the animation doesn't display. public var ldr:Loader; public var explosion:MovieClip; public var req:URLRequest; ldr = new Loader(); req = new URLRequest("../gr...

flash AS3 e4x - getting hold of child nodes

I am aware that you can use syntax such as: xml..Group And this is supposed to return an XMLList of Groups anywhere in the xml. This works fine if I have more than one , but fails if there is only one . Am I wrong in my assumption that it should return one? I trace xml..Group.length() and it is 0, but the Group is definately in the x...

movieclip.graphics disappear when using .draw() function

I'm making a drawing interface and using the Graffiti Canvas Library, on my stage I have a bezier point drawing tool, which is drawing graphics to a movieclip/sprite (I've tried both) and in using the drawToCanvas method which just passes data to the.draw() interface, the graphics immediately disappear. Any body have any ideas?? ...

Document class silently fails

Hi everyone, I have this weird issue while compiling my .fla file : it won't use the Document class. Here is the document class. (note that the parent class EditorPlugin extends Sprite). package com.myproject.plugins.editor { import flash.display.MovieClip; import com.myproject.editor.EditorPlugin; import com.myproject.editor.tools.Epis...

Accessing itemRenderer instance flash buiilder 4

My setup is pretty basic. I have an s:List with a custom itemRenderer and a dataprovider. What I would like to do is access the generated instances of the item renderer but I have no idea how. Here is the code for the list: <s:List id="layersList" borderVisible="false" allowMultipleSelection="true" ...

Flex's FileReference.save() can only be called in a user event handler -- how can I get around this?

I need to call FileReference.save() after a web service call has completed, but this method has a restriction: "In Flash Player, you can only call this method successfully in response to a user event (for example, in an event handler for a mouse click or keypress event). Otherwise, calling this method results in Flash Player throwing an ...

how do I pass a value to the setTextFormat?

my array looks like this: var cont1:Array = new Array("300","30", "1, 0xFF0000, 1", "0xFFFFFF,1","yes", "myFormat","200","200", "the text", "10","5", "yes"); TypeError: Error #1034: Type Coercion failed: cannot convert "myFormat" to flash.text.TextFormat. at myclass_fla::MainTimeline/frame1() im getting that? what is the proper wa...

Can I add a disabledIcon to a Flex Menu for use in PopUpButton

I am using the Flex PopUpButton & data binding a Menu object to the popup. I successfully added an icon to a menu item; however, it does not look like Menu supports the disabledIcon property common in many other elements for use when enabled: false for that menu item. Is it possible to extend the Flex Menu class to use disabledIcon? Sho...

Why can't I get a returned value from my custom class?

package com.adam.etutorial { import flash.display.MovieClip; import flash.text.TextField; import flash.display.Sprite; import flash.text.TextFormat; import flash.display.Shape; public class adamsboxmaker { //(boxWidth, boxHeight, lineColour, lineThickness, beginFillColour, fillIf, fontcolour, fontsize, fonttyp...

How to save XY coordinates in AS3

I have a widget that looks like an equalizer, the scrubbing on the slider is working. When I relaunch the swf file everything resets. What can I do to save the setting. ...