flash

How to change the volume of a Sound using keyboard input?

﹥>﹥吖頭↗ 提交于 2019-12-25 04:55:29
问题 How can I increase/decrease the volume of a Sound on key-press in ActionScript 3.0 回答1: private var sound:Sound; private var channel:SoundChannel; private const INCREMENT:Number = 0.2;//change it as you like sound = new Sound(); sound.addEventListener(Event.COMPLETE, onLoad); sound.load(new URLRequest("song.mp3")); function onLoad(e:Event):void { channel = sound.play(); if(stage) { stage.addEventListener(KeyboardEvent.KEY_UP, onKey); } else trace("call this from a display object on stage"); }

Fusion Charts show no flash player warning message

╄→гoц情女王★ 提交于 2019-12-25 04:55:15
问题 I'm using Fusion Charts 3.2.1. I want to show a warning message when my flash player isn't enabled in browser or installed. How do I do that? Is strange that even on the official site the chart panel is completely blank when flash is disabled. 回答1: If you are using JavaScript code to render the chart, you can use detectFlashVersion and autoInstallRedirect constructor parameters (set them to 1) to show an alert message and a redirection to flash player download page. example: var myChart = new

ItemRenderer contentBackgroundColor

旧城冷巷雨未停 提交于 2019-12-25 04:54:30
问题 i need urget help with some code. I use flex builder 3 and i need to do highlight of content which have a symbols "A,B,C,D,E,F,G,H,I,G,K,L" and i need to make them highlighted with some color in my list. And i don t know how to do this, some people say that i need to use itemRender, but i don t know how to do this in my case. Here is the code: <mx:Script> <![CDATA[ import mx.collections.ArrayCollection; [Bindable] private var myDP:ArrayCollection = new ArrayCollection([ {label1:"Alexey",

How to play music tracks in AS3?

故事扮演 提交于 2019-12-25 04:47:05
问题 I need to play three musical tracks one after the other in a circle. It is necessary that its are not loaded again and were in the cache. I use this code. Everything works fine on localhost, but only works after restart the app on the server. And wrong to re-download tracks every time. public function musicOn():void{ if (sndStart == 'true'){ req = new URLRequest("media/" + track + ".mp3"); snd.load(req); channel = snd.play(); channel.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete);

Restrict MouseEvents to Mask in Flex Skin?

偶尔善良 提交于 2019-12-25 04:37:15
问题 I have a ButtonSkin (Flex 4 Skin) with a Rect, a Label, and a Group, the Group masking the Rect. On rollOver, I animate the Label's x to this.width , and on rollOut, back to the original position. The problem is, when I rollOut, if I roll to the right (where the label is hiding behind the mask), it doesn't register rollOut, until I go past the label (this.width * 2). How do I prevent that, so when I rollOut of the visible area, even though I'm still over the label behind the mask, I get a

Flash Player trust file not working with Embedded browser on linux

喜你入骨 提交于 2019-12-25 04:33:58
问题 I have an application which embeds a xulrunner based browser. I have to load some flash content in this browser. At certain points of time the flash changes my URL and Page Title to reflect the location in the flash file where I am at. This works fine in a firefox browser when I place my trust file at /etc/FlashPlayerTrust folder with entries for the directory and the swf file I want to trust.( according to the Flash security guide http://www.adobe.com/devnet/flashplayer/articles/flash_player

Pass a callback in ExternalInterface

為{幸葍}努か 提交于 2019-12-25 04:24:07
问题 I want to call a Javascript function from Flash, which I can do with ExternalInterface , but the Javascript function takes a callback. Is there a way to give it a Flash callback? I've thought of something like this: ExternalInterface.addCallback("foo", function(){...}); ExternalInterface.call("theFunction", "foo"); But that wouldn't work since theFunction would attempt to do foo() , while it should really do swfObject.foo() . The problem is the page and its Javascript are not under my control

MySQL,PhP, and Flash As3 Data is not loading properly?

纵然是瞬间 提交于 2019-12-25 04:22:54
问题 For some reason the PHP variables are loading very improperly. So this is what happens: In my PHP code I have: <?php include_once "connect.php"; $username = $_POST['username']; $password = $_POST['password']; if ($_POST['systemCall'] == "checkLogin") { $sql = "SELECT * FROM users WHERE username='$username' AND password='$password'"; $query = mysql_query($sql); $login_counter = mysql_num_rows($query); if ($login_counter > 0) { while ($data = mysql_fetch_array($query)) { $testing = $data[

How do you “step into” with fdb.exe?

纵然是瞬间 提交于 2019-12-25 04:21:52
问题 exe now for debugging. The problem is I don't know how to do "step into" with that. There're two command for stepping, "step" and "next", but it all behaves similar to "step over" in a GUI debugger. So is there any good way? Maybe I need to set a break point in the beginning of the function i'm going to step into, continue the execution and finally remove the break point? 回答1: If you are on Windows (by the .exe I'm assuming so) then give FlashDevelop a whirl. It gives a GUI to FDB and has a

access dynamically loaded movieclip (stage > scrollpane > myloader > movieclip)

独自空忆成欢 提交于 2019-12-25 04:17:59
问题 what I'm trying to do is accessing snapText = scrollPane.source.textSnapshot; from an external swf. I've tried: trace("-->: "+scrollPane.source.textSnapshot.getText(0, 1000)); trace("-->: "+myLoader.content.textSnapshot.getText(0, 1000)); trace("-->: "+mc.textSnapshot.getText(0, 1000)); trace("-->: "+mc.getChildAt(0).textSnapshot.getText(0, 1000)); trace("-->: "+mc.getChildByName(myLoader).textSnapshot.getText(0, 1000) ); trace("-->: "+scrollPane.content.textSnapshot.getText(0, 100)); all of