actionscript-3

How to port Away3d scene with animation into PV3d?

How to port Away3d scene with animation into PV3d? Are there any tutorials on how to do that? ...

Ajaxifying flex lists

In html, it's possible to use jquery or javascript to refresh a list of stuff every 10 seconds or so to make it appear like it's live. Is the same thing possible with flex Lists? I heard it's possible to create flex with other programming language. Not sure what the details were, I think they said with javascript too. But I'm working...

find out if AS3's XMLList contains string as node value

Is there an XMLList equivalent to Array.indexOf? For example - var array:Array = ['one','two']; trace(array.indexOf('two')); // returns 1, since it's at the second position trace(array.indexOf('three')); // returns -1, since it isn't found ... right? but what if I've got this - var xml:XML = <list><item>one</item><item>two</item><...

Populating an array collection by parsing a string

In ActionScript I have string as str="subject,r1,r2:a,b:1,2:3,4"; dynamically i have split this string and build array collection as given below arraycoll.addItem({subject:a ,r1:1,r2:3}); this example of one set the arraycollection should be built dynamic i have tried but not successful ...

Add '+' sign using Flex NumberFormatter

I want to format a number with the '+' or '-' sign attached to it. When i tried with the useNegativeSign=true, it gave only '-' sign. I want like this : +13%, -12%, ... Thanks in Advance, Cheers,PK ...

Capturing System-level Keystrokes with Adobe AIR

Hi As the title suggests, is it possible to capture system-level keystrokes? Any help or pointers will be appreciated!! ...

Flex in IntelliJ: Embeded fonts not showing after compile

I'm trying to set up an old Flex project in IntelliJ IDEA but are having a problem with all embeded fonts. The font is installed on my Windows 7 PC and are also located in the folder fonts in the directory where my ActionScript sources are located. I'm using the SDK compiler config from flex_sdk_4.1 with additional option of -static-link...

How to repaint the display in ActionScript 3

Hi! Can anybody say to me how to refresh the display in ActionScript e? The correspondent from Java: pane.repaint(); ...

How to check for the FLV file existence before playing that using FLVPlayback in Action Script 3?

Hi, I'm very new to the Action Scripting, I'm using the FLVPlayback class to play my FLV files. If I'm trying to play a FLV file which is not existed yet then I am getting a "VideoError: 1000" with message of Unable to make connection to server or to find FLV on server. I want to check for the FLV file existence using the file URL or...

Flex: How do you apply a style (from an external CSS) within the init/constructor of a custom as3 component?

Hi I had a custom MXML component, that I have converted to a pure AS3 component that extends Canvas. I took the stylings i.e. alpha, color etc. from the MXML and added them to a .css file under /src/assets/. My question is, how do I apply these styles within the custom AS3 component i.e. constructor or init()? I read that you declar...

changing component properties of SkinnableComponent in Actionscript

Flex 4 separates the visual components into the skins. So how do we access those visual elements from Skinnable component? Here is my code: <?xml version="1.0" encoding="utf-8"?> <s:SkinnableComponent xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" skinClass="skins.brushedSkin" xmlns:mx="library:/...

Is it possible to use Adobe's (Open Source Media Framework) OSMF when targeting a FP9 only project?

Is it possible to use Adobe's (Open Source Media Framework) OSMF when targeting a FP9 only project? I noticed the vector class in the source code which can easily be swapped pout for arrays, but was wondering if there is much deeper compatibility issues? ...

Making DateTimeAxis with weekly labels set ticks on an arbitrary day of the week

I'm using a CartesianChart with a DateTimeAxis to display weekly data in a Flex application. When I set dataUnits="weeks" and labelUnits="weeks" on the DateTimeAxis, it automatically places each major tick on a Sunday. However, I would like to provide users with the option of beginning the week on a Sunday or a Monday. How can I ask the ...

Can I make GIF animation frames play faster in ActionScript?

like say i have a gif that has 10 frames. what is the code that will help me make the gif go through those frames at a quicker pace? ...

(stream.bytesLoaded / stream.bytesTotal) * video.duration != loaded seconds for mp4?

Good day! I'm trying to determine how much of video is loaded (in seconds). When I try something (stream.bytesLoaded / stream.bytesTotal) * video.duration the result is not accurate because distribution of video stream size is not uniform inside the file. For example if video starts with static part with video title or blank screen, t...

ActionScript 3 - Returning/inspecting class value on declaration

Hello there, I'm wondering if is there any way to mimic the same behaviour we have for top level classes in AS3 for example: var myArray:Array = [1,2,3,4]; trace(myArray) // [1,2,3,4]; As you can see it returns the own object when tracing it. but if I create my own class that extends Array I get var queue:Queue = new Queue([1,2,3,4]...

NetStream.seek() for mp4 to exact position not keyframe

It seems seek() on mp4 file seeks to the closest keyframe (seekpoint). Is it possible to seek to exact position in between of keyframes? Thanks! ...

AS3 Loading a Class using getDefinition()

Hello Everyone, I have hit a road block on this and would highly appreciate if someone can help me on this, please. What I am trying to do is to use shared runtime library by loading a swf ('index.swf') which has numerous library objects which are named in sequence such as: (orange1,orange2,orange3,orange4) (red1,red2,red3,red4) I am ...

Is it possible to use `[Embed source=`... with Flash CS3?

Is it possible to do the following using AS3 and Flash CS3 IDE? The following only works if the txt TextField is created in the IDE and if the txt.embedFonts line is removed. This does not work if I create a TextField with AS3 instead of using the IDE. Is embedding a font via code only available in Flex? package mtm.EmbedFonts { imp...

most rational way to drag popup menu in flex

In my app I currently have a popup menu implemented as a BorderContainer with a lot of buttons, textfields, date pickers, etc. PopUpManager handles its appearing and disappearing based on some UI events. I'd like to be able to drag the container by clicking on any part of it minus all the components on it. In other words, when I click o...