[flexcoders] Re: addChild from String

2006-02-19 Thread pwhite40
Did you ever get an answer on this? I'm running into the same 
problem with getClassByName(MyCustomClass) blowing up unless I 
create a dummy instance of it first. Even when I do create a dummy 
instance first, it only works the first time I call the 
getClassByName(MyCustomClass) method. After that, I start 
getting ReferenceError: Error #1065: Variable MyCustomClass is not 
defined all over again.

Thanks,
Paul


--- In flexcoders@yahoogroups.com, Brendan Meutzner 
[EMAIL PROTECTED] wrote:

 Hey Jens,
 
 Thanks for the help.  It's now working (sort of)...
 
 If I create an instance of a built-in class (such as Button), the
 method below works fine.  However, if I try creating a custom Class
 (eg. MyCustClass which extends from Canvas) like so:
  
 import custclasses.MyCustClass;
 var newComponent:Object = createInstance
(custclasses.MyCustClass);
 
 it doesn't work.  I get the run-time error message Variable
 MyCustClass is not defined.
 
 However, if I create a dummy instance of the class in my 
application
 like so:
 
 import custclasses.MyCustClass;
 var dummyMyCustClass:MyCustClass = new MyCustClass();
 
 and then create another instance using the createInstance method, 
it
 does work.
 
 Ideas?
 
 Thanks,
 
 Brendan
 
 --- In flexcoders@yahoogroups.com, Jens Halm [EMAIL PROTECTED] wrote:
 
  
   Hi All,
  
   I'd like to provide a String value which represents the 
DisplayObject
   class I want to create dynamically with addChild.  Has anyone
   accomplished this?
  
  You mean like this?
  
  public function createInstance (className : String) : Object {
  var MyClass : Class = getClassByName(className);
  return new MyClass();
  }
  
  
  Btw.: what I really miss is a method createInstance(args : 
Array) in
  the Class class, so I could easily provide an arbitrary number of
  constructor arguments not known until runtime, like this:
  
  public function createInstance (className:String, args:Array) : 
Object {
  var myClass : Class = getClassByName(className);
  return myClass.createInstance(args);
  }
  
  Class.createInstance(args:Array) would be the constructor 
equivalent
  of Function.apply(scope:Object, args:Array). If I use 
Function.apply
  after I created an instance the constructor would be called twice
  which would be quite dirty.
  
  Consider this as a feature request...  ;)
  
  
  Jens
  www.oregano-server.org
 







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* 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] Re: problem with cell renderer in ComboBox

2006-02-19 Thread Anatole Tartakovsky





Matt,
 Is it possible to downgrade 
ComboBox::dropdown property in the next beta/final release to ListBase so the 
subclassing/ability to show more complex dropdowns is possible? Also, what are 
the chances of relaxing base types of the internal properties of the controls a 
bit (when it does not affect performance) from strongly typed to lower 
levels/split them to interfaces. 
 Without code 
decoration/polymorphism in the base objectsthe current architecture is 
much more code and time consuming forcontrol development and can be 
showstopper for 3rd party controls.

Sincerely,
Anatole

- Original Message - 

  From: 
  Matt Chotin 
  
  To: flexcoders@yahoogroups.com 
  Sent: Sunday, February 19, 2006 1:16 
  AM
  Subject: RE: [flexcoders] Re: problem 
  with cell renderer in ComboBox
  labelField isn't necessary if you have a cell 
  renderer. Any chance youcan just use labelFunction if all you're 
  doing is concatenation? I'malmost positive variableRowHeight also 
  isn't going to work.-Original Message-From: flexcoders@yahoogroups.com 
  [mailto:[EMAIL PROTECTED] OnBehalf Of george_luiSent: 
  Friday, February 17, 2006 11:10 AMTo: 
  flexcoders@yahoogroups.comSubject: [flexcoders] Re: problem with cell 
  renderer in ComboBoxgood call, but it didn't work. Really weird. 
  Do you think I stillneed the labelField 
  attribute?TIA,George--- In flexcoders@yahoogroups.com, 
  "Matt Chotin" [EMAIL PROTECTED] wrote: What if you take out 
  the quotes around the renderer?  -Original 
  Message- From: flexcoders@yahoogroups.com 
  [mailto:[EMAIL PROTECTED]On Behalf Of george_lui 
  Sent: Thursday, February 16, 2006 3:50 PM To: 
  flexcoders@yahoogroups.com Subject: [flexcoders] problem with cell 
  renderer in ComboBox  Hi,  I had a 
  cellrenderer that was originally used in datagrid cell. 
  I've since replaced the datagrid with a comboBox. I'm trying to reuse 
  the same cellrenderer in the combo using the code below. 
   mx:ComboBox 
  id="employeeComboBox" 
   
  creationComplete= 
  "event.target.getDropdown().cellRenderer='com.sf.sfv4.view.sharkfin.Full 
  NameRenderer'; event.target.getDropdown().variableRowHeight=true" 
  rowCount="10" mx:dataProvider { 
  ModelLocator.employees } /mx:dataProvider 
  /mx:ComboBox  The FullNameRenderer cellrenderer I have 
  just takes the first and last name of a user vo and concatenates 
  it.  However this isn't working for the combobox. I get 
  and set the cellrenderer of the combobox's dropdown property as stated 
  in this group by another member, but it doesn't work. Instead I 
  get the user vo object displayed.  I'm confused, I'm 
  using the same dataProvider and cellrenderer in the combobox as I did 
  in the datagrid. I think there's a difference between the two 
  widgets, but I just don't know what it is.  Please 
  advise...  TIA, George   
 -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt 
  Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
   Yahoo! Groups 
  Links--Flexcoders Mailing ListFAQ: 
  http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch 
  Archives:http://www.mail-archive.com/flexcoders%40yahoogroups.com 
  Yahoo! Groups Links





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









[flexcoders] Use TextArea as application console - How to automatically scroll to bottom?

2006-02-19 Thread codability
I am using a TextArea to display a console like console :-) inside a
Flex app. I am adding text via

textArea.text = textArea.text + currentMessage;

I want the textArea to scroll down and always show the latest added
message. Any hints?








--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* 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] Flex2: How to access real object in ObjectProxy?

2006-02-19 Thread vmdocua
Hi All,

Does anyone know how to access real object being proxied via 
mx.utils.ObjectProxy? There is ObjectProxy.object property, but it's 
only visible in the debugger watch. The follwoing test case 
outputs Real object: null. Is it correct behaviour?

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.macromedia.com/2005/mxml; 
xmlns=* creationComplete=testProxy()
mx:Script![CDATA[

import mx.utils.ObjectProxy;
import mx.controls.Alert;
private function testProxy():void
{
var o1:Object = { f1:aaa, f2:123 };
var o2:Object = new ObjectProxy(o1);
var o3:Object = ObjectProxy(o2).object;
Alert.show(Real object: +o3);
}   
]]/mx:Script/mx:Application

--
Thanks,
Vadim Melnik.







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* 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] Positioning Alert

2006-02-19 Thread Daniel Cascais
I'm trying to position an Alert instance, but I'm not getting any
reaction from the Alert and it always appears in its default location
in the app.

//Code:
var myAlert:Alert = Alert.show( Lalalala );
myAlert.move( 15, 16 );

I have done this quite a lot in Flash, for which I am wondering if
there is something else I am expected to do in Flex.

Thanks,
--
Daniel





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* 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] Use TextArea as application console - How to automatically scroll to bottom?

2006-02-19 Thread Brian Lesser
See: http://www.mail-archive.com/flexcoders@yahoogroups.com/msg19784.html
Cheers,
-Brian


codability wrote:

I am using a TextArea to display a console like console :-) inside a
Flex app. I am adding text via

textArea.text = textArea.text + currentMessage;

I want the textArea to scroll down and always show the latest added
message. Any hints?








--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links



 



  



-- 
__
Brian Lesser
Assistant Director, Teaching and Technology Support
Computing and Communications Services
Ryerson University
350 Victoria St.
Toronto, Ontario   Phone: (416) 979-5000 ext. 6835
M5B 2K3Fax: (416) 979-5220
Office: AB48D  E-mail: [EMAIL PROTECTED]
(Enter through LB66)   Web: http://www.ryerson.ca/~blesser
__



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* 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] Positioning Alert

2006-02-19 Thread Aldo Bucchi
FYI, using myAlert.centerPopUp( blabla ) doesn't do the work either.

alert! something's wrong with alert

On 2/16/06, Daniel Cascais [EMAIL PROTECTED] wrote:
 I'm trying to position an Alert instance, but I'm not getting any
 reaction from the Alert and it always appears in its default location
 in the app.

 //Code:
 var myAlert:Alert = Alert.show( Lalalala );
 myAlert.move( 15, 16 );

 I have done this quite a lot in Flash, for which I am wondering if
 there is something else I am expected to do in Flex.

 Thanks,
 --
 Daniel





 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
 Yahoo! Groups Links









--
: Aldo Bucchi :
mobile (56) 8 429 8300


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* 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] Positioning Alert

2006-02-19 Thread stacey
Isn't centerPopUp a method of the PopUpManager?
such as :
PopUpManager.centerPopUp(myAlert);





 FYI, using myAlert.centerPopUp( blabla ) doesn't do the work either.

 alert! something's wrong with alert

 On 2/16/06, Daniel Cascais lt;[EMAIL PROTECTED]gt; wrote: gt;
 I'm trying to position an Alert instance, but I'm not getting any gt;
 reaction from the Alert and it always appears in its default location
 gt; in the app.
 gt;
 gt; //Code:
 gt; var myAlert:Alert = Alert.show( quot;Lalalalaquot; );
 gt; myAlert.move( 15, 16 );
 gt;
 gt; I have done this quite a lot in Flash, for which I am wondering if
 gt; there is something else I am expected to do in Flex.
 gt;
 gt; Thanks,
 gt; --
 gt; Daniel
 gt;
 gt;
 gt;
 gt;
 gt;
 gt; --
 gt; Flexcoders Mailing List
 gt; FAQ:
 http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt gt;
 Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.com gt; Yahoo!
 Groups Links
 gt;
 gt;
 gt;
 gt;
 gt;
 gt;
 gt;


 --
 : Aldo Bucchi :
 mobile (56) 8 429 8300







 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.com










 SPONSORED LINKS




 Web site design development


 Computer software development


 Software design and development




 Macromedia flex


 Software development best practice













   YAHOO! GROUPS LINKS



   nbsp;Visit your group flexcoders on the web.nbsp;
   nbsp;To unsubscribe from this group, send an email
 to:nbsp;[EMAIL PROTECTED]nbsp; nbsp;Your use
 of Yahoo! Groups is subject to the Yahoo! Terms of Service.









--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* 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] Positioning Alert

2006-02-19 Thread JesterXL
In Flex 2, not 1.5.

...is the Alert centered yet?

- Original Message - 
From: [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Sunday, February 19, 2006 10:05 PM
Subject: Re: [flexcoders] Positioning Alert


Isn't centerPopUp a method of the PopUpManager?
such as :
PopUpManager.centerPopUp(myAlert);





 FYI, using myAlert.centerPopUp( blabla ) doesn't do the work either.

 alert! something's wrong with alert

 On 2/16/06, Daniel Cascais lt;[EMAIL PROTECTED]gt; wrote: gt;
 I'm trying to position an Alert instance, but I'm not getting any gt;
 reaction from the Alert and it always appears in its default location
 gt; in the app.
 gt;
 gt; //Code:
 gt; var myAlert:Alert = Alert.show( quot;Lalalalaquot; );
 gt; myAlert.move( 15, 16 );
 gt;
 gt; I have done this quite a lot in Flash, for which I am wondering if
 gt; there is something else I am expected to do in Flex.
 gt;
 gt; Thanks,
 gt; --
 gt; Daniel
 gt;
 gt;
 gt;
 gt;
 gt;
 gt; --
 gt; Flexcoders Mailing List
 gt; FAQ:
 http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt gt;
 Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.com gt; Yahoo!
 Groups Links
 gt;
 gt;
 gt;
 gt;
 gt;
 gt;
 gt;


 --
 : Aldo Bucchi :
 mobile (56) 8 429 8300







 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.com










 SPONSORED LINKS




 Web site design development


 Computer software development


 Software design and development




 Macromedia flex


 Software development best practice













   YAHOO! GROUPS LINKS



   nbsp;Visit your group flexcoders on the web.nbsp;
   nbsp;To unsubscribe from this group, send an email
 to:nbsp;[EMAIL PROTECTED]nbsp; nbsp;Your use
 of Yahoo! Groups is subject to the Yahoo! Terms of Service.









--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links



 




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* 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] Re: addChild from String

2006-02-19 Thread pwhite40
I'm using a Tree. Each node from the XML of the tree contains a 
attribute with the name of the class that is to be instantiated when 
a change event occurs. 

The only way for me to use the String typed attribute containing the 
name of the class to be instantiated, along with a new statement 
would be with a switch statement to test the value of the attribute 
and then instantiate the appropriate class. I know that I can do 
that, but that also means that every time a new node is added to the 
XML for the tree, I also have to modify the source code for the 
function that handles the change event. If I can create the class 
from the string name of the class, I can add nodes to the XML 
without any further maintenance to the switch statement in the 
source code.


--- In flexcoders@yahoogroups.com, Roger Gonzalez [EMAIL PROTECTED] 
wrote:

 I'm not sure how you would expect this to work!
 
 The linker follows the dependency chain of all classes referenced 
by
 your code, and bakes them into the SWF.
 
 Strings are just strings, it wouldn't make sense for the linker to 
look
 inside one.
 
 Button isn't actually a built-in class, there just happens to be 
a
 dependency link to it via Application.
 
 getClassByName (which is just a wrapper around
 ApplicationDomain.getClass, btw) can only see classes that are 
linked
 in.  There is no way for it to find some class by string that 
hasn't
 been downloaded to the client - should it email the developer and 
say
 please compile this and send me a copy?  :-)
 
 What are you trying to solve such that you can't just new your 
class?
 
 If you really need total decoupling like this, you might want to 
look
 into building a separately compiled SWF that contains your other
 classes, and loading that SWF at runtime.
 
 -rg
 
  -Original Message-
  From: flexcoders@yahoogroups.com 
  [mailto:[EMAIL PROTECTED] On Behalf Of pwhite40
  Sent: Saturday, February 18, 2006 9:46 PM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Re: addChild from String
  
  Did you ever get an answer on this? I'm running into the same 
  problem with getClassByName(MyCustomClass) blowing up unless 
  I create a dummy instance of it first. Even when I do create 
  a dummy instance first, it only works the first time I call the
  getClassByName(MyCustomClass) method. After that, I start 
  getting ReferenceError: Error #1065: Variable MyCustomClass 
  is not defined all over again.
  
  Thanks,
  Paul
  
  
  --- In flexcoders@yahoogroups.com, Brendan Meutzner 
  bmeutzner@ wrote:
  
   Hey Jens,
   
   Thanks for the help.  It's now working (sort of)...
   
   If I create an instance of a built-in class (such as Button), 
the 
   method below works fine.  However, if I try creating a custom 
Class 
   (eg. MyCustClass which extends from Canvas) like so:

   import custclasses.MyCustClass;
   var newComponent:Object = createInstance
  (custclasses.MyCustClass);
   
   it doesn't work.  I get the run-time error message Variable 
   MyCustClass is not defined.
   
   However, if I create a dummy instance of the class in my
  application
   like so:
   
   import custclasses.MyCustClass;
   var dummyMyCustClass:MyCustClass = new MyCustClass();
   
   and then create another instance using the createInstance 
method,
  it
   does work.
   
   Ideas?
   
   Thanks,
   
   Brendan
   
   --- In flexcoders@yahoogroups.com, Jens Halm [EMAIL PROTECTED] 
wrote:
   

 Hi All,

 I'd like to provide a String value which represents the
  DisplayObject
 class I want to create dynamically with addChild.  Has 
anyone 
 accomplished this?

You mean like this?

public function createInstance (className : String) : Object 
{
var MyClass : Class = getClassByName(className);
return new MyClass();
}


Btw.: what I really miss is a method createInstance(args : 
  Array) in
the Class class, so I could easily provide an arbitrary 
number of 
constructor arguments not known until runtime, like this:

public function createInstance (className:String, 
args:Array) : 
  Object {
var myClass : Class = getClassByName(className);
return myClass.createInstance(args); }

Class.createInstance(args:Array) would be the constructor
  equivalent
of Function.apply(scope:Object, args:Array). If I use
  Function.apply
after I created an instance the constructor would be called 
twice 
which would be quite dirty.

Consider this as a feature request...  ;)


Jens
www.oregano-server.org
   
  
  
  
  
  
  
  
  --
  Flexcoders Mailing List
  FAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives: 
  http://www.mail-archive.com/flexcoders%40yahoogroups.com
  Yahoo! Groups Links
  
  
  
   
  
  
 









--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: 

RE: [flexcoders] ColumnChart question

2006-02-19 Thread Graham, Jason











 Flex
 1.5
 I
 want the bar that is clicked to go to an alpha of 100% and the other bars
 to fade, say to an alpha of 60-70%.
 No,
 not the entire BarSeries just the selected bar. 




Thanks..











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ely Greenfield
Sent: Sunday, February 19, 2006
9:29 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders]
ColumnChart question











1. Are you using Flex 1.5, or Flex 2 (note
to all flexcoders membersyou'll probably get your answer faster if you let
us all know this up front).



2. When the user clicks on a bar, do you
want to make it darker, or the other bars lighter?



3. When the user clicks on a bar, are you
trying to change its appearance relative to the other bars in the series, or
change the appearance of its BarSeries relative to the other BarSeries in the
chart?



Thanks,

Ely.











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Graham, Jason
Sent: Sunday, February 19, 2006
7:24 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] ColumnChart
question

When I click on one of the bars in my column chart I want to
show the selection of that bar by fading the rest.



I create the items with a fill of linear gradient and an
alpha of 50. So when the user clicks I want to set that bars alpha to
100.



When the bar is clicked I use the mouseClickedData.



I do the following



I have tried just about every invalidation I can think of
after setting the alpha.



function chartClicked( event )

{

 var fill = event.hitData.element.getStyle(fill);

 for ( var
i=0;ifill.entries.length;i++)

 {


fill.entries[i].alpha=100;

 }


event.hitData.element.invalidateStyle(fill);



.

.

.

}











--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











RE: [flexcoders] ColumnChart question

2006-02-19 Thread Ely Greenfield







- to trigger a series to redraw in Flex 1.5, call 
invalidate ( In Flex 2, series are standard UIComponents, so you'll invalidate 
them just like any other component).

- but by default, a Column/Bar series in Flex 1.5 renders 
all items exactly the same. So if you want to render one bar differently from 
the rest, you'll have to write a custom renderer.

- essentially, you'll want your custom renderer to do 
this:
 - give it a field to tell it what the index is 
of the 'selected' bar.
 - when your custom renderer's beginDraw() 
function is called, set a counter to 0
 - with every call to draw(), increment the 
counter.
 - if the counter == the selectedIndex, draw 
using a different fill than the one passed in.

That should give you the effect you're looking 
for.

Ely.




From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Graham, 
JasonSent: Sunday, February 19, 2006 7:49 PMTo: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] ColumnChart 
question



  Flex 1.5 
  I want the bar that is clicked to 
  go to an alpha of 100% and the other bars to fade, say to an alpha of 
  60-70%. 
  No, not the entire BarSeries just 
  the selected bar. 

Thanks..





From: 
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ely GreenfieldSent: Sunday, February 19, 2006 9:29 
PMTo: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] ColumnChart 
question




1. Are you using Flex 
1.5, or Flex 2 (note to all flexcoders membersyou'll probably get your 
answer faster if you let us all know this up 
front).

2. When the user clicks 
on a bar, do you want to make it darker, or the other bars 
lighter?

3. When the user clicks 
on a bar, are you trying to change its appearance relative to the other bars in 
the series, or change the appearance of its BarSeries relative to the other 
BarSeries in the chart?

Thanks,
Ely.





From: 
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Graham, JasonSent: Sunday, February 19, 2006 7:24 
PMTo: 
flexcoders@yahoogroups.comSubject: [flexcoders] ColumnChart 
question
When I click on one of the bars in 
my column chart I want to show the selection of that bar by fading the 
rest.

I create the items with a fill of 
linear gradient and an alpha of 50. So when the user clicks I want to set 
that bars alpha to 100.

When the bar is clicked I use the 
mouseClickedData.

I do the 
following

I have tried just about every 
invalidation I can think of after setting the 
alpha.

function chartClicked( event 
)
{
 var fill = 
event.hitData.element.getStyle("fill");
 for ( var 
i=0;ifill.entries.length;i++)
 
{
 
fill.entries[i].alpha=100;
 
}
 
event.hitData.element.invalidateStyle(fill);

.
.
.
}







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









[flexcoders] Mute sound in a Flex application

2006-02-19 Thread alariccole
Howdy all, 

Has anyone been successful in muting all sounds in a Flex application? 
Especially Flex 2?

I have tried using the Sound.volume property both as a declared variable 
and as the embedded in the SoundTransform and SoundEffect classes, but 
can not seem to be able to adjust the volume of an entire application.

This should be easy, but it has stumped me for now.








--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* 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] Mute sound in a Flex application

2006-02-19 Thread Johannes Nel



i ahve not tried it, but one of my coworkers was complaning about the same thing, and this worked for him in alpha 1On 2/20/06, alariccole 
[EMAIL PROTECTED] wrote:Howdy all,Has anyone been successful in muting all sounds in a Flex application?
Especially Flex 2?I have tried using the Sound.volume property both as a declared variableand as the embedded in the SoundTransform and SoundEffect classes, butcan not seem to be able to adjust the volume of an entire application.
This should be easy, but it has stumped me for now.--Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
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/* 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/
-- j:pn 






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.