flash

I need help in ActionScript3.0

放肆的年华 提交于 2020-01-17 02:20:41
问题 I am working on a time limit game, but when I load the game and it passes the time limit that is placed it reaches zero but it is not directed to the next scene where I have the game over .. this is the code that is placed var tiempo:int; var Duracion:int; Duracion = 7; tiempo = Duracion; var timer:Timer = new Timer(1000,Duracion); timer.addEventListener(TimerEvent.TIMER, tiempo2); timer.addEventListener(TimerEvent.TIMER_COMPLETE, fin) timer.start(); function tiempo2(tiempoevent:TimerEvent)

I need help in ActionScript3.0

徘徊边缘 提交于 2020-01-17 02:20:08
问题 I am working on a time limit game, but when I load the game and it passes the time limit that is placed it reaches zero but it is not directed to the next scene where I have the game over .. this is the code that is placed var tiempo:int; var Duracion:int; Duracion = 7; tiempo = Duracion; var timer:Timer = new Timer(1000,Duracion); timer.addEventListener(TimerEvent.TIMER, tiempo2); timer.addEventListener(TimerEvent.TIMER_COMPLETE, fin) timer.start(); function tiempo2(tiempoevent:TimerEvent)

ActionScript 3 Trig Equations to create Ellipse

£可爱£侵袭症+ 提交于 2020-01-17 02:15:40
问题 I am working with this function that moves an object around a center point in a perfect circle and am trying to modify it to move it in an oval shape that is 1/2 as high as it is wide? Basically, I have a set speed var myVelocity:Number = 0.25; then I calculate my Sine and Cosine based on the speed var myCos:Number = Math.cos(myVelocity); var mySin:Number = Math.sin(myVelocity); then I figure the distance of the the object from a fixed center points along each axis and var x1:Number = myBall

ActionScript 3 Trig Equations to create Ellipse

為{幸葍}努か 提交于 2020-01-17 02:15:02
问题 I am working with this function that moves an object around a center point in a perfect circle and am trying to modify it to move it in an oval shape that is 1/2 as high as it is wide? Basically, I have a set speed var myVelocity:Number = 0.25; then I calculate my Sine and Cosine based on the speed var myCos:Number = Math.cos(myVelocity); var mySin:Number = Math.sin(myVelocity); then I figure the distance of the the object from a fixed center points along each axis and var x1:Number = myBall

What's the PHP equivalent of ASP.NET ashx handlers?

半腔热情 提交于 2020-01-17 01:39:24
问题 I need to return a JSON encoded response to a flash http get request. In ASP.NET, I do this with a ASHX handler. What's the PHP equivalent ? I mean in order that I only get JSON back, and not the <html> etc. 回答1: You should put this on top of your script: header('Content-Type: application/json; charset=utf-8'); 回答2: header('Content-type: application/json'); http://php.net/manual/en/function.json-encode.php 来源: https://stackoverflow.com/questions/2888153/whats-the-php-equivalent-of-asp-net

Movieclip color is not working properly? [duplicate]

瘦欲@ 提交于 2020-01-17 01:13:26
问题 This question already has answers here : How to maintain a movieclip's color between frames? (2 answers) Closed 5 years ago . I have 2 frames and in frame 1 the target MC color is being changed to RED. After that i go to frame 2. If i came back to frame 1 the MC doesn't retain the RED color. What i do wrong. Please see the pictures. http://www.picz.ro/index.php?id=ec122060763b0fd744d2499882d4ae1f and http://www.picz.ro/index.php?id=00e207dfad35e7e414ed3236a1f79448 回答1: eliminating frames, you

Flex element includein

三世轮回 提交于 2020-01-16 19:31:49
问题 In Flex, we can assign state to an element via this: <s:Button id="mybtn" includeIn="mystate" label="button label"/> How can we do the includeIn with ActionScript? Thank you. 回答1: States are an MXML concept, not an AS concept. In AS you have to write your own logic in the override function set currentState. override public function set currentState(value:String):void { super.currentState = value; //write your logic for states } 回答2: The includeIn pseudo-attribute only exists in the MXML

Action Script 3: Adding an gotoAndStop Animation

半城伤御伤魂 提交于 2020-01-16 19:14:12
问题 So the other day I found a tutorial on how to create a pattern lock screen in action script. To do so I had to create a class, I have a good grasp on how the class is working. But I want to add an animation so when the user goes over the dots in the pattern and animation plays. But I have no idea how to do something like this through the class. Here is the code I used in my class. package { import flash.display.Sprite; import flash.events.MouseEvent; import fl.transitions.Tween; import fl

ActionScript 3.0 URLRequest with Relative Link

六眼飞鱼酱① 提交于 2020-01-16 18:56:29
问题 I am trying to pass some data between PHP and Flash. In Flash I have managed to get the code below working. The problem is I want to use a relative link such as "data/config.php" however this gives me the following error: Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. I tried looking up the error but it seems to have many possible causes and I can't figure out a way around it in my case. Here is the code (this works when the url is absolute): submit_btn.addEventListener

ActionScript 3.0 URLRequest with Relative Link

醉酒当歌 提交于 2020-01-16 18:55:21
问题 I am trying to pass some data between PHP and Flash. In Flash I have managed to get the code below working. The problem is I want to use a relative link such as "data/config.php" however this gives me the following error: Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. I tried looking up the error but it seems to have many possible causes and I can't figure out a way around it in my case. Here is the code (this works when the url is absolute): submit_btn.addEventListener