Ok, so it is possible to pass a function to another function.
http://stackoverflow.com/questions/148982/passing-a-function-to-another-function-in-actionscript-3
This is obviously very powerful, but a more important question is, when would it make sense to do so, as there are performance overheads whenever you call another function?
...
I'm looking for an AS3 function to get the filesize of a file that is being hosted on a remote webserver. Tried to find some functions but didn't succeed. Maybe somone can help me ?
...
Hi all i want to know what is dispatchEvent in AS3.
I didn't get any idea while Googling it. :(
So please help me
Edit 1:
public static const SET_VOLUME:String = "setVolume";
private function onclick(evt:MouseEvent):void {
soundClip.scaleX = 0;
dispatchEvent(new Event(SET_VOLUME));
}
what does this means?? (
...
http://www2.asis.co.th/megadig/SimpleHttpPost.swf
and
http://www.shinedraw.com/data-handling/flash-vs-silverlight-simple-http-post-request/
same swf
but i download from http://www.shinedraw.com/data-handling/flash-vs-silverlight-simple-http-post-request/
and save to my computer and upload to my host but not working in h...
I'm capturing data from the user and writing it to an xml string like so:
var myXml:XML =
{userEnteredText}
This is fine and dandy until the user gets cute with special characters like "& < >" etc. Illegal characters are also a problem like 0x19.
Is there are method that will sanatize my xml and encode special characte...
I am looking for an online photo editor like http://services.snipshot.com (Javascript) or picnik.com/info/api (Flash) but I need one that I can host on my own server.. been searching for a while but no results.. any ideas?
I also love the idea behind pixenate.com/productinfo/Overview.html but its so expensive.
...
I'm trying to do a mask on a circle shape in ActionScript 3 (I'm using the Flex AIR framework). It has to do with the ecological footprint, each circle representing one earth.
This ecological footprint picture is inside a container. The problem is that the mask seems to be fixed, though the picture floats. When I scroll the container dow...
URLRequest not working in Cross domain in As3?
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" applicationComplete="init()">
<mx:Button x="35" y="22" label="Button" click="test()"/>
<mx:TextArea x="35" y="65" width="365" height="254" id="aaa"/>
<mx:Script>
...
I am trying to set the background color of a Flex actionscript 3 project.
I have tried all sorts of things, including
this:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundColor="#FF0000">
</mx:Application>
this:
SWF(backgroundColor='0x000000', frameRate=...
We currently have a director apps (.dcr not .swf) that we want to integrate with the facebook api.
(to connect via facebook, to challenge facebook friend from within the game)
Can I embedded a flash in the director apps that take care of connecting to Facebook ?
From what I saw from my search it seem that most of the tutorial or answ...
can u passing domain crossing in action script urlrequest?
i would like to some flex to used http post to post some script to form in website in ac3
but not working i find crossing in Google that must cross domain in web to use urlrequest
anyone can help me by passing this can i do its?
...
I am having a tree which has some root nodes and internally some child nodes. We can drag and drop between these nodes by enabling inbuilt properties like dragEnabled="true" dropEnabled="true" dragMoveEnabled="true".
However, My requirement is that, while i drag and move a child node to upper side, It should not be dropped above the Root...
I'm trying to sync animation to music at a specific BPM. I've tried using the Timer but it isn't accurate when dealing with small intervals in milliseconds. I did some reading and found an alternate method that uses a small silent audio file and the SOUND_COMPLETE event as a Timer.
I used 167ms long sound file with this code.
package
...
Hi, how can i transform rectangle into trapezoid with ActionScript3
my trapezoid is a floor of 3D room, and i want to texturize it (bitmap tile).
_____________
| | | |
| |_____| |
| / \ |
| / trapez.\ |
|/__________\|
...
Hello, I'm trying to load a YouTube video on a flash MovieClip using url
http://www.youtube.com/v/4nRNoXT%5FgUc that returns the video with player directly.
the video is loaded and i can manage it with his player, the problem is when i try to position it no the stage, because I don't know his width until it starts.
I've tested it with ...
I want to create a HBox component name for example HLBox that behaves exactly like an HBox but ha s as default width and height 100%.
How can I do that?
...
HI all, i have a class file named Main.as and
another class calledr icon.as
package {
import icon;
public class main {
public var _time:String;
function main() {
_time="01:10";
iconObj=new icon(this);
}
function timerFunction() {
_time=newTime;
}
}
}
package {
public class...
I'm calling into a flash app embedded in a html page using the ExternalInterface.
The following code works fine (I'm using a button to test):
$(document).ready(function(){
$("#button").click(function(){
var app = document.getElementById('ApplicationID')
console.debug(app)
app.pageUnloading()
})
})
So th...
Is there any way in ActionScript3 to get enum from string value?
e.g. I have enum
public final class Day
{
public static const MONDAY:Day = new Day();
public static const TUESDAY:Day = new Day();
public static const WEDNESDAY:Day = new Day();
public static const THURSDAY:Day = new Day();
public static const FRIDAY:D...
Hi,
I want to create a button which resize dynamically with content. to achieve this, I created a MovieClip in library and added four layers into it namely - text, bg, shadow and border.
Problem I'm having is, if I make textfield autosize, only textfield resizes and others stuff remain as it is. if I calculate width required using xxxL...