actionscript-3

How can I get the background color of a loaded swf file?

£可爱£侵袭症+ 提交于 2019-12-29 07:22:10
问题 I'm loading an swf file into my main application using URLLoader, I want to get the background color of the loaded swf file. ( I heard that one solution wold be reading the byte code of the loaded swf ) 回答1: Yes, You need to look into binary swf data. Here is brief description of swf format. And this is a little detail about different kind of tags. Your requirement is to find out SetBackgroundColor tag(tag type = 9), which commonly is either first or second tag of the swf. Bytes in swf file

How can I get the background color of a loaded swf file?

笑着哭i 提交于 2019-12-29 07:21:31
问题 I'm loading an swf file into my main application using URLLoader, I want to get the background color of the loaded swf file. ( I heard that one solution wold be reading the byte code of the loaded swf ) 回答1: Yes, You need to look into binary swf data. Here is brief description of swf format. And this is a little detail about different kind of tags. Your requirement is to find out SetBackgroundColor tag(tag type = 9), which commonly is either first or second tag of the swf. Bytes in swf file

What are some reliable Flash obfuscators? [closed]

萝らか妹 提交于 2019-12-29 07:14:17
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I'm creating a game in Flash that submits high scores to a server. While I'm planning to take several precautions on the server-side to prevent tampering, the weak link in the chain is Flash itself. Using cheating tools, players can monitor and adjust variables in memory. I realize that most Flash/SWF

Fast or asynchronous AS3 JPEG encoding

天涯浪子 提交于 2019-12-29 07:05:31
问题 I'm currently using the JPGEncoder from the AS3 core lib to encode a bitmap to JPEG var enc:JPGEncoder = new JPGEncoder(90); var jpg:ByteArray = enc.encode(bitmap); Because the bitmap is rather large (3000 x 2000) the encoding takes a long while (about 20 seconds), causing the application to seemingly freeze while encoding. To solve this, I need either: An asynchronous encoder so I can keep updating the screen (with a progress bar or something) while encoding An alternative encoder which is

MouseWheel in Chrome and Firefox

两盒软妹~` 提交于 2019-12-29 04:26:07
问题 I'm trying to handle the mouseWheel event in an advancedDataGrid with not success. Without any additional code my adg can be scrolled with the mouse in IE but not in firefox and Chrome, why? Why does it behave different in those browsers? Then I tried this code but it does not work: protected function adgMouseWheelHandler(event:MouseEvent):void { event.delta = event.delta > 0 ? 1 : -1; } and then setting the event mouseWheel in my adg like this: <mx:AdvancedDataGrid id="myADG" width="100%"

MouseWheel in Chrome and Firefox

≡放荡痞女 提交于 2019-12-29 04:26:02
问题 I'm trying to handle the mouseWheel event in an advancedDataGrid with not success. Without any additional code my adg can be scrolled with the mouse in IE but not in firefox and Chrome, why? Why does it behave different in those browsers? Then I tried this code but it does not work: protected function adgMouseWheelHandler(event:MouseEvent):void { event.delta = event.delta > 0 ? 1 : -1; } and then setting the event mouseWheel in my adg like this: <mx:AdvancedDataGrid id="myADG" width="100%"

how do I replace all the links in a text using regex in as3? [duplicate]

亡梦爱人 提交于 2019-12-29 02:01:13
问题 This question already has an answer here : Closed 7 years ago . Possible Duplicate: How do I linkify text using ActionScript 3 I am using a regular expression to find links in a generic string and highlight that text(underline, a href, anything). Here's what I have so far: var linkRegEx:RegExp = new RegExp("(https?://)?(www\\.)?([a-zA-Z0-9_%]*)\\b\\.[a-z]{2,4}(\\.[a-z]{2})?((/[a-zA-Z0-9_%]*)+)?(\\.[a-z]*)?(:\\d{1,5})?","g"); var link:String = 'generic links: www.google.com http://www.yahoo

AS3 Textbox Change Event Not Firing

六眼飞鱼酱① 提交于 2019-12-29 01:44:13
问题 I built a quiz game with a cartoon question bubble. The bubble is re sized to the length of the question. I want to a change event on the dynamic textbox to call a function that changes the size of the question bubble. However, the change event is never called when my textbox value is modified dynamically from code. question_txt.addEventListener(Event.CHANGE, setTextBubbleSize); function setTextBubbleSize(event:Event):void { trace("QUESTION TEXT CHANGED"); textBubble_mc.height = 30 + question

Difference Between Single and Double Quoted Strings in ActionScript

旧巷老猫 提交于 2019-12-29 01:35:10
问题 Is there any difference between single and double quoted strings in ActionScript? 回答1: You can use either as delimiter for a string. They are however not interchangeable, i.e. you can't start a string with an apostrophe and end it with a quotation mark. The only difference is which characters you need to escape. Inside a string delimited by quotation marks you need to escape quotation marks but not apostrophes, and vice versa. To put the text He said "It's all right" and laughed. in a string

How to decode Json using native JSON or actionjson in Flex 3

痞子三分冷 提交于 2019-12-28 12:45:22
问题 I have the below Json (wf.json) { "workflow":{ "template":"Analysis1", "start":{ "instance":"HDA_run1", "user":"symtest", "date":"3-Mar-2012", "timestamp":"1330948220475" }, "host":{ "name":"bartla", "user":"symtest1", "password":"symtest1", "installpath":"", "product":"" }, "javadump":{ "pid":"8989", "corefilename":"", "heapdump":"", "stack":"", "JAVA_HOME":"" }, "mat":{ }, "email":{ "to":"ars@gmail.com", "subject":"", "message":"" }, "end":{ } } } As you can see there are 7 items (or sub