actionscript

Flex Event.ID3 dispatches twice

Hi, Why does this code mySound.addEventListener(Event.ID3, myID3Handler); cause the myID3Handler to run twice ?! I also notice that values provided to the handler are not the same, actually the second being the correct one. Thanks ...

Requesting pages and reading results with Flash

I have a Flash object hosted on foo.com. When I run it, I want it to send a HTTP request to foo.com, and retrieve the results along with HTTP headers. How would one achieve this with Flash? (AS 3) ...

How to escape single quotes in Flash?

I have a user supplied text and I need to prepend all backslashes and single quotes with a backslash. How to do that? ...

Creating a repeatable, random looking distribution of objects in Flash

I'm trying to scatter movie clips around the stage using Actionscript 3 in a way that looks as though they were randomly placed there, like photographs spread out on a table top. I tried using a spiral type arrangement, but found it too uniform, and also a circular distribution, but found that too random. The other factor is that i'd l...

XML load in actionscript

Hi, I am trying the basic XML parsing code from the adobe documentation.. I tried it with several RSS feeds I plan to use, many of large websites.. one worked, the others returned status -10, status: -10 (An end-tag was encountered without a matching start-tag.) the thing is, these are big sites, there is no way all of their feeds a...

FlashLite 2.x/3.0 Cross Domain policy file

As per my understanding of the Adobe docs for a cross domain request by an swf, two types of policy files are required on the server: URL policy file: this is named "crossdomain.xml" and stored in the root of the server and is generally an http request to the server. System.security.loadPolicyFile("http://foo.com/crossdomain.xml"); So...

Greensock library, which is the best option, TweenLite, TweenNano, TweenMax, TimelineMax?

Hi all, i am new in flash development, i heard that Greensock lib is the best one. But when am trying to download its really confusing. there are a lot of names like * TweenNano * TweenLite * TweenMax * TimelineLite * TimelineMax * Tweening Platform v11 Which is the best or full featured lib.. where do i get the download link for th...

Flash Combo Box... set the text field to selected value?

Hey everyone.. I'm really new to flash. I have a combo box and I am using the 'selectedIndex' property to give it a default value (a value that is at the first(0) index). Setting this property in my ActionScript does select the value in the dropdown but it does not add the selected value to the combo box's text area. How do you do this? ...

applying a ColorTransform stops MovieClip from playing

I have a MovieClip that consists of multiple layers, one of those layers is an animated background Shape. let's call this MyMovieClip with the background shape have the instance name "mcBackground"; I'm adding the MovieClip to the stage from ActionScript by: var myMovieClip = new MyMovieClip(); addChild(myMovieClip); This works fine ...

What headers does a SWF file send when requesting data from a URL

When requesting data with: <param value="data-file=http://url-to-my/json.script" name="flashvars"> via an SWF file, what request type would "http://url-to-my/json.script" receive. It doesn't seem to be a "xmlhttprequest". Is it the same as a request from a browser? ...

Sending HTTP request with multiple parameters having same name

I need to send a HTTP request (and get XML response) from Flash that looks similar to following: http://example.com/somepath?data=1&amp;data=2&amp;data=3 I.e. having several parameters that share same name, but have different values. Until now I used following code to make HTTP requests: var resp:XML = new XML(); resp.onLoad = func...

AIR file is damaged after publish.

I tried to find an answer here but haven't seen anything yet. I've been working on an AIR application with Flash CS4 (AS3) for the last two days. Yesterday when publishing I was able to install the application (or overwrite existing version) without a problem. Now whenever I publish a new AIR file, it constantly tells me it cannot be in...

Flash Actionscript Timer - what happens when an event doesn't finish in time?

Hi, I'm using the Actionscript Timer class. What happens if I run a function every 3 seconds, but the function takes 4 seconds to complete? Does the Timer object queue up events? I guess this must happen if only 1 thread is being used? ...

Dealing with multiple GUIs in Flash/Actionscript 3

I'm trying to figure out the best way to deal with writing multiple GUI windows using Flash Components. I thought the best way to handle this was to use a layer for each window that I want, and simply hide/show the layer I want for the window. It would be preferred to not use actionscript alone. Since each layer holds these GUI componen...

How to get am instance name of a dynamicaly created movieClip or name ?

For AS 3 I have a class which crate a panel with close button. and i create an instance of this class like this function _smallThumbClick(evt:MouseEvent):void { var _popup:Popup=new Popup( square.width ,evt.currentTarget.y, evt.currentTarget); addChild(_popup); } and this mouse event from the thumbnail(suppose), so if i clic...

Facebook, Flash and maintaining state

So here's the situation: I have a Flash application I'm deploying to facebook as a canvas app. There are various states within this app - different "pages", sort of. I want to be able to share this app with other users using Facebook's baked-in sharing mechanism. However, I want each state to have its own share button. That way when so...

Flash / Actionscript: How to make overlapping sprite invisible

See image at http://reggino.kingsquare.nl/tmp/actionscriptProblem.jpg Hi there, I can't get my head around this one... I'm having two sprites, where the intersection of these sprites has an alpha of 0. I tried all the blendmodes and filters, but none of them seems appropriate. I've been puzzeling with extra layers on top of these thr...

Can I use the flash.net.NetConnection over https

Is it possible to use the flash.net.NetConnection object to connect to my Flash remoting enabled web application over HTTPS within Tomcat or any other servlet container? I am using the SpiceFactory cinnamon project for amf remoting and have searched for examples of using HTTPS but see only the reference to a proxy type in the NetConnect...

Actionscript physics engine which supports particles attracting eachother

I'm looking for a physics engine for Actionscript which supports particles attracting eachother. Like in this example. So not just objects being attracted by the floor like in most engines (eg. APE afaik doesn't support particles attracting eachother) ...

simple preloader question for AS2 site

I was asked to add a preloader to a rather messily constructed AS2 website. I'm using the preloader-in-the-first-frame approach--there are tons of references to _root throughout the site so I can't load the main site externally as another swf. My approach just involved creating a new frame at the beginning of the timeline, bumping all ...