actionscript

Actionscript: How Can I Know When The Source Property Of An Image Is Completely Updated

var I:Image=new Image(); I.source='C:\\Abc.png'; var H:int=I.height; H is always Zero! I am presuming this is because the image hasn't finished reading the png file off the disk yet. What event can I monitor to know when it's width and height will have the right values? The 'Complete' event only seems to work for DOWNLOADED images. ...

List Component that acts as if control was permanently pressed

Hey, I have a list control and i want the user to be able to select many items at a time. Thus I want it to act that if the control key is pressed while he is clicking. Eg if he clicks on a selected row it should become unselected and if he clicks on a unselected row it should become selected. Do you have any idea how to do this? Than...

Haars Cascade for Actionscript development

Hi guys, I have an object that I want to be able to recognize in AS3. There's a port of OpenCV for AS3 already, that works with Haars cascades, so now I need to create a cascade of my object. From what I've read, I'll have to create an XML of several images (positive and negative), but I can't find a program that'll do that for Mac OS...

Using a mask over a transparant background (Flash)

Hi, I'm having a hard time with this and I'm hoping someone can point me in the right direction. First some details about what I am trying to achieve: I'm making a Flash file with Actionscript 3. The SWF I'm creating is supposed to be a scratchcard with a dynamic background (i.e. the covered picture and the location of the SWF can ch...

Throwing an error in ActionScript and catching it with JavaScript

Hello, I am using the ExternalInterface to communicate between Flash and JavaScript using callbacks and the call method. I would like to throw an exception in ActionScript 3.0 and catch it in JavaScript and I was please wondering if there was anyway to do that? Thank you very much, Rudy ...

ActionScript Dictionary: How to access the first element? How is it stored?

Hello, When you do a "for... in" loop, it will iterate over a Dictionary for example. I was wondering how internally this is being tracked and how it could be accessed? I think the Dictionary class stores a reference to the first item, but I would like to access it and check but I cannot figure out how. This is a bit advanced, does any...

cleanup all UIComponents inside mx:Application

Hi I create some elements( UIComponents, mainly Panels) inside the “mx:Application name=”tst” “. I need to cleanup all those UIComponent’s on MouseClick event , using Actionscript. Is there any way I access the children elements of mx:Application ( I used var totalChildren:Number = this[‘tst’].numChildren ; but looks like ...

trying to place a text box besides a label in flex

i am trying to make a simple form but when i place a textInput box after a Label it comes in the next line..how do i make the text input box be placed besides the Label? ...

ActionScript display zero value

public class myObject{ private var numVar:Number } My AS file: var temp:MyObject temp.numVar = 0; When I debug, temp.numVar contains a value of 0, but does not show anything on the UI. If this object is then saved to the DB, and then displayed to the UI, it shows a 0. My question is - how do I get temp.numVar to display 0 before pers...

Flex wordwrap issue with multiple text instances

Hi, I have a scenario where I want to dynamically add words of text to a container so that it forms a paragraph of text which is wrapped neatly according to the size of the parent container. Each text element will have differing formatting, and will have differing user interaction options. For example, imagine the text " has just spok...

Instruction works outside of a function but not inside on ActionScript 2 Flash

Hello, i dont know why this instruccion works when i write it in this way: lv = new LoadVars(); lv.sVar1 = "value1"; lv.sVar2 = "value2"; lv.onLoad = onLoadCallBack; lv.sendAndLoad("http://localhost/tiempo/flash/rsstoflash.php?" + new Date(), lv, "POST"); But if a put this code into a function in this way: function carga() { lv = new...

Flex 4: Getter getting before setter sets

I've created an AS class to use as a data model, shown here: package { import mx.controls.Alert; import mx.rpc.events.FaultEvent; import mx.rpc.events.ResultEvent; import mx.rpc.http.HTTPService; public class Model { private var xmlService:HTTPService; private var _xml:XML; private va...

Lost in dates and timezones

I'm working on an application that stores conferences with their start and end date. Up until now, I was developing in Belgium and my server is in France, so everything is in the same timezone, no problem. But today, I'm in San Francisco, my server is in France and I noticed I have a bug. I'm setting dates from a Flex client (ActionScri...

How to add an EventListener to a moiveClips/Sprites's scaleX change event?

How can i trigger an event for the scaleX property change of the movieClip or Sprite in Flash AS 3. ...

Setting the Panel Owner

Hi, I've got an application that allows a panel to popup to allow the user to edit some properties. How do I set the panel owner so that it is on top of all the other components on the page without actually disabling them like you do with an alert box? ...

How to send Facebook message from Flash?

So I can get online friends without problems into my Flash, but how can I send them a message to Facebook chat? Is there any API for that? I found some applications that are doing this. Can anybody point me somwehere? ...

trouble accessing non-static functions from static functions in AS3

I have a class containing, among other things, a drop down menu. With the aim of saving space, and since the contents of the menu will never change, I've made a static DataProvider for the whole class that populates each instances menu. I was hoping to populate the list with actual functions like so: tmpArr.push({label:"Details...", fu...

What are alternatives to Asterisq's Constellation Framework for actionscript?

i would like to present data in something like Constellation Framework... but without flash what other options are out there? python, html5, javascript would be great, but i have no preference other than no flash (i don't own CS) EDIT: i have found a handful of html5 examples without much source code and infoVis. ...

Power function fit to data set

I have a set of data (in ArrayCollection) and I need to fit a power function { f(x)= B + x^alpha } to it, before display in LineChart. As result I need the alpha and B paremeter. How to do this with Flex? ...

Not Understanding Basics Of Dynamic DataBinding (bindPropety) In Flex

I need to dynamically bind properties of components created at runtime. In this particular case please assume I need to use bindProperty. I don't quite understand why the following simplistic test is failing (see code). When I click the button, the label text does not change. I realize that there are simpler ways to go about this...