actionscript-3

Passing an ActionScript JPG Byte Array to Javascript (and eventually to PHP)

最后都变了- 提交于 2019-12-24 19:33:44
问题 Our web application has a feature which uses Flash (AS3) to take photos using the user's web cam, then passes the resulting byte array to PHP where it is reconstructed and saved on the server. However, we need to be able to take this web application offline, and we have chosen Gears to do so. The user takes the app offline, performs his tasks, then when he's reconnected to the server, we "sync" the data back with our central database. We don't have PHP to interact with Flash anymore, but we

Calling Php Script with UTF-8 POST variables

故事扮演 提交于 2019-12-24 19:33:37
问题 AS3 documentation says that Strings in AS3 are in UTF-16 format. There is a textbox on a Flash Clip where user can type some data. When a button is clicked, I want this data to be sent to a php script. I have everything set up, but it seems that the PHP script gets the data in UTF-16 format. The data in the database (which is utf-8) shows some unrecognizable characters (where special characters are used), meaning that the data has not been sent in a correct encoding. var variables

Flex - does anyone have an example of the use of the VideoDisplay control events

て烟熏妆下的殇ゞ 提交于 2019-12-24 19:30:02
问题 The Flex 3 docs are fairly basic. Can someone post a more complete example that uses the control's events? I'm still trying to get my head around ActionScript events. 回答1: You could find an interesting article concerning stateChange & playheadUpdate events on http://blog.flexexamples.com/2008/01/01/determining-a-videodisplay-controls-current-playback-state-using-the-state-property-and-statechange-event/ For a more complex example, take a look at the FXVideo component source code (in main unit

as3 can't set checkbox label - need to know when it is loaded

家住魔仙堡 提交于 2019-12-24 19:17:36
问题 We have a fla, and under "Advanced Actionscript Settings", we have "Automatically declare stage instances" UNchecked. We then have a bunch of these declarations at the class level of our document class: public var spouseCheck:CheckBox; If I set spouseCheck.label = "blah" in my constructor, it does not work. However, if I set it later, (when another event happens), it does work. This implies that the checkbox is completely loaded at that time. How can I put an event listener on the checkbox so

Should DispatchEvent be the last statement of a function?

微笑、不失礼 提交于 2019-12-24 19:16:00
问题 Should dispatchEvent must be the last statement of any function ? 回答1: When you call dispatchEvent, all handlers for that event are immediately called before the rest of the function body where dispatchEvent was called runs. Does that mean that you need to call dispatchEvent as the last thing in a function body? Only if the code that is after the dispatchEvent call somehow depends on something that will be adversely changed when the handlers run. 回答2: Absolutely not, dispatchEvent() can be

NetStream.seek() for mp4 to exact position not keyframe

眉间皱痕 提交于 2019-12-24 18:56:57
问题 It seems seek() on mp4 file seeks to the closest keyframe (seekpoint). Is it possible to seek to exact position in between of keyframes? Thanks! 回答1: It does in fact seek to the nearest key frame. If you want to be able to seek to more specific parts of the stream you'll need to add more key frames. Of course more key frames usually results in larger file size. Good luck! 来源: https://stackoverflow.com/questions/3338795/netstream-seek-for-mp4-to-exact-position-not-keyframe

Trouble with insertChildAfter for xml in actionsctipt 3

僤鯓⒐⒋嵵緔 提交于 2019-12-24 18:53:01
问题 I'm having a lot of trouble with inserting a child after an existing node that is VERY nested in my XML. I'm trying to insert another IObject node beneath object3_LIST3. I've tried the same scheme as Having trouble with insertChildBefore and insertChildAfter in AS3 with this. This always outputs undefined and I can't seem to figure out why.. Can anyone help? If I trace contentNode and parentNode, it outputs: object3_LIST3 and <objects> <IObject>object3_LIST3</IObject> </objects> As if no

How to access children of children recursively?

帅比萌擦擦* 提交于 2019-12-24 18:35:14
问题 I have a Canvas which has many components inside it and those again, have many components inside them. getChildren() returns only the top level children. What is the best way to retrieve all the children (children of children of children and so on). Well, I sorta know how to do this by iterating through the children, but the code is really messy. I'd prefer to use a nice recursive function. Has anyone written this before? Or is there a Util class to do this? 回答1: private function recuse

Add a button to save the picture in AIR or AS3

被刻印的时光 ゝ 提交于 2019-12-24 18:26:53
问题 I have a file attachment here. I tried I try to add a button for interface to download the image in the phone folder in AIR or AS3 Or make a photo wallPaper for phon. Can anyone help me?? And experience it in the attached file . 来源: https://stackoverflow.com/questions/29915396/add-a-button-to-save-the-picture-in-air-or-as3

AS3 concatenate rtmp connection string from xml between two functions

旧城冷巷雨未停 提交于 2019-12-24 18:23:44
问题 I keep getting a 'null' for the instance of the application under flash media server. I can't seem to pass the value from one function to another function XML Sample <bsettings> <obj title="instance">19046</owner> <obj title="id">uniqueid</owner> <obj title="name">somename</owner> <obj title="date">08/01/2012</owner> <obj title="gender">female</owner> </bsettings> AS3 Code <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" applicationComplete="initConnection(event)">