I'm coding up some delicious business logic and I've come to a situation like this:
There are a bunch of rules (ruleA, ruleB, etc...) which all follow a standard pattern. I've created a Rule interface, and implemented it in RuleA, RuleB, and so on.
So now I just need a way to load them.
Right now I'm using a map:
var rules:Object = {...
In Actionscript 3 I can't declare vars in Interfaces.
I don't get it.
I know i can work this around by defining getters and setters, but what if i just want a simple public property? I usually use getters and setters if there is something to do when i set or get a property, but what if i just want to store a value?
...
Can anyone recommend a plugin/extension for Flash Professional that can improve debugging features for Flash Professional. Currently, I'm using FlashDevelop to assist with coding tasks, but breakpoints etc. don't yet work well with FLA based projects.
Thanks!
...
I am trying to use html elements to style text inside an XML file that is loaded and displayed by flash. When I do this the text will not display at all. Here is a chunck of my XML :
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Page>
<Title>You should be <b>Bold</b> ! </Title>
<Page>
When I try the code below, it disp...
Hey. I'm looking to see the memory usage and processor load of an ActionScript 3 project. What applications/methods could I use for that purpose?
...
Hi all i have a problem where if my application is full screen i cannot click on any text input component and i cannot input any text into the fields. i have tried creating the text input fields at run time and i have tried creating them on the canvas when on the gui design window in flex builder. however they both give the same results ...
I am creating an AIR application which downloads file from a server. I am using URLstream object with complete, progress, IOError, security error and HTTP status events. I am not getting an event if the network is disconnected when the download is in progress. Please can anyone tell me which event is dispatched?
Thanks,
Anahas
...
I want to pass Value from Constructor in my Main Class to another Class.
Main Class:
public function Main() {
Snap.locationX = 350;
}
Another Class:
public function get locationX():Number{
return _value;
}
public function set locationX(x:Number):void{
_value = x;
}
It returns 1061: Call to a poss...
I have a program with a save feature - the user clicks a button, and everything is saved to a local Shared Object with the flush(); command.
My problem is that Flash .swf files automatically save to the local Shared Object when the movie is closed, overwriting their previous, manual save.
Is there anyway to prevent flash from saving to...
I have a custom component made up of a selectable control (radio button)
and a text input. I want to perform some logic in response to the
change events from both of those controls, but after that I want
anything that is registered on the composite component's change handler
to have a change to handle the events as well. The problem is...
So I'm attempting to use the MVC pattern for a game I'm working on. Everything has been going pretty smoothly so far, but I'm having trouble figuring out how to get my model and my view to talk to each other effectively.
My general model structure involves lots of nested information.
a Level has Rooms
a Room have Layers
a L...
I'm using the mxmlc command line tool to compile a pure AS3 project. Is there a command line option to make mxmlc treat warnings as errors? I've read through all the compiler flags and flex-config.xml but wasn't able to find this option.
...
My project for this summer is to make a multiplayer online flash game. I could use some advice as I've never implemented a secure login system before, let alone done so in Actionscript.
My setup right now is a .swf sending/receiving game data to/from a Java server which communicates with a MySQL database about account info.
1) How ...
I'm having trouble making something happen over and over without a for loop. Take a look at this:
package {
import flash.display.Sprite;
import flash.events.Event;
public class Main extends Sprite {
public function Main() {
addEventListener("done", caller);
caller();
...
In my air project i used current state size is width="441" height="358" . i have link button like Singin then move to singin state (currentstate='singin')
<mx:State name="signin">
<mx:SetProperty name="height" value="616"/>
<mx:SetProperty name="width" value="919"/>
So application resize into 616,919 . After that...
My flex project uses FA-Bridge, and apparently in Safari browser I cannot call any of my public AS functions that have arguments passed in. For example I can call this AS function from javascript:
var myButton = CreateNewButton();
myButton.setLabel('Click here');
But if I try calling it in a single statement like this:
var myButton = Cre...
It seems like there might be a way, but I'm not seeing it. I have, in the past, used the valueOf() and toString() methods on Object to cause custom objects to behave in numbers or strings based on context, but I'd like to do more.
...
I want to use FileSteam.open() to synchronously read image files from disk. I can then get them into a ByteArray with readBytes(), but I can't find how to get that into BitmapData. I know Image can read it as is, but I need BitmapData.
Any suggestions?
...
I have a flash upload component I want to use to upload multiple files. I'm using it in a MVC app and what I want to happen is that the user picks the files they want to upload, it uploads them and then displays a page showing all the files they have uploaded so they can add a description and select where to save them, and then save the ...
How do I access Stage Class properties in Costum Class?
Class:
package {
import Main;
import flash.events.*;
import flash.display.Sprite;
import flash.display.Stage;
public class Run extends Sprite {
var obj:a1_spr;
public function Run() {
runAssets();
}
private function runAssets():...