flash

How to pause flash application in browser?

白昼怎懂夜的黑 提交于 2020-01-16 01:00:08
问题 How to pause flash application in browser if there isn't any buttons that would allow it ? 回答1: Well, there is a website, there is a swf file, i want to pause it. Do you have access to these files and their source? Is it on the same domain? Anyway, the previous two answers suggested wrapping the swf with another Flash application and then setting the framerate to 0. That's not accurate, because the minimum framerate you can set is 0.01. Flash code is built around the framerate, it makes sense

How to get Flex SWFLoader unloadAndStop to unload sound also?

人走茶凉 提交于 2020-01-16 00:59:08
问题 public var swfLoader:SWFLoader = new SWFLoader(); [Embed(source="/some/file1.swf")] public var file1:Class; [Embed(source="/some/file2.swf")] public var file2:Class; then I do: swfLoader.load(file1); Later on: swfLoader.unloadAndStop(true); which unloads the video, but not the sound! So I add in SoundMixer.stopAll(); Which is ok, for a while. Later on, I do: swfLoader.load(file2); And eventually, while watching file2, file1's audio will start playing in the background over file2's audio, with

How does Youtube control Flash content loading (Chrome 12)

非 Y 不嫁゛ 提交于 2020-01-16 00:50:09
问题 Several days ago my Google Chrome was updated to 12.0.742.53 beta, and I've noticed very interesting change. When opening a Youtube video page, page loading process does not end even when all the content (text, images) is loaded; loading ends only when video buffering completes! Also, when I interrupt the loading (by pressing Esc , for example) video downloading is also stopped! (Until now I had to right click on the video and press Stop Download to abort buffering). IMHO that's a great user

trying to remove MovieClip from stage

妖精的绣舞 提交于 2020-01-16 00:38:10
问题 I am getting a little fustrated with trying to remove a MovieClip from my stage after I am done with it. On loading my frame, I have a little bit of code in a function that creates a piechart. var piechart:MovieClip = new MovieClip(); stage.addChild(piechart); //Then a bunch more to draw the pie chart So that bit of code is NOT on my "Actions" layer. Now I have a button on this frame that navigates to a different frame in the timeline but when I change frames, the piechart remaines. So, how

Order of items in objects in ActionScript

纵然是瞬间 提交于 2020-01-16 00:35:28
问题 Try to compile: var object:Object = {}; object.one = "foo"; object.two = "foo"; object.three = "foo"; object.four = "foo"; for(var key:String in object) { trace(key); } ... you will get: one four two three Why the messed up order? 回答1: The keys of an object are not ordered. If you need to preserve order and have a lookup, then you need to create a custom collection that provides that functionality. 回答2: Object in AS3 can be seen as a hashtable where the field name is the key. So you cant rely

How use swapDepths & getNextHighestDepth() in AS3?

强颜欢笑 提交于 2020-01-15 17:17:43
问题 I'm trying to convert the following code: DNA0.swapDepths(this.getNextHighestDepth()) I tried it this way: DNA0.swapChildren(stage.getChildIndex(DNA0)); But its not working... I guess I didn't understand the logic. Anybody help me? ----EDIT---- @gladoscc, good job. it's work. But I have other convert problems.. Like, this['DNA'+DNAsy.length].y = this['DNA'+(DNAsy.length-1)].y; this['DNA'+DNAsx.length].x = this['DNA'+(DNAsy.length-1)].x; DNAsy.push(this['DNA'+DNAsy.length].y) DNAsx.push(this[

How do I load a YouTube video in Flash Builder?

百般思念 提交于 2020-01-15 12:15:05
问题 I'm trying to play a Youtube video in Flash Builder. Each time I play the file I get an error message: SecurityError: Error #2121: Security sandbox violation: Loader.content: https://www.youtube.com/v/FGtTEmBR7Sk cannot access https://s.ytimg.com/yts/swfbin/player-vflQiDuyQ/watch_as3.swf. This may be worked around by calling Security.allowDomain. at flash.display::Loader/get content() at com.google.youtube.application::SwfProxy/onRequestParameters() at flash.events::EventDispatcher

How do I load a YouTube video in Flash Builder?

放肆的年华 提交于 2020-01-15 12:06:54
问题 I'm trying to play a Youtube video in Flash Builder. Each time I play the file I get an error message: SecurityError: Error #2121: Security sandbox violation: Loader.content: https://www.youtube.com/v/FGtTEmBR7Sk cannot access https://s.ytimg.com/yts/swfbin/player-vflQiDuyQ/watch_as3.swf. This may be worked around by calling Security.allowDomain. at flash.display::Loader/get content() at com.google.youtube.application::SwfProxy/onRequestParameters() at flash.events::EventDispatcher

Dynamically changing the referenced XML file in Flash AS3?

拈花ヽ惹草 提交于 2020-01-15 11:58:26
问题 Basically I have media being parsed and played by reference of an XML document using AS3. These media files are gonna be seperated into seperate XML files then what I was planning was to just dynamically change which XML file is being referenced. Problem is, the code only fires once on frame 2 and I can't seem to figure out how to switch out the XML file for a different one upon an event trigger. "new URLRequest(www.blah.com/theotherXMLfile.xml)" isn't working...do I need to reload a whole

My Actionscript 3.0 Stage will not clear

拟墨画扇 提交于 2020-01-15 11:44:08
问题 I am working on a side-scrolling game in Flash Actionscript 3.0. Right now I am trying to allow the Player to advance to the next level by touching a certain object. Before the next level is loaded, I try to remove all of the previous level's assets (background and "floor"), which are MovieClips, from the stage. When the next level loads, I can still see the previous level's assets, although the Player cannot interact with them. I have looked around the Internet and tried a few methods to fix