flash-cs6

Calculate a trajectory for an object, when given an angle and a velocity in flash

孤人 提交于 2019-12-07 17:40:38
问题 I am trying to launch a cannonball from a cannon and have it follow a realistic path. The angle of fire changes depending on the orientation of the cannon (automatically orientates to mouse pointer). So what I'm trying to figure out, is how to move a cannonball along a parabolic path, when given an angle, and a set velocity. I've read that this can be done without complicated trigonometry (never listened to it in highschool), and can be calculated simply by adding gravity to the yVelocity

Shaking effect - Flash CS6 ActionScript3.0

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-07 01:40:22
问题 This question is related to ActionScript 3.0 and Flash CS6 I am trying to make an object shake a bit in a certain for some seconds. I made it a "movieclip" and made this code: import flash.events.TimerEvent; var Machine_mc:Array = new Array(); var fl_machineshaking:Timer = new Timer(1000, 10); fl_machineshaking.addEventListener (TimerEvent.TIMER, fl_shakemachine); fl_machineshaking.start (); function fl_shakemachine (event:TimerEvent):void { for (var i = 0; i < 20; i++) { Machine.x += Math

Calculate a trajectory for an object, when given an angle and a velocity in flash

守給你的承諾、 提交于 2019-12-06 00:18:30
I am trying to launch a cannonball from a cannon and have it follow a realistic path. The angle of fire changes depending on the orientation of the cannon (automatically orientates to mouse pointer). So what I'm trying to figure out, is how to move a cannonball along a parabolic path, when given an angle, and a set velocity. I've read that this can be done without complicated trigonometry (never listened to it in highschool), and can be calculated simply by adding gravity to the yVelocity every tick. However, at this moment, I don't know how to calculate the initial yVelocity (again, depending

Shaking effect - Flash CS6 ActionScript3.0

喜你入骨 提交于 2019-12-05 05:09:56
This question is related to ActionScript 3.0 and Flash CS6 I am trying to make an object shake a bit in a certain for some seconds. I made it a "movieclip" and made this code: import flash.events.TimerEvent; var Machine_mc:Array = new Array(); var fl_machineshaking:Timer = new Timer(1000, 10); fl_machineshaking.addEventListener (TimerEvent.TIMER, fl_shakemachine); fl_machineshaking.start (); function fl_shakemachine (event:TimerEvent):void { for (var i = 0; i < 20; i++) { Machine.x += Math.random() * 6 - 4; Machine.y += Math.random() * 6 - 4; } } When testing the movie I get multiple errors

Create expansion file for AS3 android Air App Flash cs6

五迷三道 提交于 2019-12-04 18:14:39
I have created an AS3 mobile app and exported successfully through flash CS6. In this .apk I have included my video files (going to be a presentation for Android Tablet). The total size of the .flvs alone is 64mb. When I tried to upload to Google play I got the (expected) warning about the file size being >50mb . I have spend two hours trying to find a fix, including using the jobb.bat , zipalign.bat , putting the files into the format of main.1.obb and many other options. The Google website seems to think that I am using Eclipse (which I’m not I used Flash CS6), but I tried all those tools

Flash player stuck at Frame 1 after calling a function

巧了我就是萌 提交于 2019-12-04 05:16:06
问题 I'm working in a flash CS6 and I'm having a trouble: After calling a function, player freezes at frame 1. This not happend during Ctrl+ENTER preview, but when I play the .swf file published (using flash player or opening it on a web browser, doesn't matter) is when the problem begin. This is the code: import flash.display.MovieClip; var code:int = 0 var temp:int = 0; var _xmlURL:String = "http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20woeid=368335

Flash player stuck at Frame 1 after calling a function

爷,独闯天下 提交于 2019-12-02 03:32:33
I'm working in a flash CS6 and I'm having a trouble: After calling a function, player freezes at frame 1. This not happend during Ctrl+ENTER preview, but when I play the .swf file published (using flash player or opening it on a web browser, doesn't matter) is when the problem begin. This is the code: import flash.display.MovieClip; var code:int = 0 var temp:int = 0; var _xmlURL:String = "http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20woeid=368335%20and%20u=%27c%27"; var _xmlData:XML; function loadXML(xmlURL:String):void { var loader:URLLoader = new

AS3 Help For Commas

偶尔善良 提交于 2019-12-01 13:52:23
问题 I have this code and I want commas in my numbers. The jackpot is €169.85 but it is displayed as 16985 00 in the game. How to fix that? public function jackpotstring():String { var myPattern:RegExp = /./; var jp:Number = jackpot * denom; var s:String = jp.toFixed(2)+""; return s.replace(/[^A-Za-z0-9 \-_:]+/g, ' '); } 回答1: ou could try something like; var jp:Number = jackpot * denom; jp = Math.round(jp * 100)/100; // value should be something like 1698500 jp = jp / 10000; // value should be

Actionscript 3 - checking for an internet connection

末鹿安然 提交于 2019-11-29 14:27:12
I am using this code in my flash file import air.net.URLMonitor; import flash.net.URLRequest; import flash.events.StatusEvent; var monitor:URLMonitor; function checkInternetConnection(e:Event = null):void { var url:URLRequest = new URLRequest("http://www.google.com"); url.method = "HEAD"; monitor = new URLMonitor(url); monitor.pollInterval = 1000; // monitor.addEventListener(StatusEvent.STATUS, checkHTTP); // function checkHTTP(e:Event = null):void { if (monitor.available) { navigateToURL(new URLRequest("flickr.html"),"_top"); } else { gotoAndPlay(1); } } monitor.start(); } I am trying to get

Facebook abobe as3 api for air for mobile

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-28 11:26:18
问题 I am planing a project that involves a cross platform (Android and I.O.S) mobile app that logs in using Facebook. I have no experience with the face book API and cant find any use full material for newbies. I want to use air for its cross platform capabilities so want to avoid multiple solutions for each platform. I have done many searches for help but haven't found much. Can any of you point me to resources you found use full starting off with this sort of thing. 回答1: The AS3 Facebook API is