actionscript

What flash events can interrupt a mouse_up event, and how do I detect them?

你说的曾经没有我的故事 提交于 2019-12-11 07:08:15
问题 The simplified code: //triggered on MouseEvent.MOUSE_DOWN private function beginDrag(e:MouseEvent):void { stage.addEventListener(MouseEvent.MOUSE_MOVE, drag); stage.addEventListener(MouseEvent.MOUSE_UP, endDrag); stage.addEventListener(Event.DEACTIVATE, endDrag); contextMenu.addEventListener(ContextMenuEvent.MENU_SELECT, endDrag); } private function drag(e:MouseEvent):void { //do stuff } private function endDrag(e:Event):void { stage.removeEventListener(MouseEvent.MOUSE_MOVE, drag); stage

Flex DataGrid/DataProvider bug?

你离开我真会死。 提交于 2019-12-11 07:05:52
问题 Creating a datagrid and dataprovider, if the dataprovider contains 2 of the same value ({"A","A","B"}), when you hover over any of the rows containing "A" all rows containing "A" will also get highlighted. Anyone else notice this issue? 回答1: Whydna you are on the right track with the post you shared http://jonathanbranam.net/solutions/datagrid-highlights-wrong-row. The reason this is confusing flash/flex is that the datagrid uses equality to determine when it has found a match for a row. This

Random Pixels Blink White for 1/60th of a Second

♀尐吖头ヾ 提交于 2019-12-11 06:33:37
问题 I am trying to make single pixels flash for 1/60th of a second and then go away over a 2 second period of time until every single pixel on a 1280x720 screen has flashed white. After 2 seconds have elapsed the screen is all black again for 3 or so seconds before it loops and does it again. The way I solved it was using this fla another stackoverflow user came up with and I modified that uses movie clips. The problem is it doesn't work to get 921600 movie clips to start randomly. It gets really

Flex 4: Accessing public method in main application from component

被刻印的时光 ゝ 提交于 2019-12-11 06:23:55
问题 I need to be able to call a method from a component located under the main application in Flex 4. Can anyone tell me please how to do this without using FlexGlobals please? Sample code is attached. Thanks in advance. // TestApp.mxml (application) <?xml version="1.0" encoding="utf-8"?> <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" creationComplete="initApp()"> <fx:Script> <![CDATA[ import

referencing the html object that made the ExternalInterface.call to the javascript function called

穿精又带淫゛_ 提交于 2019-12-11 06:17:59
问题 i apologize if my terminology is off, my actionscript skills are pretty weak sauce. so, i have some actionscript that makes a ExternalInterface.call('someFunction'); call. is it possible to reference the html object that made the call to someFunction directly using the ExternalInterface.call call? Assume that the object that makes the call also has some Callbacks (via ExternalInterface.addCallback) that are accessible via javascript. Currently: Actionscript source ExternalInterface.call(

How to find AS code in FLA file

≡放荡痞女 提交于 2019-12-11 05:53:21
问题 So one programmer maded a flash app, but when i open it whit adobe flash, i'can find any code inside, but the application works, i've tried to see in the frames actions, but nothing, the library is only with movieclips, any ideas please? 回答1: SWC libraries contains AS classes as well. There are some explorers for SWC files, for example Flash Builder 4.6 supports it. You can also rename *.swc file to *.zip and check the catalog.xml file for class names and use any swf decompiler for browsing

How do I detect that Drag and Drop operation ended?

試著忘記壹切 提交于 2019-12-11 05:23:16
问题 This is in reference to My Other Question How do can you detect and dispatch an event when a drag and drop operation ends prematurely? I need to know that the user is no longer dragging an item. Even if the dragDrop and dragComplete events do no fire. Its almost as if I need to add an event listener to the dragManager, but that's not really possible... is it? 回答1: It looks like basically you need to be able to tell if the DragManager craps out. Even if there was an ERROR event in the drag

ItemRenderer height (and height changes) not reflected in AdvancedDataGrid row

寵の児 提交于 2019-12-11 05:18:15
问题 I have an AdvancedDataGrid with variable row height set to true. I have written a cutsom item renderer based on the DataGroup spark component. Each row in the grid has multiple entities to display, the x position and width of the entites are based on the data of the entity itself. I have a custom layout written for the DataGroup that measures and posistions each entity based on its data. Each entity in each row can either truncate or not truncate its label. When the labels are not truncated,

Bug in Louisiana Economic Development Ad?

ぐ巨炮叔叔 提交于 2019-12-11 05:14:58
问题 I was reading the June 2011 issue of Wired magazine the other day, and I came across an ad for Louisiana Economic Development, presumably written in ActionScript. I originally thought that it was a clever ad, but after looking into it, it seems like there's a fairly obvious bug in the code. Is it just me, or should that break be a return ? 回答1: I'd call it a bug, since the desired outcome would most likely be to navigate to the URL if any one of those interests is held and do nothing if none

Change the height of a movieclip from a registration point

耗尽温柔 提交于 2019-12-11 05:07:52
问题 Is there a way to extend only the bottom part of a dynamic Movieclip? I tried to change the height or to scale my mc but it always makes the change relativity to the center of the Movieclip. I guess I should define a registration point and change the height according to it but i'm not sure of how to do it. Hope someone can guide me. Thanks. 回答1: http://www.flashwonderland.com/transformation-matrix/transformation-matrix-2.html You can use matrix transforms to achieve that effect. for a scale