actionscript-3

Manipulating the hash/anchor part of the URL in Actionscript

How can you get and set the hash or anchor part of an URL in pure Actionscript? When googling for a solution I've found explainations for doing it using JavaScript, but is it possible to get it without using JavaScript? (I'm using Actionscript 2, I may consider updating the code to AS 3, but it doesn't seem to be a quite straight forward...

Get all named instances in a flash movie

Is it possible to get a list of all instances with a name in a flash movie using actionscript 2. Like an array containing all named text areas, or all movieClip instances etc. I would like to get this so the designer can add or remove text areas etc. and the actionscript can dynamically find these and get the texts from a separate dataso...

Developing and debugging a component inside FLA file with Flash CS4

I have created a small flash CS4 project that has a few custom components ( AS 3), communicating with each other. Is it possible to make a FLA file that points to these components in source format (as .AS files), without compiling these components separately 1st and copying to /flash/components folder? I want an easy way to alter com...

Flex app architecture, how can I build component library that can be overriden

Hey there, I've got a rather large flex app that we've just built for a client. Now, the bossman tells me that more clients are interested in the app. However, their implementations will need a few small tweaks (don't they always!). We're using Cairngorm and from what I can tell thus far, the only things that will be different between ...

Create a button with an icon in actionscript

I want to create buttons with icons in Flex dynamically using Actionscript. I tried this, with no success: var closeButton = new Button(); closeButton.setStyle("icon", "@Embed(source='images/closeWindowUp.png"); ...

as3 ExternalInterface.addCallback is not working right

Hi, I was trying to access swf from javascript, so this example in livedocs is what I'm trying to modify. http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/external/ExternalInterface.html#includeExamplesSummary However,it is not working correctly for some reason. The problem I'm encountering is that it does not work in Sa...

Suggestions for (semi) securing high-scores in Flash/PHP game...

...I have read a few threads on here that have discussed various methods and was just looking for some feedback on a proposed solution we came up with. In one of the threads a comment was posted recommending a public/private key which sounded great, this is what we were thinking... Client Side - 1. Key is stored inside of Flash swf whi...

Need help styling a TabNavigator in Flex.

I have a tab navigator control and I would like to make all of the tabs a certain color, say blue... How can this be done? I have tried through the following CSS: TabNavigator { tabStyleName: "tabs"; } .tabs { backgroundColor:#6588b9; } but it only seems to work with the selected tab... I then tried to do it programtica...

Security Sandbox in AS3

What is a security sandbox violation, and how do I override it? I'm making a project in FlashDevelop, and today, it will not load external files, even though it had been previously. It gives the following output: ********* Security Sandbox Violation ***** Connection to file:///C|/Documents%20and%20Settings/Kevin.PC885314341208/De...

From AS2 to AS3 what is the equvalent of _root ?

I'm trying to learn Actionscript 2 or 3, with AS2 I eventually figured by trial and error that I could get any named instance and modify it using a string with its name using var theinstance = "titletext"; // actually exctracted from an array _root[theinstance].htmlText = "New text with <b>HTML!</b>"; but when trying to convert the co...

AS3 - Can I detect change of value of a variable using addEventListener?

Hi, Is it possible to use EventListener to Listen to a variable and detect when the value of that variable changes? Thanks. ...

Vector Shape on Stage Appears Over Dynamic Textfield

The subject pretty much explains it all. I start on frame one of a MovieClip with just a Bitmap covering the whole stage. Then when a user clicks a button, it goes to frame two and a vector shape is on the stage covering part of the image. At the same time, through code, I place an input Textfield on the stage. Problem is, the dynamica...

why do tweens stop randomly?

With code like the following, sometimes the child controls correctly finish their animation and sometimes they stop at random places in the middle. Why don't they work correctly? var t:Tween; t = new Tween(child1,"x",Elastic.easeOut,0,100,2,true); t = new Tween(child1,"y", Elastic.easeOut,0,100,2,true); t = new Tween(child2,"x",Strong....

Possible to import an image into AS3 without PHP?

In actionscript 3 is it possible to allow a user to upload an image into a flash movie at runtime without POSTing to a PHP script? I dont want to export the image or save it anywhere I just want to be able to display the image in the flash movie fingers crossed ...

Flash TextField HTML - How do I prevent the error dialogue for missing images? (Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.)

I'm using a Flash TextField control to display some HTML content inside a Flash presentation to be shown on a large touch-screen kiosk. Unfortunately, if any image tag in the displayed HTML content points to a non-existent image, a dialogue is shown with the error message Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not ...

From AS2 to AS3 loading external images

I'm converting some Actionscript code from AS2 tp AS3, and I've eventually managed to get most of it to work again (it's allmost a totally different language, sharing just a little syntax similarity). One of the last things that still doesn't work, is the code for loading an external image. Perhaps this has changed in AS3 but I really t...

How can I record audio using Action script then upload it to server?

First is there any technique for using Action Script for recording sound from microphone? If yes. How? Then one he record I'll upload it to server. ...

Flex Help: Repeaters not repeating in an Accordian control.

I am having a issue with databinding child repeaters inside an accordion control, hopefully you can help... I have an accordion in a ViewStack (of which,that ViewStack is also in another top-level ViewStack). I have a repeater in each child of the accordion control. The component looks like such: <mx:Box xmlns:mx="http://www.ado...

popups from embedded .swf cross-browser

Situation: you've got a .swf embedded in an html page, and when you click on something in the .swf, it needs to popup a chromeless window. Normally this would be fairly easy - but consider Safari, which completely disables all 'window.open' functionality while its popup-blocker is enabled (it makes an exception if the function is trigger...

Actionscript3 to JavaScript communication: best practices

On a more abstract level then a previous question, in my experience there are 3 ways to call a javascript function on an html page from an embedded .swf using AS3: ExternalInterface, fscommand, and navigateToURL. Let's compare and contrast these methods (and maybe others I haven't listed) and talk about the pros and cons of each - right...