actionscript

Nested ULs wrapping

Hey all! I got an HTML string that I need to parse (to be used in Flash), by wrapping nested UL tags by a span with incremented left-margin value based on nesting level. Before: <ul> <li>Item one</li> <li>Item two: <ul> <li>One</li> <li>Two <ul> <li>One</li> ...

Problem with Flash and JavaScript Communication

I have an AS2 Flash SWF that is calling another AS2 Flash File using loadMovieNum("flash.swf",2) and a JavaScript file that calls a function on page using a timer. This is what I get in Firefox with Flash 10 (IE8 gives no error message): uncaught exception: Error calling method on NPObject! [plugin exception: Error in Actionscrip...

How to detect unplayable video channel?

I'm using NetConnection, NetStream and a flash.media.Video control to play back video files stored on the local machine. Works great for FLVs, and for H.264-encoded MP4s, but for non-H.264 MP4s, I often get audio, but no video. I realize this is to be expected. What I'm wondering is whether there's a way to reliably detect that the vi...

loadMovie issue actionscript 2

Hi guys, Has anybody ever had any issues with loadMovie in as2? I have inherited some horrific code and need to solve an issue, if you imagine a gallery and clicking back and forward would call loadMovie and get the URL address from an array, each time the back and forward buttons are pressed the number is increased and references to a ...

Actionscript one way encryption

Hi all. Is there a built in method in Actionscript 3 that allows you to create a hash of a string. Like MD5 and SHA1. Thanks. ...

What are $cinit and $init in AVM2?

Got pulled into a long thread of link-hopping and googling about this today, but still don't have much of a grasp on what $cinit and $init are. I care because I learned today that $cinit and $init are interpreted (by the FP, if I understand correctly), while everything else is compiled. I think that $init refers to the given class's co...

Actionscript Build Hex String

Hi all, basically i want to build a colour hex value using 3 decimal values. for clarities sake, the 3 decimals i have are 255 254 253 and i want to generate the hex string: 0xFFFEFD how would i do that? ...

AS3: How do I check and reset variable on the main timeline from inside a movieclip

I'm converting an old AS2 file into AS3 (and trying to learn AS3 at the same time). A movie clip contains a number of different animated sequences and buttons within the application trigger these different sequences. The buttons are functional only when an animation has completed playing. In AS2, I achieved this with a var called _root....

actionscript events - is the event buffered and ordered?

I found an interesting questions regarding the events in action script: is the event buffered and ordered? Ie) In a swfloader example, I setup a timer(1 sec) to run a function, in the function I setup a listener to event INIT of the loaded swf. It depends on the network condition that whether the timer handler or the INIT event will be ...

Flex: Different width for different tabs in tab navigator

Hi friends, Is there some way to have a tab navigator in flex where each tab width can be controlled explicitly ? Thanks in advance. ...

Flex ExternalInterface : possible for ActionScript to interrogate the HTML document?

Is there a way for the Flex app to get any information about the HTML document via the ExternalInterface? Can Flex find out if a particular DIV exists, for example? ...

Flex, <mx:Combobox> & XML: get xml node to specify's dataprovider

Hi! I'm trying to set a combobox's dataprovider. I have 2 comboboxes: cb_div and cb_stores. For cb_div, I get to set the data provider correctly with an XML file. Cb_stores' dataprovider is to be set depending on the selected item of cb_div. First, here are my XML files. Data provider for cb_div: <?xml version="1.0" encoding="UTF-8"?>...

How to make a small flash swf with ComboBox in Actionscript 3?

I have a pure Actionscript 3 project, using flash.* libraries, compiles down to about 6k (using mxmlc). Program handles about 1k shapes, a few sprites, a sockets connection, works great (tastes less filling). Now, how would I add a ComboBox control without incurring excessive bloat? More specificially, I would like to keep the size und...

Converting simple AS2 into AS3

Hello. I wanted help on a simple issue -- converting some ActionScript 2 into AS3. The script is for a sliding panel. I think I need to add my Event Listeners, but I'm not sure how to do it. On the stage there are three buttons: b1, b2 and closeb. The panel that slides is called bigSlide, and inside it contains separate parts called sli...

How to detect memory leaks in Flash?

How do you know if your compiled SWF file has a memory leak? Are there tools, a firebug setting, etc... to see if there is a problem? I cannot find much in the debug Flash player besides file size and loading time. I have a large Flash application that I maintain and suspect that is using way too much memory so I wanted to measure the ...

Collision detection in a tile based enviroment.

I am having problems with my collision detection. basically when I hit a solid tile my character's body is half way in the tile already. here is my code. The properties wY and wX are my game world positioning. Not the stage positioning. dx and dy is the velocity the character is traveling. This first snippet of code is within a game loo...

Turn Based Strategy Game techniques

I want to make a turn base strategy game. I was just curious if anyone had any sources or books that explains the concept and architect of designing a turn based strategy game or any turn based game. thanks! ...

Are there any libraries that bring CS4 Actionscript to Flash CS3?

Are there any custom libraries available that allow me to code/publish in CS3 using some of the features of CS4? EDIT: I say "some", because I understand that it is obviously nearly impossible to reimplememnt CS4 in CS3. ...

How to protect swf file from being decompiled?

I'm working on important project using Flex framework and i want to keep my algorithms and code secret. Is it possible to somehow protect swf file from being decompiled? I don't want someone extract my code using flash decompilers. Thanks. ...

Flash communication options for 2-player-games

I am currently working on a project that embeds a flash game, that uses Smartfoxserver for the flash communication. That communication is mostly just synchronizing the cursor and object movements between the two players. Since I am not a flash guy, but a ruby programmer, I got curious: What kind of communication options does flash offer...