actionscript-3

DTD flash open source engine?

DTD flash flex action script open source engine? I need some open source engine for creating some games like Desktop Tower Defense games Does it exist?) So… What do I need? I need - • Open Source Libs • Tutorials • Blog posts/Articles ...

Actionscript NetStream.play drops port in relative URLs

Hi, the current page my flash application is running from is http://localhost:3000/. I'm trying to play a video using NetStream.play(relativeURL) by using a relative URL (e.g. "myVideo.flv"), but when I look at the actual request made by actionscript, it's dropping the port number. (e.g. http://localhost/myVideo.flv). Is there somethi...

Flash AS3 : addChild() does not display imported movieclip.

I fought with the IDE and read around all day enough to learn that in AS3, the exported class name of a lib symbol matters. I have hello.fla. In it I created a simple textfield with a string ('hello') - coverted it to a symbol (movieclip) and did the following: made the classname 'Hello'. Export for AS is checked Export in first fram...

Flash async calls with mouse click permissions?

The current workflow is as follows: user clicks a button sends a Loader to see if the user has permission if the user has permission uploads a file Unfortunately, this gives: SecurityError: Error #2176: Certain actions, such as those that display a pop-up window, may only be invoked upon user interaction, for example by a mou...

Converting MXML to AS3: AreaSeries Click

Hello, I have a line of MXML for an AreaSeries in one of my Flex charts: <mx:AreaSeries yField="A" displayName="A Model" click="clickResetChart(6)" buttonMode="true" mouseChildren="false" useHandCursor="true"/> And I need to rewrite it into ActionScript. I have all of it working except for the "click" function. Could anyone tell me...

Delay before playing embedded mp3 in Actionscript / Flex 3

I am embedding an mp3 into my Flex project for use as a sound effect, but I am finding that every time I play it, there is a delay of about half a second from when I call .play() to when you can hear the sound. This makes it weird because I want the sound effects to sync to game events. My mp3 itself is only about a fifth of a second lon...

My AsyncErrorEvent isn't working to catch errors for my RTMP video player

Hi again peepz, I have this streaming video player with an asyncErrorHandler function which isn't working correctly. In Flash player 10 I get no errors, but in Flash player 9 I'll get a popup window with the error message that shows up in my output window when I test on my local machine. Error #2044: Unhandled AsyncErrorEvent:. text...

Grep doesn't work correctly with .as files

Here's the statement I'm running: grep -i -H 'ConfigureControls' *.as Note that I'm forcing file names with the -H flag. What I get back is: } } trac} } this.chairControls.debug.appendText("\nAn error occured when communicating with server:\n" + err.message);l);his.chairXML.storeResult; {ackage {ublic cpublic frequest = ...

Custom bullets in Flash

Is there a way to make a bulleted list in flash with custom bullets? If so, can this be used from within a TextArea in Flex (mx.controls.TextArea) when setting htmlText? For example: <li>Item</li> <li>Item</li> The list above will render fine when set into a TextArea using htmlText (versus just setting the text property). The rendere...

AS3 / Flash CS3 : adding instance name breaks dynamically loaded swf?

Hi, I have managed to dynamically load a swf in AS3 and instantiate one of it's library symbols. Everything was fine until I decided that inside my library symbol, I would give the textfield that was on the stage an instance name, so I could manipulate it after loading the swf. One thing I noticed was that immediately i added the instan...

AS2 to AS3 hitTest Migration

I am stuck in as3 hit test problem. this is the code i wrote in as2. please help me migrate this in to as3 target.hitTest((_x - _width / 2) * (1 / (100 / _root.game._xscale)) + _root.game._x, _y * (1 / (100 / _root.game._yscale)) + _root.game._y, true) ...

Cakephp Session lost in Flash player

Just want to know if anyone have the same problem. The website need to login to perform certain task. We use stock Auth component to do the job. Everything is fine until it hits an interface which build in Flash. Talking to Amf seems fine. But when the Flash player try to talk to other controller - got redirect because the session in n...

Opening popups from AS3 using ExternalInterface in Safari

hi, I'm using this code to open a popup ExternalInterface.call("function () { window.open('" + url + "','" + title + "','" + options + "'); }"); for JavaScript people: calling ExternalInterface.call(string); from flash player lets the browser do eval(string)(); as this call is within a click handler, it even works perfectly with Fir...

AS3: Can't convert DataEvent.data to XML (throws error, that is not well-formed)

Uploading a file, i want to have an XML response from server. So, in php, i do: header("Content-type:text/xml"); echo"<whatever/>"; // any 100% valid XML in flash, i use FileReference class and FileReference.upload() method var file:FileReference = new FileReference(); file.addEventListener(Event.SELECT, FileSelected); file.addEvent...

textField with css fontSize set to percentage does not scale in full screen

In AS3 flash - I have a textField with a CSS in it that looks like this: body { fontSize: 10%; } When it runs, the font is small. When I click the full screen button, I expected the font to increase proportionally because I set it for 10%. However, this is not working, the font stays at the same size as when not in full screen. ...

AS3 proportionally scaling external image

Currently I am using a for loop to dynamically load XML images and place them in a grid as thumbnails. I have the arrangement set and all the data is loading smoothly, but now I need to make the images scale to small 100px x 100px thumbs in small container movieclips. My code is as follows. import gs.*; import gs.easing.*; var bttnH...

How do you extract the index postion from mp4s with AS3?

I know you can extract metadata from mp4s but I want to pull specifically the index point which is in Moov Atom. Any input is greatly appreciated. If anyone knows of a program that can read the index position of an mp4 would be even better. ...

return a FaultObject on purpose from pyamf

I am currently migrating from RubyAMF to PyAMF. In RubyAMF you can return a FaultObject deliberately like so: render :amf => FaultObject.new("Thats not your pie!") Is there comparable functionality in PyAMF? I've searched the docs and can't find any mention of it. ...

swfobject weird behavior

Hi All, I'm using swfobject to embed my flash. It's doing weird things. I've created a simple textfield using FlexBuilder. It's an AS3 project, which extends Sprite. I've set its width to be 640 and height to 450. Then, in the swfobject parameters of the page, I've also set 640 x 450. I've made the background nice and red and ugly so ...

Drawing a hex grid in Flash?

What's the easiest way to draw a hex grid algorithmically? How should I present them in data? For example, in a square grid, I could just save x-y coordinates.. ...