actionscript-3

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

Flex String to HTML for parse with DOM

纵饮孤独 提交于 2020-01-17 01:29:09
问题 I have a string: private str:String = ' <!DOCTYPE html> <html> <body> <div>TEST</div> <span id="t1">T1 Content</span> <span class="t2">T2 Content</span> </body> </html>'; I want to parse the string. Next, I get innerHTMl via Object, ID or Class. E.g.: Objects: Body, Div, Span IDs: t1 Classes: t2 In PHP with the class, it's easy. But I could not create this build with Flex. Thanks for help... 回答1: Convert it to native XML in as3, then use e4x to parse the information required: var xml:XML =

AS3 Preloader which loads itself, not an external swf

不想你离开。 提交于 2020-01-17 01:25:37
问题 How can I create a preloader which does this? I have seen many examples of code to load an external swf, but never something that loads itself. Thanks for the help, this is driving me crazy... 回答1: alternatively ... You can try FlashDevelop's Preloader template, makes it really easy 回答2: It's really simple. First you need to move everything except the preloader off the first frame. Everything else is basically the same as an external preloader - the only difference is that you're checking the

Using Maven to build Flex project including stylesheets

拥有回忆 提交于 2020-01-17 01:22:34
问题 Flex stylesheets are parsed by the compiler and bundled with their assets (graphics, usually) into a swf file, which can then be loaded at runtime. I've got a project with a fixed number of styles (currently 4: old corporate style, new corporate style, and high contrast versions of both). Using Flash Builder (Eclipse with Flex IDE plugin) I'm able to have all .css files compiled to .swf files alongside the primary project artifact .swf file. This is also possible with ant scripts. My current

flash as3 xml cdata bold tags rendered in htmlText with an embedded font

夙愿已清 提交于 2020-01-17 01:22:11
问题 I'm just trying to get flash to render bold text in a dynamic text field with an embedded font, using data I've imported from an xml file using CDATA. Anyone know how to do this? XML File: <description><![CDATA[ FOR THE PAST TWO YEARS, <b>SUPERFAD</b> HAS WORKED CLOSELY WITH THE <b>MARTIN AGENCY</b> TO VISUALIZE THE ORIGINAL WORKS OF <b>SPORT CAMPAIGN</b>. THE CAMPAIGN SPOTLIGHTS THE EXTREME ATHLETES OF THE VARIOUS EVENTS AS ARTISTS IN THEIR OWN WORLD, USING THE TOOLS OF THEIR SPORT TO CREATE

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

Avoider Game Tutorial: Score not working

独自空忆成欢 提交于 2020-01-17 00:25:32
问题 I've been working on the tutorial for a neat avoider game over at this site: http://gamedev.michaeljameswilliams.com/2009/02/03/avoider-game-tutorial-5/ . I got as far as part 5, and up till then, I followed the code exactly (I stopped before running the final score at game over), and I event disabled auto-kernel and used device fonts, and embedded the text. Except when I run the game, no matter how many enemies show up, my score doesn't change from 0. Apparently, I keep getting the 1009