while trying to solve my problems in serializing the execution of cairngorm commands, I tried to bypass completely the event dispatching and simply instantiated the command I wanted to execute, then called it's execute method. In this method there's a call to a delegate that calls ServiceUtils that performs the HTTPService.send thing...
...
OK I am looping through the properties in an object like so:
private var _propsList:Object = {'Type':'product_type'
,'Kind':'product_type_sub'
,'Stone':'primary_stone'
,'Stone Color':'primary_stone_sub'
,'Metal':'metal_type'
...
I have an input TextField and have a KeyboardEvent.KEY_DOWN even listener on the stage to listen for the Keyboard.ENTER event. The event listener adds the entered text to an array or whatever, and then clears the TextField. The problem is that when the Enter key event fires and the TextField value is set to "", it leaves a carriage ret...
I have 2 classes with a draw function in them, my Background class and VideoDisplay class. I'm not done with the VideoDisplay class, but I put simple traces in it to test. I call both the Background and VideoDisplay the same way in my document class, but when I try to call the draw function of the VideoDisplay class I get this error:
Er...
I'm currently working on a WYSISYG editor that allows the user to move, resize and rotate shapes by directly manipulating them. The resizing seems to be fairly complex when the shape is rotated. I got this working for non-rotated shapes, but it will take some trigonometric calculations to resize shapes that are rotated. The registration ...
I'm using AS3, and have one simple layer with 4 keyframes If I import it to another fla file as a library item, it keeps showing me all keyframes, I don't want that I want it to show me the whole animation.
Like, if I have an animation of me swinging a baseball bat, I don't want to see all the keyframes seperately imported into the libr...
Right now, I've got a switch statement which is being used to create objects based on a string. There are three types of objects which extend an abstract generic object. I should really be using a factory pattern, which I'm figuring out right now. My issue is thus: I appreciate the flexibility of the factory pattern, but right now I'm st...
I have a function that takes as parameters 2 instances of a (custom) class. But they can each be one of several classes, and I need to then call another function based on what type they are. I'd like to do something like this:
function any_any(inst1, inst2) {
this[inst1.classname + "_" + inst2.classname] (inst1, inst2);
}
function C...
I don't understand what is structurally different between a Value Object and a Class in ActionScript3.
Can any Class be a VO if you decide to call it one?
Thanks.
...
Ive been using the loader a lot of upload images into my movieclip. But the only way I know how to do it is load the content, add an event listener, wait for it to finish finish the job in the handler using the reference to the loader like this.
protected function loadImage(imageDir:String):void
{
loader:Loader = ne...
I am trying to copy the pixels of a bitmap data. but I keep getting the following error
Parameter sourceBitmapData must be non-null.
it happens in the method drawImage. exact after my trace that says "got canvas data".
canvasData.copyPixels(image,tileRect,tilePoint);
Below is my code
package com.objects {
import flash.displ...
Hello all,
today I wanted to change the border color of TextInput when user has a focus on it. I could not find any style that would allow me to change that. A little bit of Google searching and I found answer to be themeColor.
Why is it that there are some styles that work and which are not even mentioned in the Flex documentation? (...
I'm having trouble accessing the value of the root node of an XML variable in flex.
For example:
var X:XML=
<Message Type="abc">
Content123
</Message>
I can change the "Type" attribute above with X.@Type="xyz";
But how do I change "Content123" to something else?
If the xml document were longer/deeper, I could say something ...
is the target.data, a default structure of whole xml? in as3, should the data of xml loaded through this data itself?
function xmlDisplay(e:Event):void
{
xmlData = new XML(e.target.data);
trace(xmlData);
}
...
I am having problems loading a bitmapData. I am getting the following error
Engine Init //trace
loadimage//trace
ArgumentError: Error #2015: Invalid BitmapData.
at flash.display::BitmapData()
Below is my code. it appears it happens after the trace loadimage
package com.objects {
import flash.display.Sprite;
import flash...
Is there any way to call MouseEvent function in as3 from JavaScript?
I have HTML button and swf object, I need to sent a POST request from swf by clicking on HTML button.
...
I have a flash application which uses a single php file to retrieve records from a database (using the Zend framework). When the application first begins, I make a call to the php to set a class variable, so that all future requests to the database will use this variable to select records based on its value. So here is how the class begi...
Basic OOP question...
I want to add a couple functions to the Array class so that my program will be amazing and make me rich and famous overnight.
So I create a new subclass NewArray which extends Array. Do I need to write a constructor method for NewArray? If I leave it blank will it just use the parent's (Array's) constructor metho...
This seems like it should be an easy one but I can't figure it out.
I'm trying out a very simple class that, when created, loads and XML file into the class's property. I must be getting a basic concept tangled up here because I can see the XML coming in just fine in the handleComplete function, but the class property _result remains em...
How to send a jpg image as ByteArray from as3 to javescript? And how to convert ByteArray to image in javascript?
...