flash

How to get the click event on sIFR embedded tag in IE?

只愿长相守 提交于 2020-01-04 09:22:04
问题 I have implemented Scalable Inman Flash Replacement (sIFR) to convert text. The issue is, I'm unable to do onClick event over the iSFR embed tags. $(function() { $("embed").click(function(){ alert('clicked over embed'); }); }); This works in Firefox but not in Internet Explorer. Can anybody help me? 回答1: Flash movies tend to eat these events. sIFR 3 lets you specify an onRelease callback handler in the sIFR.replace() arguments, which is called when the Flash movie is clicked on. 回答2: It might

how do I find the number of xml children in AS3

蹲街弑〆低调 提交于 2020-01-04 09:19:33
问题 so live docs says this for calling .lenght() on an XML object For XML objects, this method always returns the integer 1. The length() method of the XMLList class returns a value of 1 for an XMLList object that contains only one value. i called it on an xml that looked like this: <xml> <picture>1</picture> <picture>2</picture> </xml> i tried myXML.lenght() and it reallt returned 1. how do i get the number of children in my xml? 回答1: Try var length:int = myXML.children().length(); Also, this is

how do I find the number of xml children in AS3

只谈情不闲聊 提交于 2020-01-04 09:18:21
问题 so live docs says this for calling .lenght() on an XML object For XML objects, this method always returns the integer 1. The length() method of the XMLList class returns a value of 1 for an XMLList object that contains only one value. i called it on an xml that looked like this: <xml> <picture>1</picture> <picture>2</picture> </xml> i tried myXML.lenght() and it reallt returned 1. how do i get the number of children in my xml? 回答1: Try var length:int = myXML.children().length(); Also, this is

Serialize circular object networks using writeObject / readObject

怎甘沉沦 提交于 2020-01-04 07:35:10
问题 I'm about to implement public function writeExternal( output:IDataOutput ):void {...} public function readExternal( input:IDataInput ):void {...} to make a set of object serializable. Although I'm pretty sure, that I implemented all correctly, readExternal(..) at a certain point complains about too few data left to read: RangeError: Error #2006: The supplied index is out of bounds. at flash.filesystem::FileStream/readObject() I wonder, if I have a circular object network like A = { left -> B,

AS3 bug? Newline automatically entered after css tag

元气小坏坏 提交于 2020-01-04 06:30:50
问题 I am rendering a TextField (Flash CS5) with the following css and html properties : css = "a {font-weight: bold;} fu {color: #00A0A0;}" wordWrap = true multiline = true html = <![CDATA["Phoenicians were pioneering artisans and ingenious craftsmen… They developed the technique behind the production of transparent glass… Their innovation spread around the globe throughout the past centuries… <fu>WE AIM TO CARRY ON WITH THE INNOVATION</fu>"]]> The last QUOTE is rendered in a line BELOW "WE AIM

How to read the param value from the object tag using javascript

半城伤御伤魂 提交于 2020-01-04 06:07:43
问题 Is it possible to read the playerID value using JavaScript? <object id="myid" class="newclass"> <param name="bgcolor" value="#FFFFFF" /> <param name="width" value="345" /> <param name="height" value="216" /> <param name="playerID" value="1234" /> <param name="playerKey" value="AFASS" /> <param name="isVid" value="true" /> <param name="isUI" value="true" /> </object> 回答1: Or, you can try the following statement. It will return all the play IDs on the page, if you have multiple. var playerIDs =

Sound keeps playing after external swf was unloaded

假装没事ソ 提交于 2020-01-04 04:43:26
问题 I have a flash application, some kind of a play-list that loads external SWF video player (I don't have code access to that external file), so users can watch the video or skip to another one. When user switches to another video new SWF file is being loaded. The problem : If user didn't finish watching the video and skips to the next then I unload previous SWF file ( unloadAndStop() ) and load a new one. And because the previous SWF was playing it is not actually unloaded, it is still playing

AS3: Analyzing sound spectrums one by one, one channel at once

左心房为你撑大大i 提交于 2020-01-04 04:32:26
问题 I know the SoundMixer.computeSpectrum and Sound.extract() methods , but those methods deal with the total sound output. Instead, is there a way to deal with every single SoundChannel, so as to provide a graphical visualization of each of them? 回答1: I'm afraid that's not possible. In fact, the computeSpectrum method doesn't even compute your own channels but analyses every sound the Flash plugin catches. This can be annoying when the sounds are playing on a different location which will cause

AS3: Analyzing sound spectrums one by one, one channel at once

孤人 提交于 2020-01-04 04:32:08
问题 I know the SoundMixer.computeSpectrum and Sound.extract() methods , but those methods deal with the total sound output. Instead, is there a way to deal with every single SoundChannel, so as to provide a graphical visualization of each of them? 回答1: I'm afraid that's not possible. In fact, the computeSpectrum method doesn't even compute your own channels but analyses every sound the Flash plugin catches. This can be annoying when the sounds are playing on a different location which will cause

Can I create rain effect in javascript?

空扰寡人 提交于 2020-01-04 04:28:11
问题 I need to achieve something like this for my website: Flash Rain Effect Is that possible to do in Javascript? I want it to be just as smooth as it is in Flash. Another flash rain drop water effect 回答1: Yes, it's possible: http://www.lab4games.net/zz85/blog/2010/03/10/rain-water-ripples-with-html-canvas-javascript-jquery/ Smoothness is something relative, and you may not be able to have the same performance as hardware-accelerated Flash. With that said, more and more browsers are starting to