actionscript

ActionScript Cue Points for closed captioning in Video control?

I am using using Flash Builder to create an AS3 video player which needs to support Closed Captioning. However, I am not using the FLVPlayback component. Is there a way of doing something like addASCuePoint() to flash.media.Video;, or is my only option using Flash's Timer to do my own check? I would imagine there must be lib out there ...

flash preloader printing problem

I've got a flash movie with preloader. Preloader Event.COMPLETE listener looks like this removeEventListener(Event.ENTER_FRAME, onFrame); stage.addChild(loader.content); parent.removeChild(this); The problem is that when I try to print the movie that was loaded by it, preloader is printed instead. Why can this be happening? ...

Dynamically loaded comboboxes in cfgrid (Flash)

ok..so I am creating combobox grid cell renderers with Flash .as code for a ColdFusion routine that has 4 pages..I need two of these comboboxes - one each in two different cfgrids on seperate pages...I can create the cell renderer for one or the other of the comboboxes consistently..but need both to be available.. I finally figured out ...

Can I treat a class as a object type?

Hi, I have a custom class say class A : class A { public testA:int; public testB:int; } Now, I have a object say Object C , the object has the exact same names of variables and everything as the class. My question can I cast that object into class or vice versa. Instead of set/get of individual variables. ...

ActionScript 3.0 - Alternative Event Listener Declarations?

I have some in-file actionscript 3.0 code. This code controls a number of elements on it's stage. These elements each have an Over, an Out, and a Click event. I currently define these event listeners as so: mc_hotspot.addEventListener(MouseEvent.MOUSE_OVER, lift); mc_hotspot.addEventListener(MouseEvent.MOUSE_OUT, setDown); mc_hotspot.a...

Cannot bind data to DropDownList control in Flex 4

I'm fetching some data from a PHP application using Zend AMF. However I can't get the data to bind to a simple DropDownList control. The PHP method is: class Test { public function myMethod() { $res = array(); $res[] = array('NAME' => 'ThisIsATest', 'ID' => 1); return $res; } } Network Monitor repor...

When External SWF has reached Frame X, how do I unload it?

Here's my swf loading code: function loadBall(e:MouseEvent):void{ var mLoader:Loader = new Loader(); var mRequest:URLRequest = new URLRequest("ball.swf"); mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler); mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler); mLoader.load(mReq...

A way to keep DataGrid in same scroll position after update?

I have a custom <mx:DataGrid /> that is updated with data from a ColdFusion server every 60 seconds. I've noticed that every time the DataGrid updates and redraws the scroll position is reset to the top. Is there a way I can preserve the scroll position for my DataGrid? Thanks in advance. ...

How do I debug an Actionscript project in Flex builder?

I am trying to use Flex builder for the first time in years. I haven't used the "Run Application" option before, and when I do that now it tells me "Errors exist in required projects" and whether I should proceed. I would like to debug those errors. Does anyone know how I can do that? PS: When I click the "Debug" button, it does exact...

Font Embedding german characters( "ü") problems

hi all, i am facing one font problem, my website is to operate in five languages, one of them is german, so few characters like ü etc.are not getting displayed properly. so for example, in english, i have one word "unhappy", in german it has to be displayed as "unglücklich", actually i m still using Flex3.0, so when i receive this va...

Remove child content from ViewStack in Flex 4

In my example below, when I click "Add Content", new stack content is loaded into the ViewStack as expected. But when I then click "Close Content", I'm expecting it to close the newly created content inside the ViewStack and switch to the "defaultContent" content. Can anyone tell me where I'm going wrong please? Thanks in advance. // T...

Error: Cannot access a property or method of a null object reference in flex

Hi, Getting error while run the checkBox item renderer in advanced datagrid with out data. Error: Cannot access a property or method of a null object reference. Please find the below code: ** public function set listData(value:BaseListData):void { _listData=value; _dataGrid=valu...

stacking particles / arbitrarily-sized circles in AS3

I'm trying to stack particles on top of each other, almost as if sand is piling up in an hour glass. I don't want a pile, I want it to kind of stack from left to right. Ideally, they would be flowing in from the top at an incremented pace, like one every couple of seconds. Right now, they just kind of pop in. I'm stuck on a bug that ...

Is it possible to use a non-embedded fallback font when using an embedded font with AS3 TextField?

I have an embedded font in my AIR/AS3 app that lacks support for most international characters. Using TextField and StyleSheet with the font-family property, I assumed I would simply need to do this: font-family: Interstate-Regular, _sans; This works if TextField.embedFonts = false; but then Interstate-Regular isn't embedded for users ...

How do I get a breakup of my Lines Of Code?

Is there a tool that calculates various LOC statistics? It would have to support popular languages like C++, C#, Python, PHP, JavaScript, ActionScript, etc and interpret code accordingly. An example of the statistics I'm looking for: 350 Physical lines of code -- including braces 200 Logical lines of code -- actual code 190 Comment li...

Toggling Boolean Problem

this code is written in simple ActionScript, but i'm assuming this problem of mine would occur in all languages that have boolean datatypes. i'm simply clicking the stage so that my boolean variable reverses its value and than traces/prints/logs it's new value. however, it's always tracing true instead of switching between true and fal...

fl.motion cannot be found with Flex SDK 4.1

I just upgraded to using version 4.1 of the Flex SDk and FlashBuilder. Now, whenever I try to import the fl.motion library, like so import fl.motion; I get the following error: 1172: Definition fl.motion.easing could not be found Has anyone else encountered a similar error? ...

How can I bind a component to an XML node dynamically at runtime?

I have a custom component based on mx:ComboBox. Within it I connect to an HTTPService (the url is passed as a paramter) and bind the combobox. Parameters to be sent to the HTTPService are passed to the component. This is working fine. But I want to modify it to make it re-usable with other HTTP service URLs, which return the XML in a dif...

Updating an actionscript xml object directly in one line using e4x?

Given the following xml: <form> <personalDetails> <name>John</name> </personalDetails> <financeDetails> <income> <salary>1000000</salary> </income> </financeDetails> </form> I know that is it possible to create the above xml as follows (which is very cool): var xml:XML = <form />; x...

AS3: How do I take a snapshot of a movieclip with a transparent background?

Hi, I am coding in AS3 and I am using BitmapData to take a snapshot of a movieclip. Is there a way to have the end result BitmapData to support transparency? How do I take a snapshot of a movieclip without any background? Thanks. ...