Re: [flexcoders] Listening for CollectionEvent in custom component

2010-08-21 Thread Alexander Farber
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

Re: [flexcoders] Listening for CollectionEvent in custom component

2010-08-21 Thread Alexander Farber
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

Re: [flexcoders] does Flex 5 upgrade? or downgrade in practice? REFdn7076142784

2010-08-19 Thread Alexander Farber
So you think Flex is complex, but then you want it to become multithreaded?

[flexcoders] Push verse Poll in Flash Player

2010-08-16 Thread Alexander Farber
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){

[flexcoders] Re: PopUpButton with TileList and custom renderer works, but 2 annoyances

2010-07-26 Thread Alexander Farber
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

[flexcoders] PopUpButton with TileList and custom renderer works, but 2 annoyances

2010-07-25 Thread Alexander Farber
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

[flexcoders] Re: Changing color of the PopUpButton

2010-07-23 Thread Alexander Farber
Oh sorry - I was missing: pub.setStyle('color', 0xFF);

[flexcoders] Re: 2 PopUpButton questions: force opening upwards + red and black item colors

2010-07-22 Thread Alexander Farber
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

[flexcoders] Re: 2 PopUpButton questions: force opening upwards + red and black item colors

2010-07-22 Thread Alexander Farber
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

[flexcoders] Re: 2 PopUpButton questions: force opening upwards + red and black item colors

2010-07-22 Thread Alexander Farber
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

[flexcoders] Changing color of the PopUpButton

2010-07-22 Thread Alexander Farber
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

[flexcoders] Re: 2 PopUpButton questions: force opening upwards + red and black item colors

2010-07-21 Thread Alexander Farber
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

[flexcoders] 2 PopUpButton questions: force opening upwards + red and black item colors

2010-07-19 Thread Alexander Farber
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

Re: [flexcoders] Flex3: attaching assets from .swf using getDefinitionByName

2010-03-24 Thread Alexander Farber
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?