Re: [flexcoders] Listening for CollectionEvent in custom component
Hello Wesley and others, I have prepared a simple test case to demo my problem - I'm trying to create a custom component which is being fed with XML repeatedly coming from server. My problem is that the CollectionEvent listener isn't fired. Games.mxml: ?xml version=1.0 encoding=utf-8? mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; xmlns:my=* mx:Script ![CDATA[ import mx.collections.*; import mx.events.*; private var _xlist:XMLList; [Bindable] public function get xlist():XMLList { return _xlist; } public function set xlist(x:XMLList):void { _xlist = x; trace(set( + x +)); list.dataProvider = x; list.dataProvider.addEventListener(CollectionEvent.COLLECTION_CHANGE, xlistChanged); } private function gameLabel(item:Object):String { return game: + it...@label; } private function xlistChanged(event:CollectionEvent):void { trace(xlistChanged( + event +)); all.text = All games: + _xlist.game.length(); full.text = Full games: + _xlist.game.(user.length() == 3).length(); vacant.text = Vacant games: + _xlist.game.(user.length() 3).length(); } ]] /mx:Script mx:Label id=all text=All games/ mx:Label id=full text=Full games/ mx:Label id=vacant text=Vacant games/ mx:List id=list labelFunction=gameLabel/ /mx:VBox MyTest.mxml: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; xmlns:my=* mx:Script ![CDATA[ import mx.events.*; private function changeXML1():void { games = games game label=1 user/ user/ user/ /game game label=2 user/ user/ /game game label=3 user/ user/ user/ /game /games; } private function changeXML2():void { games = games game label=A user/ user/ user/ /game game label=B user/ user/ /game game label=C /game /games; } ]] /mx:Script mx:XML id=games games game label=X user/ user/ /game game label=Y user/ user/ /game /games /mx:XML mx:Button label=Change XML 1 click=changeXML1()/ mx:Button label=Change XML 2 click=changeXML2()/
Re: [flexcoders] Listening for CollectionEvent in custom component
Hello Wesley, On Sun, Aug 22, 2010 at 12:47 AM, Wesley Acheson wesley.ache...@gmail.com wrote: This means that your listening to a change in a subsequently unbound collection. oh ok thanks, this makes sense. In that case I probably don't need any events at all, because I read the XML data over XMLSocket and assign that data again and again to a variable. But I'm still perplexed, why do I have All/Full/Vacant games: 0 in my test code below? Games.mxml: ?xml version=1.0 encoding=utf-8? mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; xmlns:my=* mx:Script ![CDATA[ private var _xlist:XMLList; public function get xlist():XMLList { return _xlist; } public function set xlist(x:XMLList):void { _xlist = x; trace(set( + x +)); list.dataProvider = x; all.text = All games: + _xlist.game.length(); full.text = Full games: + _xlist.game.(user.length() == 3).length(); vacant.text = Vacant games: + _xlist.game.(user.length() 3).length(); } private function gameLabel(item:Object):String { return game: + it...@label; } ]] /mx:Script mx:Label id=all text=All games/ mx:Label id=full text=Full games/ mx:Label id=vacant text=Vacant games/ mx:List id=list labelFunction=gameLabel/ /mx:VBox MyTest.mxml: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; xmlns:my=* mx:Script ![CDATA[ import mx.events.*; private function changeXML1():void { games = games game label=1 user/ user/ user/ /game game label=2 user/ user/ /game game label=3 user/ user/ user/ /game /games; } private function changeXML2():void { games = games game label=A user/ user/ user/ /game game label=B user/ user/ /game game label=C /game /games; } ]] /mx:Script mx:XML id=games games game label=X user/ user/ /game game label=Y user/ user/ /game /games /mx:XML mx:Button label=Change XML 1 click=changeXML1()/ mx:Button label=Change XML 2 click=changeXML2()/ my:Games xlist={games.game}/ /mx:Application Regards Alex
Re: [flexcoders] does Flex 5 upgrade? or downgrade in practice? REFdn7076142784
So you think Flex is complex, but then you want it to become multithreaded?
[flexcoders] Listening for CollectionEvent in custom component
Hello, I have 2 problems with my custom component (code below), which works ok otherwise. It represents a list of games, with up to 3 players. I feed it with XML data being pulled from server: game id=42 user . user . user . /game game id=47 user . /game game id=56 /game I'd like to display summary at the top of my component - how many games are there in total, how many are full (with 3 users) and how many are vacant aka free (less than 3 users). Unfortunately: 1) the CollectionEvent is not fired for some reason. I have to call xlistChanged(null) - to at least test the 2) 2) When I call xlistChanged(null), the _full and _free are calculated wrong and both contain the string Full/Free 0. I probably call e4x in a wrong way? ?xml version=1.0 encoding=utf-8? mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% xmlns:my=* verticalScrollPolicy=off horizontalScrollPolicy=off mx:Script ![CDATA[ import mx.collections.*; import mx.events.*; [Bindable] private var _xlist:XMLListCollection; public function set xlist(x:XMLList):void { _xlist = new XMLListCollection(x); _xlist.addEventListener(CollectionEvent.COLLECTION_CHANGE, xlistChanged); xlistChanged(null); } private function xlistChanged(event:CollectionEvent):void { _all.label = 'All (' + _xlist.length + ')'; var full:XMLList = _xlist.source.game.(user.length() == 3); _full.label = 'Full (' + full.length() + ')'; var free:XMLList = _xlist.source.game.(user.length() 3); _free.label = 'Free (' + free.length() + ')'; } ]] /mx:Script mx:HBox width=100% mx:Label text=Playing tables:/ mx:RadioButton groupName=_type id=_free/ mx:RadioButton groupName=_type id=_full/ mx:RadioButton groupName=_type id=_all/ /mx:HBox mx:List width=100% height=100% dataProvider={_xlist} itemRenderer=Game/ /mx:VBox Thank you Alex
[flexcoders] Re: Push verse Poll in Flash Player
I think it's worth trying, because trying to read an integer this way won't waste any CPU cycles - Flash/Flex probably run select() or poll() internally and just sleep - until anything arrives over the socket. (Versus trying to pull anything every 30 seconds - that will cost you CPU and also feel delayed). And whenever an integer arrives, then you could use that number to indicate how many records have changed at your backend, so that you can use it to provide feedback on the progress to the user while fetching the updated data over HTTP. Regards Alex --- In flexcoders@yahoogroups.com, dorkie dork from dorktown dorkiedorkfromdorkt...@... wrote: good idea :) that'll work On Mon, Aug 16, 2010 at 2:42 AM, Alexander Farber alexander.far...@... wrote: An idea: you could open a socket connection (because of corporate proxies best would be the port 80) and try to read an integer: private function handleTcpData(event:Event):void { while(_socket.bytesAvailable) { try{ var i:int = _socket.readInt(); fetchHttpData(i); }catch(e:Error){ // incomplete integer, will be read by another handleTcpData call return; } } } and whenever an integer arrives from your backend, your client could read the whole data over HTTP.
[flexcoders] Re: Detecting List width from its itemRenderer
Hello Alex and others, --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: The renderer should be given an explicitWidth by the time its measure() method gets called. That would be a good time to choose a different size avatar and report a different measuredHeight. my problem is: when I increase the item size in my renderer, I don't know how to change the rowHeight of the parent List and thus the items are cut off. I've prepared a reduced test case demonstrating my problem - TestCase.mxml: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:HDividedBox width=100% height=100% mx:List id=myList width=40% height=100% alternatingItemColors=[0xCC, 0xFF] dataProvider={['a;b;c', '1;2;3', '4;5', 'd', '6;7;8']} itemRenderer=RowRenderer/ mx:Label text=lt;-- Resize the list width=60%/ /mx:HDividedBox /mx:Application RowRenderer.mxml: ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% verticalScrollPolicy=off horizontalScrollPolicy=off mx:Script ![CDATA[ [Bindable] private var _scale:Number = 0.8; override public function set data(obj:Object):void { var i:uint; super.data = obj; for (i = 0; i _btn.length; i++) _btn[i].visible = false; if (obj != null) { var str:String = String(obj); var labels:Array = str.split(/;/); for (i = 0; i _btn.length i labels.length; i++) { _btn[i].label = labels[i]; _btn[i].visible = true; } } } override protected function measure():void { super.measure(); measuredWidth=3 * 100 * _scale; measuredHeight=100 * _scale; measuredMinWidth = 3 * 50; measuredMinHeight = 50; } override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { super.updateDisplayList(unscaledWidth, unscaledHeight); trace(unscaledWidth + ' x ' + unscaledHeight); _scale = (unscaledWidth 3 * 100 ? 1.2 : 0.8); // XXX how to set the list rowHeigt=100*_scale here? } ]] /mx:Script mx:HBox width=100% horizontalAlign=center mx:Repeater id=_rpt dataProvider={[0, 1, 2]} mx:Button id=_btn width=100 height=100 fontSize=24 textAlign=center scaleX={_scale} scaleY={_scale}/ /mx:Repeater /mx:HBox /mx:Canvas
[flexcoders] Re: Detecting List width from its itemRenderer
Hello again, I thought I've found a solution by using the List's resize event to change the size of its items, but while it works for the simple test case listed below, it goes into endless loop in my real app with more complex layout and I see the traces: resize list: 0 - 480 resize list: 480 - 480 resize list: 480 - 464 resize list: 464 - 464 resize list: 464 - 480 resize list: 480 - 480 resize list: 480 - 464 resize list: 464 - 464 ... TestCase.mxml: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:Script ![CDATA[ import mx.events.*; private function resizeHandler(event:ResizeEvent):void { var list:List = event.target as List; trace(event.oldWidth + ' - ' + list.width); list.rowHeight = list.width / 3; RowRenderer._scale = list.rowHeight / (100 + 20); } ]] /mx:Script mx:HDividedBox width=100% height=100% mx:List id=myList width=40% height=100% alternatingItemColors=[0xCC, 0xFF] dataProvider={['a;b;c', '1;2;3', '4;5', 'd', '6;7;8']} itemRenderer=RowRenderer resize=resizeHandler(event)/ mx:Label text=lt;-- Resize the list width=60%/ /mx:HDividedBox /mx:Application RowRenderer.mxml: ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% verticalScrollPolicy=off horizontalScrollPolicy=off mx:Script ![CDATA[ import mx.controls.List; [Bindable] public static var _scale:Number = 1.0; override public function set data(obj:Object):void { var i:uint; super.data = obj; for (i = 0; i _btn.length; i++) _btn[i].visible = false; if (obj != null) { var str:String = String(obj); var labels:Array = str.split(/;/); for (i = 0; i _btn.length i labels.length; i++) { _btn[i].label = labels[i]; _btn[i].visible = true; } } } ]] /mx:Script mx:HBox width=100% horizontalAlign=center mx:Repeater id=_rpt dataProvider={[0, 1, 2]} mx:Button id=_btn width=100 height=100 fontSize=24 textAlign=center scaleX={_scale} scaleY={_scale}/ /mx:Repeater /mx:HBox /mx:Canvas Regards Alex
[flexcoders] Push verse Poll in Flash Player
An idea: you could open a socket connection (because of corporate proxies best would be the port 80) and try to read an integer: private function handleTcpData(event:Event):void { while(_socket.bytesAvailable) { try{ var i:int = _socket.readInt(); fetchHttpData(i); }catch(e:Error){ // incomplete integer, will be read by another handleTcpData call return; } } } and whenever an integer arrives from your backend, your client could read the whole data over HTTP. Regards Alex
[flexcoders] List and TileList with same renderer but diff. item sizes
Hello, I'm trying to use List to represent rooms with up to 3 people and a TileList to represent people in the lobby. It works ok, but I wonder how to make the items in the TileList smaller? Ist there a simple way or do I have to introduce a wrapper renderer inbetween? Thank you Alex
[flexcoders] Detecting List width from its itemRenderer
Hello, I have an itemRenderer for a List displaying avatars for users in chat rooms - up to 3 of them. It works ok (code below), but since the List itself is inside of a HDividedBox and its width can be changed, I would like to detect this event and let my itemRenderer to display bigger avatars (increase their scaleX, scaleY). How do I detect this event and where can I read-access the parent List width property? Thank you Alex ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% xmlns:my=* verticalScrollPolicy=off horizontalScrollPolicy=off mx:Script ![CDATA[ override public function set data(xlist:Object):void { var i:int; super.data = xlist; for (i = _user.length - 1; i = 0; i--) _user[i].visible = false; if (xlist != null) { for (i = xlist.user.length() - 1; i = 0; i--) { var xml:XML = xlist.user[i]; _user[i].userid = x...@id; _user[i].avatar = x...@avatar; _user[i].nick = x...@name; _user[i].visible = true; } } } ]] /mx:Script mx:HBox width=100% horizontalAlign=center mx:Repeater id=_rpt dataProvider={[0, 1, 2]} my:User id=_user width=160 height=140 scaleX=0.8 scaleY=0.8/ /mx:Repeater /mx:HBox /mx:Canvas
[flexcoders] Re: List and TileList with same renderer but diff. item sizes
Thank you, but - --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: What happened when you set columnWidth and rowHeight on the TileLIst? On 8/14/10 7:42 AM, Alexander alexander.far...@... wrote: It works ok, but I wonder how to make the items in the TileList smaller? Ist there a simple way or do I have to introduce a wrapper renderer inbetween? setting columnWidth and rowHeight doesn't scale the items down. It just cuts the items in a strange way. I've ended up using a wrapper itemRenderer for now: mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% xmlns:my=* verticalScrollPolicy=off horizontalScrollPolicy=off mx:Script ![CDATA[ override public function set data(xml:Object):void { super.data = xml; if (xml != null xml.length() == 1) { _user.userid = x...@id; _user.avatar = x...@avatar; _user.nick = x...@name; } } ]] /mx:Script my:User id=_user scaleX=0.5 scaleY=0.5/ /mx:Canvas
[flexcoders] Re: Accessing repeating components through ActionScript
Thanks Oleg, that's a good workaround and - --- In flexcoders@yahoogroups.com, Oleg Sivokon olegsivo...@... wrote: mx:Array id=labels/ mx:Repeater id=rp dataProvider={[0, 1, 2, 3]} mx:Label mx:creationComplete var event:Event = arguments[0] as Event; this.labels.push(event.currentTarget); /mx:creationComplete /mx:Label /mx:Repeater I've found out, that I can access repeating components through an array index as well: ?xml version=1.0? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; applicationComplete=init(event) mx:Script ![CDATA[ import mx.events.*; private function init(event:FlexEvent):void { for (var i:uint = 0; i _leftTxt.length; i++) trace(_leftTxt[i].text + : + _leftTxt[i].y); } ]] /mx:Script mx:Panel title=Repeater Example width=75% height=75% mx:Repeater id=rp dataProvider={[0, 1, 2, 3]} mx:Label id=_leftTxt text={rp.currentIndex}/ /mx:Repeater /mx:Panel /mx:Application
[flexcoders] Accessing repeating components through ActionScript
Hello, I'd like to have several labels in alternating colors, and set their text's from XML-data coming from a server. Unfortunately this won't compile: mx:Label id=_leftTxt[0] color=0x00/ mx:Label id=_leftTxt[1] color=0x00/ mx:Label id=_leftTxt[2] color=0x00/ mx:Label id=_leftTxt[3] color=0x00/ And if I use Repeater, I can't set the components id's (won't compile either; but it compiles if I change id - text): mx:Repeater id=rp dataProvider={[0, 1, 2, 3]} mx:Label id={'_leftTxt'+String(rp.currentItem)} color={rp.currentIndex % 2 == 0 ? 0x00 : 0xFF}/ /mx:Repeater In Flash I could just have an array of TextFields: private var _leftTxt:Array = new Array(4); for (var i:uint = 0; i _leftTxt.length; i++) { _leftTxt[i] = new TextField(); .. addChild(_leftTxt[i]); } and then just work with _leftTxt[i]... But how do you do it in Flex? Regards Alex
[flexcoders] Setting alignment of a LinkBar
Hello, I have a very newbish question, but just can't find the right attribute in the docs - in a set of 2 LinkBar's, how do you change their alignment? Why do I have the first LinkBar centered, but the 2nd - left-aligned? I tried diff. attributes, like horizontalAlignment etc. Below is my test code, thank you Alex ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:LinkBar dataProvider={stack1}/ mx:ViewStack id=stack1 width=100% height=100% mx:Canvas label=Canvas 1 width=100% height=100% /mx:Canvas mx:Canvas label=Canvas 2 width=100% height=100% /mx:Canvas mx:Canvas label=Canvas 3... width=100% height=100% mx:LinkBar dataProvider={stack2}/ mx:ViewStack id=stack2 width=100% height=100% mx:Canvas label=Canvas A width=100% height=100% /mx:Canvas mx:Canvas label=Canvas B width=100% height=100% /mx:Canvas mx:Canvas label=Canvas C width=100% height=100% /mx:Canvas /mx:ViewStack /mx:Canvas mx:Canvas label=Canvas 4 width=100% height=100% /mx:Canvas mx:Canvas label=Canvas 5 width=100% height=100% /mx:Canvas /mx:ViewStack /mx:Application
[flexcoders] Creating blinking glow effect
Hello, does anybody please have an advice on creating a repeatedly blinking Glow effect on a button. Exactly like the example at the Adobe page http://livedocs.adobe.com/flex/3/langref/mx/effects/Glow.html but it should run repeatedly - to draw the user's attention to a particular button. I realize, that in ActionScript I probably can create a Timer and then call a play() repeatedly on a Glow object, whose target member is set to the button, but maybe there is an easier method in Flex? Regards Alex
[flexcoders] Re: Setting alignment of a LinkBar
horizontalAlign=center width=100% - I was missing the width
[flexcoders] Re: PopUpButton with TileList and custom renderer works, but 2 annoyances
Thanks, I don't have warning anymore after I've changed the code. The horizontal scrolling issue seems to be a Flex 3 bug: when I change the width and height, so that there is only a vertical scrollbar - then everything starts to work ok. = MyRenderer.mxml: ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% verticalScrollPolicy=off horizontalScrollPolicy=off mx:Script ![CDATA[ override public function set data(value:Object):void { super.data = value; if (value != null value.hasOwnProperty('label')) { lb.text = value.label; lb.setStyle('color', value.color); } else { lb.text = ''; } } ]] /mx:Script mx:Label id=lb truncateToFit=true width=60/ /mx:Canvas = MyTest.mxml: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; creationPolicy=all applicationComplete=init(event); mx:Style @font-face { src:url(C:\\WINDOWS\\Fonts\\arial.ttf); fontFamily: myFont; unicodeRange: U+0020-U+0040, /* Punctuation, Numbers */ U+0041-U+005A, /* Upper-Case A-Z */ U+005B-U+0060, /* Punctuation and Symbols */ U+0061-U+007A, /* Lower-Case a-z */ U+007B-U+007E, /* Punctuation and Symbols */ U+0410-U+0451, /* cyrillic */ U+2660-U+266B; /* card suits */ } List, CheckBox, Label, Button, PopUpButton, TileList { fontFamily: myFont; fontSize: 24; } /mx:Style mx:Script ![CDATA[ import mx.controls.*; import mx.events.*; [Bindable] private var bids:Array; private var tl:TileList; private function init(event:FlexEvent):void { bids = createBids(); pub.popUp = createList(bids); } private function createBids():Array { var arr:Array = [{label: 'Pass', color: 0x00}]; for (var i:uint = 6; i = 10; i++) for (var j:uint = 0; j 5; j++) { var label:String = i+'#9824;#9827;#9830;#9829; '.charAt(j%5); var color:uint = findColor(label); arr.unshift({label: label, color: color}); } return arr; } private function findColor(str:String):uint { return (str.indexOf('#9829;') != -1 || str.indexOf('#9830;') != -1) ? 0xFF : 0x00; } private function createList(arr:Array):TileList { tl = new TileList(); tl.maxColumns = 5; tl.width = 150; tl.height = 250; tl.dataProvider = arr; tl.itemRenderer = new ClassFactory(MyRenderer); tl.addEventListener('itemClick', itemClickHandler); if (arr.length 0) { tl.selectedIndex = arr.length - 1; pub.label = arr[tl.selectedIndex].label; } return tl; } private function itemClickHandler(event:ListEvent):void { var index:uint = tl.columnCount * event.rowIndex + event.columnIndex; var label:String = bids[index].label;
[flexcoders] Re: PopUpButton with TileList and custom renderer works, but 2 annoyances
Hello again, On Sat, Jul 24, 2010 at 5:39 PM, Alexander Farber alexander.far...@gmail.com wrote: 1) For some reason I get numerous warnings: warning: unable to bind to property 'label' on class 'Object' (class is not an IEventDispatcher) 2) The TileList tl2 has a scrolling issue. I've searched around (for example: http://forums.adobe.com/message/2939121 ) and it is probably because the itemRenderer is being reused and I'm making some wrong assumptions... But where? With the following renderer code I could get rid of the warning (I guess it's not ok to use {data.label} in the renderer), but unfortunately the tl2 scrolling problem is still there - MyRenderer.mxml: ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; verticalScrollPolicy=off horizontalScrollPolicy=off width=100% height=100% mx:Script ![CDATA[ override public function set data(value:Object):void { super.data = value; var str:String = String(value.label); myLabel.text = str; myLabel.setStyle('color', findColor(str)); } public static function findColor(str:String):uint { return (str.indexOf('♥') != -1 || str.indexOf('♦') != -1) ? 0xFF : 0x00; } ]] /mx:Script mx:Label id=myLabel truncateToFit=true width=60/ /mx:Canvas MyTest.mxml: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; creationPolicy=all applicationComplete=init(event); mx:Style @font-face { src:url(C:\\WINDOWS\\Fonts\\arial.ttf); fontFamily: myFont; unicodeRange: U+0020-U+0040, /* Punctuation, Numbers */ U+0041-U+005A, /* Upper-Case A-Z */ U+005B-U+0060, /* Punctuation and Symbols */ U+0061-U+007A, /* Lower-Case a-z */ U+007B-U+007E, /* Punctuation and Symbols */ U+0410-U+0451, /* cyrillic */ U+2660-U+266B; /* card suits */ } List, CheckBox, Label, Button, PopUpButton, TileList { fontFamily: myFont; fontSize: 24; } /mx:Style mx:Script ![CDATA[ import mx.controls.*; import mx.events.*; [Bindable] private var bids:Array; private var tl:TileList; private function init(event:FlexEvent):void { bids = createBids(); pub.popUp = createList(bids); } private function createBids():Array { var arr:Array = [{label: 'Pass'}]; for (var i:uint = 6; i = 10; i++) for (var j:uint = 0; j 5; j++) arr.unshift({label: i+'♠♣♦♥ '.charAt(j%5)}); return arr; } private function createList(arr:Array):TileList { tl = new TileList(); tl.maxColumns = 5; tl.width = 350; tl.height = 250; tl.dataProvider = arr; tl.itemRenderer = new ClassFactory(MyRenderer); tl.addEventListener('itemClick', itemClickHandler); if (arr.length 0) { tl.selectedIndex = arr.length - 1; pub.label = arr[tl.selectedIndex].label; } return tl; } private function itemClickHandler(event:ListEvent):void { var index:uint = tl.columnCount * event.rowIndex + event.columnIndex; var label:String = bids[index].label; pub.label = label; pub.setStyle('color', MyRenderer.findColor(label)); pub.close(); tl.selectedIndex = index
[flexcoders] PopUpButton with TileList and custom renderer works, but 2 annoyances
Hello, I'm trying to use a PopUpButton with a red/black colored TileList and it does work, but has 2 minor issues, that I can't figure out. I've prepared a simple test case listed at the bottom, please review it. 1) For some reason I get numerous warnings: warning: unable to bind to property 'label' on class 'Object' (class is not an IEventDispatcher) warning: unable to bind to property 'label' on class 'Object' (class is not an IEventDispatcher) but I don't even know where to look, which label is it? 2) The TileList tl2 has a scrolling issue. I've searched around (for example: http://forums.adobe.com/message/2939121 ) and it is probably because the itemRenderer is being reused and I'm making some wrong assumptions... But where? Thank you for any hints, please try my code below Regards Alex MyRenderer.mxml: ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; verticalScrollPolicy=off horizontalScrollPolicy=off width=100% height=100% mx:Script ![CDATA[ public static function findColor(str:String):uint { return (str.indexOf('♥') != -1 || str.indexOf('♦') != -1) ? 0xFF : 0x00; } ]] /mx:Script mx:Label truncateToFit=true width=60 text={data.label} color={findColor(data.label)}/ /mx:Canvas MyTest.mxml: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; creationPolicy=all applicationComplete=init(event); mx:Style @font-face { src:url(C:\\WINDOWS\\Fonts\\arial.ttf); fontFamily: myFont; unicodeRange: U+0020-U+0040, /* Punctuation, Numbers */ U+0041-U+005A, /* Upper-Case A-Z */ U+005B-U+0060, /* Punctuation and Symbols */ U+0061-U+007A, /* Lower-Case a-z */ U+007B-U+007E, /* Punctuation and Symbols */ U+0410-U+0451, /* cyrillic */ U+2660-U+266B; /* card suits */ } List, CheckBox, Label, Button, PopUpButton, TileList { fontFamily: myFont; fontSize: 24; } /mx:Style mx:Script ![CDATA[ import mx.controls.*; import mx.events.*; [Bindable] private var bids:Array; private var tl:TileList; private function init(event:FlexEvent):void { bids = createBids(); pub.popUp = createList(bids); } private function createBids():Array { var arr:Array = [{label: 'Pass'}]; for (var i:uint = 6; i = 10; i++) for (var j:uint = 0; j 5; j++) arr.unshift({label: i+'♠♣♦♥ '.charAt(j%5)}); return arr; } private function createList(arr:Array):TileList { tl = new TileList(); tl.maxColumns = 5; tl.width = 350; tl.height = 250; tl.dataProvider = arr; tl.itemRenderer = new ClassFactory(MyRenderer); tl.addEventListener('itemClick', itemClickHandler); if (arr.length 0) { tl.selectedIndex = arr.length - 1; pub.label = arr[tl.selectedIndex].label; } return tl; } private function itemClickHandler(event:ListEvent):void { var index:uint = tl.columnCount * event.rowIndex + event.columnIndex; var label:String = bids[index].label; pub.label = label; pub.setStyle('color', MyRenderer.findColor(label)); pub.close(); tl.selectedIndex = index; } ]]
[flexcoders] Re: Changing color of the PopUpButton
Oh sorry - I was missing: pub.setStyle('color', 0xFF);
[flexcoders] Re: 2 PopUpButton questions: force opening upwards + red and black item colors
Thank you, but now I get the runtime error: TypeError: Error #1034: Type Coercion failed: cannot convert rende...@4c310a1 to mx.controls.menuClasses.IMenuItemRenderer. at mx.controls::Menu/http://www.adobe.com/2006/flex/mx/internal::deleteDependentSubMenus()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\controls\Menu.as:2275] at mx.controls::Menu/http://www.adobe.com/2006/flex/mx/internal::hideAllMenus()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\controls\Menu.as:2289] at mx.controls::Menu/mouseUpHandler()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\controls\Menu.as:1706] when I click at one entry. My Renderer.mxml: ?xml version=1.0 encoding=utf-8? mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; mx:Text text={data.label} fontSize=16 fontWeight=bold/ /mx:VBox My Test.mxml: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; creationPolicy=all mx:Style @font-face { src:url(C:\\WINDOWS\\Fonts\\times.ttf); fontFamily: myFont; /* card suits */ unicodeRange: U+2660-U+266B; } Menu { fontFamily: myFont; fontSize: 24; } /mx:Style mx:Script ![CDATA[ import mx.controls.*; private function createMenu():void { var bids:Array = [{label: Pass}]; for (var i:uint = 7; i = 10; i++) for (var j:uint = 0; j 4; j++) bids.unshift({label: i+♠♣♦♥.charAt(j%4)}); var menu:Menu = new Menu(); menu.dataProvider = bids; menu.itemRenderer = new ClassFactory(Renderer); menu.selectedIndex = 0; pub.popUp = menu; } ]] /mx:Script mx:Canvas width=100% height=100% /mx:Canvas mx:ApplicationControlBar width=100% mx:Spacer width=100%/ mx:PopUpButton id=pub creationComplete=createMenu();/ /mx:ApplicationControlBar /mx:Application Does it mean VBox is missing some method needed by IMenuItemRenderer? I'm just trying to get red + black entries Regards Alex
[flexcoders] Re: 2 PopUpButton questions: force opening upwards + red and black item colors
I've tried another code and still get the error when I click the menu: TypeError: Error #1034: Type Coercion failed: cannot convert myrende...@47410a1 to mx.controls.menuClasses.IMenuItemRenderer. at mx.controls::Menu/http://www.adobe.com/2006/flex/mx/internal::deleteDependentSubMenus()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\controls\Menu.as:2275] at mx.controls::Menu/http://www.adobe.com/2006/flex/mx/internal::hideAllMenus()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\controls\Menu.as:2289] at mx.controls::Menu/mouseUpHandler()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\controls\Menu.as:1706] In my code I do implement all 5 methods listed at the http://livedocs.adobe.com/flex/3/langref/mx/controls/menuClasses/IMenuItemRenderer.html so I'm not sure, what is missing here? MyRenderer.mxml: ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; alpha=0.4 width=100% height=100% mx:Script ![CDATA[ import mx.events.*; import mx.controls.*; [Bindable] private var color:uint; override public function set data(value:Object):void { if(value != null) { super.data = value; lb.text = String(value.label); color = (lb.text.indexOf('♥') != -1 || lb.text.indexOf('♦') != -1) ? 0xFF : 0x00; } dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE)); } // Internal variable for the property value. private var _menu:Menu; public function get menu():Menu { return _menu; } public function set menu(value:Menu):void { _menu = value; } public function get measuredBranchIconWidth():Number { return 50;} public function get measuredTypeIconWidth ():Number { return 50;} public function get measuredIconWidth ():Number { return 50;} ]] /mx:Script mx:Label id=lb color={color} / /mx:Canvas Test.mxml: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; creationPolicy=all mx:Style @font-face { src:url(C:\\WINDOWS\\Fonts\\times.ttf); fontFamily: myFont; /* card suits */ unicodeRange: U+2660-U+266B; } Menu, Label { fontFamily: myFont; fontSize: 24; } /mx:Style mx:Script ![CDATA[ import mx.controls.*; private function createMenu():void { var bids:Array = [{label: Pass}]; for (var i:uint = 7; i = 10; i++) for (var j:uint = 0; j 4; j++) bids.unshift({label: i+♠♣♦♥.charAt(j%4)}); var menu:Menu = new Menu(); menu.dataProvider = bids; menu.itemRenderer = new ClassFactory(MyRenderer); menu.selectedIndex = 0; pub.popUp = menu; } ]] /mx:Script mx:Canvas width=100% height=100% /mx:Canvas mx:ApplicationControlBar width=100% mx:Spacer width=100%/ mx:PopUpButton id=pub creationComplete=createMenu();/ /mx:ApplicationControlBar /mx:Application
[flexcoders] Re: 2 PopUpButton questions: force opening upwards + red and black item colors
Now it works (not sure if dispathEvent needed though and why): ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; verticalScrollPolicy=off horizontalScrollPolicy=off implements=mx.controls.menuClasses.IMenuItemRenderer width=100% height=100% mx:Script ![CDATA[ import mx.events.*; import mx.controls.*; [Bindable] private var color:uint; override public function set data(value:Object):void { if(value != null) { super.data = value; lb.text = String(value.label); color = (lb.text.indexOf('♥') != -1 || lb.text.indexOf('♦') != -1) ? 0xFF : 0x00; } dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE)); } // implement IMenuItemRenderer interface private var _menu:Menu; public function get menu():Menu { return _menu; } public function set menu(value:Menu):void { _menu = value; } public function get measuredBranchIconWidth():Number { return 100;} public function get measuredTypeIconWidth ():Number { return 100;} public function get measuredIconWidth ():Number { return 100;} ]] /mx:Script mx:Label id=lb color={color} / /mx:Canvas
[flexcoders] Changing color of the PopUpButton
Hello, I have a working code for displaying red and black entries in the list of a PopUpButton (depending on the card suit). However I'm missing the minor last touch: when the user selects a red entry in the list and I assign its value to the PopUpButton's label, I don't know how to change label's color. I've tried several things and searched web... Here is my code, please try it out and you'll see the problem - Thank you Alex --TestCase.mxml ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; creationPolicy=all mx:Style @font-face { src:url(C:\\WINDOWS\\Fonts\\times.ttf); fontFamily: myFont; unicodeRange: U+0020-U+0040, /* Punctuation, Numbers */ U+0041-U+005A, /* Upper-Case A-Z */ U+005B-U+0060, /* Punctuation and Symbols */ U+0061-U+007A, /* Lower-Case a-z */ U+007B-U+007E, /* Punctuation and Symbols */ U+0410-U+0451, /* cyrillic */ U+2660-U+266B; /* card suits */ } List, Menu, CheckBox, Label, Button, PopUpButton { fontFamily: myFont; fontSize: 16; } /mx:Style mx:Script ![CDATA[ import mx.controls.*; import mx.events.*; private var menu:Menu; private function createMenu():void { var bids:Array = [{label: 'Pass'}]; for (var i:uint = 6; i = 10; i++) for (var j:uint = 0; j 5; j++) bids.unshift({label: i+'♠♣♦♥ '.charAt(j%5)}); menu = new Menu(); menu.dataProvider = bids; menu.itemRenderer = new ClassFactory(MyRenderer); menu.selectedIndex = menu.dataProvider.length - 1; menu.addEventListener('itemClick', itemClickHandler); pub.popUp = menu; pub.label = menu.dataProvider[menu.selectedIndex].label; } private function itemClickHandler(event:MenuEvent):void { var label:String = event.item.label; trace(Selected: + label); pub.label = label; // XXX how do you make the label red? pub.close(); menu.selectedIndex = event.index; } ]] /mx:Script mx:Canvas width=100% height=100% /mx:Canvas mx:ApplicationControlBar width=100% mx:Spacer width=100%/ mx:CheckBox id=auto label=Auto:/ mx:Button id=left label=lt;lt;/ mx:PopUpButton id=pub creationComplete=createMenu(); width=60/ mx:Button id=right label=gt;gt;/ /mx:ApplicationControlBar /mx:Application -MyRenderer.mxml ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; verticalScrollPolicy=off horizontalScrollPolicy=off implements=mx.controls.menuClasses.IMenuItemRenderer width=100% height=100% mx:Script ![CDATA[ import mx.events.*; import mx.controls.*; [Bindable] private var color:uint; override public function set data(value:Object):void { if(value != null) { super.data = value; lb.text = String(value.label); color = (lb.text.indexOf('♥') != -1 || lb.text.indexOf('♦') != -1) ? 0xFF : 0x00; } dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE)); } // implement IMenuItemRenderer interface private var _menu:Menu; public function get menu():Menu { return _menu; } public function set menu(value:Menu):void { _menu = value; }
[flexcoders] Re: 2 PopUpButton questions: force opening upwards + red and black item colors
Hello, I'm trying this code, but get the error about bad casting in Test.mxml: Implicit coercion of a value of type Class to an unrelated type mx.core:IFactory. My Renderer.mxml: ?xml version=1.0 encoding=utf-8? mx:HBox xmlns:mx=http://www.adobe.com/2006/mxml; mx:Text text={data.label} fontSize=16 fontWeight=bold/ /mx:HBox My Test.mxml: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; creationPolicy=all mx:Style @font-face { src:url(C:\\WINDOWS\\Fonts\\times.ttf); fontFamily: myFont; /* card suits */ unicodeRange: U+2660-U+266B; } Menu { fontFamily: myFont; fontSize: 24; } /mx:Style mx:Script ![CDATA[ import mx.controls.*; private function createMenu():void { var bids:Array = [{label: Pass}]; for (var i:uint = 7; i = 10; i++) for (var j:uint = 0; j 4; j++) // string with 4 card suits below: bids.unshift({label: i+♠♣♦♥.charAt(j%4)}); var menu:Menu = new Menu(); menu.dataProvider = bids; // XXX the line below fails: menu.itemRenderer = Renderer; menu.selectedIndex = 0; pub.popUp = menu; } ]] /mx:Script mx:Canvas width=100% height=100% /mx:Canvas mx:ApplicationControlBar width=100% mx:Spacer width=100%/ mx:PopUpButton id=pub creationComplete=createMenu();/ /mx:ApplicationControlBar /mx:Application I've tried adding itemRenderer=Renderer to the PopUpButton tag, but it isn't accepted (I guess the renderer belongs to the Menu) Regards Alex
[flexcoders] 2 PopUpButton questions: force opening upwards + red and black item colors
Hello, I'm trying to port a bigger project from Flash CS4 to Flex 3 and have a problem that the PopUpButton, that is located at the right bottom of my app, opens downwards when I click it and thus is being cut off. Only if I resize the browser, it will open upwards as actually wanted by me. I've tried to prepare a simpler test case (s. the code below) to demonstrate my problem, but can't reproduce it :-/ Also I would appreciate if someone could reproduce me a simple trick to render some of the items (card suits) in red foreground color instead of the default black? Do I have to create a separate file as an item renderer (still reading up there... and don't understand yet, how to specify that file in my menu which I create in AS) or is there maybe a simpler trick? Thank you for any hints and below is my test code Alex ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; creationPolicy=all mx:Style @font-face { src:url(C:\\WINDOWS\\Fonts\\times.ttf); fontFamily: myFont; /* card suits */ unicodeRange: U+2660-U+266B; } Menu { fontFamily: myFont; fontSize: 24; } /mx:Style mx:Script ![CDATA[ import mx.controls.*; private function createMenu():void { var bids:Array = [{label: Pass}]; for (var i:uint = 7; i = 10; i++) for (var j:uint = 0; j 4; j++) bids.unshift({label: i+â â£â¦â¥.charAt(j%4)}); var menu:Menu = new Menu(); menu.dataProvider = bids; menu.selectedIndex = 0; pub.popUp = menu; } ]] /mx:Script mx:Canvas width=100% height=100% /mx:Canvas mx:ApplicationControlBar width=100% mx:Spacer width=100%/ mx:PopUpButton id=pub creationComplete=createMenu();/ /mx:ApplicationControlBar /mx:Application
[flexcoders] Re: 2 PopUpButton questions: force opening upwards + red and black item colors
Sorry for the double post. Also the mangled Unicode string below is the 4 card suit characters. --- In flexcoders@yahoogroups.com, Alexander alexander.far...@... wrote: bids.unshift({label: i+â â£â¦â¥.charAt(j%4)});
[flexcoders] 2 PopUpButton questions: force opening upwards + red and black item colors
Hello, I'm trying to port a bigger project from Flash CS4 to Flex 3 and have a problem that the PopUpButton, that is located at the right bottom of my app, opens downwards when I click it and thus is being cut off. Only if I resize the browser, it will open upwards as actually wanted by me. I've tried to prepare a simpler test case (s. the code below) to demonstrate my problem, but can't reproduce it :-/ Also I would appreciate if someone could reproduce me a simple trick to render some of the items (card suits) in red foreground color instead of the default black? Do I have to create a separate file as an item renderer (still reading up there... and don't understand yet, how to specify that file in my menu which I create in AS) or is there maybe a simpler trick? Thank you for any hints and below is my test code Alex ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; creationPolicy=all mx:Style @font-face { src:url(C:\\WINDOWS\\Fonts\\times.ttf); fontFamily: myFont; /* card suits */ unicodeRange: U+2660-U+266B; } Menu { fontFamily: myFont; fontSize: 24; } /mx:Style mx:Script ![CDATA[ import mx.controls.*; private function createMenu():void { var bids:Array = [{label: Pass}]; for (var i:uint = 7; i = 10; i++) for (var j:uint = 0; j 4; j++) bids.unshift({label: i+♠♣♦♥.charAt(j%4)}); var menu:Menu = new Menu(); menu.dataProvider = bids; menu.selectedIndex = 0; pub.popUp = menu; } ]] /mx:Script mx:Canvas width=100% height=100% /mx:Canvas mx:ApplicationControlBar width=100% mx:Spacer width=100%/ mx:PopUpButton id=pub creationComplete=createMenu();/ /mx:ApplicationControlBar /mx:Application
[flexcoders] Re: Flex3: attaching assets from .swf using getDefinitionByName
I'd like to share the solution for my problem for the archives: TestCase.mxml: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute creationComplete=onCreationComplete(); mx:Script ![CDATA[ private function onCreationComplete():void { var sprite:Sprite = new Sprite(); var g:Graphics = sprite.graphics; g.beginFill(0xFF); g.drawCircle(100, 100, 10); g.endFill(); spriteHolder.addChild(sprite); var suit:String = SPADES; var sprite2:Sprite = new (Symbols[suit] as Class); sprite2.x = 50; sprite2.y = 50; sprite2.rotation = 50; spriteHolder.addChild(sprite2); } ]] /mx:Script mx:VBox width=100% !-- mx:Button label=1 icon={SPADES} / mx:Button label=2 icon={CLUBS} / mx:Button label=3 icon={DIAMONDS} / mx:Button label=4 icon={HEARTS} / -- mx:UIComponent id=spriteHolder width=200 height=200/ /mx:VBox /mx:Application Symbols.as: package { public class Symbols { [Embed('../assets/symbols.swf', symbol='spades')] public static const SPADES:Class; [Embed('../assets/symbols.swf', symbol='clubs')] public static const CLUBS:Class; [Embed('../assets/symbols.swf', symbol='diamonds')] public static const DIAMONDS:Class; [Embed('../assets/symbols.swf', symbol='hearts')] public static const HEARTS:Class; } }
[flexcoders] Re: Flex3: attaching assets from .swf using getDefinitionByName
I've prepared a much simpler test case and it is still not working - i.e. the icons at the buttons and the drawn circle do work fine, but I can't attach an .swf symbol, it is reported as null (but works ok for button??) - ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute creationComplete=onCreationComplete(); mx:Script ![CDATA[ [Embed('../assets/symbols.swf', symbol='spades')] var SPADES:Class; [Embed('../assets/symbols.swf', symbol='clubs')] var CLUBS:Class; [Embed('../assets/symbols.swf', symbol='diamonds')] var DIAMONDS:Class; [Embed('../assets/symbols.swf', symbol='hearts')] var HEARTS:Class; private function onCreationComplete():void { var sprite:Sprite = new Sprite(); var g:Graphics = sprite.graphics; g.beginFill(0xFF); g.drawCircle(100, 100, 10); g.endFill(); spriteHolder.addChild(sprite); // XXX the only line which does not work spriteHolder.addChild(SPADES as DisplayObject); } ]] /mx:Script mx:VBox width=100% mx:Button label=1 icon={SPADES} / mx:Button label=2 icon={CLUBS} / mx:Button label=3 icon={DIAMONDS} / mx:Button label=4 icon={HEARTS} / mx:UIComponent id=spriteHolder width=200 height=200/ /mx:VBox /mx:Application
[flexcoders] Flex3: attaching assets from .swf using getDefinitionByName
Hello, I'm new to this list and also Flex. I'm stuck with a probably simple problem, which I'd like to demonstrate with a short test case: Test.mxml: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute creationComplete=onCreationComplete(); mx:Script ![CDATA[ private function onCreationComplete():void { var sprite:Sprite = new Sprite(); var g:Graphics = sprite.graphics; g.lineStyle(1, 0xFF); g.beginFill(0xFF); g.drawCircle(100, 100, 20); g.endFill(); spriteHolder.addChild(sprite); // XXX stuff below not working var suit:String = 'SPADES'; var mc:MovieClip = new (getDefinitionByName(Symbols.CLUBS) as Class); spriteHolder.addChild(mc); } ]] /mx:Script mx:VBox width=100% mx:Button label=1 icon={Symbols.SPADES} / mx:Button label=2 icon={Symbols.CLUBS} / mx:Button label=3 icon={Symbols.DIAMONDS} / mx:Button label=4 icon={Symbols.HEARTS} / mx:UIComponent id=spriteHolder width=200 height=200/ /mx:VBox /mx:Application Symbols.as: package { public class Symbols { [Embed('../assets/symbols.swf', symbol='spades')] public static const SPADES:Class; [Embed('../assets/symbols.swf', symbol='clubs')] public static const CLUBS:Class; [Embed('../assets/symbols.swf', symbol='diamonds')] public static const DIAMONDS:Class; [Embed('../assets/symbols.swf', symbol='hearts')] public static const HEARTS:Class; } } How could I make the mc appear? Everything else work ok. (the icons appear at the buttons, there is a red circle,...) Thank you Alex
Re: [flexcoders] Flex3: attaching assets from .swf using getDefinitionByName
Hello, On Wed, Mar 24, 2010 at 11:23 PM, Oleg Sivokon olegsivo...@gmail.comwrote: 1. You cannot embed on constants. 2. It is always better to embed on a class then on a variable (you won't be using mx.core.WhateverAsset for the asset factory, but a normal flash.* class. 1) Are you sure? Embedding seems to work fine for the lines mx:Button label=1 icon={Symbols.SPADES} / mx:Button label=2 icon={Symbols.CLUBS} / mx:Button label=3 icon={Symbols.DIAMONDS} / mx:Button label=4 icon={Symbols.HEARTS} / Also, I've changed from const to var in the package { public class Symbols { [Embed('../assets/symbols.swf', symbol='spades')] public static var SPADES:Class; and still get the same runtime error ReferenceError: Error #1065: Variable SPADES is not defined. at global/flash.utils::getDefinitionByName() at TestCase/onCreationComplete()[C:\Documents and Settings\afarber\My Documents\Flex Builder 3\TestCase\src\TestCase.mxml:21] at TestCase/___TestCase_Application1_creationComplete()[C:\Documents and Settings\afarber\My Documents\Flex Builder 3\TestCase\src\TestCase.mxml:4] 2) Could you elaborate, I don't understand what you've written. Can anyone please fix my test code? Here is it again, it is very short: package { public class Symbols { [Embed('../assets/symbols.swf', symbol='spades')] public static var SPADES:Class; [Embed('../assets/symbols.swf', symbol='clubs')] public static var CLUBS:Class; [Embed('../assets/symbols.swf', symbol='diamonds')] public static var DIAMONDS:Class; [Embed('../assets/symbols.swf', symbol='hearts')] public static var HEARTS:Class; } } - ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute creationComplete=onCreationComplete(); mx:Script ![CDATA[ private function onCreationComplete():void { var sprite:Sprite = new Sprite(); var g:Graphics = sprite.graphics; g.lineStyle(1, 0xFF); g.beginFill(0xFF); g.drawCircle(100, 100, 20); g.endFill(); spriteHolder.addChild(sprite); // XXX stuff below not working, can it be fixed? var suit:String = SPADES; var mc:MovieClip = new (getDefinitionByName(Symbols.SPADES) as Class); spriteHolder.addChild(mc); } ]] /mx:Script mx:VBox width=100% mx:Button label=1 icon={Symbols.SPADES} / mx:Button label=2 icon={Symbols.CLUBS} / mx:Button label=3 icon={Symbols.DIAMONDS} / mx:Button label=4 icon={Symbols.HEARTS} / mx:UIComponent id=spriteHolder width=200 height=200/ /mx:VBox /mx:Application
Re: [flexcoders] Re: Caringorm vs PureMVC
Honestly, nobody can really answer the question of which one is better, as they all are built to server a purpose. As you are going to have to live and breathe whichever framework you choose, you really should research them yourself and try it out, then you'll know which one you prefer and which one works best with your specific project. -Julian From: Wally Kolcz wko...@isavepets.com To: flexcoders@yahoogroups.com Sent: Mon, January 11, 2010 9:08:19 AM Subject: re: [flexcoders] Re: Caringorm vs PureMVC I, too, am using Mate. The best part is the lower learning curve and the fact that it is completely independent of your code. I use it in all my projects. Since there is NO Mate code in your Model, Managers, or Views, you can pop the framework off at any time and the application will still run. (you just have to handle to events). Even though I haven't used it, Swiz also has that reputation. Both have been referred to as 2nd generation Flex frameworks (verses Caringorm and PureMVC. From: gers32 c...@kitry.fr Sent: Monday, January 11, 2010 2:32 AM To: flexcod...@yahoogro ups.com Subject: [flexcoders] Re: Caringorm vs PureMVC Hi Patricia, I spent a couple days investigating the various Flex frameworks and finally came to the conclusion that Mate was best for me. The big Plus is that it doesn't interfere with your Flex code. Among my numerous findings, the following two are pretty good: http://www.insideri a.com/2009/ 01/frameworkques t-2008-part- 6-the.html http://www.adobe. com/devnet/ flex/articles/ flex_framework. html Cheers, Chris.
Re: [flexcoders] Network Topology Diagrams
Check out KapLabs diagrammer - that I think would be your best bet. -Julian From: vin.flex vin.f...@yahoo.com To: flexcoders@yahoogroups.com Sent: Tue, December 29, 2009 12:59:09 PM Subject: [flexcoders] Network Topology Diagrams Hi, I got a requiremnt to display newtwork diagrmas. These diagrams should be created dynamically by loading data from the database. I have looked into some 3rd party frameworks like, ILOG Elixir, y files etc, but none of them was giving me a solution. Any bidy cna suggest how to implemnt this. thanks vin
Re: [flexcoders] IE6 + SSL + Flex
Dear Venkat, Thanks for the direction, but unfortunately that just made it worse. Any other ideas? -Julian From: venkateswarlu naidu contactve...@yahoo.co.in To: flexcoders@yahoogroups.com Sent: Sat, December 26, 2009 10:43:39 PM Subject: Re: [flexcoders] IE6 + SSL + Flex If your SWF is not loading in IE6 + SSL + Flex combination, then try setting http-proxy-caching-of-cookiesin app server configuration file (like weblogic.xml) Thanks Regards,Venkat. From: wb...@ymail. com wb...@ymail. com To: flexcod...@yahoogro ups.com Sent: Sat, 26 December, 2009 7:54:57 PM Subject: [flexcoders] IE6 + SSL + Flex Dear All, Having a bit of a rough time over here with getting IE6 + flex + ssl to play nicely together. Everything works except that after the app has loaded once, if you go to a different URL and then go back it fails on loading, and unfortunately in my case this is a common scenario. If anyone is knowledgeable about this PLEASE (UL) let me know as I've been banging my head against the wall on this one for weeks on and off and now I have a bit of a deadline to meet and this is the primary stop. Thanks in advance, Julian The INTERNET now has a personality. YOURS! See your Yahoo! Homepage.
Re: [flexcoders] IE6 + SSL + Flex
Dear Guy, While I generally see you're point, there are a few flaws in what you're saying: 1. Try saying that to a corporate executive who is expecting your software to work in his existing infrastructure and see how far you get. 2. It is a problem in all version of IE anyway, so if you used the garbage known as IE 8 you'd still be in the same boat. 3. It's solved anyway by hacking the hell out of the headers when it's IE 6 :) (will be posted somewhere online once I've got the solution 100%). -Julian From: Guy Morton g...@alchemy.com.au To: flexcoders@yahoogroups.com Sent: Mon, December 28, 2009 5:03:44 PM Subject: Re: [flexcoders] IE6 + SSL + Flex Yes. Drop support for IE6. It has very little market share these days and is about the worst browser out there. Use a little browser detection javascript to tell users of IE6 it's time to update to something that isn't so crappy. Firefox, Google Chrome and Safari are all far better browsers than any version of IE. If developers stopped tying themselves in knots trying to work around all IE's faults and instead encouraged everyone to install one of the aforementioned browsers we'd soon see many of these sorts of problems go away and we could concentrate instead on actually developing content. Guy On 29/12/2009, at 2:37 AM, Julian Alexander wrote: Dear Venkat, Thanks for the direction, but unfortunately that just made it worse. Any other ideas? -Julian From: venkateswarlu naidu contactvenku@ yahoo.co. in To: flexcoders@yahoogroups.com Sent: Sat, December 26, 2009 10:43:39 PM Subject: Re: [flexcoders] IE6 + SSL + Flex If your SWF is not loading in IE6 + SSL + Flex combination, then try setting http-proxy-caching-of-cookiesin app server configuration file (like weblogic.xml) Thanks Regards,Venkat. From: wb...@ymail. com wb...@ymail. com To: flexcod...@yahoogro ups.com Sent: Sat, 26 December, 2009 7:54:57 PM Subject: [flexcoders] IE6 + SSL + Flex Dear All, Having a bit of a rough time over here with getting IE6 + flex + ssl to play nicely together. Everything works except that after the app has loaded once, if you go to a different URL and then go back it fails on loading, and unfortunately in my case this is a common scenario. If anyone is knowledgeable about this PLEASE (UL) let me know as I've been banging my head against the wall on this one for weeks on and off and now I have a bit of a deadline to meet and this is the primary stop. Thanks in advance, Julian The INTERNET now has a personality. YOURS! See your Yahoo! Homepage.
Re: [flexcoders] array count?
myArray.length -J From: tex_learning_flex tex.learning.f...@gmail.com To: flexcoders@yahoogroups.com Sent: Fri, December 11, 2009 9:46:17 PM Subject: [flexcoders] array count? how do I best count items in an array? thanks, Tex
Re: [flexcoders] MAC : TextInput focus
I ran into this same issue but with every browser - however it may be different for you. Either way, the handling is simple: First, the problem is that the SWF file within the browser doesn't have the focus. Within the app your text field has focus, but you'll notice that you won't get any keyboard events or anything until you do a fix. The simplicity of it is that you need to use a bit of javascript to set the focus to the swf on page load. To do this, you modify the index.template.html file to have the following javascript function: function focusFlash () { document.getElementById('${application}').focus() } Now you can call that via ExternalInterface.call('focusFlash') on CreationComplete or whichever event makes the most sense. This will then set the focus to the SWF and shld resolve that issue. ML, Julian From: suman gayakwad srgayak...@gmail.com To: flexcoders@yahoogroups.com Sent: Tue, November 24, 2009 12:13:50 AM Subject: Re: [flexcoders] MAC : TextInput focus Hi Julian, The screen looks to have focus on the login page and the textinput seems to have focus(i mean blue border surrouding the text input field) but the focus is not set inside text input field.On clicking(Mouse click ) somewhere within the application, the focus is set in the text input field.This happens only in Safari Browser. Thanks, Suman __._,_..___ Reply to sender | Reply to group Messages in this topic (3) Recent Activity:* New Members 27 Visit Your Group Start a New Topic -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat..com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com MARKETPLACE Going Green: Your Yahoo! Groups resource for green living Switch to: Text-Only, Daily Digest • Unsubscribe • Terms of Use .
Re: [flexcoders] byteStream to .txt file
Check out the FileReference class. It has a download() method that can be passed a URLRequest. -Julian From: Matthew fume...@yahoo.com To: flexcoders@yahoogroups.com Sent: Tue, November 24, 2009 9:30:14 AM Subject: [flexcoders] byteStream to .txt file Hi - I'm working with a Java developer and trying to figure out how to download files off a server. Because the server doesn't accept HTTP requests (only FTP), I can't link to the file. The Java developer wants to send the file to me as a byteStream. Is this possible? How do I transform that to a .txt file? Is there a better solution? Thanks for any tips. Matt
Re: [flexcoders] Re: byteStream to .txt file
How are you even getting the byte stream if it's over FTP? From: Matthew fume...@yahoo.com To: flexcoders@yahoogroups.com Sent: Tue, November 24, 2009 10:21:15 AM Subject: [flexcoders] Re: byteStream to .txt file I didn't realize I could plug in an FTP address into URLRequest. Regardless, I just found out he have write access but not read access on that server. Anyway, I think I can use the byteArray class to read a byte stream but is there some type of library for creating a TXT file out of that? Thanks for your help. Matt --- In flexcod...@yahoogro ups.com, Julian Alexander wb...@... wrote: Check out the FileReference class. It has a download() method that can be passed a URLRequest. -Julian _ _ __ From: Matthew fume...@... To: flexcod...@yahoogro ups.com Sent: Tue, November 24, 2009 9:30:14 AM Subject: [flexcoders] byteStream to .txt file Hi - I'm working with a Java developer and trying to figure out how to download files off a server. Because the server doesn't accept HTTP requests (only FTP), I can't link to the file. The Java developer wants to send the file to me as a byteStream. Is this possible? How do I transform that to a .txt file? Is there a better solution? Thanks for any tips. Matt
Re: [flexcoders] Re: byteStream to .txt file
I think it is possible to download via FTP in flex: http://projects.maliboo.pl/FlexFTP/ and I'm pretty sure that there's no conversion needed to get it back to a text file or anything. I haven't done any downloading via FTP but I've had a Java client stream me files plenty of times and it comes out the other end as the file. -J From: Matthew fume...@yahoo.com To: flexcoders@yahoogroups.com Sent: Tue, November 24, 2009 12:34:48 PM Subject: [flexcoders] Re: byteStream to .txt file I haven't hooked up the byteArray object yet so I don't even know if it could work with an FTP server. I'm guessing from your response that the answer is no, it wouldn't work. --- In flexcod...@yahoogro ups.com, Julian Alexander wb...@... wrote: How are you even getting the byte stream if it's over FTP? _ _ __ From: Matthew fume...@ To: flexcod...@yahoogro ups.com Sent: Tue, November 24, 2009 10:21:15 AM Subject: [flexcoders] Re: byteStream to .txt file I didn't realize I could plug in an FTP address into URLRequest. Regardless, I just found out he have write access but not read access on that server. Anyway, I think I can use the byteArray class to read a byte stream but is there some type of library for creating a TXT file out of that? Thanks for your help. Matt --- In flexcod...@yahoogro ups.com, Julian Alexander wb2nd@ wrote: Check out the FileReference class. It has a download() method that can be passed a URLRequest. -Julian _ _ __ From: Matthew fumeng5@ To: flexcod...@yahoogro ups.com Sent: Tue, November 24, 2009 9:30:14 AM Subject: [flexcoders] byteStream to .txt file Hi - I'm working with a Java developer and trying to figure out how to download files off a server. Because the server doesn't accept HTTP requests (only FTP), I can't link to the file. The Java developer wants to send the file to me as a byteStream. Is this possible? How do I transform that to a .txt file? Is there a better solution? Thanks for any tips. Matt __._,_..___ Reply to sender | Reply to group Messages in this topic (5) Recent Activity:* New Members 28 Visit Your Group Start a New Topic -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat..com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com MARKETPLACE Mom Power: Discover the community of moms doing more for their families, for the world and for each other Switch to: Text-Only, Daily Digest • Unsubscribe • Terms of Use .
Re: [flexcoders] MAC : TextInput focus
The other thing is callLater(). I've found also that in some cases the focus only gets partially set when other things are still being initialized. Try calling callLater(myComp.setFocus); after creationComplete. -J From: suman gayakwad srgayak...@gmail.com To: flexcoders@yahoogroups.com Sent: Tue, November 24, 2009 11:12:33 AM Subject: Re: [flexcoders] MAC : TextInput focus Hi Julian, I did that and the focus seems to be in loaded SWF but it wont set the focus in textinput field embedded in the swf :( . This happens only in safari browser. Thanks, Suman
Re: [flexcoders] MAC : TextInput focus
Does the screen look like it has focus but when you type it doesn't actually go there? From: Suman srgayak...@gmail.com To: flexcoders@yahoogroups.com Sent: Mon, November 23, 2009 11:37:49 AM Subject: [flexcoders] MAC : TextInput focus Hi, In our application, i am trying to set the focus on the login page which has got textinput field. This works fine in IE as well as Firefox but fails in Mac browser. Any pointers on how to set the focus on the textinput field in Mac browser? Thanks, Suman
Re: [flexcoders] Syntax Question
Dan, The problem (I assume) is that the object you're getitng back isn't XML. I was using that as an example, but when you use the as operator if the object isn't that type it will always return null. What is your data provider? Is it an array of objects? XML? It all depends on what you're doing. Either way, it's based on a list. Getting the selected item will give you a generic object that you need to cast to whichever data type (actually, you don't have to but it's nicer) at which point you have all of the properties accessible and you can grab the same property that the first column is bound to. -Julian From: Dan Pride danielpr...@yahoo.com To: flexcoders@yahoogroups.com Sent: Sat, November 21, 2009 7:42:28 AM Subject: Re: [flexcoders] Syntax Question Julian... Apparently you are wrong? When I do it with an untyped var I get an object with an XMLList for each grid column var squat = dataGrid.selectedIt em; This var myValue:XML = dataGrid.selectedIt em as XML; returns null for myValue Why is it such Rocket Science to get the first value in a column? Very frustrating for something that should be so simple. Thanks for the help Dan --- On Fri, 11/20/09, Julian Alexander wb...@ymail. com wrote: From: Julian Alexander wb...@ymail. com Subject: Re: [flexcoders] Syntax Question To: flexcod...@yahoogro ups.com Date: Friday, November 20, 2009, 10:53 PM You can't access the value from the column name - getting the selected value will give you the entire row that the datagrid is displaying from which you can get the value you're looking for. In other words, if you have an XMLList as your dataProvider, you can do something like: var myValue:XML = dataGrid.selectedIt em as XML; var myName:String = myval...@name. Make sense? -Julian From: Dan Pride danielpride@ yahoo.com To: flexcod...@yahoogro ups.com Sent: Fri, November 20, 2009 9:43:33 PM Subject: [flexcoders] Syntax Question On Creation complete I am filling a datagrid and I want to select the first value listed from the Name Column (NameCol) What is the syntax? dataGrid.selectedIn dex = 0; Value = dataGrid.selectedIt em.NameCol; Does not work. why not? Thanks Dan
Re: [flexcoders] Syntax Question
Why the heck do you need to re-cast as an XMLListCollection? This is a actually really simple... var squat:XML = XML(squaresGrid.selectedItem); var myValue:String = squ...@myproperty OR squat.myProperty (depending on if it's a node or attribute) It does work. I've done it hundreds of times. Don't know what you're doing wrong... -Julian From: Dan Pride danielpr...@yahoo..com To: flexcoders@yahoogroups.com Sent: Sat, November 21, 2009 11:43:34 AM Subject: Re: [flexcoders] Syntax Question Thanks for the response. Its an ArrayCollection of XML objects. var squat:XMLList = squaresGrid. selectedItem. NameCol; will trace as an XML List but I can not seem to get the list to then recast as an XMLListCollection so I can get at it. Thanks Dan --- On Sat, 11/21/09, Julian Alexander wb...@ymail. com wrote: From: Julian Alexander wb...@ymail.. com Subject: Re: [flexcoders] Syntax Question To: flexcod...@yahoogro ups.com Date: Saturday, November 21, 2009, 11:14 AM Dan, The problem (I assume) is that the object you're getitng back isn't XML. I was using that as an example, but when you use the as operator if the object isn't that type it will always return null. What is your data provider? Is it an array of objects? XML? It all depends on what you're doing. Either way, it's based on a list. Getting the selected item will give you a generic object that you need to cast to whichever data type (actually, you don't have to but it's nicer) at which point you have all of the properties accessible and you can grab the same property that the first column is bound to. -Julian From: Dan Pride danielpride@ yahoo.com To: flexcod...@yahoogro ups.com Sent: Sat, November 21, 2009 7:42:28 AM Subject: Re: [flexcoders] Syntax Question Julian... Apparently you are wrong? When I do it with an untyped var I get an object with an XMLList for each grid column var squat = dataGrid.selectedIt em; This var myValue:XML = dataGrid.selectedIt em as XML; returns null for myValue Why is it such Rocket Science to get the first value in a column? Very frustrating for something that should be so simple. Thanks for the help Dan --- On Fri, 11/20/09, Julian Alexander wb...@ymail. com wrote: From: Julian Alexander wb...@ymail. com Subject: Re: [flexcoders] Syntax Question To: flexcod...@yahoogro ups.com Date: Friday, November 20, 2009, 10:53 PM You can't access the value from the column name - getting the selected value will give you the entire row that the datagrid is displaying from which you can get the value you're looking for. In other words, if you have an XMLList as your dataProvider, you can do something like: var myValue:XML = dataGrid.selectedIt em as XML; var myName:String = myval...@name. Make sense? -Julian From: Dan Pride danielpride@ yahoo.com To: flexcod...@yahoogro ups.com Sent: Fri, November 20, 2009 9:43:33 PM Subject: [flexcoders] Syntax Question On Creation complete I am filling a datagrid and I want to select the first value listed from the Name Column (NameCol) What is the syntax? dataGrid.selectedIn dex = 0; Value = dataGrid.selectedIt em.NameCol; Does not work. why not? Thanks Dan Reply to sender | Reply to group Messages in this topic (6) Recent Activity:* New Members 34 Visit Your Group Start a New Topic -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com MARKETPLACE Parenting Zone: Find useful resources for a happy, healthy family and home Switch to: Text-Only, Daily Digest • Unsubscribe • Terms of Use . __,_.._,___
Re: [flexcoders] Syntax Question
Alright Dan.. so we're going to solve this. After this much back-and-forth, we've gotta make it work. So here's the deal: if you use my statement and squat is just XML, then you're almost there. It should be something like this yourObject nameGZAW08/name otherPropertyvalue/otherProperty etc... / /yourObject With your variable squat, you can then access a specific property of it by saying, for example, squat.name - that will give you the value. If you want it as a string, you can also say squat.name.toString(). Just to clarify earlier, if you had yourObject name=GZAW08 etc.../ then you would use squ...@name. -Julian From: Dan Pride danielpr...@yahoo.com To: flexcoders@yahoogroups.com Sent: Sat, November 21, 2009 4:09:59 PM Subject: Re: [flexcoders] Syntax Question Yes I would think something this absurdly simple would be a single sentence reply which I could cut and paste,... unfortunately not. This statement with the variable uncast var crapola = squaresGrid. selectedItem. NameCol; returns as follows in the debugger this Center (@137ef0a1) crapolaXMLList (@1ce7c461) [0] XML Name GZAW08 Your statement var squat:XML = XML(squaresGrid. selectedItem) ; returned just XML Neither of the two options you stated worked. It is the string GZAW08 which I am trying to return. I am ready to throw something, sorry to visit this on you. --- On Sat, 11/21/09, Julian Alexander wb...@ymail. com wrote: From: Julian Alexander wb...@ymail. com Subject: Re: [flexcoders] Syntax Question To: flexcod...@yahoogro ups.com Date: Saturday, November 21, 2009, 2:08 PM Why the heck do you need to re-cast as an XMLListCollection? This is a actually really simple... var squat:XML = XML(squaresGrid. selectedItem) ; var myValue:String = squ...@myproperty OR squat.myProperty (depending on if it's a node or attribute) It does work. I've done it hundreds of times. Don't know what you're doing wrong... -Julian From: Dan Pride danielpride@ yahoo.com To: flexcod...@yahoogro ups.com Sent: Sat, November 21, 2009 11:43:34 AM Subject: Re: [flexcoders] Syntax Question Thanks for the response. Its an ArrayCollection of XML objects. var squat:XMLList = squaresGrid. selectedItem. NameCol; will trace as an XML List but I can not seem to get the list to then recast as an XMLListCollection so I can get at it. Thanks Dan --- On Sat, 11/21/09, Julian Alexander wb...@ymail. com wrote: From: Julian Alexander wb...@ymail. com Subject: Re: [flexcoders] Syntax Question To: flexcod...@yahoogro ups.com Date: Saturday, November 21, 2009, 11:14 AM Dan, The problem (I assume) is that the object you're getitng back isn't XML. I was using that as an example, but when you use the as operator if the object isn't that type it will always return null. What is your data provider? Is it an array of objects? XML? It all depends on what you're doing. Either way, it's based on a list. Getting the selected item will give you a generic object that you need to cast to whichever data type (actually, you don't have to but it's nicer) at which point you have all of the properties accessible and you can grab the same property that the first column is bound to. -Julian From: Dan Pride danielpride@ yahoo.com To: flexcod...@yahoogro ups.com Sent: Sat, November 21, 2009 7:42:28 AM Subject: Re: [flexcoders] Syntax Question Julian... Apparently you are wrong? When I do it with an untyped var I get an object with an XMLList for each grid column var squat = dataGrid.selectedIt em; This var myValue:XML = dataGrid.selectedIt em as XML; returns null for myValue Why is it such Rocket Science to get the first value in a column? Very frustrating for something that should be so simple. Thanks for the help Dan --- On Fri, 11/20/09, Julian Alexander wb...@ymail. com wrote: From: Julian Alexander wb...@ymail. com Subject: Re: [flexcoders] Syntax Question To: flexcod...@yahoogro ups.com Date: Friday, November 20, 2009, 10:53 PM You can't access the value from the column name - getting the selected value will give you the entire row that the datagrid is displaying from which you can get the value you're looking for.. In other words, if you have an XMLList as your dataProvider, you can do something like: var myValue:XML = dataGrid.selectedIt em as XML; var myName:String = myval...@name. Make sense? -Julian From: Dan Pride danielpride@ yahoo.com To: flexcod...@yahoogro ups.com Sent: Fri, November 20, 2009 9:43:33 PM Subject: [flexcoders] Syntax Question On Creation complete I am filling a datagrid and I want to select the first value listed from the Name Column (NameCol) What is the syntax
Re: [flexcoders] Extremely large HTTP Requests
Tino - thanks. There is a threshold on tomcat that limits the size. I basically got rid of this and it was fine :) -Julian From: Tino Dai obe...@gmail.com To: flexcoders@yahoogroups.com Sent: Sat, November 21, 2009 2:25:33 PM Subject: Re: [flexcoders] Extremely large HTTP Requests You might want to start poking around in the Tomcat settings. http://tomcat. apache.org/ tomcat-5. 5-doc/config/ http.html -Tino On Sat, Nov 21, 2009 at 2:16 PM, wb...@ymail. com wb...@ymail. com wrote: Dear All, I have a little IMAP Client that I wrote, and in the main it works perfectly except for when there is a MASSIVE email that I am trying to either reply to or anything. I have one in particular that I'm struggling with, but more could come in as I will have about 600 people using the client in the next week or so (I'm running a pilot right now of only 12 people or so and I've already run into it). I have a message that, when copied into a text file, is about 750k. This message is one of the HTTP Parameters set, however Tomcat (the backend for it) seems to just kill all of the parameters when I send something this big. Is there a limit to HTTP Request sizes? If so, is there a way around it? -Julian Reply to sender | Reply to group Messages in this topic (2) Recent Activity:* New Members 34 Visit Your Group Start a New Topic -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com MARKETPLACE Parenting Zone: Find useful resources for a happy, healthy family and home Switch to: Text-Only, Daily Digest • Unsubscribe • Terms of Use . __,_.._,___
Re: [flexcoders] Syntax Question
Can you somehow send me your code? This is agitating. Value Objects are abt 100x better anyway tho... -Julian From: Dan Pride danielpr...@yahoo.com To: flexcoders@yahoogroups.com Sent: Sat, November 21, 2009 5:14:59 PM Subject: Re: [flexcoders] Syntax Question I tried all that in the first hour. None of it works I have been resisting it but I think I am just going to rewrite the whole damn thing in value objects. i started this app some time ago leveraging off the auto generated php code for a database table. The references have been a pain ever since. I would truely like to know why nothing anybody has suggested has worked tho. It really bugs me. Dan --- On Sat, 11/21/09, Julian Alexander wb...@ymail. com wrote: From: Julian Alexander wb...@ymail. com Subject: Re: [flexcoders] Syntax Question To: flexcod...@yahoogro ups.com Date: Saturday, November 21, 2009, 4:53 PM Alright Dan.. so we're going to solve this. After this much back-and-forth, we've gotta make it work. So here's the deal: if you use my statement and squat is just XML, then you're almost there. It should be something like this yourObject nameGZAW08/name otherPropertyvalue/otherProperty etc... / /yourObject With your variable squat, you can then access a specific property of it by saying, for example, squat.name - that will give you the value. If you want it as a string, you can also say squat.name.toString (). Just to clarify earlier, if you had yourObject name=GZAW08 etc.../ then you would use squ...@name. -Julian From: Dan Pride danielpride@ yahoo.com To: flexcod...@yahoogro ups.com Sent: Sat, November 21, 2009 4:09:59 PM Subject: Re: [flexcoders] Syntax Question Yes I would think something this absurdly simple would be a single sentence reply which I could cut and paste,... unfortunately not. This statement with the variable uncast var crapola = squaresGrid. selectedItem. NameCol; returns as follows in the debugger this Center (@137ef0a1) crapolaXMLList (@1ce7c461) [0] XML Name GZAW08 Your statement var squat:XML = XML(squaresGrid. selectedItem) ; returned just XML Neither of the two options you stated worked. It is the string GZAW08 which I am trying to return. I am ready to throw something, sorry to visit this on you. --- On Sat, 11/21/09, Julian Alexander wb...@ymail. com wrote: From: Julian Alexander wb...@ymail. com Subject: Re: [flexcoders] Syntax Question To: flexcod...@yahoogro ups.com Date: Saturday, November 21, 2009, 2:08 PM Why the heck do you need to re-cast as an XMLListCollection? This is a actually really simple... var squat:XML = XML(squaresGrid. selectedItem) ; var myValue:String = squ...@myproperty OR squat.myProperty (depending on if it's a node or attribute) It does work. I've done it hundreds of times. Don't know what you're doing wrong... -Julian From: Dan Pride danielpride@ yahoo.com To: flexcod...@yahoogro ups.com Sent: Sat, November 21, 2009 11:43:34 AM Subject: Re: [flexcoders] Syntax Question Thanks for the response. Its an ArrayCollection of XML objects. var squat:XMLList = squaresGrid. selectedItem. NameCol; will trace as an XML List but I can not seem to get the list to then recast as an XMLListCollection so I can get at it. Thanks Dan --- On Sat, 11/21/09, Julian Alexander wb...@ymail. com wrote: From: Julian Alexander wb...@ymail. com Subject: Re: [flexcoders] Syntax Question To: flexcod...@yahoogro ups.com Date: Saturday, November 21, 2009, 11:14 AM Dan, The problem (I assume) is that the object you're getitng back isn't XML. I was using that as an example, but when you use the as operator if the object isn't that type it will always return null. What is your data provider? Is it an array of objects? XML? It all depends on what you're doing. Either way, it's based on a list. Getting the selected item will give you a generic object that you need to cast to whichever data type (actually, you don't have to but it's nicer) at which point you have all of the properties accessible and you can grab the same property that the first column is bound to. -Julian From: Dan Pride danielpride@ yahoo.com To: flexcod...@yahoogro ups.com Sent: Sat, November 21, 2009 7:42:28 AM Subject: Re: [flexcoders] Syntax Question Julian... Apparently you are wrong? When I do it with an untyped var I get an object with an XMLList for each grid column var squat = dataGrid.selectedIt em; This var myValue:XML = dataGrid.selectedIt em as XML; returns null for myValue Why is it such Rocket Science to get the first value in a column? Very frustrating for something that should be so simple. Thanks for the help Dan --- On Fri, 11
Re: [flexcoders] Combo box right-anchor
Okay, I actually got a bit distracted and didn't end up working on this for the last day or so, however after a brief search I did find the solution in the archives, however I implemented it slightly differently (it's along the lines of what you were saying, Alex): private function handleOpen ( aEvent:DropDownEvent ):void { var myScreenWidth:Number = Application(Application.application).width; var myCombo:cComboBox= aEvent.currentTarget as cComboBox; var myCurrentX:Number= localToGlobal(new Point(this.x, this.y)).x; if(myCurrentX + myCombo.dropdown.width - 50) myScreenWidth) { myCombo.dropdown.x = myScreenWidth - myCombo.dropdown.width; } } This is specifically because I don't really care unless it's at the right edge of the screen and will be cut off, so only in that case do I do anything. cComboBox is my own extended combo box, and as you can tell the function is within it with the listener being added in the constructor. Thanks for the direction! -Julian From: Alex Harui aha...@adobe.com To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com Sent: Thu, November 19, 2009 1:09:10 AM Subject: RE: [flexcoders] Combo box right-anchor There is no API for this. You might find an old discussion of this problem in the archives. I think you have to get the dropdown, add an eventListener for “show” and/or “move” and reposition then. You may also have to adjust the scrollRect. Alex Harui Flex SDK Developer Adobe Systems Inc. Blog: http://blogs. adobe.com/ aharui From:flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of Julian Alexander Sent: Wednesday, November 18, 2009 6:16 PM To: flexcod...@yahoogro ups.com Subject: Re: [flexcoders] Combo box right-anchor That's kinda what I'm trying to do - I've already got it solved where it sets the drop down width dynamically based on the content of the lookup, however the combo box is on the right side of the screen and the drop down gets cut off by the right side of the screen, thus I'm trying to anchor it on the right. Is there any way to do this? From:Alex Harui aha...@adobe. com To: flexcod...@yahoogro ups.com flexcod...@yahoogro ups.com Sent: Wed, November 18, 2009 6:39:23 PM Subject: RE: [flexcoders] Combo box right-anchor Setting dropDownWidth will make it wider, but you may not like where it puts the left edge. Alex Harui Flex SDK Developer Adobe Systems Inc. Blog: http://blogs. adobe.com/ aharui From:flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of wb...@ymail. com Sent: Wednesday, November 18, 2009 12:19 PM To: flexcod...@yahoogro ups.com Subject: [flexcoders] Combo box right-anchor Dear All, I am trying to make a combo box with an extended drop down (wider than the control) anchor to the right. Basically I want +-+ |My Combo_|V| - + |___ _ | |___ _ | |___ _ | Hopefully my little ascii diagram makes sense... Does aynyone know how this could be do! ne?
Re: [flexcoders] Syntax Question
You can't access the value from the column name - getting the selected value will give you the entire row that the datagrid is displaying from which you can get the value you're looking for. In other words, if you have an XMLList as your dataProvider, you can do something like: var myValue:XML = dataGrid.selectedItem as XML; var myName:String = myval...@name. Make sense? -Julian From: Dan Pride danielpr...@yahoo.com To: flexcoders@yahoogroups.com Sent: Fri, November 20, 2009 9:43:33 PM Subject: [flexcoders] Syntax Question On Creation complete I am filling a datagrid and I want to select the first value listed from the Name Column (NameCol) What is the syntax? dataGrid.selectedIn dex = 0; Value = dataGrid.selectedIt em.NameCol; Does not work. why not? Thanks Dan __.._,_.___ Reply to sender | Reply to group Messages in this topic (1) Recent Activity:* New Members 34 Visit Your Group Start a New Topic -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com MARKETPLACE Mom Power: Discover the community of moms doing more for their families, for the world and for each other Switch to: Text-Only, Daily Digest • Unsubscribe • Terms of Use .
Re: [flexcoders] measureHeightOfItems()
I ended up just hardcoding the heights of the renderers and now it's fine :) Thanks though! From: Alex Harui aha...@adobe.com To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com Sent: Mon, November 16, 2009 5:52:10 PM Subject: RE: [flexcoders] measureHeightOfItems() The DG will measure the first item in the dataprovider. If that isn’t “typical” you can get bad results. But first, make sure your custom renderers to accurately measure. Lots of folks have problems especially if the renderer has something in it that word-wraps text. I think you can just set rowHeight to a number that is “typical” and variableRowHeight will still work. Alex Harui Flex SDK Developer Adobe Systems Inc. Blog: http://blogs. adobe.com/ aharui From:flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of wb...@ymail. com Sent: Monday, November 16, 2009 11:04 AM To: flexcod...@yahoogro ups.com Subject: [flexcoders] measureHeightOfItem s() Dear All, I have a component that is a composite of a datagrid and an advancedDataGrid - the datagrid being on top. The top datagrid shows the primary information, while the bottom grid shows everything grouped (using the grouping functionality of the AdvancedDataGrid) , however I am having some serious issues with the sizing of the top grid. The idea is that it is sized based on the components within it, however it has the most variables you can possibly get for such a scenario - namely, it has custom renderers in each case it's used (and it's not the same renderer each time), variableRowHeight is true - and has to be. The problem I'm running into is that the measureHeightOfItem s() gives me, occasionally, grossly inaccurate figures. I get the top grid being twice the size that it needs to be on occasion. Does anyone know how to fix this or an alternative method?
Re: [flexcoders] Combo box right-anchor
That's kinda what I'm trying to do - I've already got it solved where it sets the drop down width dynamically based on the content of the lookup, however the combo box is on the right side of the screen and the drop down gets cut off by the right side of the screen, thus I'm trying to anchor it on the right. Is there any way to do this? From: Alex Harui aha...@adobe.com To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com Sent: Wed, November 18, 2009 6:39:23 PM Subject: RE: [flexcoders] Combo box right-anchor Setting dropDownWidth will make it wider, but you may not like where it puts the left edge. Alex Harui Flex SDK Developer Adobe Systems Inc. Blog: http://blogs. adobe.com/ aharui From:flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of wb...@ymail. com Sent: Wednesday, November 18, 2009 12:19 PM To: flexcod...@yahoogro ups.com Subject: [flexcoders] Combo box right-anchor Dear All, I am trying to make a combo box with an extended drop down (wider than the control) anchor to the right. Basically I want +-+ |My Combo_|V| - + |___ _ | |___ _ | |___ _ | Hopefully my little ascii diagram makes sense... Does aynyone know how this could be do! ne?
Re: [flexcoders] Position elements with different font size against baseline in HBox
Well, thank you for the answer, but I originally asked how I could eliminate padding =) On Sun, Sep 6, 2009 at 3:49 AM, Ivan Wang ivan.wang2...@gmail.com wrote: Just make the labels same height, and tuning its own padding. I think it is sort of tricky, but Flex still can't make text alignment perfect automatically, and you do always have to spend much effort to get over this. mx:HBox mx:Label height=100% text=LABEL1 fontSize=10 paddingTop = 2/ mx:Label height=100% text=LABEL2 fontSize=12 paddingTop = 0/ /mx:HBox - Original Message - *From:* Alexander Tarelkin alexander.tarel...@gmail.com *To:* flexcoders@yahoogroups.com *Sent:* Saturday, September 05, 2009 2:38 AM *Subject:* [flexcoders] Position elements with different font size against baseline in HBox Hello, flexcoders. Let's pretend I have the following code: mx:HBox mx:Label text=LABEL1 fontSize=10/ mx:Label text=LABEL2 fontSize=12/ /mx:HBox What should I do to vertically position the buttons on the same baseline without using padding? Referencing some constraint row from outside the HBox does not work, since HBox abolishes absolute positioning. Thank you, Alexander Tarelkin
Re: [flexcoders] LineSeries in LineChart
Types inherited from Series including LineSeries have a filterData property. Hopefully this is all you need. On Sat, Sep 5, 2009 at 10:56 PM, ram ramesh ram_y...@yahoo.co.in wrote: Hi How to block/restrict undefined value or null value in Lineseries before plotted into Chart. I tried all the scenarios.The issue is not consistent. If the Data object is not in ArrayCollection , undefined is getting plotted in the Chart. The Data point in the Chart is in 0 position of the Axis if the value is undefined. Please help me .I am relly sturggling to come out from this issue. 3 days I tried in all the scenarion like filteData = true setting and all. Please Response ASAP that would be very helpful. Thanks Ramesh
Re: [flexcoders] LineSeries in LineChart
I am sorry/ I missed that you have already tried this. Why don't you want to wrap the collection with an ArrayCollection if it works? On Sun, Sep 6, 2009 at 8:39 PM, Alexander Tarelkin alexander.tarel...@gmail.com wrote: Types inherited from Series including LineSeries have a filterData property. Hopefully this is all you need. On Sat, Sep 5, 2009 at 10:56 PM, ram ramesh ram_y...@yahoo.co.in wrote: Hi How to block/restrict undefined value or null value in Lineseries before plotted into Chart. I tried all the scenarios.The issue is not consistent. If the Data object is not in ArrayCollection , undefined is getting plotted in the Chart. The Data point in the Chart is in 0 position of the Axis if the value is undefined. Please help me .I am relly sturggling to come out from this issue. 3 days I tried in all the scenarion like filteData = true setting and all. Please Response ASAP that would be very helpful. Thanks Ramesh
[flexcoders] Position elements with different font size against baseline in HBox
Hello, flexcoders. Let's pretend I have the following code: mx:HBox mx:Label text=LABEL1 fontSize=10/ mx:Label text=LABEL2 fontSize=12/ /mx:HBox What should I do to vertically position the buttons on the same baseline without using padding? Referencing some constraint row from outside the HBox does not work, since HBox abolishes absolute positioning. Thank you, Alexander Tarelkin
Re: [flexcoders] Flex Compilation takes long time
I googled on the same subject literally a couple of weeks ago. Here is the link that shed some light and helped me: http://stackoverflow.com/questions/33768/any-advice-for-speeding-up-the-compile-time-in-flex-builder-3 What turned out relevant for our projects: * Slow compile time is most often caused by having large numbers of embedded resources ([Embed] or @Embed). We have plenty of them, but the second tip helped much more. * Go to Project-Properties-Flex Applications. All of the applications listed are compiled each time. This one is so evident but no one thought of that. We had 8 applications in the project, but only two of them were required at a time. On Wed, Jul 22, 2009 at 9:30 AM, ondemand_mayur ondemand_ma...@yahoo.comwrote: Hi folks, I have a project crated with Flex 3 ( SDK 3.2 ). When ever I compile it really takes much long time min 4 to 5 mins ( i.e. 240 to 300 seconds). That really make my developers crazy and it is so frustrating. Has any one any suggestions how to make compilation process faster. * I have already set -incremental=true for flex compiler in Flex Builder 3. * I have around six diff. modules in my project. ( And I have noticed after modularization of my application it takes some more time for compilation I know that in the process - flex builder has to call another tool for module compilation other then MXMLC ) I Need some tech. Tips and suggestions to reduce the time for compilation. Thanking you in advance. Mayur -- Alexander Tarelkin Web Developer devexperts.com
Re: [flexcoders] Flex Compilation takes long time
This link can be useful as well: http://hasseg.org/blog/?p=194 On Wed, Jul 22, 2009 at 9:30 AM, ondemand_mayur ondemand_ma...@yahoo.comwrote: Hi folks, I have a project crated with Flex 3 ( SDK 3.2 ). When ever I compile it really takes much long time min 4 to 5 mins ( i.e. 240 to 300 seconds). That really make my developers crazy and it is so frustrating. Has any one any suggestions how to make compilation process faster. * I have already set -incremental=true for flex compiler in Flex Builder 3. * I have around six diff. modules in my project. ( And I have noticed after modularization of my application it takes some more time for compilation I know that in the process - flex builder has to call another tool for module compilation other then MXMLC ) I Need some tech. Tips and suggestions to reduce the time for compilation. Thanking you in advance. Mayur -- Alexander Tarelkin Web Developer devexperts.com
Re: [flexcoders] variables name are in array
Where is the breaking condition in the loop? On Wed, Jul 22, 2009 at 12:57 AM, markflex2007 markflex2...@yahoo.comwrote: I use a array to save variable names and other to save values,but why the following code doesn't work.please give me a idea. for(var i:int = 0;arrName.length; i++) { arrName[i] = arrValue[i]; } Thanks a lot. Mark -- Alexander Tarelkin Web Developer devexperts.com
Re: [flexcoders] FlexBuilder / eclipse Question
Ctrl+F8 jumps between perspectives, and by default will return to the previous one. On Fri, Jul 17, 2009 at 7:21 PM, Libby libbychan...@yahoo.com wrote: Hi FlexBuilders! I was wondering if there is an option or way to automatically return to the development perspective when you shut down the debugger? So if you do terminate (Ctrl-F2) on the app in the debugger, you would immediately swap back over to development perspective the same way you earlier swapped to debugger perspective when you hit the debug button? Thanks for this and all your past help on this forum. Libby
[flexcoders] Sharing DataTransform between series
Hello, I am working on an application that displays several series on the same chart. The series display similar data so they actualy share vertical and horizontal axes. I noticed that series.describeData method is invoked twice for each dimension on any underlying data update. It turnes out that the axes are involved in several equal DataTransform objects within the chart. One common created in the CartesianChart, and one for each Serie object. Each data update leads to describeData invocation in the axes, they in turn call describeData on the registered datatransforms, the datatransforms call describeData on each IChartElement. Thus, each serie is contained in two dataTransforms: CartesianCharts' one and the Serie's own one. DataTransform object does not contain any state, so I wanted to reuse the chart's datatransform for all the series. Each Serie implements IChartElement so it implies passing in an external DataTransform. But, it turns out that the implementation of each series (Line, HLOC, Area) contains the following code in commitProperties method: dataTransform.elements = [this]; Moreover, the implementation of CartesianDataCanvas contains the code as well. Is there any reason why I should not want to reuse the same DataTransform or it is a bug? P.S. As a hack, I certainly can override the commitProperties and return the thrown out elements back, or even set elements array to an empty one and communicate over the CartesianChart's datatransform. I just wonder why it is as it is. I am using Flex 3.3.0.
[flexcoders] Good Flex skins
Hello, I am searching for a great looking Flex skins/themes. Something similar in quality to FlashMint (http://www.flashmint.com). Most of the Flex skins I've seen so far look extremely amateurish, including ScaleNine. Can you point me to a high-quality Flex skins library? Does it even exist? Thanks, Alex
[flexcoders] Memory Leak and SuperImage
Hi, i'm new to flex and have the following problem. When i run my application firefox and IE require nearly 5mb per second more memory and run on 100% cpu. Are there common mistakes i could have made? The only data i load are images with the help of the super image component. ( http://www.quietlyscheming.com/blog/2007/01/23/some-thoughts-on-doubt-on-flex-as-the-best-option-orhow-i-made-my-flex-images-stop-dancing/ ) i'm changing this images for mouseover effects and stuff but use allways the same. I hope anybody has an idea what could go wrong. Greetings, Alexander -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Memory Leak and SuperImage
I tried to debug it with the flex builder profiler, but i dont quite undertstand the outputs there. There aren't to many instance of my classes out there. Mostly one or two more than visible. my guess is that the garbage collector didnt collect them in time for the snapshot. what worries me are more than 5000 instances of Function and nearly the same number of Object. Is this normal? Together these two groups need more than 60% of my memory. If i read the profiler right, most of the objects are created in a function where i create a tooltip. I still hope someone has an idea. Greetings, Alexander CODE: var pt:Point = new Point(event.currentTarget.x, event.currentTarget.y); pt = event.currentTarget.localToGlobal(pt); var curX:Number = pt.x; var curY:Number = pt.y + event.currentTarget.height; tip = new SkillTooltip(); tip.Skill = mySkill; if (curX + tip.width Application.application.width) { curX = Application.application.width - tip.width; } tip.x = curX; tip.y = curY; var sm:ISystemManager = Application.application.systemManager; sm.toolTipChildren.addChild(tip); Alexander Baetz schrieb: Hi, i'm new to flex and have the following problem. When i run my application firefox and IE require nearly 5mb per second more memory and run on 100% cpu. Are there common mistakes i could have made? The only data i load are images with the help of the super image component. ( http://www.quietlyscheming.com/blog/2007/01/23/some-thoughts-on-doubt-on-flex-as-the-best-option-orhow-i-made-my-flex-images-stop-dancing/ ) i'm changing this images for mouseover effects and stuff but use allways the same. I hope anybody has an idea what could go wrong. Greetings, Alexander -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Dynamicaly loading of images
Hi, i use the SuperImage component now. Works fine. Thanks to all, Alexander Alexander Baetz schrieb: Hi, for a special tool i want to display buttons with icons that where loaded at runtime (based on an xml document loaded at runtime) in adobe livedocs i read that i cant load icons at runtime. To workaround that i switched to Images in buttonmode. But everytime the displayed image changes because i changed the source attribute (for example when my button is disabled) there is a timegap and the image is empty. This happens even i used the same source-url before. My guess would be that my application forgetts the imagedata if no object uses it anymore and therefore loads the url again. So im looking either for a way to store the imagedata and supply it to my Button when necessary. Greetings, Alexander -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Dynamicaly loading of images
Hi, for a special tool i want to display buttons with icons that where loaded at runtime (based on an xml document loaded at runtime) in adobe livedocs i read that i cant load icons at runtime. To workaround that i switched to Images in buttonmode. But everytime the displayed image changes because i changed the source attribute (for example when my button is disabled) there is a timegap and the image is empty. This happens even i used the same source-url before. My guess would be that my application forgetts the imagedata if no object uses it anymore and therefore loads the url again. So im looking either for a way to store the imagedata and supply it to my Button when necessary. Greetings, Alexander -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] How to Embed an Application that Supports Deep-Linking?
Hi, for Training i developed an application that uses the Flex 3 Deeplinking-Mechanism. I used the Flex Builder and everything Works perfect when i open the html-file, the flex builder creates. Now i tried to embed the application into an existing page (for example www.mydomain.de/myapp.html . I placed the application at www.myotherdomain.de/testapp/ and started trying. Since i don't know much about JavaScript i tried the copy-paste-Approach. Copy the content of the generated html-file, fix all links, check all links, hope it works. Well, all links work, i hoped and it didn't. No action inside my app changes the url inside the browser. No parameters attached to the url in the prowser affect the application. My current Testembed is added as an attachment. Everything beside testapp_embed.txt was generated by the flex builder. How can (or should) i use a flex application from another domain and make deeplinking still work? I hope somebody out there can help me. Greetings, Alexander script language=JavaScript type=text/javascript !-- // Version check for the Flash Player that has the ability to start Player Product Install (6.0r65) var hasProductInstall = DetectFlashVer(6, 0, 65); // Version check based upon the values defined in globals var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision); if (hasRequestedVersion) { // if we've detected an acceptable version // embed the Flash Content SWF when all tests are passed AC_FL_RunContent( src, http://www.myotherdomain.de/testapp/myapp;, width, 625, height, 1000px, align, middle, id, myapp, quality, high, bgcolor, #869ca7, name, myapp, allowScriptAccess,sameDomain, type, application/x-shockwave-flash, pluginspage, http://www.adobe.com/go/getflashplayer; ); } else { ... } // -- /script noscriptobject classid=clsid:D27CDB6E-AE6D-11cf-96B8-44455354 codebase=http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab; param name=bgcolor value=#869ca7 / embed name=guGenericSkilltree play=true loop=false quality=high /embed /object/noscript// Flash Player Version Detection - Rev 1.6 // Detect Client Browser type // Copyright(c) 2005-2006 Adobe Macromedia Software, LLC. All rights reserved. var isIE = (navigator.appVersion.indexOf(MSIE) != -1) ? true : false; var isWin = (navigator.appVersion.toLowerCase().indexOf(win) != -1) ? true : false; var isOpera = (navigator.userAgent.indexOf(Opera) != -1) ? true : false; function ControlVersion() { var version; var axo; var e; // NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry try { // version will be set for 7.X or greater players axo = new ActiveXObject(ShockwaveFlash.ShockwaveFlash.7); version = axo.GetVariable($version); } catch (e) { } if (!version) { try { // version will be set for 6.X players only axo = new ActiveXObject(ShockwaveFlash.ShockwaveFlash.6); // installed player is some revision of 6.0 // GetVariable($version) crashes for versions 6.0.22 through 6.0.29, // so we have to be careful. // default to the first public version version = WIN 6,0,21,0; // throws if AllowScripAccess does not exist (introduced in 6.0r47) axo.AllowScriptAccess = always; // safe to call for 6.0r47 or greater version = axo.GetVariable($version); } catch (e) { } } if (!version) { try { // version will be set for 4.X or 5.X player axo = new ActiveXObject(ShockwaveFlash.ShockwaveFlash.3); version = axo.GetVariable($version); } catch (e) { } } if (!version) { try { // version will be set for 3.X player axo = new ActiveXObject(ShockwaveFlash.ShockwaveFlash.3); version = WIN 3,0,18,0; } catch (e) { } } if (!version) { try { // version will be set for 2.X player axo = new ActiveXObject(ShockwaveFlash.ShockwaveFlash); version = WIN 2,0,0,11; } catch (e) { version = -1
[flexcoders] Event result listener problem
I am using a component as a popup, and i create 2 instanced of it. The component edits a users information. If I open two different popups (different users) and submit the one, the event result updates both popups (hence overwriting the other popups data). I guess, how can i route the event result to the correct popup? Thanks, Alexander
[flexcoders] Variables get overwritten issue...
i have a set of components that comprise the user data section that user data section is used in the main app. but in one place, i use it as a popup the problem is, that any changes i make from the popup to user B, the variables are updated both on popup and main app users data section. So if I was editing/viewing user A in the main app, if i then edit user B in the popup, when i close the popup and return to main app user B is now selected instead of user A. Any ideas? thanks
[flexcoders] Re: Variables get overwritten issue...
But it is the same file.mxml Thanks, Alex --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: Use separate data models. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alexander Tsoukias Sent: Friday, May 09, 2008 11:57 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Variables get overwritten issue... i have a set of components that comprise the user data section that user data section is used in the main app. but in one place, i use it as a popup the problem is, that any changes i make from the popup to user B, the variables are updated both on popup and main app users data section. So if I was editing/viewing user A in the main app, if i then edit user B in the popup, when i close the popup and return to main app user B is now selected instead of user A. Any ideas? thanks
[flexcoders] Total subscribers on LCDS rtmp messaging
Is it possible to get a total count of subscribers on a specific destination/topic/subtopic when using LCDS RTMP messaging? Thanks, Alexander
[flexcoders] External swf as menu in Flex App
What is the best way to have such a menu in a flex app. http://www.reflektions.com/miniml/template_permalink.asp?id=356 Should i build it in FLEX or use this swf which is no more than 60kb? If I should/can use the swf, are there ways to communicate with it from flex? Thanks, Alexander
[flexcoders] Multiple destinations LCDS from one app
Is it possible to access multiple Destinations (which are config in xml) from a single flex app. If so, do they all use the same RTMP connection? Is it heavy? Reason im asking, you can only define one ID and get one arraycollection returned. I want to use more. Would appreciate some clarification here. thanks Alexander
[flexcoders] Re: How to configure LCDS 2.5.1 to make use of Flex 3.0 SDK libraries?
I am also wondering the same now that u mentioned it. Alexander --- In flexcoders@yahoogroups.com, msankar_igst [EMAIL PROTECTED] wrote: Hi, I deployed LCDS 2.5.1 version which uses Flex 2.0 by default. Now i want to use Flex 3.0 with this LCDS. How to configure it? I tried to configure by modifying the library path and source path which points to Flex 3.0 SDK library and source path from the following file, {WAS_INSTALLED_PATH}\flex_war.ear\flex.war\WEB-INF\flex\flex-config.xml But it is not working properly. Can anyone please help me, how to change Flex 3.0 SDK lookup for LCDS 2.5.1? Thanks, Murali Sankar Muthaiah
[flexcoders] Re: flashvars hate me
I've had similar issues but this post had helped me a lot: http://thanksmister.com/?p=27 thanks Alexander --- In flexcoders@yahoogroups.com, dfalling [EMAIL PROTECTED] wrote: I can't get flashvars to work... It seems pretty basic, but no mater what I do they don't seem to show up in flex. AS: woo = Application.application.parameters.url; HTML: param name=FlashVars value=url=woo / embed ... flashvars=url=woo /embed What am I missing? Thanks!
[flexcoders] Equivalent of FMS server side object in LC Data services
So, if I was to create a server side shared object with Flash Media Server i would have my online users in a shared object, then another server shared object with all the chat users etc... If i was to do this with LCDS (Live Cycle Data Services) - again using rtmp - how would it be done? Currently i use Data Services which stored the data in a database. In FMS i guess it just keeps it in memory. Any idea? Thanks, Alexander
[flexcoders] Remoting using RTMP protocol
I am trying to find out if there is a way to do same logic as when using RemoteObject with coldfusion, but instead of using (http polling) AMF to use the RTMP protocol. In my logic, i would just create a new destination in remoting-config.xml and add a channel ie: my-rtmp. Would this work? If not, can this be at all done? Thanks, Alexander
[flexcoders] Re: Remoting using RTMP protocol
Thanks for this Anatole made things quite clearer and saved me a lot of time. I own LCDS 2.6, so as in your PS I'd like to know where can i find these LCDS 2.6 sections you are referring to. Also, since you have the knowledge on this, could you help out on this topic as well? http://tech.groups.yahoo.com/group/flexcoders/message/108292 Thanks so much, Alexander --- In flexcoders@yahoogroups.com, Anatole Tartakovsky [EMAIL PROTECTED] wrote: The real question is - does it move you in the right direction. Architecturally, (long) RemoteObject call is a one-way-at-a-time road with typical congestions including latency, inability to detect lost packages/dups/out of sequence. RTMP is usually 2 pairs of 2-way sockets (Publishing and Subscriptions), using acknowledgements on each side rather then responses. Blocking model of request/response over non-blocking IO model of RTMP will most likely put a lot of pressure on the resource consumption and performance. By using Publisher/Subscriber objects as higher level tunnels you can solve much more of typical problems of RIA apps.To add by-directional (pull and push) RemoteObject functionality to the RTMP you have to start with endpoints - basically keeping track of messageId/CorrelationIds as standard functionality of RemoteObject with standard timeouts will not suffice. Deciding if you want code distributed between endpoint and adapter is really up to you - but keeping endpoints unchanged is not really an option, and then you have to decide on number of places to maintain the code. As far as adding remoting destinations - it is trivial from messaging as well - you can get implementation from BlazeDS sources C:\blazeds-source\modules\remoting\src\java\flex\messaging\services\remoting\adapters\JavaAdapter). It would go like this (optimization removed for brevity): public Object invoke(Message message){ RemotingDestination remotingDestination = (RemotingDestination)getDestination(); RemotingMessage remotingMessage = (RemotingMessage)message; FactoryInstance factoryInstance = remotingDestination.getFactoryInstance(); // We don't allow the client to specify the source for // Java based services. String className = factoryInstance.getSource(); remotingMessage.setSource(className); String methodName = remotingMessage.getOperation(); List parameters = remotingMessage.getParameters(); Object result = null; try { // Test that the target method may be invoked based upon include/exclude method settings. if (includeMethods != null) { RemotingMethod method = (RemotingMethod)includeMethods.get(methodName); if (method == null) MethodMatcher.methodNotFound(methodName, null, new Match(null)); // Check method-level security constraint, if defined. SecurityConstraint constraint = method.getSecurityConstraint (); if (constraint != null) getDestination().getService().getMessageBroker().getLoginManager().checkConstraint(constraint); } else if ((excludeMethods != null) excludeMethods.containsKey (methodName)) MethodMatcher.methodNotFound(methodName, null, new Match(null)); // Lookup and invoke. Object instance = createInstance( factoryInstance.getInstanceClass()); if (instance == null) { MessageException me = new MessageException(Null instance returned from: + factoryInstance); me.setCode(Server.Processing); throw me; } Class c = instance.getClass(); MethodMatcher methodMatcher = remotingDestination.getMethodMatcher(); Method method = methodMatcher.getMethod(c, methodName, parameters); result = method.invoke(instance, parameters.toArray()); As soon as you have result, you wrap it into message, apply correlationId from the messages original request - and you are done. Regards, Anatole Tartakovsky Farata Systems PS. If you are just looking for RemoteObject request/response long transaction support), look into BlazeDS/LCDS 2.6 sections for long httprequest - that solution might work well for some applications On Mon, Mar 31, 2008 at 12:58 PM, Alexander Tsoukias [EMAIL PROTECTED] wrote: I am trying to find out if there is a way to do same logic as when using RemoteObject with coldfusion, but instead of using (http polling) AMF to use the RTMP protocol. In my logic, i would just create a new destination in remoting-config.xml and add a channel ie: my-rtmp. Would this work? If not, can this be at all done? Thanks, Alexander
[flexcoders] itemRenderer on TileList question
I am using an itemRenderer and in that renderer i am calling the init() method on creationComplete event. The List's dataprovider is an ArrayCollection from LCDS rtmp and i notice that the init() function does not get called everytime a new item is added (even though the new item does display on the TileList as a new row. So I guess my question is, how can i EVERYTIME call a function in my itemRenderer component? thanks, Alexander
[flexcoders] Re: itemRenderer on TileList question
Thank you so much for this info, can you possibly give me a code example scenario? thanks alexander --- In flexcoders@yahoogroups.com, Scott Melby [EMAIL PROTECTED] wrote: Alexander - Flex recycles itemRenderers, so it does not create 1 per item in your data provider. Instead it creates enough renderer objects to display the data, then calls the setter of the data property set data(value:Object) on those existing renderers as things change (scroll, etc.) So, the way you handle this is to override the set data(value:Object) method in your renderer... the object you are passed as a parameter will be an item from your data provider. hth Scott Scott Melby Founder, Fast Lane Software LLC http://www.fastlanesw.com http://blog.fastlanesw.com Alexander Tsoukias wrote: I am using an itemRenderer and in that renderer i am calling the init() method on creationComplete event. The List's dataprovider is an ArrayCollection from LCDS rtmp and i notice that the init() function does not get called everytime a new item is added (even though the new item does display on the TileList as a new row. So I guess my question is, how can i EVERYTIME call a function in my itemRenderer component? thanks, Alexander
[flexcoders] Re: itemRenderer on TileList question
My itemRenderer is in MXML, i added this in the script block: public override function set data(value:Object):void { super.data = value; } but still doesn't help - am i missing something? thanks --- In flexcoders@yahoogroups.com, Scott Melby [EMAIL PROTECTED] wrote: I suggest reading this post http://blogs.adobe.com/aharui/2007/03/thinking_about_item_renderers_1.html on Alex Harui's blog. He describes the use of item renderers very well. You can also find information on the working with item renderers page of the live docs http://livedocs.adobe.com/flex/3/html/help.html?content=cellrenderer_8.html. This post http://blog.fastlanesw.com/?p=25 on my blog also shows the use of a custom item renderer that overrides the data property setter in order to set the background color of a data grid cell. Just click the link for the sample app, then right click on the app to view source. hth Scott Scott Melby Founder, Fast Lane Software LLC http://www.fastlanesw.com http://blog.fastlanesw.com Alexander Tsoukias wrote: Thank you so much for this info, can you possibly give me a code example scenario? thanks alexander --- In flexcoders@yahoogroups.com, Scott Melby smelby@ wrote: Alexander - Flex recycles itemRenderers, so it does not create 1 per item in your data provider. Instead it creates enough renderer objects to display the data, then calls the setter of the data property set data(value:Object) on those existing renderers as things change (scroll, etc.) So, the way you handle this is to override the set data(value:Object) method in your renderer... the object you are passed as a parameter will be an item from your data provider. hth Scott Scott Melby Founder, Fast Lane Software LLC http://www.fastlanesw.com http://blog.fastlanesw.com Alexander Tsoukias wrote: I am using an itemRenderer and in that renderer i am calling the init() method on creationComplete event. The List's dataprovider is an ArrayCollection from LCDS rtmp and i notice that the init() function does not get called everytime a new item is added (even though the new item does display on the TileList as a new row. So I guess my question is, how can i EVERYTIME call a function in my itemRenderer component? thanks, Alexander
[flexcoders] Error: Unknown Property: 'constructor'. when using LCDS
The fill method works great using RTMP and it fills a datagrid. When i make the datagrid editable and change a value, It returns this error: Error: Unknown Property: 'constructor'. The backend is connected with coldfusion CFCs. Again the fill method works great. Thanks, Alexander
[flexcoders] Coldfusion changes not applied when using LCDS
Situation: Flex app connects using Data Services (RTMP) and uses coldfusion as the backend (CFC). Everything works fine. I then edit the coldfusion DAOs CFC code and on purpose cause it to throw an error. The app continues to work as if it doesn't even use the CFC files again. Only when i reboot the CF server the changes apply. thanks, Alexander
[flexcoders] Flex Data Services (of LiveCycle Data Services)
I am trying to create a multiplayer game, in which at first i need to show a tables list of available seats. Each table, should be a new destination on FDS server? or am i missing something here? If thats the case, how do i automatically create and delete destinations? (I'm using RTMP - if I was using Flash Media Server, I would create server side shared objects). Thanks, Alexander
[flexcoders] Re: Flex Data Services (of LiveCycle Data Services)
This really does sound what needs to be done (in theory). Practically how would i go about doing this? Is there some documentation I can reference? I'm new to this topic (even tho I own the licenses) just trying to make some good use of them. With Flash Media Server i'm assuming this would be done using server side Shared Objects? Thanks Alexander --- In flexcoders@yahoogroups.com, Jeff Vroom [EMAIL PROTECTED] wrote: Take a look at the subtopics feature of the Consumer or the MultiTopicConsumer if you want to receive multiple subscriptions from a single message stream. You'd have one destination for the seats as a whole and probably a separate subtopics for each seat. If you need to route messages to players individually, you could have a another destination for players and a subtopic based on the user's session or user id. Subtopics are created lazily the first time someone subscribes to them and are removed when the last user unsubscribes. Actually, this type of thing is probably easier to do using data management since that will do all of the subscriptions for you. In that case, you'd do a fill to get the list of seats (which would then be sync'd with the server so as new seats come and go the client would automatically be updated). Once you select a seat you'd do a query to get the view of data for that seat... again that is sync'd automatically with the server if you leave autoSyncEnabled=true on the DataService. Each user could also create records for their per-user info which other users might share by getting a reference to... maybe the seat would have a reference to public view of the users at that table. Jeff From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alexander Tsoukias Sent: Thursday, March 27, 2008 10:42 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex Data Services (of LiveCycle Data Services) I am trying to create a multiplayer game, in which at first i need to show a tables list of available seats. Each table, should be a new destination on FDS server? or am i missing something here? If thats the case, how do i automatically create and delete destinations? (I'm using RTMP - if I was using Flash Media Server, I would create server side shared objects). Thanks, Alexander
[flexcoders] Disable screen interaction while cursor in busy mode
I would like each time i made a SOAP call and set the Cursor to busy for the screen to get disabled while cursor in busy mode. Any ideas?
[flexcoders] Re: Disable screen interaction while cursor in busy mode
thats exactly what i was looking for. Did not know such thing existed. thanks for pointing out!!! Alex --- In flexcoders@yahoogroups.com, Sherif Abdou [EMAIL PROTECTED] wrote: why not just do enabled=false on the Application itself - Original Message From: Alexander Tsoukias [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Tuesday, February 12, 2008 4:47:19 PM Subject: [flexcoders] Re: Disable screen interaction while cursor in busy mode Sounds good, but what if this occurs in the service call as file in cairngorm, there is no parent to add the popup to. ?? Alex --- In [EMAIL PROTECTED] ups.com, simonjpalmer simonjpalmer@ ... wrote: pop up a modal dialog with a progress bar and remove it when the response returns --- In [EMAIL PROTECTED] ups.com, Alexander Tsoukias alex49080@ wrote: I would like each time i made a SOAP call and set the Cursor to busy for the screen to get disabled while cursor in busy mode. Any ideas? Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
[flexcoders] Re: Picnik photo functions/features RD
Thanks for the input. Would anyone else have any idea on how to accomplish this? So many great minds in here common! thanks alex --- In flexcoders@yahoogroups.com, Jon Bradley [EMAIL PROTECTED] wrote: On Jan 29, 2008, at 10:27 PM, Alexander Tsoukias wrote: Given the nature of picnik, i wouldnt think they go back and forth as the manipulation happens instantly as you drag a slider or pick a color. I think that's accurate. Some of the simpler operations are able to be done in Flash because of the color matrix filter. You might be right about final processing (compiling) of the final image, but possibly giving the user a preview of how the image will look without going back and forth to the server for processing. It does depend on usage. For high resolution photo editing - and relatively accurate color work, it's best to do that outside of AS. Things like a 'filmic' sepia conversion isn't possible with a simple transformation that Flash can handle (not without per-pixel operations that is). That said, with Hydra and the new advancements Adobe is making to get Photoshop online marketable, I think we'll be seeing some pretty nice capabilities in the Player in the near future. good luck on your project if you're heading down that road. :) cheers, jon
[flexcoders] Re: Picnik photo functions/features R
Troy, your response has been the most reasonable, their preview is instant, and if there were sending it back to server and bring it back again so fast they would be the next bill gates. If you get a bitmap as a byte array you can scan through it and apply all sorts of traditional per-pixel manipulations. Sure, maybe not real-time in a video game sense (multiple frames per second), but certainly real-time in the web app sense (a few seconds, about like a network request). In terms of applying traditional per-pixel manipulations - can you be more specific in possibly which and how? As much as you can tell. Alex
[flexcoders] Losing validation red border on custom skinning
I have skinned my components using custom skinning and now when they go through validation and fail (INVALID) the red border does not appear around the textinput/combobox. any ideas?
[flexcoders] Picnik photo functions/features RD
Hi all, Picnik.com has all these photo effects and I was wondering how are they doing it. Is it built in actionscript as functions? Are they using third party components? Any input is greatly appreciated. PS. Anyone looking to work on this please contact me. Thank you, Alex
[flexcoders] Re: Picnik photo functions/features RD
Given the nature of picnik, i wouldnt think they go back and forth as the manipulation happens instantly as you drag a slider or pick a color. You might be right about final processing (compiling) of the final image, but possibly giving the user a preview of how the image will look without going back and forth to the server for processing. This way the user can undo the changes he/she makes. alex --- In flexcoders@yahoogroups.com, Jon Bradley [EMAIL PROTECTED] wrote: I believe a majority of the image processing is done on the server but it depends on the circumstance. In most cases (not all though), doing image processing in AS is not the best design choice. Some transformations may be done in AS, but it would not make sense in the general case to do so. Especially with complex transformations that may require per-pixel operations - AS is exceedingly slow at that. In my experience it's faster to push a quick image transformation matrix or color matrix (or other image edit) to the server and have GDI++, ImageMagik, PIL or one of the many imaging libraries make the modification and send back a proxy. peace, jon On Jan 29, 2008, at 7:14 PM, Alexander Tsoukias wrote: Hi all, Picnik.com has all these photo effects and I was wondering how are they doing it. Is it built in actionscript as functions? Are they using third party components? Any input is greatly appreciated. PS. Anyone looking to work on this please contact me. Thank you, Alex
RE: [flexcoders] How can google index a Flex / SWF site ?
Received. Shall review and reply tonight. Jon From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Brendan Meutzner Sent: Monday, February 19, 2007 2:49 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] How can google index a Flex / SWF site ? A bit of light reading for you... http://tech.groups.yahoo.com/group/flexcoders/message/58926 Brendan On 2/19/07, helihobby [EMAIL PROTECTED] wrote: Hello all, How can google and other search engines index a fully Flexed page ? It seems like Adobe must have a solution for SEO ( Search Engine Optimzation ) solutions for Flex as this can be a problem for this technology if no such Flex to HTML real time translation exists !!! Regards, Sean - HeliHobby.com -- Brendan Meutzner Stretch Media - RIA Adobe Flex Development [EMAIL PROTECTED] http://www.stretchmedia.ca attachment: image001.jpg attachment: image002.jpg
[flexcoders] Re: Module Loader progress bar
Is there a way I could have an example of how this module trick loads another swf file at runtime? {a} --- In flexcoders@yahoogroups.com, Roger Gonzalez [EMAIL PROTECTED] wrote: Yes, the module loading code dispatches loading events, so you can create a component that displays very similar to the Flex download progress bar. My preferred way to do it so that it is usable from MXML is to subclass ModuleLoader. -rg From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of mthielman11 Sent: Friday, February 02, 2007 9:59 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Module Loader progress bar We have a large app we are building and decided to break it into modules. We have the module loading after a user successfully logins in. After the login it changes states to a box that just contains th moduleLoader. Its all working fine except we get no feedback as to the progress of the module. Is there a way to make it appear similar to the way the flex swf progress appears when loading the flex app? I have tried, unsuccessfully to use the module loader code in the docs. Thanks
[flexcoders] addChild(myFriend) on the fly - possible?
I have a custom component myFriend.mxml I have a datagrid on the left filled with search results. What i was is, as I'm clicking Add Friend on the datagrid, for it to appear on the right (one under the other) automatically with the style and format of myFriend.mxml Is this possible? if so, I would appreciate any help. Thanks, Alexander
[flexcoders] Is this possible - SVG to PDF(vector) ?
Hi all... How is it possible to take a canvas from FLEX and convert it to vector PDF? Is taking SVG and converting to a PDF a way? Does coldfusion have any way of doing this? Thanks, Alexander
[flexcoders] Re: Is this possible - SVG to PDF(vector) ?
That would be great, although, I need to be able to download it as eps directly from flex. Would that be a possibility? Alex --- In flexcoders@yahoogroups.com, Brendan Meutzner [EMAIL PROTECTED] wrote: I've had success in the past converting to EPS format from Flash Player (which successfully opened in vector format inside Illustrator) by using Print to File with specific print drivers... it's not exactly seamless, but it worked. I can track down the specific print drivers if that would help... Brendan On 1/31/07, Alexander Tsoukias [EMAIL PROTECTED] wrote: Hi all... How is it possible to take a canvas from FLEX and convert it to vector PDF? Is taking SVG and converting to a PDF a way? Does coldfusion have any way of doing this? Thanks, Alexander -- Brendan Meutzner Stretch Media - RIA Adobe Flex Development [EMAIL PROTECTED] http://www.stretchmedia.ca
[flexcoders] Viewstack Navigation Reference problem
I am using the namespace steps in order to refer to a viestacks pages which are navigated to from buttons I have above the viewstack. This is what I click to go to a particlular step (steps:Step1 /): mainNav.selectedChild=step1; (mainNav is the viewstack ID). How can I reference to this functionality from within the Step1.mxml file which is in the folder Steps? It doesnt seem to work when i use the same as the button in the main application. Thanks, Alexander
[flexcoders] Loader component instead of busy icon
In a tab navigator, I want as I change through tabs to have a Loader component that loops indefinetly until the results are back from a remote object call instead of that busy icon thing. How would i go about doing this? Thanks, Alexander
[flexcoders] FDS Application takes a while to load
I am using this example to test out the whole FDS idea: http://coenraets.org/blog/2006/10/building-collaborative-applications-with-flex-data-services-and-flash-media-server/ When I run the application from the URL, it takes up to 4 minutes to load the application. Any idea why this would be happening? Thanks, Alexander