flash

Using Forex Feed from XML in AS3?

大憨熊 提交于 2019-12-25 09:35:45
问题 I would like to use this xml file for currency exchange rates in my AS3 flash file: http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml So far, this is what I have: var myXML:XML; var myLoader:URLLoader = new URLLoader(); myLoader.load(new URLRequest("http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml")); myLoader.addEventListener(Event.COMPLETE, processXML); function processXML(e:Event):void { myXML = new XML(e.target.data); trace(myXML.*); } With this I get the whole xml

Error 1010 in ActionScript

冷暖自知 提交于 2019-12-25 08:59:04
问题 After compiling and running my program, i run into runtime error 1010: TypeError: Error #1010: A term is undefined and has no properties. at DC/updateScore()[DC::frame74:36] This is the piece of code: function updateScore(e:MouseEvent) { var i:uint=0; for(;i<balls.length;i++) if(balls[i]==e.target) break; if(balls[i].isCorrect) { score++; timeField.text = new String(score); } else { score--; timeField.text = new String(score); } } What's the problem? I'm using updateScore function for

Moving a Flash object within the DOM tree

心已入冬 提交于 2019-12-25 08:49:23
问题 I have found this question; Can I move a Flash object within the DOM without it reloading? I m developing a simple video chat application. Whenever I move a flash object within the dom tree, it resets itself. I know there is no solution for it which is a browser specific behaviour. However, I would like to ask whether there is any workaround to do this. My requirements are simple. I have multiple streams which are aligned horizontally. Every stream is a different flash object. When someone

if clicked 1+2 button true or wrong.How I do that

久未见 提交于 2019-12-25 08:26:18
问题 A few fish come to the screen and stop after a while the other fishes come in.Then a while the stage is stopped and the player is trying to guess the first fishes.How can I create code to say that the chosen fish is wrong or true.For example:The first come 3 fishes it's correct and after then came fishes wrong.Player guess right all the fishes and earn coins or display win text bla bla.. I selected to sequence of the fish at timeline.So yes I animated.I was using as3 random function for the

Make swf file a link using Jquery

寵の児 提交于 2019-12-25 08:22:08
问题 I've been sent a swf file for a banner that needs to be linked to a url. I am adding this to my client's website and my client has been sent the swf and javascript to add to the page. The problem is that the javascript code is overly complex, and I'm wanting to use Jquery and Unobtrusive Flash Objects (I've not yet updated to swfobject on this site). Can I use Jquery and/or UFO (or indeed swfobject if I have to upgrade) to make the swf file link to an external url (preferably loading in a new

Resizing BitmapData in ActionScript 3

吃可爱长大的小学妹 提交于 2019-12-25 08:09:33
问题 I am using ActionScript 3.0 to capture image from users webcam ,It is working fine , however the problem is that the size of image is too big for my liking . Can I make it small , I tried changing coordinates of Bitmap Data . Can anybody suggest me the solution. Thanks 回答1: When you capture the webcam you have to provide a matrix. This matrix can handle a rescaling. var output:BitmapData = new BitmapData(camera.width * scaleFactor, camera.height * scaleFactor, false); var matrix:Matrix = new

Change Tumblr audio player color with Javascript

前提是你 提交于 2019-12-25 08:03:25
问题 I'm forced to load the tumblr audio player in my theme via JavaScript because of this issue. The loading happens as follows: $(window).load(function() { setTimeout(function() { $('.audio-player').each(function(){ var audioID = $(this).parents(".audio").attr("id"); var $audioPost = $(this); var color = "000000"; //new color $.ajax({ url: '/api/read/json?id=' + audioID, dataType: 'jsonp', timeout: 50000, success: function(data){ if ($audioPost.html().indexOf("is required to") != -1) {

Getting the bit rate of a externally loaded mp3 in the flashplayer

◇◆丶佛笑我妖孽 提交于 2019-12-25 07:59:47
问题 does anyone know if this is possible? much appreciated, 回答1: Using the native flash sound class, you can read the id3 metadata property of the sound object, however this depends on the software that encoded the mp3 putting the encoding information in the metadata. there's nothing inherent to the mp3 itself that reports this to the sound class, and the metadata is often missing or unreliable. http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/media/Sound.html#id3 alternatively

Flash/ActionScript: How to center smaller swf when loaded in a larger one?

梦想与她 提交于 2019-12-25 07:39:03
问题 I am making an interactive storybook project given these specifications: My book has 13 pages, where 1 page = 1 swf loaded externally into the book swf. As you can see, the page swf must be centered in between the 2 buttons that are both 100x450 each. Whenever I try to load the swf, usually it's cut off at some point. In short, how do I center my externally swf when loaded? 回答1: Make the completeHandler Function like given bellow function completeHandler(event:Event):void{ this.container

Animating maps based on database values

孤街醉人 提交于 2019-12-25 07:26:46
问题 Image link to GUI Requirement http://imageshack.us/a/img39/8062/requirement1.jpg The image map should be loaded from a database On entering values in search box , it should query the database and zoom to that coordinate,and fill up the results on the left hand side On querying the status, the total villages belonging to this status should be displayed on the map On clicking the coordinates of the villages on the map ,the left result should be displayed. We should be able to update the status