actionscript

actionscript 3.0 transparent image floodfill

半世苍凉 提交于 2019-12-24 00:47:20
问题 I want to use bitmapData.floodfill() method to fill the image by using "onclick" event (like paint bucket does). But the problem is that this method doesn't work as i excepted when i use transparent images(png, gif). It will only fill using white color(or alpha=0 as i think) when i use something different (like blue, red, etc). This is how it looks when i fill Jerry mouse with red color clip2net.com/s/2nW65 and here is the example i used with Embed image: var container:MovieClip = new

Hosting games locally with Flash?

江枫思渺然 提交于 2019-12-23 18:37:03
问题 I just can't find the right Google search terms for this... Is it possible to use Flash (or a Flash compatible service) to allow players in a game to host their own games (using their own bandwidth), through a web browser? In a way, to run their own game servers (for a Flash in-browser game) from their computer, but through a web browser using Flash? If so, any recommendations? Thanks in advance for any help! 回答1: I am guessing that you want to make some kind of "game room" on which users can

Is there a way to subclass and override a method that is in a custom namespace?

蓝咒 提交于 2019-12-23 18:04:27
问题 Say I have a class with a method defined in a namespace other than public, protected or internal... package com.foo.bar { import com.foo.my_name_space public class bar { private var _vabc:String private var _v123:String protected function set123(val:String):void{ _v123 = val; } my_name_space function setABC(val:String):void{ _vabc = val; } } } Now I want to extend and override this in a subclass... package com.foo { import com.foo.bar.bar import com.foo.my_name_space public class foo extends

Actionscript 3 and dynamic masks

守給你的承諾、 提交于 2019-12-23 17:56:52
问题 I have a container MovieClip that serves as a content area that I need to mask off. When I create a mask inside this container using a Shape I can't seem to interact with the contents of other containers I create here, like buttons etc. This is what I'm doing in code (I've left out all the import's etc.): class MyContainer extends MovieClip { protected var masker : Shape = null; protected var panel : MyPanel = null; public function MyContainer() { this.masker = new Shape(); this.masker

How to protect swf file from being decompiled?

一世执手 提交于 2019-12-23 15:46:27
问题 I'm working on important project using Flex framework and i want to keep my algorithms and code secret. Is it possible to somehow protect swf file from being decompiled? I don't want someone extract my code using flash decompilers. Thanks. 回答1: While there is no full-proof way to secure code from decompilers there are some tricks to reduce the chances of this happening. host the .swf on a https server then it doesnt get cached You can obfuscate the code to make it impossible to understand

Add search icon inside spark TextInput in Flex

对着背影说爱祢 提交于 2019-12-23 15:41:10
问题 I want to add search icon inside the spark TextInput control. Is there a way by which I can extend the TextInput control and add a child to it. Thanks 回答1: You shouldn't extend TextInput itself. The main power of Spark architecture is skinning possibility. You can create your own skin based on standard TextInputSkin and place icon there. I think there will not any problems. 回答2: I faced the same problem wanting to get a search icon in a spark TextInput. It was very simple to copy the existing

Possible to control SWF through Javascript?

感情迁移 提交于 2019-12-23 15:15:38
问题 Here's the situation: Client wants a looping SWF file to pause for two seconds before it begins playing all over again (it's a nice build animation on a logo, but the logo doesn't stay on the screen for very long because the movie repeats so users can't see the logo for long. This is irrelevant, but good back story.) They provided me with a SWF file, but not FLA. When I asked for the FLA I was told the hard drive that contained the FLA crashed and it cannot be retrieved. So, that is pretty

AS3, loading in a SWF as a custom type

假如想象 提交于 2019-12-23 12:57:25
问题 Fundamental question here. Typically in AS3 you load in a SWF via the Loader, and what you get is some sort of pseudo MovieClip that is of type "Loader". Is there any holy way under the sun to cast this loaded SWF to a custom type that extends MovieClip and not Loader, assuming the SWF was published with a base class of the custom type? Without data loss? Alternatively, let's say you can't, can you even cast it from a custom type that extends Loader itself? 回答1: You can do something like this

Permissions not showing while installing apk

馋奶兔 提交于 2019-12-23 12:34:29
问题 I'm making an Android app with ActionScript using FlashBuilder. I need to use The WiFi permission for my app. The application works on desktop with no problems(AIR Desktop project). Now when I tried to make it for Android(Mobile Project), it showed me no errors. I enabled the permissions I needed (Network and wifi) and made the .apk file. However, when I install the .apk file on my Android 6.0.1 device(Note 5) it claims that the app asks for no permissions. I decided to ask for all the

swfloader: can I catch all the exceptions from the loaded swf?

佐手、 提交于 2019-12-23 06:02:14
问题 I am loading a swf into another swf using swfloader, I want to catch all the exceptions thrown by the inner swf, is it doable? 回答1: Here are some basics that may help. In short, you cannot use try/catch here. Errors in loading external content cannot be caught with try..catch..finally statements. Instead you have to create event handlers to handle and “catch” the error events. If you do not have an event listener assigned to an error event and that error occurs, the Flash player will inform