actionscript

Flex 3 DataGridColumn HeaderText Localization

拜拜、爱过 提交于 2020-01-05 06:17:12
问题 I'm working in a multi-language application using ResourceBundle in Flex 3. I'm displaying data in a DataGrid and defined DataGridColumn headerText like this headerText="{localizedHeaderText('LABEL_USER_NAME')} this function returns the localized label for the username, but when I dynamcally select another language evertying gets refreshed but the headerText labels? Any thoughts? Thanks 回答1: Unless you make the localizedHeaderText method bindable, the binding will never be re-evaluated since

ActionScript 3 AIR — Video make blink jump

邮差的信 提交于 2020-01-05 04:17:05
问题 I make an application for iOS and Android using ActionScript 3 and Adobe AIR ( 3.7 ) to build the ipa and apk. In this application, I load a Video from an FLV and add it in the scene. The problem is, on the emulator or the Flash view, all is ok, but, on the iPad ( test on iPad 1, 2 and 3 with same results ) the video makes shorts jumps ( like a sudden freeze follow by a short jump into the time-line ) every 2 secondes, approximately. Of course, I make sure that the video wasn't under other

get the color of movieClip

跟風遠走 提交于 2020-01-05 04:10:09
问题 I want to get the color from the movieclip. I am Using Following Code: for (var j = 0; j <bmpd.width; j++) { for (var k = 0; k <bmpd.height; k++) { trace("0x"+bmpd.getPixel(j,k).toString(16)) } } Here Circle is a MovieClip.please guide me 回答1: To get a color on your MovieClip at a certain point or range, you should create a transparent BitmapData of required capacity (1x1 for point), fill it with 0x0 color, then create a transform matrix aligning (0,0) of BitmapData to upper left corner of

how do I find the number of xml children in AS3

蹲街弑〆低调 提交于 2020-01-04 09:19:33
问题 so live docs says this for calling .lenght() on an XML object For XML objects, this method always returns the integer 1. The length() method of the XMLList class returns a value of 1 for an XMLList object that contains only one value. i called it on an xml that looked like this: <xml> <picture>1</picture> <picture>2</picture> </xml> i tried myXML.lenght() and it reallt returned 1. how do i get the number of children in my xml? 回答1: Try var length:int = myXML.children().length(); Also, this is

how do I find the number of xml children in AS3

只谈情不闲聊 提交于 2020-01-04 09:18:21
问题 so live docs says this for calling .lenght() on an XML object For XML objects, this method always returns the integer 1. The length() method of the XMLList class returns a value of 1 for an XMLList object that contains only one value. i called it on an xml that looked like this: <xml> <picture>1</picture> <picture>2</picture> </xml> i tried myXML.lenght() and it reallt returned 1. how do i get the number of children in my xml? 回答1: Try var length:int = myXML.children().length(); Also, this is

Flash Audio Lag in Google Chrome

自古美人都是妖i 提交于 2020-01-04 03:49:31
问题 I'm currently working on a flash game and, at least on my machine, the audio seems to lag by a fraction of a second in Chrome, but not in IE or FF. This isn't a huge deal, the game is still playable, but it's a little bit annoying. Is there anything I can do from a development standpoint to fix this issue or is it something the user would have to fix? Edit: I've now tested it on two other machines and the same thing happened. The audio is delayed in chrome but not Firefox or IE. Edit 2: I've

Simple secure way for Flash to MySQL Database

雨燕双飞 提交于 2020-01-03 05:08:35
问题 Any simple, but secure script available for Flash > MySQL DB integration? I need something for a Login DB. Exchanging variables with PHP is nice and easy, but obviously insecure. via Remoting? I've got the Flash 8 remoting components installed, and some ideas: idea-1, idea-2. via NetConnection? Got some leads: lead-1, lead-2. Cold Fusion? Anybody has any ideas? Less likely solutions: via XML? Anybody has any idea how to use XML to connect to a DB? (AS2 or AS3) AMF-PHP is not possible for

Pass data from action script to javascript

家住魔仙堡 提交于 2020-01-03 05:05:23
问题 Does anyone know if I can pass data from flash (action script) to java script? If yes... how? (I need to send an ajax request with a text typed inside a textbox from actionscript). 回答1: You can use ExternalInterface to interact w/ JavaScript import flash.external.ExternalInterface; button_1.addEventListener(MouseEvent.CLICK, function(){ ExternalInterface.call("myFunc", "param"); }); for some reason i run into issues if i declare JavaScript tag type='text/javascript' . so i recommend using:

Actionscript Compiler directive

寵の児 提交于 2020-01-02 18:39:13
问题 I have an established pattern for lazy loading data from a server via AMF. private var _XeventDispatched:Boolean; private var _X:ArrayCollection; public function get X():ArrayCollection{ if(!_XeventDispatched && (_X==null || _X.length==0)){ var evt:Event = new Event();//whatever event is need for this data member dispatcher.dispatchEvent(evt); _XeventDispatched = true; } return _X; } public function set X(ac:ArrayCollection):void{ return _X; } This way the data is not loaded from the server

Actionscript Beginner [closed]

匆匆过客 提交于 2020-01-02 10:16:32
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I want to learn actionscript but I don't know wether to learn AS2 or AS3. Isn't AS3 an upgrade of AS2? I studied Lingo Scripts for