actionscript-3

Error flash output TypeError 1009:Cannot access a property or method of a null object reference

六眼飞鱼酱① 提交于 2020-01-07 08:44:25
问题 Why I get output TypeError: Error #1009: Cannot access a property or method of a null object reference. at Untitled_1_fla::MainTimeline/asd() this my code stage.addEventListener(Event.ENTER_FRAME,asd) function asd(e:Event){ if(test.pemukul.hitTestObject(musuh)){ musuh.visible=false } } 回答1: some object you trying to access is null so check this objects: test pemukul musuh 来源: https://stackoverflow.com/questions/24530439/error-flash-output-typeerror-1009cannot-access-a-property-or-method-of-a

Error flash output TypeError 1009:Cannot access a property or method of a null object reference

放肆的年华 提交于 2020-01-07 08:44:04
问题 Why I get output TypeError: Error #1009: Cannot access a property or method of a null object reference. at Untitled_1_fla::MainTimeline/asd() this my code stage.addEventListener(Event.ENTER_FRAME,asd) function asd(e:Event){ if(test.pemukul.hitTestObject(musuh)){ musuh.visible=false } } 回答1: some object you trying to access is null so check this objects: test pemukul musuh 来源: https://stackoverflow.com/questions/24530439/error-flash-output-typeerror-1009cannot-access-a-property-or-method-of-a

Error flash output TypeError 1009:Cannot access a property or method of a null object reference

谁说胖子不能爱 提交于 2020-01-07 08:43:31
问题 Why I get output TypeError: Error #1009: Cannot access a property or method of a null object reference. at Untitled_1_fla::MainTimeline/asd() this my code stage.addEventListener(Event.ENTER_FRAME,asd) function asd(e:Event){ if(test.pemukul.hitTestObject(musuh)){ musuh.visible=false } } 回答1: some object you trying to access is null so check this objects: test pemukul musuh 来源: https://stackoverflow.com/questions/24530439/error-flash-output-typeerror-1009cannot-access-a-property-or-method-of-a

What is “ByteArray.uncompress()” in AS3 equivalent to in C#?

大憨熊 提交于 2020-01-07 08:24:29
问题 I am trying to convert a AS3 (ActionScript 3) function to C#. This ActionScript function contains a class called ByteArray which from what I am aware of it's basically what it sounds like lmao. I think it's kind of similar of how byte[] would be in C#. Anyway, I have tried my best to convert the code to C# using MemoryStream and then writing bytes to it, and then returning UTF8 string as you can see in my code below. However, I feel as if my way of doing how the ActionScript code does isn't

Save data into external files in AS3, with out server?

﹥>﹥吖頭↗ 提交于 2020-01-07 07:27:06
问题 HI How can I save some text information in local hard-disk with out the server support. I know shared object, but i dont use this. I need to save all these function in anther external file as text. Is there any way to do that in AS3.0 . I don't prefer Flex, am working in Action Script 3.0 & Flash IDE EDIT: My swf is saved in a local machine. So no server interaction or browser interaction. the swf is running a local folder and read txt files from local folder, and save once press the save

Get dominant or average color in getPixels ByteArray

久未见 提交于 2020-01-07 06:43:51
问题 So, I've got this code: import flash.display.BitmapData; import flash.display.Bitmap; import flash.geom.Rectangle; import flash.utils.ByteArray; var bmd:BitmapData = new BitmapData(10, 10, true); var seed:int = int(Math.random() * int.MAX_VALUE); bmd.noise(seed); var bounds:Rectangle = new Rectangle(0, 0, bmd.width, bmd.height); var pixels:ByteArray = bmd.getPixels(bounds); Is there a way to get, efficiently and quickly, the dominant color and/or the average color in pixels ByteArray. noise

How set for collision with other balls while ball is growing?

守給你的承諾、 提交于 2020-01-07 06:32:29
问题 I'm trying to stop grooving of ball and drop to bottom of the stage when it's hit to the other balls.But I can't. I tried set distance but it's not worked. I add a picture of the game And my code Enemy balls(green) touch each other fine.But not touch circle make by the mouse.Balls touch to black balls but not seeing touched massage.The touch message appear only when touch the mouse arrow. import flash.display.MovieClip; import flash.display.Stage; import flash.events.Event; import flash

Rotating the nearest rectangles

≯℡__Kan透↙ 提交于 2020-01-07 05:58:08
问题 The main code(init): package { import flash.display.Sprite; import flash.display.Bitmap; import flash.display.BitmapData; import flash.geom.Rectangle; import flash.geom.Point; import flash.events.Event; import flash.utils.Timer; import flash.events.TimerEvent; public class Init extends Sprite { var parts:Array, images:Array, w:Number = 20, h:Number = 80, numParts:int = stage.stageWidth / w, i:int, imgCount:int = 0, timer:Timer, rc:Number = 0, vr:Number = 10; public function Init() { init(); }

Loading array of display objects using shared objects in action script 3.0

你说的曾经没有我的故事 提交于 2020-01-07 05:53:30
问题 I'm trying to load an array that contain some display objects, the program lets me to populate the array with circles and save them to a shared object, then, I can trace the content of my array using the load button. The problem is that i can't load the array after that I restart my program. It traces me this message:"objects loaded: ,,," This is the code: var SO:SharedObject=SharedObject.getLocal("myFile", "/"); var arr:Array=new Array(); var counter:Number=-1; addBtn.addEventListener

Do I use AIR or native code for iOS application?

核能气质少年 提交于 2020-01-07 05:50:08
问题 I have been using Flex for desktop development for years. I'm new to mobile development and need to create an app for the iPhone 6 but have no idea whether I should be using Flex/AIR or native code. The requirements of the iOS app is as follows: Record video to local storage within app Playback video from local storage within app Pause/seek video within app Overlay controls on top of the video such as TextInput, TextArea and DropDownList so user can make notes as video is being recorded Data