flash

Converting 2x32 bit uint <-> Number

江枫思渺然 提交于 2019-12-25 06:33:41
问题 How would one convert from 2x32bit uints to a Number and back (assume max value of 2^52)? I believe the following would theoretically work (passing around as ByteArray for clarity, but an Array could work as storage as well), But it doesn't because bitwise operators evidently force Number into 32 bits :\ (see: Binary math on Number objects limited to 32 bits?): public static function read64BitNumberFromBuffer(buffer:ByteArray):Number { var ch1:uint = buffer.readUnsignedInt(); var ch2:uint =

AS3 error text linkage to xml

一曲冷凌霜 提交于 2019-12-25 06:23:26
问题 SO i was testin various ways for linkage dynamic scrolling text and xml file i wanted to put on stage double text sliders each of them will fetch different data from xml file but getting random error here is the code: //SCROLLING SPEED var scrolling_speed:int = 2; var scrolling_speed2:int = 4; //TEXT TO SCROLL var text_to_scroll:String = "www.posta.ba"; var xmlLoader: URLLoader = new URLLoader(); var myData: XML; var myItems: XMLList; var position: uint; xmlLoader.addEventListener(Event

Changing the direction of a ball on collision base on speed

给你一囗甜甜゛ 提交于 2019-12-25 06:19:20
问题 I am creating a ping pong game. And I want to create the ability to control the direction of the ball based on the impact on the paddle. If the ball is coming down at vy = 4; vx = 4; and the paddle is moving to the left at vx = -5; I want the ball to slightly change its course depending on how fast the paddle is moving. It would probably reduce the balls vx speed on collision, therefore making the ball move more straight (close to the Y axis) when it is moving back up. But before I go on a

flvplayback component doesn't stop playing upon exitframe

时光总嘲笑我的痴心妄想 提交于 2019-12-25 06:13:38
问题 I have an instance of an flvplayback component on a frame (not the first frame) on a timeline in a flash AS3 flash app file. I would like to stop the movie when i exit that frame, either via gotoAndStop() or whatever else. Is there a listener for this? Or any solution that people know of? Thanks, jml 回答1: You could always add an ENTER_FRAME listener to the parent MovieClip, check if currentFrame yields the correct frame number, and stop the FLV if it doesn't. But if I understand correctly,

flvplayback component doesn't stop playing upon exitframe

半腔热情 提交于 2019-12-25 06:12:22
问题 I have an instance of an flvplayback component on a frame (not the first frame) on a timeline in a flash AS3 flash app file. I would like to stop the movie when i exit that frame, either via gotoAndStop() or whatever else. Is there a listener for this? Or any solution that people know of? Thanks, jml 回答1: You could always add an ENTER_FRAME listener to the parent MovieClip, check if currentFrame yields the correct frame number, and stop the FLV if it doesn't. But if I understand correctly,

Webbrowser Control, Flash not working

走远了吗. 提交于 2019-12-25 06:11:02
问题 I know this problem has been around forever and hopefully someone can point me to a solution. I created a simple web browser program (using VS 2013 Ultimate) to automate changing from urls by just clicking a button. It's for children so they don't need to navigate, they just push a button and it takes them to the next url. Problem: Flash content will not display using the webbrowser control. It will display in iexplorer 11 that is installed on the computer. It will also display in VS 2013

Webbrowser Control, Flash not working

心已入冬 提交于 2019-12-25 06:10:52
问题 I know this problem has been around forever and hopefully someone can point me to a solution. I created a simple web browser program (using VS 2013 Ultimate) to automate changing from urls by just clicking a button. It's for children so they don't need to navigate, they just push a button and it takes them to the next url. Problem: Flash content will not display using the webbrowser control. It will display in iexplorer 11 that is installed on the computer. It will also display in VS 2013

Action script 3 drawing app undo and redo function

若如初见. 提交于 2019-12-25 05:56:55
问题 Can anyone show me how can I make undo and redo function? so this is my current action script. I cant figure how to do it and i see some example in some web site, the action script is to long to under stand. Pls show a simple way that i can make this work.. sorry for bad grammar... import flash.display.MovieClip; import flash.events.MouseEvent; var pen_mc:MovieClip; var drawing:Boolean = false; var penSize:uint = 1; var penColor:Number = 0x000000; var shapes:Vector.<Shape>=new Vector.<Shape>(

actionscript project compiled as swf. how can i load it with flex and use the functions it provides?

一个人想着一个人 提交于 2019-12-25 05:32:34
问题 I have an ActionScript project with several classes that i compiled as an swf using Adobe Flex (by creating an actionscript project and clicking on export -> release build) Is there a way to load that swf so i'll be able to load it's classes and use them on a different swf ? i know i can use the following code to load an swf file: var loader:Loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoaded); loader.load(new URLRequest("game.swf")); addChild(loader);

AS3 - Memory management

依然范特西╮ 提交于 2019-12-25 05:32:29
问题 I have a question regarding AS3 memory management I wonder if anyone could help me with. Supposing I created an instance variable for a Class, in this case or type Sound: public class SoundStore extends Sprite{ var s:Sound; Then within various class functions I referenced this variable multiple times, each time I wanted to load in a new sound: s = new Sound(); Am I correct in thinking that each time I created a new Sound I would be overwriting the previous allocated memory? Thanks 回答1: No.