actionscript-3

Flash using AS3.0

Hello- I created a movie clip called splash_mc that I only want to be viewed on the "splash page". However, when I link my splash_mc to the main timeline, or any other movie clip, it (of course) spreads it across all my frames as I'm clicking though the various links on my navbar. Basically, I just want the animation to appear under the...

AS3: setting registration point of a DisplayObject with actionscript?

How would you set the registration point on a Sprite or Shape via actionscript (I know this is trivial using Flash, but I need to do it purely in actionscript) ...

Connecting to SQL server2005 from ActionScript3

I want to connect to database SQL2005 from ActionScript3, where i need to execute query statements from actionscript! can any one tell me please the code to do that ???? i searched about this issue and the result did'nt help me as the code is not workinf so i got confused. ...

AS3, hooking your events

Does anyone have experience in hooking onto events. so we can modify there behavior without changing it's initial. So lets say we want to modify the behavior of every click of a certain set of menu buttons that if you click them you would wait 30 seconds before the original callback is called. I'm working on a project that will create ...

reverse engineering or documentation tools for flex/actionscript

I have inherited a flex project which is sadly not documented. Im looking for a documentation generation tool / class diagram generater or something like that which works with actionscript. There are around a 1000 class files and I don't have the time to step through all the code in debug. I have tried a few tools like Doxygen (set the ...

Adobe AIR - reading a file in the same folder outside AIR package

How may I know File.nativepath from the folder that my .app or .exe AIR app is running? When I try this I just get '/Users/MYNAME/Desktop/MYAPP/Contents/Resources/FILETHATINEED.xml' I need put this on any folder and read a xml file in the same folder. I don't need my xml file inside the package. I need this structure /folder...

Problem with the Flash Contact Form

Hi, In Flash (AS3) Iam creating a contact form in that i have taken one " Submit Button" , one " Reset Button", four input text fields " Name, Email, Subject, Message" with instance names " contact_name, contact_email, contact_subject, contact_message" Iam very much confused about setFocus and killFocus. In AS3, i have given contact_n...

How do I create dynamically text in a movie clip using as3?

I would like to create text animated like a comet. I would like to create a gravity effect, accelerate the movie clip on vector, set a starting position on stage and load the text from a xml file. ...

How to access a configuration file in two different MXML files

I have something like this 1.mxml <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()"> <mx:Script source="_Public.as"/> </mx:Application> _public.as [Bindable] public var config:XML; public function init():void { var request:URLRequest = new URLRequest("config/config.xml"); try { loader.l...

Detecting if fullscreen is allowed in ActionScript 3.0?

I would like to remove a fullscreen button if the allowfullscreen param is false.       param value="true" name="allowfullscreen" Does anyone know if its possible to detect that value? It doesn't come with other flashvars on loaderInfo.parameters. ...

Where would I keep my .txt files for inclusion in a Flex app?

I'm working on a flex app, and I have Flash & AS3 experience up to now. I have text file I need to request using URLLoader, so I placed it in the same directory as the SWF deploy > maps > map1.txt but when run the SWF I get the following error *** Security Sandbox Violation *** SecurityError: Error #2148: SWF file file:///Users/him/D...

Serious Flex databinding issue

Ok so this is kind of urgent at this point. I have a large-scale AIR application that is pigging out left and right, and by massive amounts of trace statements and generating my own stack traces (useful for debugging), I have found that each combo-box is getting it's lookup from the LookupManager class multiple times, equating to about 3...

Actionscript and ViewStack = Cannot access a property or method of a null object reference

I'm writing a flex program in an OO manner and I've got to the point of creating a ViewStack to hold various panels. My problem is that when I add a panel to the ViewStack it throws the aforementioned error. No doubt the answer is pretty obvious so here's the constructor for the manager class that holds my ViewStack. stack = new ViewS...

Where to put code that defines prototypes for base types in flex?

I've added functions to the Date prototype and I am wondering where is the best place to put the code in a Flex project? ...

Load images from folder into slideshow

I have this AS3 slideshow code, that loads an XML with a list of images. What I'm looking for, is a way to skip the XML part, and just load all images in the folder "images"? How can I add an constant boolean that decides if it should play the images random or not? const RANDOM:boolean = true; ... // import tweener import caurina.trans...

Convert string to GUID in Actionscript 3

Hello, I'm retrieving an GUID from a webservice with Flex. With this GUID i have to retrieve an Username from the webservice. The output gives me a "The key supplied is invalid. It must be of type System.Guid." I looked everywhere for a solution, but I can't find the right answer. Anyone? Thanks! edited: Is there a way to convert a ...

Can someone explain this bit manipulation code?

I have a tree control with checkboxes next to each node that allows for checked, unchecked and middle checked states on the nodes. When clicking a node, the parent and children are updated. The code I found that does the trick uses bit shifting and I'm trying to understand what exactly is happening. Can someone explain the following cod...

AS3 Event Bubbling outside of the Scenegraph/DisplayList

Hi just wondering if it is possible to take advantage of event bubbling in non display list classes in AS3. For example in the model of an application where there is a City class that contains many Cars. What methods are there to attach an event listener to a City object and receive events that bubble up from the child Cars. To clarify ...

Infinite loop while traversing XML in Actionscript 3

Hello, I've narrowed down the code to this (ignore the colourization): var theXML:XML = <xml> word </xml>; for each (var i:XML in theXML.*) { trace(i); } For some reason, this prints out "word" over and over indefinitely. Any thoughts as to why? I'm a bit out of practice and have a feeling it's something obvious...

Debugging FLEX/AS3 memory leaks

I have a pretty big Flex & Papervision3D application that creates and destroys objects continually. It also loads and unloads SWF resource files too. While it's running the SWF slowly consumes memory til about 2GB when it croaks the player. Obviously I am pretty sure I let go of reference to instances I no longer want with expectation th...