flash

AS3 Using multiple timer to show / hide enemies

无人久伴 提交于 2020-01-06 05:39:14
问题 i have a shooting game that works with some sort of rounds, for instance, this round is gonna show 4 enemies on the screen that the user has to shoot. I show the 4 enemies at a half seconds interval of each one so it doesnt all appear on the same time. Using something like: enemiesShowTimer = new Timer(0.5 * 1000, 1); enemiesShowTimer.addEventListener(TimerEvent.TIMER, showEnemyAtTime); enemiesShowTimer.start(); The player has 2 seconds to kill each enemy after they appear, so i also use this

Loaded swf doesn't appear when referencing one of its control by string

好久不见. 提交于 2020-01-06 05:25:29
问题 I have in main: var MyLoader:Loader = new Loader(); MyLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, finishLoading); MyLoader.load(new URLRequest("MySWF.swf")); MyZone.addChild(loader); And in MySWF: this["aSlider"].addEventListener(SliderEvent.CHANGE,OnSliderChange); then MySWF doesn't show up on stage whereas with aSlider.addEventListener(SliderEvent.CHANGE,OnSliderChange); it does appear. I need to use this["aSlider"] because of this http://blog.ickydime.com/2008/07/as3-notes

how does flash handle garbage collection when it comes to adding movieclips directly to another

家住魔仙堡 提交于 2020-01-06 04:46:09
问题 Just curious, If i nest a movieclip inside of another movieclip, and the nested movieclip is attached to a custom class. And that custom class has a Event.ENTER_FRAME listener. when I destroy the container movieclip, will flash get rid of the event listeners inside of nested movieclip's custom class ? May seem like a silly question but flash has a tendency of not killing listeners along with the movieclip itself once it is removed from the stage(this is if your apply the movieclip via

imported .swc movie clip not being displayed - Flash Builder

橙三吉。 提交于 2020-01-06 04:18:52
问题 I am trying to take an animation I made in flash professional, and use it inside of the Flash Builder IDE. I have tried importing an image to the stage in flash, converting it to a movie clip and exporting it as a .swc. After adding the swc to a Flash builder project, I was able to create a class specified by the swc file, and by adding the object to the display tree I could see the image when I ran my project. So I tried the next step which was to animate the image. I imported an image to

Flash Loader and ByteArray

与世无争的帅哥 提交于 2020-01-06 03:53:07
问题 I need to be able to load a jpeg/png image from disk and show it in flex and send it to a server as a base64 encoded string. But once the image file is loaded, in my flash.display.LoaderInfo object, the bytes property (type of ByteArray ) contains more byte than the file content. Example: image file size: 3089 flash.display.LoaderInfo.bytesTotal:3089 flash.display.LoaderInfo.bytes.length:3155 As i need to encode the flash.display.LoaderInfo.bytes in base64 string, i don't know which part of

How to render IP camera video with socket by actionscript?

别来无恙 提交于 2020-01-06 03:35:10
问题 So far the solution I found requires a crossdomain.xml to work,but this is not available on an IP camera: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" applicationComplete="init()"> <mx:Script> <![CDATA[ import utils.video.mjpeg.MJPEG; public function init():void{ Security.loadPolicyFile("xmlsocket:http://10.8.0.54/crossdomain.xml"); trace("xmlsocket:http://10.8.0.54/crossdomain.xml") var vid:MJPEG = new MJPEG("10.8.0.54", "

AS3 - Finding the highest y-coordinate for a given x-coordinate in BitmapData?

和自甴很熟 提交于 2020-01-06 02:59:07
问题 I'm making a platformer. Here is what I have so far: http://megaswf.com/s/2486396 (move around and jump with arrowkeys). I'm using the ground's bitmap data to test collisions with the player's coordinates, and the player is sinking into the ground a few pixels (especially when walking uphill). To prevent this, I want the player's y coordinate to instantly change so that the player is sitting on top of the ground. Here is what I'm working on: if (groundClipBmpData.hitTest(rLoc, 255, bLocFuture

write, update and save a well-formed xml file in as3

早过忘川 提交于 2020-01-06 02:44:13
问题 I am trying to update an xml file and save elements inside of an already saved root element. I have only found examples where the xml files are just opened and not saved. Can someone help me to find the best way to save the results? My project right now looks like this: I am loading an xml file via URLLoader/URLRequest and display the contents in several text fields. New text from an input field is saved (appended) via FileStream directly to the xml file in the applicationStorageDirectory

Flash AS3 Clone, Drag & Drop

大憨熊 提交于 2020-01-06 01:36:09
问题 I am a teacher and with the help of some of you, I managed to create very basic word game for kids where they are able to create words from letters. SWF | FLA I have, however, been unable to continue to drag and drop the letters once they have been cloned from their originals on the side of the stage. Is anyone able to advise how I might be able to add this functionality to my existing code? import flash.display.MovieClip; for (var i=1; i<27; i++) { this["object" + i].addEventListener

Flex 4.5.1 and iOS, Android development

让人想犯罪 __ 提交于 2020-01-05 23:31:12
问题 I recently came across Flex builder and it was gr8 to know that it supports iOS, Android and Blackberry Tablet OS development all within same IDE, framework and api. This is awesome!!! The project I am assigned is a kind of large product and in its desktop versions we have used core C++ and OS API for development (i.e. WIN 32 ), So before starting the development I am instructed to perform a detailed feasibility study on Flex 4.5.1. I have been reading various blogs and posts related to this