actionscript

XML Node replacement in Actionscript 3

Hi, A couple of days ago I asked a question about how to replace and edit values in an xml file with c#. The question got a great answer. Now I wonder how to do this in Actionscript and if there is an as simple way as in c#. The question can be found here: http://stackoverflow.com/questions/2856459/advanced-replace-in-c Thanks ...

Flex/Actionscript: Unable to add archive file

I have an Flex 4 application that I am developing in Flash Builder 4. I'm trying to use a library developed by a coworker, which was delivered as an SWC. I added the library to the Library Path in the project properties. Component set: MX + Spark, Framework linkage: Merged into code. When I attempt to instantiate a component from th...

Is there anething like @-quoted string in Actionscript?

For example in C# @-quoted string literals start with @ and are enclosed in double quotation marks... So Is there anething like @-quoted string in Actionscript? ...

How Can I build a Flash ActionScript Throttling Demo like bandwidth profiler

I'd like to setup a demo that that shows the same video loading at varying throttled speeds page online.. so for example I'd have a swf shell, that loads the same video into three separate movie clips, but throttled at different speeds. how do I manually set the bandwidth speed... like one does in the bandwidth profiler ? thanks ...

where should damage logic go Game Engine or Character Class

I am making a game and I am trying to decide what is the best practice for exchanging damage between two objects on the screen. Should the damage be passed directly between the two objects or should it be pass through a central game engine that decides the damage and different criteria's such as hit or miss or amount dealt. So overall w...

Actionscript blur/shadows/glows how heavy are they on the processor?

Hi, I have say 10 items in a particular space, If I apply glows and drop shadows to all of them and all of these items are usually static. Other characters do move around them too. So I'm just wondering would it be wise to use vectors with actionscript blurs and glows. Or to have a PNG? and if I cannot have a PNG and have to work with v...

dbpedia /flash how to?

I am interested in visualising data from dbpedia in flash but I am a little out of my depth technically... I know a bit of actionscript, javascript and some php but I'm not familiar with SPARQL or java. The documentation I can find on it is a little over my head. I have a couple of questions before I totally ruling it out: • Has anyone...

bring object to front flash actionscript 3

I have a menu set up that has about 20 menu items in a circle. When you mouse over each item, a title comes up. The only problem is that because of the depth order, it's hidden behind the other menu items. Is there a way to bring this item to the front when moused over? I'm pretty actionscript illiterate so any help would be awesome. ...

ActionScript: Type coercion problem with BlazeDS/AMF and class interfaces

Hi, I've got a problem with type coercion in a Java/Hibernate/BlazeDS/Flex-Setup. First of all, my classes look like this: --- JAVA --- Interface I (Abstract) Class A implements I Class B extends A --- ActionScript --- Interface I Class A implements I Class B extends A I got RemoteClass-Meta-Tags in all ActionScript-Classes/...

How do I set if a node is a branch or a leaf?

I have a tree being populated by an array collection. I don't have control of the data in the array collection and even when a node has no children it still has a "children" property that is causing my tree to treat every node as branch. I can do a simple check on the length of the array in the children property. If this is 0 I need the ...

C# analogs for actionscript: events.Event, events.EventDispatcher, events.IEventDispatcher;

What are C# analogs for actionscript: import flash.events.Event; import flash.events.EventDispatcher; import flash.events.IEventDispatcher; And what is a translation for dispatchEvent( new SlicedEvent ( SlicedEvent.COMPLETE, _slice, startTag.time, endTag.time ) ); ...

Multiple loadmovie() ends up with multiple videos played at the same time!

Hi, i use loadmovie() to load youtube videos inside my flash website but when i load another video the old one doesn't stop, so i tried unloadmovie to destroy it but it seems that i did a mistake in my code This is how the code looks to stop the old one an load the new: vloader.unloadMovie(); vloader.loadMovie("http://www.youtube.com/v...

Send xml from ActionScript to PHP

Hi, I have values inside an XMLList in Actionscript. Need to send these values to the DB and update it. My actionscript code is as follows: public static function saveUserPermList():void { var ht:HTTPService = new HTTPService(); ht.url = Config.getServerURL(); ht.method = URLRequestMethod.POST; //ht.resu...

Get old text from change event?

Can I somehow find out what was the change in the textfield? I would want to compare the old text with the new text ... the problem is, that I have multiple textAreas in a tab-editor, and all the textAreas are watched by one eventListener. I want to get a value calculated by the next formula: globalChangeCount += thisTextArea.currentCh...

Flex - Tab View Multiple DataGrids and same dataProvider

I have a flex application in which I have a TabNavigator with multiple tabs and a datagrid in each of those tabs. I have bound s single array of data to each grid. What I want to do is to bind each grid with a particular set of data in that array i.e. to distribute array contents among grids based on data type. For example items startin...

Actionscript image download open custom viewer

Hi Gurus, i am downloading tiff images from WAMP server using our Flex AIR client. Using the following code for that. public static function requestDownload(id:int, defaultName:String):void { //POST params var urlVars:URLVariables = new URLVariables(); urlVars.action = "download"; urlVars....

Base32 decode in actionscript

Hi! How do I decode a Base32 encoded string in Actionscript? /Martin ...

how to open swf file in stand alone flash player from getURL() action?

Hi, I would like to open a separate swf file from with in flash, but by default, it opens the swf in a browser. I would like this file to open in a stand alone player not in the browser. How can I achive this? Right now I'm using the getURL() action. Is there a separate function for opening a file at a specified filepath? thanks ...

Adding an ActionScript eventListener that takes the whole sprite

Hello, I have a very simple constructor in ActionScript as the following: public function ButtonTest() { this.addEventListener(MouseEvent.CLICK, browseFiles); } My problem is that when I open the SWF file itself, the window is not full size and the whole area responds to the mouse click. If I expand the window to full size, a margin ...

Storing Instances of Classes in Flex Shared Objects

Is it possible to store instances of a class in a cookie or in shared objects. Basically in my application I have an object "Diagram" that the user can create. If they hit save, I want to store the current instance as a cookie and allows them to reload it later. Alternatively, I could see about getting them to store the saved version o...