I've tried many different ways of accessing the name of an attribute, but just can't get it working.
The current Function:
protected function applyProperties(_axml:XML):void
{
var list:XMLList = _axml.properties;
var list2:XMLList = list.attributes();
for( var i = 0; i < list2.length(); i++ ){
trace(list2[i].nodeName.toStr...
I am creating a blit game and as of right now, the only thing that is blitting is the world itself (i.e. roads, fences). i was planning on displaying my character as a sprite and any interactive objects that it comes by as sprites as well. PickUps, Houses, Enemies. I was wanting to know what are the best practices when it comes to this. ...
I want to dynamically create and put some Image (mx.controls.Image) objects on a Canvas and I want them then to be able to be repositioned by the user via the mouse. Can this be done? Note, I am not looking for drag and drop. I just want to change the X and Y coordinates of Images with the mouse.
Thanks!
...
I have a Flex application that can load modules as necessary. When the first module is loaded, it creates a class MyBackground(), which paints the background red. When I choose to load a second module (and unload the first) I again load a class MyBackground (from the second module). However, when I step into the constructor for MyBackgro...
I'm constructing a book of sorts in Actionscript 3 (FlexBuilder) and am trying to size an image dynamically according to the dimensions of it's source file. But, I've found that if I don't explicitly state the width and height of an image, they trace as 0.
So that I can scale down an image to fit within a given space, how do I get th...
Hi,
I have an ugly problem. I have two string variables (className and staticMethod) store the name of a class and it's static method I have to call:
package {
import flash.display.Sprite;
import flash.utils.getDefinitionByName;
import flash.utils.getQualifiedClassName;
public class ClassPlay extends Sprite {
public function Cl...
Hi friends! I'm a noob trying to develop my first site with Flash. I made some scrollers, but they aren't smooth...
The code I used was:
const scrollUpper:int = -151;
const scrollLower:int = 366;
const scrollRange:int = scrollLower - scrollUpper;
var dragBounds:Rectangle = new Rectangle(scroller_mc.x, scrollUpper, 0, scrollRange);
var...
Hi,
I'm new to Actionscript (v3), 20 years C++ though, and I'm just trying to get my head around some of the performance caveats I'm reading.
I checked out this site:
http://www.nbilyk.com/optimizing-actionscript-3
and was scared to death of the 'code' section saying that Actionscript has to do a dynamic lookup when trying find stati...
I am trying to remove an object from an array. but from some reason its not working. I am under the impression that a splice accepts 2 parameters. the position of the array. and for parameter 2 , how many to delete from then on out
I just want to delete one array so I am doing this
array.splice(i,0);
but it isn't working. can someone...
Hi
New to the Twitter API, but need to choose between 3 different Actionscript libraries available for the Twitter API.
Has anyone used either TwitterScript, SWX Twitter, or Tweetr and knows some of the pros and cons of each?
...
If you have an array with six numbers, say:
public var check:Array = new Array[10,12,5,11,9,4];
or
public var check:Array = new Array[10,10,5,11,9,4];
How do you check for a match (of a pair?)
...
Hello guys, I'm triying to get a folder size by doing:
var FolderFile:File = new File("file:///SomePath/Folder");
var FolderSize: FolderFile.size;
But this gives me a value of 0, how can I get the folder size? is there anyway to do this?
Tranks
...
This might be a dumb question. I think I already know the answer, just clarify. If you declare a object in varible1 and then pass the value into varible2. If you decide to null varible2 would that kill just the reference or the object itself as well. I want to say no, but then again, everything you do to the reference it self, also affec...
hi
I have a flash script, i added one move clip via addChild, my movie area is 500x400
and the movieClip i aligned to center. But when am trying to set the size with in browser its not aligned to center. all my calculations are getting wrong.
package {
import flash.display.*;
import flash.display.Stage;
import flash.geom.*;
...
package {
import flash.display.Stage;
public class MyGlobal {
public static var CX:Number = stage.stageWidth / 2;
public static var CY:Number = stage.stageHeight / 2;
}
}
The Error is "1120: Access of undefined property stage." WHY?
...
Hi
I'm new to actionscript. I'm trying to make a menusystem that will jump to specific frames depending on what frame I'm currently on. I have made a switch/case to evaluate the current frame. I have managed to find this code to get the current frame but I need an instance of my entire flash movie it seems? I have tried this (psudo code...
I am trying to use AlivePDF to save a chart into a .pdf file. However, when I try to save my chart, it ends up clipping half of the chart in the pdf so it isn't even fully visible. It seems that the screencapture that AlivePDF took to generate my pdf was too small.
I am trying to get a chart from a sample to work with sample code for ...
I'm using Loader to get the image data out of a ByteArray. The problem is that I need to store that image data with a name (which is known beforehand) once it's passed to the complete handler. Since the operation is asynchronous, I can't be sure which image of multiple will finish loading first, so it seems I need to pass the information...
I'm trying to apply/remove a glow filter to a movie clip on a MOUSE_OVER/MOUSE_OUT event.
Basically when I hover over a movie clip I want the glow to animate on, and then animate back off when I mouse out.
How would I achieve this?
Thanks
...
Hello,
I'm writing a ticket-shop-system atm for reserving tickets for various concerts.
What I have is a php-backend and a webpage that shows a .swf with some actionsscript-3 code in it, to draw in flash some sort of map and make available seats clickable for the end-user.
The problem with this solution is, that there are quite large hal...