Flex Effects include "isPlaying" property to check whether Effect is currently playing or not. But is there a way to find out what is the direction of playback (whether the play was started with playReversedFromEnd)?
I have a clip of a small person 'flying', following the mouse coordinates. Its a 2d image facing a to one side. how I can determine when the mouse is moving right or left so that I can trigger the icon to 'flip' and face the other direction.
i have a scroller developed in as2. it basically scrolls continuously in a direction until the direction of the mouse is changed. the images of course loop in the continuous scroll. now the problem is that for 10-15 photos its ok. but when i feed it with 180 photos, it seems to show only 11. why would this be? any restriction on flash ??
have a ball with the name of mc which can be moved using the keyboard .. when you press the left mouse button shoots the ball, this ball and the other flies in the face where the cursor was in the shot .. but if you move the cursor to another location and shoot a second time then the second ball is also flying in the direction of the cursor and the first ball change direction toward a second shot ..
It's a bit of decoration to go behind a logo. When the dMove var is commented out I get the appropriate line of squares fading in and out at random spots along the x = 78 axis, but when introduced nothing appears at all...
With mx:Box I can set the direction to be either "horizontal" or "vertical". I'd like to reverse the order of the components in the box though. For example:
When one call Clipboard.generalClipboard.getData() in ActionScript outside of Event.PASTE processing function it fails with following message. The Clipboard.generalClipboard object may only be read while processing a flash.events.Event.PASTE event. Even if I dispatch Event.PASTE event and call this function within event handler it still fails. How does it determine which event is currently being processed?
Ref: spark.components.ButtonBar. In the spark ButtonBar's mouseOver event, how do you determine which of the several buttons the mouse is hovering over? There is, of course, no selected index at this juncture. If it makes a difference, my ButtonBar is not defined in MXML but is instantiated in ActionScript and an ArrayList is assigned to the dataProvider property of my ButtonBar instance.
Is there a way to take a compiled SWF file and figure out how much of it's size is used by code and how much is assets (images, etc)? I'd like to see if I can get my Flex SWF smaller but I'm unsure what's taking up the most space.
I wanted to know which event determines if an external video is loaded (using Action Script 3, Flex SDK 3.4 compiler and FlashDevelop -VideoEvent is not present here-).
I'm using a flash.media.video component
I've tried with NetStatusEvent.NET_STATUS and "NetStream.Buffer.Full" but it does not seem to work.
I am working on a Flex Front End at the moment, and have been using the Parsley framework for passing messages/events around.
I was wondering if there is a simple way for a function (in this case, an event's constructor) to obtain a reference to the object which called it?
This is to ensure that a certain event that I am defining can only be dispatched by one specified class. My thinking is to check the caller of the constructor somehow, and throw an error if it is not of the correct type.
I'm writing a helper class and I want it to be used in both flex and pure actionscript projects. For example:
public static function listenToPositionAndSize(control:DisplayObject):void { if (mxLibrariesSupported) { control.addEventListener(mx.events.ResizeEvent.RESIZE, onControlResize); control.addEventListener(mx.events.MoveEvent.MOVE, onControlMove);
[Code]...
EDIT: One simple reason to do this is: if you check the above example, I would prefer mx.events.MoveEvent.MOVE (if available) instead of flash.events.Event.ENTER_FRAME for performance issues.
I need a way to programmatically record what source files are consumed in an MXMLC compile.Ideally there would be a flag to pass to MXMLC to have it report the complete list of sourc files it is compiling, but there doesn't seem to be such a flag. It seems generally you just pass a main.mxml file to MXMLC and it goes off and compiles everything it needs to without telling you what it's doing. As far as I can tell, you also cannot explicitly list the files for it to compile; it will resolve references automatically and compile referenced sources without any way to control that behavior or report on it.
If the compiler cannot supply this information and a user cannot control this behavior, the only other option I can think of is write my own source code scanner for MXML that will traverse all the references in a code tree to give a report of what MXMLC should be compiling, though that's obviously error prone and certainly not something I'm looking forward to.
In general, I haven't yet found a definitive way to get Flex and Spark containers to size themselves relative to their children. I have searched for good documentation for this concept many times but have yet to find anything that sufficiently explains the concepts. A simple example of something I often want to do is to draw a border uniformly around a set of controls. The goal here would be to have all UI elements to size themselves automatically.
I would want the Labels to size themselves based on the text property, and the HGroup should be as big as needed to contain labels and BorderContainer should only just contain that HGroup. Now the more complicated example that I am working on now. I have a class that extends the BorderContainer. Within the class I create an HGroup with 5 Labels as children of the HGroup. Then the HGroup is added as a child of the ExtendedBorderContainer (using addElement() method).
Then the new class is used in the application as: <mx:ViewStack> <s:NavigatorContent> <my:ExtendedBorderContainer /> </s:NavigatorContent> <!-- more NavigatorContents here --> </mx:ViewStack>
I have tried various [max|min]height/width combinations and I can not get the desired layout, which is very tight borders around elements without extraneous space starting from the deepest Label children all the way up to the NavigatorContent.
I have this bit of code, and it's not working as I expected. btnContainer is a VBox that contains a ton of buttons (toggle=true); and I want to reset them to un-toggled at a certain point.
for (var btn:Object in btnContainer.getChildren()){ if (btn.isPrototypeOf(mx.controls.Button)){ btn.selected = false; } }
With the above code, "btn" shows up as just the index during each iteration of the loop (0,1,2,3,...), and the conditional never evaluates to true.I also tried this:
for (var btn:Button in btnContainer.getChildren()){ btn.selected = false; }
This works fine, except that there is also a label inside btnContainer; so it throws an error when trying to cast the label as a button.
What it says on the tin: I have an XMLList, and I want to find where in it a particular XML item falls. First index is good enough for my purposes. Note that I have no problem writing a function to do this by hand... but I was hoping that the API has something buried somewhere that'll do it for me. I didn't see it, though.
Adobe flash: How to determine users CPU characteristics? (its mhz, its current ocupation) I need to know how fast is users computer now, and I have only 150 ms for it. How to do such thing in actionscript?
Each system - whether it is win, mac, or linux - displays (desktop) icons at a user selected size (e.g., 16x16, 32x32, 48x48, etc.)How can I find which size is being used by the local system from within Flex or ActionScript3?
I have a custom component with a couple of text input fields (among other things) that is used as the row components in a tree. I have had to write my own drag and drop handling, and have almost finished the start handler (which I did last), using mouseDown as the event to kick if off.It basically works, but when the tree is expanded enough so that a scroll bar shows, using the scroll bar drags a row of the tree at the same time ! Not the desired behaviour.Looking in the debugger, I can see that when a row of the tree is dragged the currentTarget is the tree itself, and the target is the textInput component. Looking at the parents of that component I can see my custom component (that contains the textInput) a couple of levels up.My question is, is there an easy way to determine if this target is descended from my component, so that I can initiate a drag only if that is the case ? event.target is doesn't work by the way.
My application pops up help windows outside of flex on several occasions. I need to warn the user to allow pop ups from my app if they have the pop-up blocker on. Does anyone know how to determine this from inside of flex and then how to have the browser pop up the "allow pop ups from this site" thing after that?
I am trying to find the best way to improve the user experience when interacting with a context menu in a Flex application. I already know that the context menu in Flex is quite limited in terms of how it is constructed and what it can show.
What I was hoping to do was to implement something similar to what Microsoft Word does in 2010 or later, where when right clicking a little floating palette is displayed above the common popup menu. I was hoping that there was a way to 1) listen for an event that is triggered when a context menu is displayed, and 2) determine the location of the context menu so that I could display a floating palette above the context menu as in Word. So far, I have not found out how to accomplish either of these things.
I suspect that there might be some focus and stage management issues with this approach generally, but I was hoping to at least get to the point where those issues were discovered.
In Flex (Flash Builder 4) I am opening a new window via PopUpManager.addPopUp. I have timer code that runs in my component and I need to stop my timer when that window opens and start the timer again when the window closes.
I figure it's easy enough to stop the timer in the function that opens the window, but how can I start the timer again when the window closes?
Is there a way to tell if there is a pop-up window in front of my component, or if a specific pop-up window is still open via PopUpManager?
I am working on a sample map application using Flex 4/fxg? Now I have got FXG paths held in Group elements with id's( I have assigned path's id's to the corresponding group container)? But when I click anywhere in the map, I do not get the clicked group as target/currentTarget in event handler. How to determine which element is clicked?
I'm currently building a Flex 4.5 mobile project including several views and custom written MXML components that can be incorporated dynamically into those views.How do I determine which component currently has focus, namely has been activated by the user tapping on it? The background for this is a global search function in the main application. Depending on the results of this search, fields in the custom components are set. Given that I don't want all components in a view to listen to the outcome of that search function, I have to check which one is currently active.I'm trying to bind the selected object (the result from the search function) to the active component.