actionscript

Safari WIndows and Transparent Flash

浪尽此生 提交于 2019-12-01 18:23:46
// Edit: The issue now appears to be confined to Safari for Windows. Around the time Safari for Windows 4 came out I started hearing from users that wmode=transparent was no longer working in Safari. I have googled this many times but have not come up with any answers. I have tried reducing interference by using tags as opposed to scripts to embed the Flash but with no success. An example is here: http://hiv411.org/safari.php alternately embedded with script at http://hiv411.org/ All videos use wmode=transparent and are embedded via tags. All work fine in every browser I have except Safari.

Using . or [ ] to access Object properties - what's the difference?

烈酒焚心 提交于 2019-12-01 17:34:59
What is the difference between the code (i) and (ii) written below ? (i) var obj:Object = new Object(); obj.attribute = value ; (ii) var obj:Object = new Object(); obj["key"] = value; Are there any run-time implications if I write this : var obj:Object = new Object(); obj.somekey = value1 ; obj["someKey"] = value2 ; Please explain. The difference is in the lookup mechanism: If you use the dot syntax, the compiler will know at compile time that you are accessing a property of that object. If you use the bracket syntax, the actual lookup of the property is done at runtime, and there will have to

Custom metadata in AS3/Flex?

独自空忆成欢 提交于 2019-12-01 16:28:05
How to create and to work with custom metadata in ActionScript3/Flex? There is two general directions to deal with metadata in ActionScript in Flex: Dealing in runtime using reflection (or introspection in terms of Adobe). You can find documentation here . There are several third-party libraries which provides more convenient reflection API such as as3-commons-reflect or reflection API in Parsley . Using Flex Compiler Extensions which was introduced since Flex 4 SDK revision 8165 (see details ). See also the corresponding discussion and official documentation . To create metadata, just use

AS3 to Generate Dynamic SWF?

一世执手 提交于 2019-12-01 14:47:47
Is it possible, using AS3, to programmatically generate a .swf file? What my little app does is load a bunch of images, using FileReference, now I want to compile them into a stand-alone swf that the user can download (the swf will be a slideshow). [edit] There seems to be some mis-understanding of what I am asking. I want to have one compiled swf from which the user may select some images and press a button whereby the swf will create and compile a second swf containing said images. As this is a stand-alone app, there will be no server-side interaction. What I am thinking is that there will

Dynamic Object Initiation As3

﹥>﹥吖頭↗ 提交于 2019-12-01 14:39:45
I notice in older version of flash you can create an instance of a dynamic class. I am creating a game that will have many different classes that can be displayed on the stage but can very from time to time. How would I go about calling them dynamically. for example var newObject = new ["DynamicObject"](); ?? Is this possible in As3 ?? I think there are 2 ways you can do that: 1.Using ApplicationDomain.getDefinition('DynamicTemplate') something like: var DynamicClass:Class = this.loaderInfo.applicationDomain.getDefinition('DynamicTemplate') as Class; addChild(new DynamicClass); You would need

AS3 Help For Commas

偶尔善良 提交于 2019-12-01 13:52:23
问题 I have this code and I want commas in my numbers. The jackpot is €169.85 but it is displayed as 16985 00 in the game. How to fix that? public function jackpotstring():String { var myPattern:RegExp = /./; var jp:Number = jackpot * denom; var s:String = jp.toFixed(2)+""; return s.replace(/[^A-Za-z0-9 \-_:]+/g, ' '); } 回答1: ou could try something like; var jp:Number = jackpot * denom; jp = Math.round(jp * 100)/100; // value should be something like 1698500 jp = jp / 10000; // value should be

Flex : Is it possible to stop a remote call?

人走茶凉 提交于 2019-12-01 12:32:39
问题 I search for a long time, but I still not found the answer. In common case, we keep the token of a remote method call, Flex -> Java for example. But, if the client know that the current call is not needed anymore, how stopping the server processing ? With an asyncToken, is it possible to stop a remote call ? Thanks for your answer. 回答1: As I understood it, an AsyncToken just provides extra data for some operation. You'll need to access that operation to cancel. IF you're calling an

Actionscript memory management, garbage collection

眉间皱痕 提交于 2019-12-01 12:03:33
This blog (and others) state that you should set object references to null inside your dispose() methods when cleaning up objects. However, Actionscript 3 (with Flash Player 9) uses mark and sweep to clear out circular references for you. So I am wondering: is there really any reason to null out your object references? I never do - as long as you do the obvious: Break all reference to the object (remove from arrays, set variables storing the object to null, remove from display list) Remove all event listeners and so on Then the memory that was used by the object is available for overwriting at

actionscript + javascript

ⅰ亾dé卋堺 提交于 2019-12-01 11:54:45
I'd like to call a javascript function from an embedded .swf file. Specifically, I'd like to call a function in one of my externally linked javascript files from within: function loadTrack(){ //Radio Mode feature by nosferathoo, more info in: https://sourceforge.net/tracker/index.php?func=detail&aid=1341940&group_id=128363&atid=711474 if (radio_mode && track_index==playlist_size-1) { playlist_url=playlist_array[track_index].location; for (i=0;i<playlist_mc.track_count;++i) { removeMovieClip(playlist_mc.tracks_mc["track_"+i+"_mc"]); } playlist_mc.track_count=0; playlist_size=0; track_index=0;

Porting SHA512 Javascript implemention to Actionscript

巧了我就是萌 提交于 2019-12-01 11:49:46
I am wondering if anyone can help me in porting a SHA-512 implemention in Javascript to Actionscript. Since both Javascript and Actionscript share the same origin, I think porting it will be easy for people who are used to Actionscript. The code for sha512 in javascript can be found here: http://pajhome.org.uk/crypt/md5/sha512.html Thank you. Here is the code ported by me. The code is separated between two files Int64.as and Sha512.as, both of them belong to the com.crypto package. com/crypto/Int64.as /* * Int64 for ActionScript * Ported by: AAA * Ported from: See below */ /* * A JavaScript