I have an XML object that I want to send to my player via HTTP POST. This is all good when using XML.sendAndLoad.
The problem is that when the XML object I generate contains CDATA, the CDATA is stripped out before the POST occurs.
so if I have:
var xml:XML = new XML("<root><tag><![CDATA[hello]]></tag></root>")
when I do a sendAndL...
I have the bad luck of having to downport some ActionScript 3 code to ActionScript 2 and I have a problem with detecting when the mouse leaves the stage.
In ActionScript 3 there is an event called Event.MOUSE_LEAVE, which can be used to detect when the mouse leaves the stage, but there is no equivalent in ActionScript 2 as far as I can ...
I'm looking for a way to find out the URL of a SWF using ActionScript 2.
In ActionScript 3 this is done by using root.loaderInfo.loaderURL, but I haven't found any equivalent in ActionScript 2.
Please note that I'm not looking for the URL to the page where the SWF is embedded, but the URL of the actual SWF, and that using ActionScript ...
Hi guys,
I'm writing a very simple flash app (AS 2) to sign users up to an email newsletter; the way it works is that it uses LoadVars to hit a (same-domain) PHP script via POST with the user's email address. The PHP script then passes the info through to another domain (the newsletter mailer URL) via curl to sign up the user.
So far, ...
I need a way to get a (content) MovieClip within a (container) MovieClip to be scrollable using a scrollbar.
Flash AS2 Components
ScrollArea - Can only scroll externally loaded SWFs.
UIScrollBar - Can only scroll TextFields.
How to scroll an internal MovieClip?
...
I heard that AS boxes and un-boxes values every time arguments are passed into/out of functions.
A. Therefore, would this be faster?
var val = doWork(50,"hello", 2048);
function doWork (param1,param2,param3){
t.text = param2;
return param1+param3;
}
B. Or this?
var val:Number = doWork(50,"hello", 2048);
function doWork (para...
I have a small flash file that just loads and shows one image scaled to fit inside the content area. We use these with a javascript gallery so we have several instances on one html page (embedded with swfObject) I've been using MovieClipLoader to load the jpgs but it no longer works.
We updated the server and as far as I know only rele...
I have 8 TextFields placed on the stage. I have a tab order setup and was able to get to the next field by pressing Tab. After adding 2 components (UIScollBar and Button) to the stage, I have somehow lost this ability. How can I get it back?
...
As the title says... I'm trying to interact with my flash movie's actionscript via javascript. Specifically I'm trying to send text to my flash movie. I've come across a couple sites that had some walkthroughs but I for the life of me could not get them to work.
From the adobe site.
http://kb.adobe.com/selfservice/viewContent.do?externa...
I have the following code:
if(pickedUp == true){
trace("released and picked up" + pickedUpNum);
this.storedClick = false;
this.onMouseMove = null;
this.onMouseDown = null;
this.onMouseUp = null;
this.onEnterFrame = this.refresh;
pickedUpNum++;
if( pickedUpNum > 60) pickedUp = false;
}
if(pickedUp == false){
trace("released and...
I am trying to turn the the flash page flip (source: http://76design.com/shiftcontrol/index.php/2005/07/03/dynamic-page-flip/) into a single page that can be lifted up, dragged around, and set back down. All looking very realistic.
Does anyone think they can accomplish this? Or have you seen this modification anywhere?
Thanks
...
Hi guys,
I'm doing some work in Actionscript 2.0 for the first time in a while (really simple stuff, just pulling content from a text file), and I can not fathom for the life of me why I'm getting such unpredictable output here.
Sometimes when I test build a simple script like this, variables are listed as undefined, and sometimes the...
Is it better to Unload a MovieClip before Removing it off the Stage, in order for its contents to get cleared from RAM and therefore free up RAM better?
Adobe Flash AS2 Documentation:
removeMovieClip() - Removes a movie clip instance.
unloadMovie() - Removes the contents of a movie clip instance.
...
Is it possible to use the "_" underscore prefix for your own MovieClip names? (AS2)
i.e. Can you name a created/attached MovieClip "_feature" or "_bug" ?
Typically this is reserved for internal properties like _x or _visible.
...
I've got an AS3 SWF that I'm going to be loading other SWFs into. These child SWFs all take a single parameter on the URL. I can't seem to get it working when loading an AS2 child, and it needs to be able to handle both.
so I have
var request:URLRequest = new URLRequest();
var loader:URLLoader = new URLLoader();
request.url = "http:...
Is there a performance hit when iterating over object attributes vs. iterating an array?
Example, using objects:
var x:Object = {one: 1, two: 2, three: 3};
for (var s:String in x) {
trace(x[s]);
}
Vs using an array
var a:Array = [1, 2, 3];
var len:Number = a.length;
for (var i:Number = 0; i < len; ++i) {
trace(a[i]);
}
So - whic...
I have a Director project with 3 scripts (2 behaviors and 1 movie script). I have the following code in my movie script:
on startRecording ()
--do stuff
_movie.script["script2"].passGrade(75, 3, 4)
end
and in one of my behavior scripts, I have the following:
on passGrade (acc, dur, tim)
member("Assessment", "Assessment").displa...
A have a flash widget (a music player) and there are about 10 instances of it on one page. I need to communicate between the flash and the javascript of the page it's embedded in. I haven't done much with actionscript for a long time, but some googling led me here, and to ExternalInterface. It seemed perfect, however there is one problem...
Any replacement for the AS3 ByteArray where you can read raw binary data via any medium?
Maybe load a TXT file and access the characters byte-by-byte? Any ideas?
...
I need a solution to read raw binary from any filetype stored on a server.
I heard of AMFPHP but initially got put off since I believed it required admin-access to install the service on the server.
Can I use it to read binary files? Any solution to this would be greatly accepted.
(No, I tried binary in XML CDATA sections but there ar...