Crazy dragging with Flex, setting DragManager styles
Yesterday I was working with Flex again and made a drag and drop application that contained a tile list of images that can be dragged into a text-area which then becomes populated with the url of the image. The problem I was having was that when I dragged in a TileList in Flex off the TileList the scroller went crazy and flew either up or down depending on which way I was dragging the image. The solution I found to this problem was to disable the TileList whenever I clicked on the image. It was actually very very simple, after asking Mark of course.
I had a variable in my Cairngorm model called dragging which is true if we’re dragging an image and false if not. I just bound this dragging boolean to the enabled attribute of the TileList. So it became:
[code lang="xml"]
[/code]
This fixed the TileList going crazy whenever dragging and scrolling up or down really fast as the TileList just disabled itself(greyed out the scroller bar on the right) whenever a dragging operation is performed.
I was also getting a nasty looking cursor when dragging across the tilelist, it had a red circle with a white X within it. I didn’t want that so I just overwrote the default CSS style
[code lang="actionscript"]
DragManager
{ rejectCursor: Embed(source="assets/copyCursor.png");
}
[/code]
I included the main style within the Application
[code lang="xml"]
[/code]
I was playing around with Voxy today, its an open source VoiceXML plugin for Asterisk. Problem with it is that it doesn’t include ANY TTS or audio playback so if you have a VoiceXML document it will go off and parse it fine but do nothing with it! So its pretty useless as it stands as to alter it you have to go and mess around with the C source and recompile which isn’t too appealing. The mayhem of VoiceXML and Asterisk goes on. Will try VXIAsterisk again tomorrow(don’t have much hope though given their pathetic record in the past every time I’ve tried to compile/install it for use alongside Asterisk)
Thanks a lot. You helped me remove (not really) the reject cursor, by replacing it with a 1×1 png.
You’re welcome, glad to see someone is reading this thing