actionscript

Simple flat shading using Stage3D/AGAL

我只是一个虾纸丫 提交于 2019-12-23 01:38:29
问题 I'm relatively new to 3D development and am currently using Actionscript, Stage3D and AGAL to learn. I'm trying to create a scene with a simple procedural mesh that is flat shaded. However, I'm stuck on exactly how I should be passing surface normals to the shader for the lighting. I would really like to just use a single surface normal for each triangle and do flat, even shading for each. I know it's easy to achieve better looking lighting with normals for each vertex, but this is the look I

When using swfobject, swf file ignores z-index

左心房为你撑大大i 提交于 2019-12-22 23:17:37
问题 I have this issue where if I append a swf file using SWFObject, it ignores my css rules for z-index. I have tried to set the parent container, the swf file, and everything around it; nothing seems to work for me. Has anyone ran into this issue and could give me some helpful advice? Thanks, Kyle 回答1: Make sure your using "transparent" wmode. var params = {}; params.wmode = "transparent"; swfobject.embedSWF("file.swf", "id_name", "100", "100", "10.0.0",false,false,params); 回答2: Z-index is

When using swfobject, swf file ignores z-index

会有一股神秘感。 提交于 2019-12-22 23:17:35
问题 I have this issue where if I append a swf file using SWFObject, it ignores my css rules for z-index. I have tried to set the parent container, the swf file, and everything around it; nothing seems to work for me. Has anyone ran into this issue and could give me some helpful advice? Thanks, Kyle 回答1: Make sure your using "transparent" wmode. var params = {}; params.wmode = "transparent"; swfobject.embedSWF("file.swf", "id_name", "100", "100", "10.0.0",false,false,params); 回答2: Z-index is

Save encoded .mp3 to applicationStorageDirectory Adobe Air iOS

本小妞迷上赌 提交于 2019-12-22 21:43:14
问题 I'm developing an iOS iPad app w/ Flash CS5.5 AIR v.3.1 I'm using ShineMp3Encoder to encode a Wav to a Mp3 from: https://github.com/kikko/Shine-MP3-Encoder-on-AS3-Alchemy Basically it converts a byteArray (wav) to a byteArray (mp3) or "mp3encoder.mp3Data" in the code. I have no trouble saving this using a (new FileReference()).save(mp3Data, filename); but because this is being used in a iOS AIR app I wanted to switch to using the File.applicationStorageDirectory so that I could put the saved

Is there a way to read local files in ActionScript 3 “silently”'?

ぃ、小莉子 提交于 2019-12-22 12:41:47
问题 I'm developing an application and because of certain design restrictions I have to do it in Flash. This application communicates with another one done in c++, but just because I need a couple strings, so I thought it would be easy to write them to a .txt file and parse it. But the only way I've found so far is adding a browse event handler and select the file manually. That's no good for me, I need the file to be read automatically given a path, something like: var data:ByteArray = fileRef['C

Is it possible to send an ICMP echo request from a swf?

你离开我真会死。 提交于 2019-12-22 12:40:01
问题 ActionScript 3 can send UDP packets via flash.net.DatagramSocket. Is their any way to send an ICMP packet? I'd also like to set the TTL flag so I can implement traceroute in an SWF. 回答1: UDP is not available on Flash Player, only on Adobe AIR runtime. So if you are not targeting a browser, you can use it. I don't know if you can send an ICMP packet with DatagramSocket - but you could try to set the TTL like this example: http://blog.debit.nl/2010/06/mdns-daap-announce-air-2-0/ And you might

Send keyboard and mouse events to Flash Movie

℡╲_俬逩灬. 提交于 2019-12-22 10:36:25
问题 I'm looking for a way to "inject" some events into a flash movie running on a browser. I know about ActionScript's ExternalInterface.addCallback function, however I'm trying to achieve this with any "random" flash from the web. Eg. send a "SPACE" keyboard event to a youtube video. 回答1: You can't do this to any random swf on any website because of security limitations. You need to have access to the DOM, which can only be done by Javascript Injections, unless you are the one with the swf

How to access AS3 URLLoader return data on IOErrorEvent

我的未来我决定 提交于 2019-12-22 09:30:07
问题 I'm writing an actionscript library for an api. I use a URLLoader object to load data from the api. The problem I'm having is that whenever the api returns an http status in the 400s, actionscript treats this as an io error. This is all find and good, however, it seems like there is no way to access any data that was returned if this is the case. Consequently, any helpful xml about the cause of the error that gets returned is lost. Is there any way around this? It makes the library kind of a

Extracting Actionscript from .fla file, without Adobe Flash

北战南征 提交于 2019-12-22 08:49:29
问题 Unlike this guy, I'm using MTASC's Haxe to compile SWF from AS. Considering I don't have Adobe CS, what are our options to extract the action scripts from any FLA file? I mean different versions, like CS4, CS5, etc. Converting older versions to CS5 would also help. 回答1: CS4 FLA container is Microsoft Structured Storage (like MS Word documents). You can open it with for example FAR Manager or OpenMCDF. Embedded AS3 code can be seen inside the objects in Unicode plaintext. You can open it with

Get IP address using Action Script?

淺唱寂寞╮ 提交于 2019-12-22 06:31:45
问题 Is it possible to get client IP address through Flash (swf) Action Script 3 and then pass it to php file to store it in database? 回答1: No need to do it in flash, just do it on your server in php "$ip=@$REMOTE_ADDR;" 回答2: No, the client IP address is not available in ActionScript 3. The recommended approach is to have it reflected by server-side code. See http://www.actionscript.org/forums/showthread.php3?s=&threadid=20123 回答3: function GetUserIP() { var js="function get_userIP(){return java