actionscript-3

AS3 how to go to next frame in MainTimeline when character die animation ends

倾然丶 夕夏残阳落幕 提交于 2019-12-20 07:09:16
问题 so I need to know if my character(bird) hitTestObject with pipe he plays the die animation after the animation ends it need to go to the game over frame in the main timeline if (bird.hitTestObject(pipe1)) { bird.gotoAndStop(3); //frame 3 = where the die animation is } LINK 1 (here you see different frames for animations frame 3 is die animation) http://gyazo.com/67381832827bfb8a4dac2452076a4217 LINK 2 (the die animation) http://gyazo.com/bf5153a9d00e1478471fff7b73d0c592 so here you can see

How to monkey patch or override a swc class in Flex?

烈酒焚心 提交于 2019-12-20 07:06:10
问题 I'm using a swc from the Axiis project to display visualizations in a project I'm working on. I've run into a bug where re-compiling the library swc would be an easy solution, but I can only use the buggy version of the swc. I have the Axiis source and compiled a version with the bug fixed, though I'm not allowed to use it because of client version restrictions. Does anyone know how I can use the updated Actionscript class/file in my code so it overrides the swc class? 回答1: I'm not sure if

Collision Detection in Flash Functionalities? (hitTestObject)

拜拜、爱过 提交于 2019-12-20 07:04:49
问题 Hello, so I've been recently using hitTestObject to detect collisions in an android app I'm making. After testing for a bit, I realized that the game was detecting "fake" collisions. What I mean by this is that it was detecting a collisions not when the pixels of an object(s) are touching, but (after doing a bit of research) I found out that the boxes of the objects where colliding. So I had the game stop with a collision, and this is how it looks like: I tried outlining the two object's

SQL Error :“No such table”

被刻印的时光 ゝ 提交于 2019-12-20 06:55:49
问题 I am trying to troubleshoot why my code returned null for all my queries and finally found that sql query returns nothing. I created a new AIR document (s:WindowedApplication) with minimalistic code: <fx:Script> <![CDATA[ import mx.events.FlexEvent; private var sqlConnection:SQLConnection; private var select:SQLStatement; private var databaseFile:File; protected function windowedapplication1_creationCompleteHandler(event:FlexEvent):void { var dbPath:String = "Movie Manager Settings/moovioDB2

Starling library - When I try and change cursor to image…it doesn't work (and a sprite element dissapears from stage)

こ雲淡風輕ζ 提交于 2019-12-20 06:38:12
问题 I am using Starling to make a really, really, really easy game - I am just trying to add a stationary sprite to the stage...and make it so that when the mouse touches the sprite...the game "stops" and a score is sent. I haven't tried implementing hitTest yet for the collision, but I have run into a sort of conflict problem where, when I comment out the line(s) that is supposed to change the cursor image (see Startup.as - stage.addEventListener(TouchEvent.TOUCH, touchHandler); and

How to maintain a movieclip's color between frames?

流过昼夜 提交于 2019-12-20 06:27:48
问题 My app has 2 frames; in frame 1 there are 5 MC and on a DOUBLE_CLICK event the target's color change and go to the next frame 2. In frame 2 I have a button to return to frame 1. How can i maintain the MC color when I return to frame 1? public class test extends MovieClip { public function test() { var myMCTable:Array = [myMC1, myMC2, myMC3, myMC4, myMC5]; for (var i:uint = 0; i < myMCTable.length; i++) { myMCTable[i].doubleClickEnabled = true; myMCTable[i].addEventListener(MouseEvent.DOUBLE

How to get output of a webpage in ActionScript 3

若如初见. 提交于 2019-12-20 06:17:16
问题 Let's say this page www.example.com/mypage returns some html that I want to parse in Actionscript. How do i call this page from Actionscript while getting back the response in a string variable? 回答1: Try this: import flash.net.* var _loader:URLLoader = new URLLoader(); var _req:URLRequest = new URLRequest('http://www.google.com'); _loader.addEventListener(Event.COMPLETE, _onComplete); _loader.load(_req); function _onComplete(e:Event):void{ trace(String(_loader.data)); } 回答2: you will need to

How to create a drag/drop with ActionScript 3.0? Multiple items being dragged to multiple targets

♀尐吖头ヾ 提交于 2019-12-20 06:09:33
问题 I am creating an interactive paper doll in Adobe Animate and am having some trouble making the drag drop feature work. I have multiple clothing items that will need to have the possibility of being dragged to the same area. For example I may have 4 different shirt options. I have started with the two dresses (yellow dress_mc & blue dress_mc). The yellow dress is working properly, but the blue dress won't work, I can drag it, but not drop it. Any suggestions? This is the code I have right now:

What is the best way to calculate Age using Flex? [closed]

社会主义新天地 提交于 2019-12-20 06:07:17
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . What is the best way to calculate Age using Flex? 回答1: I found an answer at the bottom of this page in comments section (which is now offline). jpwrunyan said on Apr 30, 2007 at 10:10 PM : By the way, here is how to calculate age in years (only) from DOB without needing to account

What is the best way to calculate Age using Flex? [closed]

可紊 提交于 2019-12-20 06:06:16
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . What is the best way to calculate Age using Flex? 回答1: I found an answer at the bottom of this page in comments section (which is now offline). jpwrunyan said on Apr 30, 2007 at 10:10 PM : By the way, here is how to calculate age in years (only) from DOB without needing to account