flash

Flex Datagrid - how to obtain item for mouse x/y coordinates?

怎甘沉沦 提交于 2019-12-30 12:25:29
问题 my mission is to select an item in a DataGrid instance with nothing but the coordinates on screen. We are implementing right-click functionality in our Flash application, with the goal of being able to right-click a DG row, which would select that row plus show a popup window containing some context commands. I have managed to get the right click event into my Flex app with the help of this site. Further progress so far has been to obtain the DataGrid instance via var objects : Array = this

Flex Datagrid - how to obtain item for mouse x/y coordinates?

微笑、不失礼 提交于 2019-12-30 12:25:11
问题 my mission is to select an item in a DataGrid instance with nothing but the coordinates on screen. We are implementing right-click functionality in our Flash application, with the goal of being able to right-click a DG row, which would select that row plus show a popup window containing some context commands. I have managed to get the right click event into my Flex app with the help of this site. Further progress so far has been to obtain the DataGrid instance via var objects : Array = this

AS3: Getting the scale of a Matrix object

十年热恋 提交于 2019-12-30 11:33:10
问题 Most often, questions are asked about how to scale a DisplayObject, and the answer is usually to use a Matrix. My question is, how to you GET the scale of a Matrix (scaleX and scaleY)? There's a Matrix.scale method to set the scaleX and scaleY, but it doesn't return a value, and no other properties exist to read it back. The reason I ask, I'm using object burried deep down into a Display list, and each may be transformed. So I use the child object's sprite.transform.concatenatedMatrix getter,

AS3: beginGradientFIll() doesn't make me a gradient!

*爱你&永不变心* 提交于 2019-12-30 11:29:28
问题 I'm trying to render a circle with a radial gradient but I can't seem to figure it out. var bkgdGrad:Shape = new Shape(); bkgdGrad.graphics.beginGradientFill(GradientType.RADIAL, [0x0000FF, 0x00FF00], [1, 1], [0, 255],null,"pad"); bkgdGrad.graphics.drawCircle(0,0,r+200); bkgdGrad.graphics.endFill(); this.addChild(bkgdGrad); The above code renders a solid green circle for me. If I change the array after the colors to [1,0] (the alpha array) I get a transparent fill. I can't seem to get flash

Actionscript memory management, garbage collection

我与影子孤独终老i 提交于 2019-12-30 11:18:10
问题 This blog (and others) state that you should set object references to null inside your dispose() methods when cleaning up objects. However, Actionscript 3 (with Flash Player 9) uses mark and sweep to clear out circular references for you. So I am wondering: is there really any reason to null out your object references? 回答1: I never do - as long as you do the obvious: Break all reference to the object (remove from arrays, set variables storing the object to null, remove from display list)

android WebView stop Flash plugin onPause

时间秒杀一切 提交于 2019-12-30 10:47:12
问题 I have a WebView that contains a html file that contains a Flash plugin (a video). When the user presses play on the Flash plugin, the video plays fine. However when the user closes the app or moves to a new Activity, the Flash is still playing in the background. Going back to the view appears to create a new thread with the Flash plugin running on it. How can we stop the Flash plugin running onPause? Thanks 回答1: I ran into the same issue. The following worked for me: @Override protected void

Flash toggle button

非 Y 不嫁゛ 提交于 2019-12-30 10:29:41
问题 I need a button in Flash/AS3 that toggles between on and off. So I was glad to see that the Button class has the toggle property that lets me have that behavior. I was less happy to see that what I get when I make something a "button" in the Flash file is an instance of SimpleButton class, which does not have that option. Is there a way to either get a Button instance from the .fla, or get the SimpleButton to behave as a toggle? 回答1: Here's how I coded my way around this: private buttonState

When should HTML5 video fall back to Flash player?

﹥>﹥吖頭↗ 提交于 2019-12-30 10:04:39
问题 I'm working on implementing a fallback mechanism for the HTML5 video player. I've got a way to replace it with the swfobject Flash player, but how should I detect if any issues have developed? In other words, if we use the following list of error events that can be thrown, which one should trigger the Flash player replacement? Or should we simply do a replacement if any error is thrown? Also, where should the onError handler be called? I'm thinking on the video tag, but want to make sure.

When should HTML5 video fall back to Flash player?

久未见 提交于 2019-12-30 10:03:05
问题 I'm working on implementing a fallback mechanism for the HTML5 video player. I've got a way to replace it with the swfobject Flash player, but how should I detect if any issues have developed? In other words, if we use the following list of error events that can be thrown, which one should trigger the Flash player replacement? Or should we simply do a replacement if any error is thrown? Also, where should the onError handler be called? I'm thinking on the video tag, but want to make sure.

Flash & Flex SDK/AS3 - How to keep keyboard focus?

我的未来我决定 提交于 2019-12-30 09:54:07
问题 I'm writing a flash application in Flex/AS3, and I can't seem to assign keyboard focus to it. I was mindful of this problem early on in development and added a splash screen with a "play now" button, to entice the user to click. However, the user must then click a second time on the application for the keyboard to work! To make matters worse, I have an in-game shortcut that returns you to the main menu. If you return to the main menu then click the "play now" button, the SWF loses focus again