actionscript-3

Trouble With ActionScript Loader Events

Hello, I am working with a loader to request an image from a WMS(Web Mapping Service). Everything thing is fine and dandy with a valid request. When a bad request is made to a WMS, a Standard Exception Document(XML) is usually returned. However, the loader doesn't fire any event (specifically the Complete or IOError events) when a ...

Place an 'addChild' button into grid space of TabNavigator

This question is similar to the post: "Move Button into grid space of a TabNavigator’s tabs in Flex Builder." http://stackoverflow.com/questions/1150835/move-button-into-grid-space-of-a-tabnavigators-tabs-in-flex-builder but with a slight difference. I wish to have a button that adds a child (tab) to the TabNavigator in the grid spac...

Pure AS3 Project with onInvoke working.

I'm trying to create a pure ActionScript 3 AIR project, without Flex, somewhat like in the following question: http://stackoverflow.com/questions/966180/actionscript-project-to-air-application ...but I'm not really sure how to access command line arguments from onInvoke(). I need this for accessing command line arguments for my Pure AS...

Loading an embedded image in AS3

OK, I feel dumb asking this, but I've spent the whole afternoon trying to figure it out, without success. In AS3, I want to add an image to the Library (let's call it image.png) and instantiate it using just code. I succeeded in instantiating an external image this way var pLoad:Loader = new Loader(); pLoad.load(new URLRequest("image....

AS3 -- Can upload several images to stage, want to size and move each separately

Currently each loader is a child of a sprite -- sprite.addChild(loader); Next I add the sprite to movieClip box which is with myBorder movieClip -- mainMovie.myBorder.box.addChild(sprite); Next I can drag the sprite using -- mainMovie.addEventListener(MouseEvent.MOUSE_DOWN,pickUp); mainMovie.addEventListener(MouseEvent.MOUSE_UP,drop...

Roll over and roll out on buttons

I have two buttons in my flex app next to each other, ButtonA and ButtonB. When the user does a mouse roll-over on any of the two buttons, I want the roll-over skin (overSkin) to show on both buttons, i.e. Button A and Button B. I tried to do it using this when user rolled over Button B: ButtonA.dispatchEvent(new MouseEvent(MouseEvent.R...

onDragOver for Actionscript 3.0

Hi, I am having a hell of a time getting a MovieClip to detect whether another MovieClip is being dragged over it in ActionScript 3.0? Does anyone know of a good implementation. Thanks ...

Flash, ActionScript: Load assets from external SWF

Hi, We have a widget (SWF) that needs to be broken into two SWFs. The main SWF will contain all the programming and business logic and it will also load a second SWF file which will contain the assets, fonts etc. I have limited experience in Flash but I know it can be done in Flex. Anyway here we have to do it in Flash CS3. Will it be ...

Childs and parents and the famous garbage collector in actionscript-3

Once again a question about the garbage collector in actionscript-3: If I have a master container: var masterContainer:Sprite = new Sprite(); And then I add a child to this container: var childImage:Sprite = new Sprite(); masterContainer.addChild(childImage); addChild(masterContainer); And, I then decided to let the garbage collec...

RegEx to modify urls in htmlText as3

Hi, I have some html text that I set into a TextField in flash. I want to highlight links ( either in a different colour, either just by using underline and make sure the link target is set to "_blank". I am really bad at RegEx. I found a handy expression on RegExr : </?\w+((\s+\w+(\s*=\s*(?:".*?"|'.*?'|[^'">\s]+))?)+\s*|\s*)/?> b...

Optimizing my dynamic background engine for a 2d flash game in actionscript-3.

Edit 2: judging on the lack of replies I start wondering if my issue is clear enough. Please tell me if I need to elaborate more. Notice: see bottom for a code update! Short introduction: I'm writing a 2 dimensional flash space game in actionscript. The universe is infinitely big, because of this feature, the background has to be rende...

How can I get an instance's "memory location" in ActionScript?

FlexBuilder's debugger will show you the "memory location" (or, I can only assume, something roughly analagous) of any in-scope instance: But I'd like to get this information in code (sort of like Python's id function), so I could very easily trace how objects move through out the system. For example, I might have: trace("Returning"...

Flex 3 Alert text doesn't stretch to fill space?

This seems like a ridiculously simple question, and yet I just can't seem to find an answer. I'm trying to display some simple information in an Alert (I'd rather not use an alert, but I need a fast n' simple solution for a project that's got to be out the door asap) Long story short, no matter how large I make the alert, my informatio...

Bug? Netstream won't resume after an inital pause then seek

I'm experiencing some strange behavior for which I can't find any documented knowledge. Here's what is happening: After calling the play() method, a netstream is paused when the NetStatus code is "NetStream.Play.Start". This disables the default behavior of automatically playing. Before resuming with either togglePause() OR resume(), p...

ENTER_FRAME listener in extended classes for as3

I'm working on learning the basics of AS3 and have been working through a tutorial book. We just made a class that, when linked to movie clips (or conceivably any sprite) would enlarge them when rolling the mouse over them. To make sure I remembered all the principles, I tried to make a class that would make the sprite spin when moused...

Can I get Actionscript3 to type cast Numbers and ints in XML files as numbers and ints?

Everything seems to be a string right now & that kinda ruins the whole xml as an internal data structure thing, I don't need a big tree of string I need typed data :-/ Are there any changes I can make to either my XML files or my AS3 code that will force it to cast ints as ints and Numbers as Numbers? Or maybe some kind of type schema I ...

AS3 - Accessing Library Items from outside the Document class

How do you access Library items from classes other than the document class? For example, if I create a movie clip in Flash and Export it for Actionscript with the name Foo, I can do this in the document class: var f = new Foo(); this.addChild(f); And it appears on the stage, as it should. But I need to be able to create other instanc...

How can I find the type of a var/name in Actionscript3?

Erm, that's it!... ...

Can I get Flash CS4 to observe an XML schema? So it may strongly type XML input...

...as it loads and save me having to duplicate the whole data structure by hand and set each type manually. It seems such donkey work should be quite unnecessary in this modern day and age but I can't find a shred of info on the web to help me avoid it! Surely this whole new e4x thingy must support type casting somehow?!? Cheers, Roger...

What's the best practice for tracking events with Google Analytics?

Specifically thinking about the Flash version but I'm sure this applies to the JS version too. Should I cache/queue a number of events before calling the API and then send them all at once or should I simply report them as they happen? I'd like to track a lot of events, say 50 or so per a minute, but I don't want to completely overwhelm...