actionscript-3

Flash AS3 Getting Security sandbox violation when trying fetch an external swf

偶尔善良 提交于 2019-12-19 19:44:51
问题 Hii, I'm tring to load swf file to my flash application from a different server. When i try to load it on flash IDE (crl+enter) everything is working fine, but when i run the swf as an independent swf file or by debugging it, i'm getting this error: SecurityError: Error #2121: Security sandbox violation: LoaderInfo.content: file:///C|/Users/something/Desktop/blablabla/myplayer.swf cannot access http://www.somedomain.com/blablabla/lalalala/abc.swf. This may be worked around by calling Security

Actionscript 3.0: Scope

北慕城南 提交于 2019-12-19 17:44:57
问题 Tutorials usually don't deal with scope in Actionscript. Can you point me to some documentation and/or explain what should I know about it. I want to avoid problems arising from certain classes are not visible at certain places. 回答1: These should help. Function scope: http://livedocs.adobe.com/flex/3/html/help.html?content=03_Language_and_Syntax_21.html Packaging and namespace: http://livedocs.adobe.com/flex/3/html/03_Language_and_Syntax_04.html#119303 回答2: You're a bit vague, but hopefully I

Embed mp3 in actionscript 3 doesn't work

这一生的挚爱 提交于 2019-12-19 17:39:31
问题 I have a problem with actionscript 3, especially when using the embed tag. I have this code: [Embed(source = "sound.mp3")] private static var soundClip:Class; ... var sound:Sound = (new soundClip()) as Sound; trace(sound.length); When I test the movie, I get the following output : 4501,923 Which is the sound.mp3 length in milliseconds. However, the original sound is 13.000 milliseconds. How can that be possible, can anyone help me please? Thank you. 回答1: The Embed process implies a

Custom metadata in AS3/Flex?

旧时模样 提交于 2019-12-19 13:47:22
问题 How to create and to work with custom metadata in ActionScript3/Flex? 回答1: 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

How to get control on security privacy pop up in flash

拥有回忆 提交于 2019-12-19 11:59:07
问题 We are working on flash camera project. We want to ask user to allow or deny camera access first on page load. then after few seconds we want to start camera and take photo. If User deny camera (or flash) access, we do not want to start camera. and If user allows permission for camera (or flash) access, we want to start camera and take photo. For this, We are using "Security.showSettings(SecurityPanel.PRIVACY);". This code is user for ask permission to user about their camera access. So, it

as3 Air browse for file on sd card?

为君一笑 提交于 2019-12-19 11:58:35
问题 Looking to be able to have access to browse and select a file from the users phone using as3 air. This code only pops up an upload box and says "No Files were found". But I know I have a zip on my phone so it must not be choosing the right folder path. How can I change that to make it access the entire phone? function unzip_init():void{ fileFilter = new FileFilter("selected your zip file.", "*.zip; *.gz2; *.bz2;"); file = new File(); //file.browseForDirectory("Choose a directory"); // Only

Encrypt in ActionScript3 and Decrypt in asp.net c#

梦想的初衷 提交于 2019-12-19 11:58:25
问题 I need to send data from flash to the server, so I'm looking for a flash ActionScript 3.0 script that will encrypt a text and a C# .net script that decrypt the text. Can anyone help me here ? 回答1: Check out the as3corelib crypto package: http://code.google.com/p/as3corelib/source/browse/trunk/src/com/adobe/crypto/?r=49 And .NET has it's own cryptography namespace too: http://msdn.microsoft.com/en-us/library/system.security.cryptography.aspx 来源: https://stackoverflow.com/questions/3308781

How to stop all child movieclips inside a movieclip in AS3?

廉价感情. 提交于 2019-12-19 11:46:11
问题 I have a movieclip which is a character in a game. Inside this movieclips there are several movieclips containing limbs that has an animation. So do anyone have a suggestion on how to gotoAndStop(1); on all the movieclips that are inside the character without having to call on every limb object manually? The character movieclip contains a total of 20 movieclips on 4 frames, so I just want to stop all of the movieclips inside the character. 回答1: If i understand you correctly (ie: stop all

Add movieclips (and controlling them) in a datagrid in AS3

淺唱寂寞╮ 提交于 2019-12-19 11:44:14
问题 I created a column in a datagrid which displays a movieclip (every row the same movieclip appears. How can I control which frame is displayed in each row? using this.parent from inside the movieclip doesn't work. What's the path to the specific row in which a movieclip resides? Thanks 回答1: I've done a test using this devnet article: Notice that in data I pass another object that has source , refence used to display a clip and frame, used to control the frame of the clip. //imports import fl

What code would I use to get the hex value of a color when an alpha at about half transparency is applied?

一个人想着一个人 提交于 2019-12-19 11:43:14
问题 If I have a visual element (could be text or div with color fill, doesn't matter) and the color is set to black, 0x000000 , and it's alpha is set to .4 or .5 and the background is solid white , 0xFFFFFF , the result would be a gray color. We can test this in Photoshop. What I would like to know is what code would I use to get to that result? I'm looking for something such as an equation: newColor = foregroundColor * alpha * backgroundColor Or something like in JavaScript, ActionScript or