actionscript-3

Running the Flash Player over long time period

僤鯓⒐⒋嵵緔 提交于 2020-01-05 04:58:11
问题 Hi I'm looking into the issues to expect if the Flash Player (version 10) is run over a long period of time, say 24+ hours. I know that the player has issues with not performing garbage collection properly, and that the weak listener system is buggy. I plan on having the flash app started/monitored using a watchdog/sentinal app written in C/C++/C#. So I plan on refreshing the app periodically. Does anyone have recommended practices for running a flash player over that sort of time scale? 回答1:

Replacing ScrollPane Scrollbar with OS Native Scrollbar

北慕城南 提交于 2020-01-05 04:36:08
问题 Is there an easy way to replace the ScrollPane scrollbar with the OS's native scrollbar? Flash applications look much more integrated if they have the same skinning as the user's operating system -- which isn't always easy to detect (Vista Aero vs. Classic?). Have you guys come across any examples of Flash apps doing this? 回答1: To set up something like this would be a big and dirty job. If you're that concerned with OS look-and-feel integration, you're probably better off using native browser

Flex custom button component

纵然是瞬间 提交于 2020-01-05 04:22:09
问题 I want my custom button to look like the button sample below. More specifically, I want the width of the button to be determined by the width of the largest word in the label (i.e. width of "Elongated" in my example). The label must wrap, not truncate. And I want only one pixel between the top edge of the icon and my button's top edge. I have tried lots of things but to no avail so far. I have reduced the horizontalGap and verticalGap to zero and padding to zero. But still nothing. Please

how to disable garbage collector as3 [duplicate]

纵然是瞬间 提交于 2020-01-05 04:21:11
问题 This question already has answers here : disable GC in AS3 (2 answers) Closed 6 years ago . so, I am making really enormous project with as3, and I`d like to know how to disable garbage collector, as user might be on for long and I dont want him or her to just be cut off because garbage collector removed some listener somewhere that should be now needed. is there easier way to disable garbage collector than go to every single listener and add "false, 0, true" extension after naming the

Anyone able to translate sIFR into AS3 (for hyphenation and with the help of a converter)?

[亡魂溺海] 提交于 2020-01-05 04:12:09
问题 One thing asked for a lot with sIFR is hyphenation. Now I almost solved it with integrating Hyphenator.as http://vis4.net/blog/2010/05/as3-hyphenation/. The only problem is that Hyphenator.as is written in AcionScript 3, while sIFR is in ActionScript 2. I found an AS2 to AS3 converter www.5etdemi.com/blog/archives/2006/11/as2-to-as3-converter-createtextfield-geturl-handling/ but the result examples.bezel.be/sIFR-as3.as is not working yet. Anyone able to contribute to making hyphenation work

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

Recursive iteration through every component instance

喜欢而已 提交于 2020-01-05 04:08:31
问题 I have various custom component instances in my flex app. I want to loop through them recursively and get their instance Ids. The recursive part is very important to me. Can someone tell me what's the best way to do it? I have tried doing this, but it didn't do recursive: for each (var myItem:* in this.MasterContainer.childDescriptors) { trace(myItem.id); } 回答1: This will do it: private function findControlsRecursive(current:DisplayObjectContainer, controls:ArrayCollection):void { for(var idx

How can I enlarge video fullscreen without the affected interface project in as3?

半世苍凉 提交于 2020-01-05 03:06:33
问题 I have a problem I do not know how to correct it. I want to work a full-screen in my project. But the video of the entire screen, and I want to show the entire video of the screen appears when you click the button on the control panel only video of a button. Do not know the solution to the problem I want to help me. I USE this code in AS3: stage.displayState = StageDisplayState.FULL_SCREEN; stage.scaleMode = StageScaleMode.NO_SCALE; Example: https://drive.google.com/file/d

AS3 PNG Encoder?

[亡魂溺海] 提交于 2020-01-05 03:03:37
问题 Is there a way to encode bitmap data into PNG for use with a FileReference.Save() method in AS3? I assume I need an encoder library. Where can I get a library that encode BitpmapData into PNG? 回答1: You're looking for: https://github.com/mikechambers/as3corelib There are probably other solutions, but this is widely used and well tested. I've used it myself on several occasions without issue. 回答2: Shameless plug! I just wrote a new PNG encoder called PNGEncoder2. It's extremely fast, offers

Connecting lines (while dragging) in Flex/Actionscript

若如初见. 提交于 2020-01-04 17:29:48
问题 I have a mx:Canvas element that contains several mx:Panel elements. I want to be able to draw a line connecting two such mx:Panel's in such a way that the line continues to connect the two mx:Panels when one or both get dragged around. It seems like something that should be trivial to do, but I haven't been able to figure it out. In effect, this is the problem. alt text http://img150.imageshack.us/img150/5656/ishot1eu3.jpg Since the updates only occur when the Panel reaches it's final