Here’s a quick way of restarting your Flex Application without reinitializing everything through a function
navigateToURL(new URLRequest(Application.application.url), ‘_self’);
Here’s a quick way of restarting your Flex Application without reinitializing everything through a function
navigateToURL(new URLRequest(Application.application.url), ‘_self’);
→ No CommentsTags:
In order to change the mouse cursor to a hand cursor when a mouse over a particular component in Flex Component you will need to set useHandCursor = true , however if you set this to true you will not be able to get the hand cursor unless you set another two properties on the Flex component , buttonMode = true and mouseChildren = false.
Here’s an example
1 2 3 4 | var label:Label = new Label(); label.buttonMode = true; label.useHandCursor = true; label.mouseChildren = false; |
Once you set all three property of the component you will have the hand cursor when the mouse moves over the flex component.
→ No CommentsTags:actionscript·Flex·hand cursor·mouse cursor
Recently I was working on a project that I was using MouseEvent.DOUBLE_CLICK and the darn thing wasn’t firing no matter how many times that I’ve clicked on it. After awhile I remember that most Flex component actually have a doubleClickEnable property . Guess what was the result of the trace when I did
1 | trace(image.doubleClickEnabled) // this will return false |
The simple solution for getting MouseEvent.DOUBLE_CLICK to work is to ensure that you set the property of doubleClickEnable to true
1 2 | image.doubleClickEnabled = true; image.addEventListener(MouseEvent.DOUBLE_CLICK, double_click); |
→ No CommentsTags:double click·MouseEvent.DOUBLE_CLICK
While working on a new project using Flex and Webservices, I got this annoying message when I’m trying to use dataprovider and custom ItemRenderer
warning: unable to bind to property ‘xxx’ on class ‘xxx’ (class is not an IEventDispatcher)
warning: unable to bind to property ‘xxx’ on class ‘xxx’ (class is not an IEventDispatcher)
This is happening because binding fails when using complex objects , the compiler doesn’t know what kind of datatype that is being looped in the Repeater class and spits out a warning. Depending on what you are trying to do , sometimes it wont even spit out the data. The quick solution is to extend your class to Object and to make it bindable.
Here’s an example
package com.thedesilva { import mx.rpc.soap.types.*; /** * Wrapper class for a operation required type */ [Bindable] public class Magazine extends Object { /** * Constructor, initializes the type class */ public function Magazine() {} public var id:String; public var imagename:String; public var name:String; } }
→ No CommentsTags: