actionscript-3

How to share graphics between multiple .swf files? (Flash CS5)

In Flash CS5 it seems like there's an option to import .swc files into the library, but as an RSL (runtime shared library). What's the difference between this option (swc) and using a runtime shared library .swf file? Also, if you select a .swc file, and choose the "info" ("i") icon, there seems to be several options for .swc..."merg...

Reducing the hit area on a movieclip button

Hey guys, have a little issue i need to figure out. I created a movie clip button that contains 2 text fields, one static and one dynamic. The dynamic text field holds strings that will vary in length. This MC in general is used as a button so what im trying to do is not have the hit area as large as the length of the text box. If you g...

Flash movie consuming HTTPS WebService connects as HTTP

I have a Flash Movie (SWF) that is consuming a .NET WebService (located on the same domain) and in my Test environment everything works perfectly (Test env is all HTTP). When deployed to production (All HTTPS) an issue occurs when trying to access the WebService from the Flash movie. A new WebService object is created with the HTTPS ur...

moving event intialization from mxml application declaration to .as file

The question says it all basically, but an example: <?xml version="1.0" encoding="UTF-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:mc="my_components.*" xmlns:custom="swf_address.*" ... deactivate="repeat_end(event); bActive = false" ... initialize="{new Rad_XF(this)}" > What would the syntax ...

ActionScript - Difference Between "Wildcard" and Object Datatypes?

When declaring a variable to have an open datatype, is there any difference, especially a performance difference, between typing a variable as a "wildcard" (i'm not sure of the official name for this) and typing a variable as an Object? var myVar:*; var myVar:Object; ...

Debugging ActionScript in Browser

I am trying to implement following: http://stackoverflow.com/questions/668377/how-can-i-start-a-flash-video-from-javascript However I am unable to call method from Javascript. The trace message I wrote within AS file is not able to see while calling file within browser. How can I test whether my JS function is calling AS method or not...

Flash PNG Quality on Tween

In Flash I have some PNG images, and I wish these images to become 50% larger on hover. However the tween I have used to make them larger distorts the quality of the images considerably. For the tween I am not using any external libraries and I am using a standard scaleX tween. Is there a way around this loss of quality? ...

Listening for Multiple Events on Multiple Objects AS3

I currently have an over, out and click event for 8 different objects. The over and out events are identical for each (tween expands object and then shrinks it back for the out state). I have previously asked for an easy way to declare those events, and now I was looking for an easier way to handle them. Here's my code: //-----------G...

Why is object property null?

Below is my class, which simply reads an xml file and provides the contents in e4x format. Unfortunately, after the constructors executes and sets the xmlProperties property with the expected values, it some how becomes null. Anyone know what I'm doing wrong? public class WebService { private var _propertiesReader:HTTPServic...

URLLoader doesn't even try to load. Error #2032: Stream Error

I am trying to use URLLoader to load an XML file from server (same domain as swf). This should be too simple but I am getting Error #2032: Stream Error If I trace the HTTP status event it just shows status=0 though I have read that Mozilla doesn't supply status codes to Flash Player so maybe it's not informative. I have sniffed the HTT...

How can I make a button change it's shape with every click (music button)

I want to design a music button for a game like geochallenge ...

Flash CS5: combining bold and regular text in a textfield?

I am trying to combine bold and regular text in a textfield but how do I embed an font family and not just a single style of a font? See example of how I embedded a font, you can only choose one style: "regular", "bold", "italic" or "bold italic" at once: However, when you try to embed the text (via the IDE settings or actionscript) ...

Flex 4 How do I access a specific cell by index?

I would like to edit a cell by the row and column indexes so essentially do the following: advDataGrid[2][3] = "Dogs" so that I am setting the data grid row 2 and column 3 to Dogs. I cannot for the life of me figure out how to do this! Side note: I need this because I am trying to allow the user to copy a section of an excel file to ...

flash.net.URLLoader get body from 500 internal server error.

I'm trying to streamline my error reporting for internal testing. When I use URLLoader/URLRequest to load a page that responds with the 500 HTTP status code, I catch it with the IOErrorEvent.IO_ERROR, but can't find a way to get the response body. Unlike with Event.Complete, loader.data (My URLLoader) is an empty string. Yes, I can us...

Is there a problem with importing a SWF movie made in AS3 into a SWF movie made in AS2?

I haven't tried yet but am curious if I should even bother. I have a legacy AS2 swf that I don't want to rewrite in AS3 but I need to improve upon it to play video, and I'd prefer to use the AS3 video playing mechanisms. Ideally I can build an AS3 movie that just takes a string param of the movie location and plays it. I'd load this ...

drawing circle in flex

I'm using flex sdk and trying to draw primitive geometry figures, what is wrong in following code? i tried without the trigger(placing) of button, but did not work. <mx:Script> import flash.display.Sprite; import flash.display.Shape; private function draw_circle():void { var myCircle:Shape = new Shap...

How to decrease the width of HDividedBox divider bar length in Flex?

how we can lessen the length of Dividing bar between two components. like in this example i want the length only of two pixel. ...

About code optimization in Flash AS3

Hi, i'm curious about something. Let say we have 30 object in the code, and every object should be animated trough enter frame event. Which will be faster(in terms of memory execution) : to have just one event listener in the main object (for example) and to call object methods, or, to have separate event listener for every object? Thank...

Most efficient way to concat Vectors

What is the most efficient way to insert one Vector into another at specific position? For example: var aa:Vector.<int> = Vector.<int>([1, 2, 3]); var bb:Vector.<int> = Vector.<int>([9, 8, 7]); This doesn't seems to work: bb.splice(1, 0, aa); The result is [9, 0, 8, 7]. ...

How to get a random filename from a directory in AS3?

I need to get a random filename from a directory in AS3, and open it. (This will be online, so no AIR) I'm thinking of just using a text/xml file with all the filenames listed, and just traverse through it getting the filename. But is there a more "direct" way to just look at the directory so I don't have to edit the text/xml file all t...