actionscript

url functions in as2

This is from ActionScript 2.0 not a big one, but enough to keep me wondering what is wrong. This code works perfectly when I hit button in original swf file but when I publish it as html or embed it in html document there is no response. What to do? on (release) { URL("aboutus.html"); } ...

How to split packets in flash, XMLSocket

Hello I believe my flash client is losing some packets the server sends, because some packets get joined together hence I believe it drops them. Here is my packetHandler in flash private var xmlsock:XMLSocket; this.xmlsock = new XMLSocket(); xmlsock.connect("127.0.0.1", 1234); this.xmlsock.addEventListener(DataEvent.DATA, this....

How to split a string by char 0 / byte 0 / 0x00 / \u0000 in flash

How do I split a string by char 0 / byte 0 / 0x00 / \u0000 in flash actionscript 3 ...

flash/actionscript to display an image for x seconds

Is there any opensource flash/actionscript code to display an image for x number of seconds. ...

Is there an event in Flex that shoots out when all the operations in a mx:state tag are done?

Let's take the next example: <mx:State name="sayHello"> <mx:SetProperty name="preText" target="{this}" value="Hello"><mx:SetProperty> </mx:State> Can I somehow know when preText property has been set to hello? Already tried with: state->activate state->enterState state->exitState and UIComponent->currentStateChange In ...

Flex Date and Time Stock Chart (HOLC) - Need Help

I am trying to show BOTH the date and the time in Flex 3.5 Stock HOLC (high, open, low, close) Chart. This data shows up but not in the correct format... Problems: 1. The time are out of whack.. they do not line up with proper time.. (is it because they are not military time)? 2. The dates (days) do not show up on the bottom labels ...

Wait for class method to complete in ActionScript 3.

Hi, I'm currently creating a website with AS3 in FlashDevelop, so it's code only — no timeline stuff. I have a class that loads images with a method that I call from my main source. I was wondering how I go about making sure that the images are loaded before executing more code outside of the class. I know how to do it using Event.COMP...

How do I access the root element of an MXML document if I can't set an id?

If I wanted to do something like this: <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" horizontalScrollPolicy="off" verticalScrollPolicy="off" xmlns:view="com.foo.bar.view.*" > <mx:Script> <![CDATA[ myWidth = 100; myHeight = 200; myCanvas.width = myWidth; ...

Making a Flex chart with an interactive legend

Hello, I currently need help with making a chart in Flex with multiple series and a chart legend which is an interactive legend where upon selecting an item in the legend (which corresponds with a series in the chart) that specific series in the chart will slideDown or Up depending on whether it was just de-selected from the legend or ...

In Actionscript, how to match / in infinitive structures like to cross out/off?

Hi, I'm using the following regular expression to find the exact occurrences in infinitives. Flag is global. (?!to )(?<!\w) (' + word_to_search + ') (?!\w) To give example of what I'm trying to achieve looking for out should not bring : to outlaw looking for out could bring : to be out of line looking for to should not bring : to e...

packages cannot be nested

its giving error on importing mx.resource.resourcebundle that packages cannot be nested package common { import common.clsGlobals; import flash.desktop.NativeProcess; import flash.desktop.NativeProcessStartupInfo; import flash.events.IOErrorEvent; import flash.events.NativeProcessExitEvent; import flash.events.P...

Flex transparency problem

In development of Flash/Flex application I've came across weird thing: button placed over transparent panel button remains transparent even with alpha="1". <mx:HBox backgroundColor="#444444" alpha="0.8"> <mx:Button width="34" height="34" toolTip="Home" icon="{homeIcon}" alpha="1" /> </mx:HBox> Is there any way to make button not t...

How to call stage objects from a non document class?

Hi, The problem I'm facing is that I'm trying to manipulate (in this particular case add eventListeners) objects (in this case some MovieClips) on the stage from a class that isn't the document class. 1120: Access of undefined property trans. Now I know that it's probably a scope thing and I probably can't access stage objects direct...

Timed Based Events for Website

I was wondering if it was possible to make a small script in Jquery that would change an image at a certain time. For my site, I want the image for the opening and closing of a facility to change when it opens and closes. Is this possible with Jquery or should I go with something else? Actionscript/Flash? I can't use PHP on the site......

Actionscript3 SSL sockets

Hey, In the application we are working on we have to send secured messages from a flash movie running in the browser to an app engine application. One good candidate would be SSL which app engine seems to somewhat support (not exactly sure). But is there any implementation for SSL sockets for actionscript 3 (since afaik as3 doesn't have...

HHTTPService Error

I'm trying to debug an issue by going to the most basic of tasks. I have an app written in adobe flex (action script 3) that I want to have interact with a web service. Because it appears I can't access the server, I've created a simple app. Source code for the ActionScript <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns...

How to get transformations from transformation matrix in Flash?

I have transformation matrix properties (a,b,c,d). How to calculate scaleX, scaleY, scewX, scewY and rotation angle from those values? When only one type of transformation is applied, I can figure out that: scaleX = a scaleY = d scewX = c scewY = b rotation = arccos(a) or -arcsin(c) But when multiple transformations are applied at on...

Post from Flash to PHP in Facebook app

Hi, I published 2 days ago a Facebook app, it's a flash game, after the game over, the flash file POST score to my php file, Publish your score to wall if you beat your highscore, Facebook disabled the application because bad reviews from users. How to POST from Falsh to PHP without redirecting the user, i want after the game over POST...

Flex: Setting a style that is not suported by a component

Dear Friends, I am not very good in 'style' in flex. I am wondering if flex enforce style settings and throws compilation errors if a style that is applid to a component that is not supported by it. Has any one tried it before ? Please help me if you have any idea in this regard. Thanks in advance. ...

flashvars help, dymanically load an XML file

Hay, i have a flash movie which loads a static XML file, the script for this looks like list = "list.xml"; var listXml:XML = new XML(); listXml.ignoreWhite = true; listXml.load(list); I want to be able to change this 'list' variable dynamically, perhaps using flashVars. like this var flashvars = { xmlpath: "list.xml" }; Any i...