![]() |
|
Spaces home All about iiley and AsWi...PhotosProfileFriendsMore ![]() | ![]() |
|
All about iiley and AsWingflash actionscript, java, airobot, robocode...
August 03 Plan to leave from this blogFinally, I decide to move, the MSN blog is disappointing.
最终,我决定离开这里了,MSN Blog让我太失望了。 July 10 AsWing Extension CollectionFor the problem whether puting XFolder into core AsWing or not, we have another idea, is a AsWing Extensions Collection page at www.aswing.org It's here: http://aswing.wiki.adaptavist.com/display/AsWing/AsWing+Extensions The idea is cool that some simple and useful component or any other aswing useful classes and be shared here easily. This will not enlarge the core AsWing library, but make people have more useful components. We'll add some other useful classes later, And we encourage and hope you to share your component very much! Hope you like. June 29 Serveral AsWing new demo are onlineThey are JCholorChooser, pallette, and component resizer, they are here:
June 20 Real single line TextField??You create a TextField with multiline = false, and then publish it, well, you think the textfield just accept single line text, you press Enter, no newline entered, you paste a new line, it is filtered. Seems every thing runs well...
But how about when you press Ctrl+Enter when your swf runs in Internet Explorer? On my machine, new line is entered, the single line textfield became a two line textfield.(Tested on Windows2000+IE6+FP8 plugin)
This is weird and annoying, but here is a solution:
Add a handler to the onScroller event, when your single line textfield scrolled, means newline is entered, then you can find out the newline code and deleted it from your textfield text, sample code:
yourTextField.onScroller = function(textField:TextField){
var str:String = textField.text; //only check it when Ctrl or Enter pressed
if(Key.getCode() == Key.CONTROL || Key.getCode() == Key.ENTER){ for(var i:Number=0; i<str.length; i++){ if(str.charCodeAt(i) == 13){ textField.text = str.substring(0, i) + str.substring(i+1); return; } } } } Well, maybe adding some thing to prototype to make all TextField avoid this issue is cool, but i'v not fixed it out in a while, welcome to discuss. June 06 JSlider DoneJSlider component is done today, it's on svn now. It come with most features from swing JSlider except value labes, but we added a new feature to replace it, it is value tip(similar to flex slider component's value tip).
See the demo here:
|
||||||
|
|