I just want to know if the object in question, has any sub-objects within it or not.
Do I really have to do THIS:
public static function getLength(o:Object):bool
{
for (var item:* in o)
if (item != "mx_internal_uid")
return true;
return false;
}
Isn't there some way to say SOMETHING LIKE: Object.hasChildren();
OR EVEN ...
I am learning ActionScript 3.0. Coming from Java world I can easily relate to strict compilation mode. I think having type safety checks at compilation time makes perfect sense.
This makes me wonder, why the compiler allows a standard mode were all the type safety checks are deferred to run time? Is compatibility with older ActionScrip...
This is driving me crazy. It seems I cannot use ScrollPane ANYWHERE in my AS3 code without it crashing every dropdown box in the program.
Here is the error message I get when clicking a dropdown box:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at fl.containers::BaseScrollPane/drawBackground()...
REF: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/Loader.html
With regards to a parent SWF loading a child SWF via the Loader class, is it possible to prevent the loaded child SWF from:
Making any network calls, or
Making calls to specific domains
Basically, I'm looking for a programmatic version of allowN...
When I destroy my objects that are on the stage. I usually just removeChild(this) and I remove event listeners of the object. is this all I need to do to completely remove the object ??
...
Is there a way to use getters and setters for Vectors?
Say, in my Main class, I would like to write
myVector.push(item);
and in another class, I have written:
public function get myVector():Vector.<int> {
return _opponentCardList;
}
public function set myVector(myVector:Vector.<int>):void {
_myVector = myVector;
}
This ...
Hi everyone, I just wrote a Background class for a new project. The background is basically going to be 2 rounded rectangles with a simple stroke and fill color laid on top of each other.
Anyways right now I'm just trying to draw out 1 rounded rectangle, but for some reason I don't see it anywhere on stage :( No errors and my traces tra...
Imagine a Flex application which contains spam/eggs.as:
package spam {
public var eggs:Eggs = new Eggs();
}
At what point in the process of loading the .swf file will Eggs be instantiated?
Then, assume there is also spam/ham.as:
package spam {
public var ham:Ham = new Ham();
}
What which of the two - eggs or ham - will be loaded f...
I'm making an arcade game in as3 and I want to draw pixely(unsmoothed by flash) lines. I'm drawing the pixels 'by hand'(not with flash's lineTo or anything) onto a bitmapdata object.
The lines don't appear quite right though, when zoomed out the line is rendered 2 pixels thick at some parts. However by zooming it its apparent that t...
Can I add a ProgressEvent listener to the stage?
I don't see it in any of the auto-complete options when I am typing in Flex.
What do people normally do to get a progress readout of the entire main runner's loading progress?
I try the following, which is where I would expect to see the ProgressEvent options pop up:
stage.addEventListen...
I get a vague "Socket timeout." error on occasion when I am loading my site. I make various HTTP requests for PHP data and also am using a Loader() class instance. Can anyone shed some light on where this error might be coming from?
I wish there was more of an indication of where the error stemmed from...
Here is my code that I am ...
I want it to do another action if the ID I key in does not exist or have an error, how do I trace the error event?
loadID=searchArea.text;
myLoader2.load(new URLRequest("GetData.aspx?id="+loadID));
if (errorEvent) {
trace("Please key in the correct ID");
} else {
myLoader2.addEventListener(Event.COMPLETE,processXML2);
}
...
i wanted to know that using actionscript, is it possible to send email and create a front end in flashbuilder 4(flex),
everywhere i see php being used for mails, is it possible?
...
I'm doing some calculation with numbers and would like to only print an integer (the number without the decimals).
I thought that the toFixed() method of the Number class would do the trick, and it does most of the time. But quite frequently strange values are returned. Here are 2 examples:
Number(0.002).toFixed(0) returns
"0." while
...
I'm sure that there is a design pattern solution to my problem, but I can't seem to decide what a workable approach is. I know what I want, I'm just having trouble making the connections... I'll explain:
I'm working on a game. I have GameObjects. I have GameBehaviors. The properties of my GameObjects are defined in an XML file which has...
Hi
Can a stand alone flash / flashlite app invoke javascript functions using externalinterface or any other interfacing feature in actionscript ?
thanks
kunal
...
I have created a navbar in flash with 5 different movieclips I use as buttons. Each movieclip(button) has a different instance name. Is there a way to use addeventlistener so that I dont have to do soemthing like this:
//for button1
button1.buttonMode = true;// Show the hand cursor
button1.addEventListener(MouseEvent.ROLL_OVER, butto...
Hi I have an actionscript that moves a box across the stage when the mouse is over a left or right arrow shaped button . The script below does just that. BUT what I want to do is have the box repeatedly move until the mouse is moved off the arrow button . I have tried all ways can anybody please point me in the right direction .I have re...
My problem, simplified:
I have a dataGrid with a dataProvider "documents"
A column of the datagrid has a labelFunction that gets the project_id field of the document, and returns the project name, from a bindable variable "projects"
Now, I dispatch the events to download from the server the documents and the projects, but If the documen...
I was wondering if an AIR application can find out what OS it's running on, e.g. Windows XP, Vista, Mac OS, etc. Also, is there a way for it to find out the current OS user name? Thanks.
...