actionscript-3

MD5 of String in ActionScript returning incorrect results when some hex is part of the string( ie“abc\xBF\x4E”)

旧时模样 提交于 2019-12-24 18:16:08
问题 I am trying to MD5 a string in ActionScript using the MD5 algorithm that was created by Adobe and is part of AS3corelib. (http://as3corelib.googlecode.com/svn/trunk/src/com/adobe/crypto/MD5.as). I am comparing this to an MD5 created in php that I know is correct. If I create MD5s using AS and PHP for say a string like "abcd1234" they both are equal, as is to be expected. The problem is, when my string contains some hexadecimal in it ie "abcd\x28\xBF\x4E", the MD5s from ActionSCript and php

Flex: Special-casing an item in a list or menu?

◇◆丶佛笑我妖孽 提交于 2019-12-24 18:16:06
问题 I've found it's often useful to special case the first item in a drop-down menu (ie, an instance of Menu). For example, if I want to pick a color from the list provided by a web service: <mx:PopUpMenuButton id="colorSelelector" dataProvider="{colorsService.lastResult}" /> I might also want a special-case, which is "enter a new color", allowing the user to enter the RGB values for a new color which isn't in the list. For example: var newColor = { label: "Enter a new color", rgb: null }; Then

Flash receiving status of file write from PHP?

陌路散爱 提交于 2019-12-24 18:12:56
问题 I am trying to make a simple Flash ActionScript3 program that saves some text to a text file (on my server) via a PHP script. I want the Flash program to be able to detect if the PHP script fails to write. Right now I'm just trying to get Flash to trace a status received from PHP. My below code is based on a few examples I've found online. Here is my Flash code: import flash.net.*; import flash.events.*; var varLoader:URLLoader = new URLLoader; var varURL:URLRequest = new URLRequest("http:/

As3 flash error “Cannot access a property or method of a null object reference”

杀马特。学长 韩版系。学妹 提交于 2019-12-24 17:43:10
问题 im trying to do a couple of basic games on flash that consist in random numbers but im receiving this error every time i run my scene: TypeError: Error #1009: Cannot access a property or method of a null object reference. at capacitacion_fla::MainTimeline/frame1() TypeError: Error #1009: Cannot access a property or method of a null object reference. at capacitacion_fla::MainTimeline/frame1() at flash.display::MovieClip/gotoAndStop() at capacitacion_fla::MainTimeline/fl

As3 flash error “Cannot access a property or method of a null object reference”

断了今生、忘了曾经 提交于 2019-12-24 17:41:48
问题 im trying to do a couple of basic games on flash that consist in random numbers but im receiving this error every time i run my scene: TypeError: Error #1009: Cannot access a property or method of a null object reference. at capacitacion_fla::MainTimeline/frame1() TypeError: Error #1009: Cannot access a property or method of a null object reference. at capacitacion_fla::MainTimeline/frame1() at flash.display::MovieClip/gotoAndStop() at capacitacion_fla::MainTimeline/fl

Flash Player 10.1 for Flash Professional CS4 playerglobal.swc?

不羁岁月 提交于 2019-12-24 17:27:28
问题 Adobe released projector, debugger and plugin for Flash 10.1 yesterday. on my Mac i've installed the standalone player and debugger in Adobe Flash CS4/Players/ and Adobe Flash CS4/Players/Debug respectively. however, i think i need to download the globalplayer.swc for 10.1 so that Flash CS4 IDE is directed to use the new players. i've searched but i could only find the globalplayer.swc that was released during the 10.1 betas, and i'm not sure if that's the .swc i should use for the final 10.1

php/as3 regex to split multiple json in one

跟風遠走 提交于 2019-12-24 17:24:36
问题 For example I have this string of 2 json objects: {"glossary": {"title": "example glossary"}, "aaa": "1212"}{"adada": "faka"} I want to split it in the array for PHP and Actionscript 3 Array ( [0] => '{"glossary": {"title": "example glossary"}', [1] => '{"adada": "faka"}' ) What is the best method to do it. Edit: I don't need answer how to parse json. To simplify I need to split {...{..}....}{....}{........} into {...{..}....} {....} {........} 回答1: either you modify a JSON parser to do it,

AS3 - Access MovieClip from stage within a class

坚强是说给别人听的谎言 提交于 2019-12-24 16:42:30
问题 I have been stuck on this for a long time and have looked at past questions on here about this similar issue such as this post: How do I access a movieClip on the stage using as3 class?. I use the constructor to listen for the ADDED_TO_STAGE event, and then initiate the main function to set up the eventListeners from the ADDED_TO_STAGE handler. Within the same handler I also try to get a MovieClip from the stage using the following code: player = stage.getChildByName("player") as MovieClip;

What is the null-object error with this AS3 code for loading external swf?

岁酱吖の 提交于 2019-12-24 16:33:37
问题 I am getting a null object error when I add the mouse event listener for the log in button. (Look at the comments in the constructor) I am using Flash CS6, and objects such as logInbutton and screen_log_in are instance names from the .fla file. This here is the .as file. Error I get is: TypeError: Error #1009: Cannot access a property or method of a null object reference. at actions::indexPage() My AS3 code: package actions { import flash.display.MovieClip; import flash.events.Event; import

recombine split TCP packet with flash sockets

有些话、适合烂在心里 提交于 2019-12-24 16:22:27
问题 I have a program in c++ that sends a socket of 23723 bytes to a flash player in one "shot". The flash player sometimes receives two packets of size 17520 and 6203, and other times it receives a single packet of 23723. EDIT: There does not seem to be a way to obtain the total number of bytes associated with the send data from flash. This would make it very difficult to build a loop to reconstruct the "broken" packet. I thought TCP was supposed to correctly recombine the packets and I am having