RE: [SPAM] RE: [SPAM] RE: [flexcoders] Changing the image in a custom component item renderer

2007-09-17 Thread Alex Harui
Hmm, didn't see that last time.  Try this:

 



 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Paul Steven
Sent: Monday, September 17, 2007 11:32 PM
To: flexcoders@yahoogroups.com
Subject: RE: [SPAM] RE: [SPAM] RE: [flexcoders] Changing the image in a
custom component item renderer

 

Thanks for the reply Alex. I do still have those 3 class vars but
something still is not quite working. See my code listing below and you
will see the 3 class vars

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: 18 September 2007 07:14
To: flexcoders@yahoogroups.com
Subject: [SPAM] RE: [SPAM] RE: [flexcoders] Changing the image in a
custom component item renderer

 

In the original post, you had 3 class vars  You still need those.
@Embed is compile time, so you have to embed the 3 images like you had
it at first, then the code I showed will choose one of the three
variables.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Paul Steven
Sent: Monday, September 17, 2007 10:53 PM
To: flexcoders@yahoogroups.com
Subject: RE: [SPAM] RE: [flexcoders] Changing the image in a custom
component item renderer

 

Thanks Alex

 

I have tried what you suggested but the image is not displaying. I have
added a text field into the custom component - this is displaying the
correct value. But it is not displaying any image - just a broken image
icon.

 

Here is the code for my custom component:

 



http://www.adobe.com/2006/mxml
 " width="100" height="30">

















 

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: 17 September 2007 19:12
To: flexcoders@yahoogroups.com
Subject: [SPAM] RE: [flexcoders] Changing the image in a custom
component item renderer

 

Something like:

 

imagePath="{data[DataGridListData(listData).dataField]}"

 

You'll need to add a listData getter/setter and implement
IDropInListItemRenderer.  Copy the listData get/set from Label or
TextInput

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Paul Steven
Sent: Monday, September 17, 2007 10:32 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Changing the image in a custom component item
renderer

 

I am creating a datagrid that uses a custom component in an item
renderer to display one of 3 images (symbols of an embedded swf)

 

The data grid columns are created dynamically. I can't figure out how to
set the value of imagePath inside this custom component. 

 

The symbol names are the same as the value for xmlColumn.localName();

 

Any help really appreciated!!

 

 

e.g

 

dgc = new DataGridColumn();

dgc.headerText = xmlColumn.localName();
dgc.itemRenderer=new ClassFactory(statusComponent); 
dgc.dataField = xmlColumn.localName();

 

My custom component is as follows:

 


http://www.adobe.com/2006/mxml";
  width="100" height="30">







 

 



RE: [flexcoders] Dynamic class name

2007-09-17 Thread Alex Harui
getDefinitionByName

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of learner
Sent: Monday, September 17, 2007 11:28 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Dynamic class name

 

Hi all,
How can we instantiate the object of the class when class name is
dynamic.

What I am trying to implement is something like this:

var classArr= ["mxmlcomp1", "mxmlcomp2" ...] // array of class name 

(for var i:int=0;i

RE: [flexcoders] Sandbox/Crossdomain problem on connecting Socket with webserver on port 6680

2007-09-17 Thread Alex Harui
Hmm, maybe I missed something here...

 

Port 6680 is generally open?  What does the crossdomain.xml file look like on 
the server at that port?

What url are you using to open the socket?

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rogerio 
Gonzalez
Sent: Monday, September 17, 2007 3:06 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Sandbox/Crossdomain problem on connecting Socket with 
webserver on port 6680

 

Yes, if I have access to the port 80. But in my case, I don´t have, because of 
that, I try to use the xmlsocket protocol, but it don´t work.


Regards,

Rogério




On 9/17/07, Alex Harui <[EMAIL PROTECTED]  > wrote:

I think you want to load the policy file w/o a port so it uses a simple HTTP 
fetch.

 

Security.loadPolicyFile(" http://servico.servidor.com/crossdomain.xml 
 ");

The policy file should then allow access to port 6680

 



 

 



From: flexcoders@yahoogroups.com [mailto: flexcoders@  
yahoogroups.com  ] On Behalf Of Rogerio Gonzalez
Sent: Monday, September 17, 2007 10:06 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Sandbox/Crossdomain problem on connecting Socket with 
webserver on port 6680

 

Hello everybody.

I am developing a system for use of sockets to a telnet server on port 6677.
Locally, everything goes fine, even creating a projector(exe).

But when it goes online, it don´t connect because some kind of
crossdomain error.

The problem is that I don´t have access to the 80 port of the server,
so my webserver is on 6680 port.

I try use:
Security.loadPolicyFile("http://servico.servidor.com:6680/crossdomain.xml 
 "); 

And also:
Security.loadPolicyFile("xmlsocket://servico.servidor.com:6680/crossdomain.xml");

But, for some reason, he keeps giving me the sandbox error.

I did several alterations like:
Security.allowDomain(host +":6680")
Security.allowInsecureDomain(host +":6680");
Security.loadPolicyFile("xmlsocket://"+ host
+":6680/crossdomain.xml");
Security.loadPolicyFile("http://"+ host +":6680/crossdomain.xml");

But still, nothing.

Somebody have any idea?

Regards!

Rogério Gonzalez

 

 



Re: [flexcoders] Adding buttons to an Accordion header

2007-09-17 Thread Doug McCune
I might try to do a full post about this soon, but you can try checking out
the CanvasButton component in FlexLib. Basically this is a subclass of
Button that works like Canvas, so you can easily add whatever children to it
that you want. So you would use that to create your header renderer, which
you can set as a header renderer because it actually subclasses Button. You
can get the FlexLib components here: http://code.google.com/p/flexlib/

Hopefully that makes some sense. I'll try to write up a post soon since I've
seen this question asked multiple times.

Doug

On 9/17/07, Alex Harui <[EMAIL PROTECTED]> wrote:
>
>Yes, but you have to float buttons over the header.  Someone may have
> done this already.
>
>
>  --
>
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *kundigee
> *Sent:* Monday, September 17, 2007 8:27 PM
> *To:* flexcoders@yahoogroups.com
> *Subject:* [flexcoders] Adding buttons to an Accordion header
>
>
>
> I am dynamically creating an Accordion at run time. I place a new
> panel in the Accordion which generates a new Accordion header that I
> attribute an icon to. All good so far. I need to dynamically place +/-
> buttons on the right side of each header to give the user the ability
> to replicate, or delete the panel/Accordion component. I can't seem to
> addChild to the header with a child button. The Accordion header is a
> button itself and not a container. I started to create a custom MXML
> module extending Button, which I intended to substitute via the
> headerRenderer if I could work something out, but that also will not
> allow me to drop anything onto the component, as it is not a container.
>
> Is there any way to do what I am trying to accomplish?
>
>  
>


RE: [flexcoders] Can I use Flex to create flash widgets? that are embedded in HTML/JS web-app?

2007-09-17 Thread Alex Harui
You can use Flex to create things not based on the Flex Framework and
make really small swfs, but you can't make swcs that will work in Flash
Authoring.

 

To make small widgets and swfs, you can subclass Sprite.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Satish Kumar.M
Sent: Monday, September 17, 2007 10:57 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Can I use Flex to create flash widgets? that are
embedded in HTML/JS web-app?

 

I want to use Flex for creating chart widgets. and embed those widgets
in another HTML/JS web-app. Can I use Flex for that? I dont want to
create a full-blown Flex application.

The whole app is HTML/JS with embedded Flash widgets for charting..

Can some one point me to any example please, which show embedded Flex
in HTML/JS dominant app?

 



RE: [SPAM] RE: [SPAM] RE: [flexcoders] Changing the image in a custom component item renderer

2007-09-17 Thread Paul Steven
Thanks for the reply Alex. I do still have those 3 class vars but something
still is not quite working. See my code listing below and you will see the 3
class vars

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: 18 September 2007 07:14
To: flexcoders@yahoogroups.com
Subject: [SPAM] RE: [SPAM] RE: [flexcoders] Changing the image in a custom
component item renderer

 

In the original post, you had 3 class vars  You still need those.  @Embed is
compile time, so you have to embed the 3 images like you had it at first,
then the code I showed will choose one of the three variables.

 

  _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Paul Steven
Sent: Monday, September 17, 2007 10:53 PM
To: flexcoders@yahoogroups.com
Subject: RE: [SPAM] RE: [flexcoders] Changing the image in a custom
component item renderer

 

Thanks Alex

 

I have tried what you suggested but the image is not displaying. I have
added a text field into the custom component - this is displaying the
correct value. But it is not displaying any image - just a broken image
icon.

 

Here is the code for my custom component:

 



http://www.adobe.com/2006/mxml"; width="100"
height="30">

















 

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: 17 September 2007 19:12
To: flexcoders@yahoogroups.com
Subject: [SPAM] RE: [flexcoders] Changing the image in a custom component
item renderer

 

Something like:

 

imagePath="{data[DataGridListData(listData).dataField]}"

 

You'll need to add a listData getter/setter and implement
IDropInListItemRenderer.  Copy the listData get/set from Label or TextInput

 

  _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Paul Steven
Sent: Monday, September 17, 2007 10:32 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Changing the image in a custom component item renderer

 

I am creating a datagrid that uses a custom component in an item renderer to
display one of 3 images (symbols of an embedded swf)

 

The data grid columns are created dynamically. I can't figure out how to set
the value of imagePath inside this custom component. 

 

The symbol names are the same as the value for xmlColumn.localName();

 

Any help really appreciated!!

 

 

e.g

 

dgc = new DataGridColumn();

dgc.headerText = xmlColumn.localName();
dgc.itemRenderer=new ClassFactory(statusComponent); 
dgc.dataField = xmlColumn.localName();

 

My custom component is as follows:

 


http://www.adobe.com/2006/mxml"; width="100"
height="30">







 

 



RE: [flexcoders] Alignment of SWF in HTML output

2007-09-17 Thread Alex Harui
Make sure you're wrapping the right thing.  The object/embed tags are
not used by most browsers.  Also make sure your app appears centered at
that size.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Michael Baird
Sent: Sunday, September 16, 2007 11:56 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Alignment of SWF in HTML output

 

I have a Flex app with a defined size of 1024x768. I'd like to be able
to center this in the HTML page that it gets embedded in. I've tried
editing the FlexBuilder-generated html index page to include a div,
table, etc to try to get the SWF centered, but nothing seems to have any
effect. 
What am I missing? Is there an easier way?

 



RE: [flexcoders] Re: Buttons in Flex !

2007-09-17 Thread Alex Harui
In theory you can do this in Moxie, but in 2.x, all you are seeing is an
inherited prop that Button does not use.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of restlessdesign
Sent: Monday, September 17, 2007 11:10 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Buttons in Flex !

 

I too have this issue and did some quick research. Would it be
possible to use the transitions property of the Button class and pass
in effects that way using its pre-defined states (upState, overState,
downState, etc.)?

 



RE: [flexcoders] Adding buttons to an Accordion header

2007-09-17 Thread Alex Harui
Yes, but you have to float buttons over the header.  Someone may have
done this already.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of kundigee
Sent: Monday, September 17, 2007 8:27 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Adding buttons to an Accordion header

 

I am dynamically creating an Accordion at run time. I place a new 
panel in the Accordion which generates a new Accordion header that I 
attribute an icon to. All good so far. I need to dynamically place +/-
buttons on the right side of each header to give the user the ability 
to replicate, or delete the panel/Accordion component. I can't seem to 
addChild to the header with a child button. The Accordion header is a 
button itself and not a container. I started to create a custom MXML 
module extending Button, which I intended to substitute via the 
headerRenderer if I could work something out, but that also will not 
allow me to drop anything onto the component, as it is not a container.

Is there any way to do what I am trying to accomplish?

 



RE: [flexcoders] How to change positions of Alert popups in SHOW_ALL mode

2007-09-17 Thread Alex Harui
If I remember correctly, to get the scaling stage modes to work, you
have to make sure the application lays out at the same size as the
original stage.  I think you have to specify the size in the
mx:Appication tag, customize the HTML wrapper so it doesn't fix the
size, then make sure your layout fits in the size you specified.
Otherwise, things get out of whack.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of george_w_canada
Sent: Monday, September 17, 2007 6:55 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How to change positions of Alert popups in
SHOW_ALL mode

 

In Flex the SHOW_ALL mode couldn't function correctly for default
popups, like Alert. I didn't find a way to fit them in center of
browser screen automatically. Occasional Alert popups (usually server
side errors) not belong to any views so to make an customized version
of Alert class will cost lots of time to dig. Any suggestions?

Thanks a lot!
George

 



[flexcoders] Dynamic class name

2007-09-17 Thread learner
Hi all,
How can we instantiate the object of the class when class name is dynamic.

What I am trying to implement is something like this:

var classArr= ["mxmlcomp1", "mxmlcomp2" ...] // array of class name

(for var i:int=0;i

RE: [SPAM] RE: [flexcoders] Changing the image in a custom component item renderer

2007-09-17 Thread Alex Harui
In the original post, you had 3 class vars  You still need those.
@Embed is compile time, so you have to embed the 3 images like you had
it at first, then the code I showed will choose one of the three
variables.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Paul Steven
Sent: Monday, September 17, 2007 10:53 PM
To: flexcoders@yahoogroups.com
Subject: RE: [SPAM] RE: [flexcoders] Changing the image in a custom
component item renderer

 

Thanks Alex

 

I have tried what you suggested but the image is not displaying. I have
added a text field into the custom component - this is displaying the
correct value. But it is not displaying any image - just a broken image
icon.

 

Here is the code for my custom component:

 



http://www.adobe.com/2006/mxml
 " width="100" height="30">

















 

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: 17 September 2007 19:12
To: flexcoders@yahoogroups.com
Subject: [SPAM] RE: [flexcoders] Changing the image in a custom
component item renderer

 

Something like:

 

imagePath="{data[DataGridListData(listData).dataField]}"

 

You'll need to add a listData getter/setter and implement
IDropInListItemRenderer.  Copy the listData get/set from Label or
TextInput

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Paul Steven
Sent: Monday, September 17, 2007 10:32 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Changing the image in a custom component item
renderer

 

I am creating a datagrid that uses a custom component in an item
renderer to display one of 3 images (symbols of an embedded swf)

 

The data grid columns are created dynamically. I can't figure out how to
set the value of imagePath inside this custom component. 

 

The symbol names are the same as the value for xmlColumn.localName();

 

Any help really appreciated!!

 

 

e.g

 

dgc = new DataGridColumn();

dgc.headerText = xmlColumn.localName();
dgc.itemRenderer=new ClassFactory(statusComponent); 
dgc.dataField = xmlColumn.localName();

 

My custom component is as follows:

 


http://www.adobe.com/2006/mxml";
  width="100" height="30">







 

 



[flexcoders] Re: drag and drop an image object, over a list object

2007-09-17 Thread flashcrow2000
Indeed it is. I expected the DragEvent to have something similar. If
someone needs this, it works like this:

private function onDragDrop(event:DragEvent):void {
trace("droped on:"+List(event.target).calculateDropIndex(event))
}

Thanks Alex


--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> It is a method, not a property.  I assume you have a dragdrop event
> handler?  The one in LIstBase.as might serve as an example.
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of flashcrow2000
> Sent: Monday, September 17, 2007 10:56 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: drag and drop an image object, over a list
> object
> 
>  
> 
> Which is not an option for a List item. I tried using it from the mxml
> declaration (and it does not exist, according to Flash 2.0.1), and
> also from AS (of course, with the same result). If i'm doing something
> wrong, can you please provide a small code sample?
> 
> Thank you Alex
> --- In flexcoders@yahoogroups.com 
> , "Alex Harui"  wrote:
> >
> > calculateDropIndex?
> > 
> > 
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com 
> [mailto:flexcoders@yahoogroups.com 
> ] On
> > Behalf Of flashcrow2000
> > Sent: Monday, September 17, 2007 5:56 AM
> > To: flexcoders@yahoogroups.com  
> > Subject: [flexcoders] drag and drop an image object, over a list
> object
> > 
> > 
> > 
> > Hello all,
> > 
> > I have the following problem: I need to be able to drag an Image
> > object over a list, and make some operations based on the specific row
> > i'm dropping that picture on. The list contains names of different
> > people, and each picture I drag over one name becomes assigned to that
> > person.
> > 
> > I have the drag and drop capability all worked out (i'm using the
> > DragManager of course, and the List object accepts the drop) but I
> > can't seem to be able to actually find out on what row the user
> > dropped the picture. Any ideas? (I'm sure it's simple, but I just
> > don't see it yet)
> > 
> > Thanks, 
> > Cosmin
> >
>




[flexcoders] DelegateFactory

2007-09-17 Thread Sammi
Hi,

 

Am am creating a Cairngorm app that needs to support the API of a number of
similar online webservices.  All the webservices supply the same
functionality - just in a slightly different way.

 

My idea is this.  Use the FactoryPattern for the Delegates.  So when a
Command needs a delegate it calls the Factory and the factory supplies the
command with a delegate.

 

So the command needs a LoginDelegate.  It gets a
LoginDelegateForWebServiceA(), because the user has previously configured
the app to use web service A.

 

I am just so new to actually applying design patterns.  I have read many
articles and books (Head first Java books are GREAT!) so I understand the
concept.  I just haven't used it much so I am not sure if my idea is any
good.

 

Is this the way to go?  Can you point me at any good articles on how to
support multiple "backends"?

 

Best,

Sammi



Re: [flexcoders] Sandbox/Crossdomain problem on connecting Socket with webserver on port 6680

2007-09-17 Thread Rogerio Gonzalez
Yes, if I have access to the port 80. But in my case, I don´t have, because
of that, I try to use the xmlsocket protocol, but it don´t work.


Regards,

Rogério



On 9/17/07, Alex Harui <[EMAIL PROTECTED]> wrote:
>
>I think you want to load the policy file w/o a port so it uses a simple
> HTTP fetch.
>
>
>
> Security.loadPolicyFile("http://servico.servidor.com/crossdomain.xml
> ");
>
>  The policy file should then allow access to port 6680
>
>
>
> 
>
>
>
>
>  --
>
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Rogerio Gonzalez
> *Sent:* Monday, September 17, 2007 10:06 AM
> *To:* flexcoders@yahoogroups.com
> *Subject:* [flexcoders] Sandbox/Crossdomain problem on connecting Socket
> with webserver on port 6680
>
>
>
> Hello everybody.
>
> I am developing a system for use of sockets to a telnet server on port
> 6677.
> Locally, everything goes fine, even creating a projector(exe).
>
> But when it goes online, it don´t connect because some kind of
> crossdomain error.
>
> The problem is that I don´t have access to the 80 port of the server,
> so my webserver is on 6680 port.
>
> I try use:
> Security.loadPolicyFile("http://servico.servidor.com:6680/crossdomain.xml
> ");
>
> And also:
> Security.loadPolicyFile("
> xmlsocket://servico.servidor.com:6680/crossdomain.xml");
>
> But, for some reason, he keeps giving me the sandbox error.
>
> I did several alterations like:
> Security.allowDomain(host +":6680")
> Security.allowInsecureDomain(host +":6680");
> Security.loadPolicyFile("xmlsocket://"+ host
> +":6680/crossdomain.xml");
> Security.loadPolicyFile("http://"+ host +":6680/crossdomain.xml");
>
> But still, nothing.
>
> Somebody have any idea?
>
> Regards!
>
> Rogério Gonzalez
>
>  
>


[flexcoders] Alignment of SWF in HTML output

2007-09-17 Thread Michael Baird
I have a Flex app with a defined size of 1024x768. I'd like to be able to
center this in the HTML page that it gets embedded in. I've tried editing
the FlexBuilder-generated html index page to include a div, table, etc to
try to get the SWF centered, but nothing seems to have any effect.
What am I missing? Is there an easier way?


[flexcoders] Can I use Flex to create flash widgets? that are embedded in HTML/JS web-app?

2007-09-17 Thread Satish Kumar.M
I want to use Flex for creating chart widgets. and embed those widgets
in another HTML/JS web-app. Can I use Flex for that? I dont want to
create a full-blown Flex application.

The whole app is HTML/JS with embedded Flash widgets for charting..

Can some one point me to any example please, which show embedded Flex
in HTML/JS dominant app?



[flexcoders] Re: Buttons in Flex !

2007-09-17 Thread restlessdesign
I too have this issue and did some quick research. Would it be
possible to use the transitions property of the Button class and pass
in effects that way using its pre-defined states (upState, overState,
downState, etc.)?



Re: [flexcoders] Loading code from swf (instantiating classes from external swf)

2007-09-17 Thread Steve Mathews
You can use LoadModule, which might be the best way to go. But I am
doing a AS3 only project (no flex framework) and am doing this using
applicationDomain.getDefinition which works great.

On 9/17/07, Tom Chiverton <[EMAIL PROTECTED]> wrote:
> On Monday 17 Sep 2007, [EMAIL PROTECTED] wrote:
> > I tried Google but I couldn't find anything, maybe it's pretty easy
> > and maybe it's impossible. Anyone has any ideas?
>
> LoadModule
>
> --
> Tom Chiverton
> Helping to continuously bully cross-media mindshares
> on: http://thefalken.livejournal.com
>
> 
>
> This email is sent for and on behalf of Halliwells LLP.
>
> Halliwells LLP is a limited liability partnership registered in England and 
> Wales under registered number OC307980 whose registered office address is at 
> St James's Court Brown Street Manchester M2 2JF.  A list of members is 
> available for inspection at the registered office. Any reference to a partner 
> in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by 
> the Law Society.
>
> CONFIDENTIALITY
>
> This email is intended only for the use of the addressee named above and may 
> be confidential or legally privileged.  If you are not the addressee you must 
> not read it and must not use any information contained in nor copy it nor 
> inform any person other than Halliwells LLP or the addressee of its existence 
> or contents.  If you have received this email in error please delete it and 
> notify Halliwells LLP IT Department on 0870 365 8008.
>
> For more information about Halliwells LLP visit www.halliwells.com.
>
>
>
> --
> 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] Re: Buttons in Flex !

2007-09-17 Thread restlessdesign
What if the transition is just a simple fade from one skin to the
next. Does that make things any easier? The Button class has a
transitions property, so why can't that be leveraged?



[flexcoders] Adding buttons to an Accordion header

2007-09-17 Thread kundigee
I am dynamically creating an Accordion at run time.  I place a new 
panel in the Accordion which generates a new Accordion header that I 
attribute an icon to.  All good so far.  I need to dynamically place +/-
 buttons on the right side of each header to give the user the ability 
to replicate, or delete the panel/Accordion component.  I can't seem to 
addChild to the header with a child button.  The Accordion header is a 
button itself and not a container.  I started to create a custom MXML 
module extending Button, which I intended to substitute via the 
headerRenderer if I could work something out, but that also will not 
allow me to drop anything onto the component, as it is not a container.

Is there any way to do what I am trying to accomplish?



[flexcoders] How to change positions of Alert popups in SHOW_ALL mode

2007-09-17 Thread george_w_canada
In Flex the SHOW_ALL mode couldn't function correctly for default
popups, like Alert. I didn't find a way to fit them in center of
browser screen automatically. Occasional Alert popups (usually server
side errors) not belong to any views so to make an customized version
of Alert class will cost lots of time to dig. Any suggestions?

Thanks a lot!
George



[flexcoders] httpservice and crud

2007-09-17 Thread nylarch
noob question alert.

Just starting on flex.   I'm doing a simple CRUD page working with a calendar.  
 Do I need 
to do seperate HTTPService components for the different CRUD operations or is 
it possible 
to dynamically pass in requests to one service since I'm doing all of the 
operations on the 
same backend php page.

i.e. do you need to seperate:




{fmtDate.format(dateChoose.selectedDate)}






{fmtDate.format(dateChoose.selectedDate)}
<_update>true




or can I dynamically pass in the in "update=true" and just use one service for 
both Get and 
Update.

Thanks.



[flexcoders] httpservice and crud

2007-09-17 Thread nylarch
noob question alert.



[flexcoders] Custom AS3 component, on stopDrag, everything disappears?

2007-09-17 Thread mrand02
I have a draggable part of my component (that extends Panel, if it
matters), that seems to work fine while dragging.  I can click on the
titleBar of the Panel and the Panel drags around the screen as you'd
expect a draggable window to do, but after I release the mouse button
and this function here gets called, the entire panel just disappears.
 I've tried stage.invalidate() and evt.updateAfterEvent(), they both
do nothing.  Any suggestions?  Never seen this happen before...

public function onRelease(evt:Event):void
{
if (_bIsDraggable)
{
this.stopDrag();
}
}



RE: [flexcoders] Flex Developer Center example

2007-09-17 Thread Matt Chotin
We'll hopefully be posting source to that sample pretty soon.  It should
use states but it actually doesn't L

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of hworke
Sent: Monday, September 17, 2007 10:20 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex Developer Center example

 



Does any one know what was used to create the UI with 3 resizable
window in Flex Developer Center web page:

http://www.adobe.com/devnet/flex/

Did they use mx:states? If any one could also send some similar
code example that would be highly appreciated.

Regards

 



RE: [SPAM] RE: [flexcoders] Changing the image in a custom component item renderer

2007-09-17 Thread Paul Steven
Thanks Alex

 

I have tried what you suggested but the image is not displaying. I have
added a text field into the custom component - this is displaying the
correct value. But it is not displaying any image - just a broken image
icon.

 

Here is the code for my custom component:

 



http://www.adobe.com/2006/mxml"; width="100"
height="30">

















 

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: 17 September 2007 19:12
To: flexcoders@yahoogroups.com
Subject: [SPAM] RE: [flexcoders] Changing the image in a custom component
item renderer

 

Something like:

 

imagePath="{data[DataGridListData(listData).dataField]}"

 

You'll need to add a listData getter/setter and implement
IDropInListItemRenderer.  Copy the listData get/set from Label or TextInput

 

  _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Paul Steven
Sent: Monday, September 17, 2007 10:32 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Changing the image in a custom component item renderer

 

I am creating a datagrid that uses a custom component in an item renderer to
display one of 3 images (symbols of an embedded swf)

 

The data grid columns are created dynamically. I can't figure out how to set
the value of imagePath inside this custom component. 

 

The symbol names are the same as the value for xmlColumn.localName();

 

Any help really appreciated!!

 

 

e.g

 

dgc = new DataGridColumn();

dgc.headerText = xmlColumn.localName();
dgc.itemRenderer=new ClassFactory(statusComponent); 
dgc.dataField = xmlColumn.localName();

 

My custom component is as follows:

 


http://www.adobe.com/2006/mxml"; width="100"
height="30">







 

 



RE: [flexcoders] Combo box with Remote Object

2007-09-17 Thread Alex Harui
If you have an array, just pass it in as the dataProvider.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tom Preet
Sent: Monday, September 17, 2007 10:25 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Combo box with Remote Object

 

 

Hi Guys,

 

am having a doubt on using the combo box control in Flex Application.

The values in the combo box has to be read from a file and display
within 

a combo box, for this I used Remote object method. am not getting how to


write a function for store the data in a Array Collection and display it

and display the content when i clicked on it.

Does anybody know any ways of overcoming this problem?

 

Thanks,

Tomt.

 



[flexcoders] Combo box with Remote Object

2007-09-17 Thread Tom Preet
Hi Guys,

am having a doubt on using the combo box control in Flex Application.

The values in the combo box has to be read from a file and display within

a combo box, for this I used Remote object method. am not getting how to

write a function for store the data in a Array Collection and display it

and display the content when i clicked on it.
Does anybody know any ways of overcoming this problem?

Thanks,
Tomt.


RE: [flexcoders] How can I load an image whose name includes utf-8 type characters?

2007-09-17 Thread Alex Harui
I think is really HTTP underneath so you may have to call encodeURI

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of arcencie1978
Sent: Monday, September 17, 2007 5:46 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How can I load an image whose name includes utf-8
type characters?

 

Hi guys,
I'd like to load an image which has utf-8 character names,
something like Korean.
I thought that since Flex supports utf-8, loading an image with utf-8 
charaters would not be a problem but it turns out that
Flex doesn't seem to be able to load any utf-8 character included 
images. Is there any workaround to this? Any hints would be greatly 
appreciated!! 

 



[flexcoders] HTTPService: Request timed out

2007-09-17 Thread mitek17
Hi all,

I've got an intermittent problem with HTTPService fetching data from
Apache2/PHP5 server over an SSL connection.

Sometimes (2-6 out of 200 requests) the response from server never
reaches the client back. Server logs show that the response has been
sent. The problem is in the browser or in my gut feeling in the
HTTPService itself.

I've already done the following:

1. variable URL like page.php?nocache=
2. PHP sends a header which tells not to cache the response
3. new HTTPService object is created for each request (this step gave
me the best improvement)

This problem happens on ANY browser at the same rate (IE6,IE7, FF,
Safari).

The whole flex application is running over an SSL connection and all
the HTTPService calls are made to the relative server addresses.


I should admit, that in test environment (localhost) where we don't
have SSL connection it never happened. On the other hand localhost
connection and ADSL links to the live site are quite different things.


Does anybody know any ways of overcoming this problem?

Thanks in advance!


Cheers,
Dmitri.






Re: [flexcoders] asdocs for as3 and ant files

2007-09-17 Thread learner
yeah got that ...
Thanks ..
I can not build asdocs using the build files..but .. just curious.. why
those files are there?
Can you please share ur knowledge?

Regards
Mayur



On 9/17/07, Stephen Gilson <[EMAIL PROTECTED]> wrote:
>
>   Hi,
>
> When you open the Help in FlexBuilder, do you see an entry for the doc
> called "Adobe Flex 3.0 Help"?
>
> Under that should be an entry for "Adobe(r) Flex(tm) 3 Language
> Reference".
>
> You cannot build the ASDoc for yourself using the build.xml file in
> \moxie\asdoc.
>
> Stephen
>
>
> -Original Message-
> From: flexcoders@yahoogroups.com  [mailto:
> flexcoders@yahoogroups.com ] On
> Behalf Of learner
> Sent: Monday, September 17, 2007 1:47 AM
> To: flexcoders@yahoogroups.com 
> Subject: [flexcoders] asdocs for as3 and ant files
>
> Hi All,
> I am trying to access asdocs , but its not there in my flexbuilder's
> help.
>
> I tried and search in the flex installation directory.I found a folder
> asdocs here :
> C:\Program Files\Adobe\Flex Builder 3\sdks\moxie\asdoc\
>
> I found the index.hml in template folder inside asdoc directory..but
> ".page not found" is displayed when I open the it.
> I see one "build.xml " in asdoc directory ..after running this ant
> script it gives me a build fail error.
>
> I see one more ant file in the framework directory of installation (here
> C:\Program Files\Adobe\Flex Builder 3\sdks\moxie\frameworks\)
>
> Can some body please explain me for what these build.xmls' are there and
> what is the use...and also where can I find the asdocs for the as3
> clasess.
>
> Thanks in advance.
> Regards
> PS
>
>  
>


[flexcoders] RE: DataGrid & XMLList Problem

2007-09-17 Thread Manu Dhanda

Yes, Solved my problem.

Thanks.


Tracy Spratt wrote:
> 
> You want labelFunction()
> 
>  
> 
> It will replace dataField for displaying column data in deeply nested
> nodes.
> 
>  
> 
> Tracy
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Manu Dhanda
> Sent: Friday, September 14, 2007 4:57 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] DataGrid & XMLList Problem
> 
>  
> 
> 
> Hii
> 
> I have code something like this:
>  dataProvider="{XML(categoryXMLList).label}">
> 
>  dataField="{myfunction(data.category_key)}"/>
> 
> 
> 
> 
> 
> So, in my DataGridColum, I want to call a function for the datafield
> which
> returns a string value to display.
> 
> Can someone please guide me to solve this issue.
> 
> Thanks,
> Manu.
> 
> -- 
> View this message in context:
> http://www.nabble.com/DataGrid---XMLList-Problem-tf4441089.html#a1267121
> 7
>  17> 
> Sent from the FlexCoders mailing list archive at Nabble.com.
> 
>  
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/DataGrid---XMLList-Problem-tf4441089.html#a12749105
Sent from the FlexCoders mailing list archive at Nabble.com.



RE: [flexcoders] insert / delete problems using FDS with hibernate

2007-09-17 Thread Jeff Vroom
Hi Carlos,

 

First of all, if you are not running the latest version LC DS 2.5.1 (FDS
was renamed to LC DS), it may help to upgrade as we've both fixed a few
problems and also improved the diagnostics.  

 

The best way to diagnose these problems is to turn on the debug logging
on the server (services-config.xml for the patterns Message.* and
DataService.*) and client (with the ) tag.  

 

Hibernate also has some nice debug logging which shows the SQL that is
generated which is nice as well.  

 

I haven't heard of any problems where deleteItem just silently does not
delete the object.  In some cases, there are rows which refer to the row
you want to delete and so the deleteItem will generate an error due to
the database integrity constraint.  This can happen in particular
because hibernate supports cascade="delete" behavior but DMS does not
have that yet.  In these cases, you may have to delete the related
objects before you delete the main object.  

 

In any case, the debug logs will show the details and so we can figure
out what is going on.  If the logs are too big to send to the list, feel
free to send them to me off list ([EMAIL PROTECTED]) and I can help you
out.

 

Jeff

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of targo_05
Sent: Monday, September 17, 2007 4:44 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] insert / delete problems using FDS with hibernate

 

Hi everyone,

I'd be very thankful if anyone could help me with this problem 
because I got stuck on it for several weeks.

I'm developing a FDS application with database connection and I've 
mapped a relational database to POJO's with Hibernate (using 
hibernate tools). I'm experiencing a lot of problems when I try to 
insert and delete items using the hibernate assembler. Here is my 
situation.

My database, which represents information about cars, contains five 
tables:

MODEL
id
engine
transmission
cab 
bed 

MODEL_PACK
model_id
pack_id
inclusion_type

PACK
id
name 
category

MODEL_COLOR
model_id
color_id

COLOR
id
extColor
intColor

The AS classes that represent this schema:

Model.as

id:int;
engine:string;
transmission:string;
cab:string;
bed:string;
colors:ArrayCollection;
packs:ArrayCollection;

ModelPack.as

id:ModelPackId;
model:Model;
pack:Pack;
inclusion:String;

ModelPackId is a custom class to store the composite primary key 
which is mapped to the corresponding java POJO.

Pack.as

id:String;
category:String;
name:String;
models:ArrayCollection;

Color.as

id:String;
extColor:String;
intColor:String;
models:ArrayCollection;

The corresponding destinations in data-management-config.xml:


...


..


.








...


...

.

As you can see the relationships are bidirectional. 

For example I have the data service to manage the operations in the 
front end and a datagrid:





and a button:



The callback function only uses the hibernate assembler to delete the 
model:

models_ds.deleteItem(modelList.selectedItem);
models_ds.commit();

It seems that the operation is performed succesfully but then when I 
check the database or reload the application the model that I've 
tried to delete is still there with its corresponding packs and 
colors. Sometimes the application throws a runtime error about 
synchronization. I've tried to remove the relations in the AS classes 
because I think that the problem have to do with the relations 
between classes and it works but in this case the application doesn't 
meet my requirements and the delete operation is more complex. 
Similar problems happen when I try to add Items.

I've tried a lot of solutions to fix that problem (remove relations, 
convert them to unidirectional instead of bidirectional...) and I'd 
be deeply grateful if anyone can show me the procedure to add and 
delete items in that scenario. I've also thought that I could have 
missed any tag like "cascade" in the hibernate mapping files but I 
haven't tried this solution because I don't know what does it exactly 
mean.

I have heard that the hibernate assembler has some bugs and in some 
circumstances it doesn't work properly. Could anyone confirm that?If 
true what should be the alternative solution? It's very important for 
me because this is a small part of my dissertation and I can't 
continue because I got stuck on this issue.

Thanks a lot in advance,

Carlos

 



[flexcoders] Re: Multiple Axis in Flex 3 FLEX CHART

2007-09-17 Thread reflexactions
The example you give is not what is usually meant by a "multiple axis" 
chart it is more a "multiple chart" chart!

Multiple Axes refers to displaying several overlayed data series that 
use more than one axis in the same position i.e. two overlayed lines 
charts which have different scales shown with two Y Axis placed on the 
left of the chart.

You want to have several different charts stacked above each other 
sharing a common X axis.

With Flex Charts there is no built in way to achieve that but you can 
create more than one chart, place them in a VBox to stack vertically. 
You would then need to customise the charts to ensure the X axis scales 
were the same and to hide the XAxis for all but the main chart. 



FYI In XPCharting for Flex we have a built in SubChart that 
automatically does exactly this, it allows you to add multiple sub 
charts which are displayed stacked underneath the main chart sharing a 
common XAxis and only one chart displays the shared XAxis. You can see 
an example here 
http://www.xpcomponents.com/flex/examples/StockChartExample2/StockChartE
xample2.html where we use the subcharts to display volume and RSI below 
the main stock chart. You can control the heights of the various 
subcharts individually.



 
--- In flexcoders@yahoogroups.com, "hworke" <[EMAIL PROTECTED]> wrote:
>
> 
> 
> Hello!! I can see that Flax 3 charting now has multi axis ability. The
> examples I got from the web has all the Y axis "side by side"!!! Is it
> possible to stack up Y axis? I kind of want to STAKC up like 10 area
> graphs with 10 multi Y axis so that I can view all of them at the same
> time in one chart with one background. Please take a look at this
> link, I need somthing like this:
> 
> 
http://www.visualmining.com/developers/examples/lines/linemultiaxes.htm
> 
> Thanks
>




[flexcoders] How can I load an image whose name includes utf-8 type characters?

2007-09-17 Thread arcencie1978
Hi guys,
I'd like to load an image which has utf-8 character names,
something like Korean.
I thought that since Flex supports utf-8, loading an image with utf-8 
charaters would not be a problem but it turns out that
Flex doesn't seem to be able to load any utf-8 character included 
images. Is there any workaround to this? Any hints would be greatly 
appreciated!! 



Re: [flexcoders] air namespace (adobe)

2007-09-17 Thread Jeffry Houser

  In theory, a different implementation will still have the same API, or 
the API will be 'smart enough' to know which implementation it is using. 
;)  I'm glad I don't have to design it.

superabe superabe wrote:
> 
> 
> Ok. That makes sense I guess ...  
> Though in your example , what if the File class for mobile needs to have 
> a different implementation (lightweight?) than the File class for 
> desktop devices (AIR) ?
> 
> - superabe
> 
> On 9/17/07, *Gordon Smith* <[EMAIL PROTECTED] 
> > wrote:
> 
> No. This decision is consistent with the fact that the AIR team has
> put their new classes like File into the flash.* package.
>  
> Both decisions are motivated by the fact that it's hard to know what
> classes will exist on which platforms in the future. For example,
> the Flash Player for mobile devices -- which isn't AIR -- may have a
> File class. So our rule is that packages do not indicate the platform.
>  
> - Gordon
> 
> 
> *From:* flexcoders@yahoogroups.com 
> [mailto:flexcoders@ yahoogroups.com
> ] *On Behalf Of *superabe superabe
> *Sent:* Saturday, September 15, 2007 5:03 AM
> *To:* flexcoders@yahoogroups.com 
> *Subject:* [flexcoders] air namespace (adobe)
> 
> Are there any plans to create a separate namespace for AIR related
> components in the SDK?
> For e.g. I am looking inside the mx.controls package and I see
> controls like FileSystemComboBox and FileSystemDataGrid listed,
> which dont seem to be usable in a non-AIR flex context, thus leading
> to confusion.
> 
> - superabe
> 
> 
> 

-- 
Jeffry Houser, Technical Entrepreneur, Software Developer, Author, 
Recording Engineer
AIM: Reboog711  | Phone: 1-203-379-0773
--
My Company: 
My Podcast: 
My Blog: 



Re: [flexcoders] air namespace (adobe)

2007-09-17 Thread superabe superabe
Ok. That makes sense I guess ...
Though in your example , what if the File class for mobile needs to have a
different implementation (lightweight?) than the File class for desktop
devices (AIR) ?

- superabe

On 9/17/07, Gordon Smith <[EMAIL PROTECTED]> wrote:
>
>No. This decision is consistent with the fact that the AIR team has
> put their new classes like File into the flash.* package.
>
> Both decisions are motivated by the fact that it's hard to know what
> classes will exist on which platforms in the future. For example, the Flash
> Player for mobile devices -- which isn't AIR -- may have a File class. So
> our rule is that packages do not indicate the platform.
>
> - Gordon
>
>  --
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *superabe superabe
> *Sent:* Saturday, September 15, 2007 5:03 AM
> *To:* flexcoders@yahoogroups.com
> *Subject:* [flexcoders] air namespace (adobe)
>
>  Are there any plans to create a separate namespace for AIR related
> components in the SDK?
> For e.g. I am looking inside the mx.controls package and I see controls
> like FileSystemComboBox and FileSystemDataGrid listed, which dont seem to be
> usable in a non-AIR flex context, thus leading to confusion.
>
> - superabe
>
>  
>


[flexcoders] insert / delete problems using FDS with hibernate

2007-09-17 Thread targo_05
Hi everyone,

I'd be very thankful if anyone could help me with this problem 
because I got stuck on it for several weeks.

I'm developing a FDS application with database connection and I've 
mapped a relational database to POJO's with Hibernate (using 
hibernate tools). I'm experiencing a lot of problems when I try to 
insert and delete items using the hibernate assembler. Here is my 
situation.

My database, which represents information about cars, contains five 
tables:

MODEL
id
engine
transmission
cab 
bed 

MODEL_PACK
model_id
pack_id
inclusion_type

PACK
id
name 
category

MODEL_COLOR
model_id
color_id

COLOR
id
extColor
intColor

The AS classes that represent this schema:

Model.as

id:int;
engine:string;
transmission:string;
cab:string;
bed:string;
colors:ArrayCollection;
packs:ArrayCollection;


ModelPack.as

id:ModelPackId;
model:Model;
pack:Pack;
inclusion:String;

ModelPackId is a custom class to store the composite primary key 
which is mapped to the corresponding java POJO.


Pack.as

id:String;
category:String;
name:String;
models:ArrayCollection;


Color.as

id:String;
extColor:String;
intColor:String;
models:ArrayCollection;



The corresponding destinations in data-management-config.xml:


...


..



.









...



...

.


As you can see the relationships are bidirectional. 

For example I have the data service to manage the operations in the 
front end and a datagrid:





and a button:



The callback function only uses the hibernate assembler to delete the 
model:

models_ds.deleteItem(modelList.selectedItem);
models_ds.commit();

It seems that the operation is performed succesfully but then when I 
check the database or reload the application the model that I've 
tried to delete is still there with its corresponding packs and 
colors. Sometimes the application throws a runtime error about 
synchronization. I've tried to remove the relations in the AS classes 
because I think that the problem have to do with the relations 
between classes and it works but in this case the application doesn't 
meet my requirements and the delete operation is more complex. 
Similar problems happen when I try to add Items.

I've tried a lot of solutions to fix that problem (remove relations, 
convert them to unidirectional instead of bidirectional...) and I'd 
be deeply grateful if anyone can show me the procedure to add and 
delete items in that scenario. I've also thought that I could have 
missed any tag like "cascade" in the hibernate mapping files but I 
haven't tried this solution because I don't know what does it exactly 
mean.

I have heard that the hibernate assembler has some bugs and in some 
circumstances it doesn't work properly. Could anyone confirm that?If 
true what should be the alternative solution? It's very important for 
me because this is a small part of my dissertation and I can't 
continue because I got stuck on this issue.

Thanks a lot in advance,

Carlos



[flexcoders] Re: Math.cos...?

2007-09-17 Thread simonjpalmer
Therein lies the entire problem.  Discontinuities are an artefact of a
flawed model and do not truly appear in nature.  

The whole problem would go away if we counted in base pi and went back
to having no zero.  

--- In flexcoders@yahoogroups.com, "Gordon Smith" <[EMAIL PROTECTED]> wrote:
>
> That would be a bad idea because it would lead to discontinuities. The
> function should be smooth at pi/2, pi, etc.
>  
> - Gordon
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Guido
> Sent: Monday, September 17, 2007 1:46 PM
> To: flexcoders@yahoogroups.com
> Subject: Re: [flexcoders] Math.cos...?
> 
> 
> 
> Math.cos() (and every other trig function) should check the argument
> being PI (or any other of its own constants) before calculating, since
> it would better reflect the mathematical function and maybe even save up
> on some performance. 
> 
> 
> On 9/17/07, Gordon Smith <[EMAIL PROTECTED]  >
> wrote: 
> 
>   
> 
>   In addition to Math.PI not being able to store the exact value
> of pi, the computation of trig functions involves approximations. For
> example, one definition of a cosine is in terms of an infinite series,
> and a computer can't calculate an infinite number of terms. Even if the
> argument passed to Math.cos() is exact, the result generally won't be.
>
>   - Gordon
> 
> 
> 
>   From: flexcoders@yahoogroups.com
> [mailto:flexcoders@yahoogroups.com  ] On Behalf
> Of Jon Bradley
>   Sent: Sunday, September 16, 2007 2:49 PM
>   To: flexcoders@yahoogroups.com
>   Subject: Re: [flexcoders] Math.cos...?
>   
>   
>   That's pretty much it. 
> 
> 
>   To a computer Math.cos(Math.PI/2) is not 0. It's really close to
> 0, because PI is an infinite sequence and a computer can "only" store it
> as a double precision floating point number (ie, a fixed value).
> 
>   What you get back from this calculation is the error bound of
> the computer basically, which you can then use for  numerical
> calculations, ie, MathLib.ERROR_BOUND = Math.cos(Math.PI/2). Then you
> can feasibly use if you need numerical accuracy.
> 
>   IE, if result == MathLib.ERROR_BOUND, result = 0.
> 
>   Numerical accuracy in AS2 is not equivalent to that of AS3. I
> ran into this while porting the Mersenne Twister algorithm to AS2 - I
> couldn't even store 2^32 as a hex value in AS2 (0x1, which
> equals 4294967296).
> 
>   At least we can be somewhat numerically accurate now...
> 
>   good luck,
> 
>   jon
> 
> 
>   On Sep 16, 2007, at 5:15 PM, Troy Gilbert wrote:
> 
> 
>   > Why does Math.cos(Math.PI/2) not return zero?
>   
>   Round-off error in the Math libs? It does return a value
> very close to
>   0 (1.7xe-17).
>   
>   Troy.
>




[flexcoders] Re: Overriding ValueObjects class

2007-09-17 Thread simonjpalmer
My first question is what are you trying to achieve by duplicating the
title variable in the subclass, it would on the face of it seem a
little pointless?   If you need to titles use an array or call them
different things so as to disambiguate them.

However, have you tried writing a setter or getter on the subclass

> package com.xyz
> {
>   [Bindable]
>   public class Bar extends Foo
>   {
> public var description:String;
> public function set title(s:String):void{}
> public function get title():String{}
>   }
> }

I think there is also an override keyword you could investigate.

Best solution is to design your objects in such a way that avoids
these sorts of clashes.

hope that helps
SP

--- In flexcoders@yahoogroups.com, nhid <[EMAIL PROTECTED]> wrote:
>
> Hello,
> 
> Lets say I have a VO class Bar.as to be extended from Foo.as VO
class.  I
> get this error at variable "title" (see code below):
> 
> Overriding a function that is not marked for override.
> 
> How do I resolve this?  I saw Adobe's link saying I should remove
[Bindable]
> from base class, I did but that did not resolve the problem.  Any
suggestion
> is appreciated.
> 
> thank you.
> 
> **
> // Foo.as
> package com.xyz
> {
>   [Bindable]
>   public class Foo
>   {
> public var title:String;
>   }
> }
> 
> // Bar.as
> package com.xyz
> {
>   [Bindable]
>   public class Bar extends Foo
>   {
> public var description:String;
> public var title:String;
>   }
> }
>




[flexcoders] Re: Cache-Control header not working in HTTPService

2007-09-17 Thread Doug Lowder
It's best to stay away from pragma no-cache entirely, since some 
browser versions don't handle it correctly.  I use "max-age=0, must-
revalidate".

 http://tech.groups.yahoo.com/group/flexcoders/message/29418

- Doug

--- In flexcoders@yahoogroups.com, "dario.drome" <[EMAIL PROTECTED]> 
wrote:
>
> The http headers to control (and avoid the cache) come from the 
> server side, that is, it is not useful at all that you set the 
> headers from the client side.
> In order to avoid cache you need to set the header "Pragma" with 
the 
> value "no-cache" and also set "Expires" with "-1" to give your 
> content an inmediate expiration, but remember: set these values 
from 
> the server, not from the client.
> 
> Regards.
> 
> --- In flexcoders@yahoogroups.com, Scott - FastLane  
> wrote:
> >
> > If you have control of the server side of your project, you could 
> ask 
> > them to include the cache in their response header... I believe 
> that is 
> > the way it is supposed to work.  The server indicates that the 
> content 
> > it is returning is dynamic in nature and should not be cached.  
> While 
> > adding the current time to each of your requests as a parameter 
> will 
> > avoid caching, it is a bit burdensome if you have a large system 
to 
> > implement.  Note also that the no-cache response header is 
ignored 
> by 
> > IE/flashplayer when your request is over https as described here 
> > http://blog.fastlanesw.com/?p=9.  Note: I also describe the 
> workaround 
> > that I use to get around this issue.
> > 
> > hth
> > Scott
> > 
> > Dan Todor wrote:
> > >
> > > Try adding current system time as a parameter to your request, 
it 
> will 
> > > avoid caching.
> > > hth
> > >
> > > On 9/17/07, *Guido* mailto:ptevan@>> wrote:
> > >
> > > Hi y'all,
> > >
> > > I've been having this problem for a while now, and I've 
went 
> by
> > > the docs on RPC components time and time again, getting no
> > > solution for this.
> > >
> > > I have an HTTP service and I need to guarantee that its 
> results
> > > are not cached by either the app or the browser.
> > >
> > > My last attempt on this is:
> > >
> > >  > > concurrency="last"
> > > headers="{new URLRequestHeader("Cache-Control" ,
> > > "no-cache")}"
> > > makeObjectsBindable="true"
> > > requestTimeout="10"
> > > showBusyCursor="true"
> > > useProxy="false"
> > > url="{myServiceURL}"/>
> > >
> > > When debugging the app, the service's HTTP header property 
is
> > > populated by the URLRequestHeader, so I believe It's 
getting 
> built
> > > adequately. Also, when inspecting the AsyncToken returned by
> > > myService.send(), the message property has its headers also
> > > populated by the URLRequestHeader.
> > >
> > > The thing is that when I check for adequate reception on the
> > > server side, I don't get the Cache-Control header at all.
> > >
> > >
> > > Does anyone know how to make HTTP headers work for 
> HTTPServices?
> > >
> > > TIA,
> > >
> > > Guido.
> > >
> > >
> > >
> > >
> > > -- 
> > > All best,
> > > Dan
> > >
> > > Zen is like looking for the spectacles that are sitting on your 
> nose
> > >
> >
>




RE: [flexcoders] ComboBox SelectedIndex HELP!

2007-09-17 Thread Alex Harui
Binding to functions is tricky.  It doesn't know when its value changed.
Binding to something that does is better.  The function probably gets
run at init time and errors which is eaten by Binding then never knows
that the results came back.  I would set selectedIndex in the results
handler.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of hammer995
Sent: Monday, September 17, 2007 2:51 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] ComboBox SelectedIndex HELP!

 

So I have an edit form which I have several combobox's that I can
populate successfully from static arrays. So I want to duplicate this
with results from an HTTPService.

For some reason, the selectedIndex property does not run the function
for selecting the data to be shown by default.

The HTTPService gets launched at creationComplete when the user
selects the edit component.

I actually never get the trace in the findIndexAcct so that leads me
to believe that it never gets executed.

This is my code:





[Bindable]
public var acctArray:ArrayCollection;

private function
getAcctListResultHandler(event:ResultEvent): void {
acctArray = event.result.customers.customer as ArrayCollection;
/*
for (var i:int = 0; i < acctArray.length; i++) {
trace(acctArray[i].acct);
} */
}

private function findIndexAcct(acct:String):int {
var index:int = -1;

for (var i:int = 0; i < acctArray.length; i++) {
if ( acct == acctArray[i].acct) {
index = i;
}
}
trace(index);
return index;
}

 



[flexcoders] Re: Changing styleName at run-time

2007-09-17 Thread scalenine
For that type of scenario I sometimes set the button to toggle and
then skin the selected state.

Like this:

.playButton
{
upSkin: Embed...(playButtonSkin)
overSkin: Embed...(playButtonSkin)
downSkin: Embed...(playButtonSkin)
disabledSkin: Embed...(playButtonSkin)

selectedUpSkin: Embed...(pauseButtonSkin)
selectedOverSkin: Embed...(pauseButtonSkin)
selectedDownSkin: Embed...(pauseButtonSkin)
selectedDisabledSkin: Embed...(pauseButtonSkin)
}



Juan
scalenine.com
degrafa.com

--- In flexcoders@yahoogroups.com, "williamkusumo" <[EMAIL PROTECTED]>
wrote:
>
> Argh, my newbie-ness shows. styleName is part of the property, I can
> just change it like any other prop. Sorry to waste your time :)
> 
> --- In flexcoders@yahoogroups.com, "williamkusumo" 
> wrote:
> >
> > Hi!
> > 
> > I have a skinned play button that needs to turn into a pause button
> > when clicked. Is it possible to change the styleName at run-time? If
> > not, what is the recommended way to change the button skin when user
> > clicks it?
> > 
> > Appreciate the help!
> >
>




RE: [flexcoders] Math.cos...?

2007-09-17 Thread Gordon Smith
Here is what the Ecmascript spec 
(http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf 
 ) 
has to say about methods like Math.cos():

The behaviour of the functions acos, asin, atan, atan2, cos, exp, log, pow, 
sin, and sqrt is not precisely specified here except to require specific 
results for certain argument values that represent boundary cases of interest. 
For other argument values, these functions are intended to compute 
approximations to the results of familiar mathematical functions, but some 
latitude is allowed in the choice of approximation algorithms. The general 
intent is that an implementer should be able to use the same mathematical 
library for ECMAScript on a given hardware platform that is available to C 
programmers on that platform.

Although the choice of algorithms is left to the implementation, it is 
recommended (but not specified by this standard) that implementations use the 
approximation algorithms for IEEE 754 arithmetic contained in fdlibm, the 
freely distributable mathematical library from Sun Microsystems (fdlibmcomment@ 
 sunpro.eng.sun.com). This specification also 
requires specific results for certain argument values that represent boundary 
cases of interest.

Note the phrases "intended to compute approximations" and "approximation 
algorithms". The "certain arguments values that represent boundary cases of 
interest" are specified as follows:

cos (x)

Returns an implementation-dependent approximation to the cosine of x. The 
argument is expressed in radians.
• If x is NaN, the result is NaN.
• If x is +0, the result is 1.
• If x is −0, the result is 1.
• If x is +∞, the result is NaN.
• If x is −∞, the result is NaN.

- Gordon




From: Gordon Smith 
Sent: Monday, September 17, 2007 2:49 PM
To: 'flexcoders@yahoogroups.com'
Subject: RE: [flexcoders] Math.cos...?


That would be a bad idea because it would lead to discontinuities. The function 
should be smooth at pi/2, pi, etc.
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Guido
Sent: Monday, September 17, 2007 1:46 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Math.cos...?



Math.cos() (and every other trig function) should check the argument being PI 
(or any other of its own constants) before calculating, since it would better 
reflect the mathematical function and maybe even save up on some performance. 


On 9/17/07, Gordon Smith <[EMAIL PROTECTED]  > wrote: 



In addition to Math.PI not being able to store the exact value of pi, 
the computation of trig functions involves approximations. For example, one 
definition of a cosine is in terms of an infinite series, and a computer can't 
calculate an infinite number of terms. Even if the argument passed to 
Math.cos() is exact, the result generally won't be.
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com 
 ] On Behalf Of Jon Bradley
Sent: Sunday, September 16, 2007 2:49 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Math.cos...?


That's pretty much it. 


To a computer Math.cos(Math.PI/2) is not 0. It's really close to 0, 
because PI is an infinite sequence and a computer can "only" store it as a 
double precision floating point number (ie, a fixed value).

What you get back from this calculation is the error bound of the 
computer basically, which you can then use for  numerical calculations, ie, 
MathLib.ERROR_BOUND = Math.cos(Math.PI/2). Then you can feasibly use if you 
need numerical accuracy.

IE, if result == MathLib.ERROR_BOUND, result = 0.

Numerical accuracy in AS2 is not equivalent to that of AS3. I ran into 
this while porting the Mersenne Twister algorithm to AS2 - I couldn't even 
store 2^32 as a hex value in AS2 (0x1, which equals 4294967296).

At least we can be somewhat numerically accurate now...

good luck,

jon


On Sep 16, 2007, at 5:15 PM, Troy Gilbert wrote:


> Why does Math.cos(Math.PI/2) not return zero?

Round-off error in the Math libs? It does return a value very 
close to
0 (1.7xe-17).

Troy.











 


RE: [flexcoders] Math.cos...?

2007-09-17 Thread Gordon Smith
That would be a bad idea because it would lead to discontinuities. The
function should be smooth at pi/2, pi, etc.
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Guido
Sent: Monday, September 17, 2007 1:46 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Math.cos...?



Math.cos() (and every other trig function) should check the argument
being PI (or any other of its own constants) before calculating, since
it would better reflect the mathematical function and maybe even save up
on some performance. 


On 9/17/07, Gordon Smith <[EMAIL PROTECTED]  >
wrote: 



In addition to Math.PI not being able to store the exact value
of pi, the computation of trig functions involves approximations. For
example, one definition of a cosine is in terms of an infinite series,
and a computer can't calculate an infinite number of terms. Even if the
argument passed to Math.cos() is exact, the result generally won't be.
 
- Gordon



From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com  ] On Behalf
Of Jon Bradley
Sent: Sunday, September 16, 2007 2:49 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Math.cos...?


That's pretty much it. 


To a computer Math.cos(Math.PI/2) is not 0. It's really close to
0, because PI is an infinite sequence and a computer can "only" store it
as a double precision floating point number (ie, a fixed value).

What you get back from this calculation is the error bound of
the computer basically, which you can then use for  numerical
calculations, ie, MathLib.ERROR_BOUND = Math.cos(Math.PI/2). Then you
can feasibly use if you need numerical accuracy.

IE, if result == MathLib.ERROR_BOUND, result = 0.

Numerical accuracy in AS2 is not equivalent to that of AS3. I
ran into this while porting the Mersenne Twister algorithm to AS2 - I
couldn't even store 2^32 as a hex value in AS2 (0x1, which
equals 4294967296).

At least we can be somewhat numerically accurate now...

good luck,

jon


On Sep 16, 2007, at 5:15 PM, Troy Gilbert wrote:


> Why does Math.cos(Math.PI/2) not return zero?

Round-off error in the Math libs? It does return a value
very close to
0 (1.7xe-17).

Troy.











 


[flexcoders] ComboBox SelectedIndex HELP!

2007-09-17 Thread hammer995
So I have an edit form which I have several combobox's that I can
populate successfully from static arrays.  So I want to duplicate this
with results from an HTTPService.

For some reason, the selectedIndex property does not run the function
for selecting the data to be shown by default.

The HTTPService gets launched at creationComplete when the user
selects the edit component.

I actually never get the trace in the findIndexAcct so that leads me
to believe that it never gets executed.

This is my code:





[Bindable]
public var acctArray:ArrayCollection;
 
private function
getAcctListResultHandler(event:ResultEvent): void {
acctArray = event.result.customers.customer as 
ArrayCollection;
/*
for (var i:int = 0; i < acctArray.length; i++) {
trace(acctArray[i].acct);
} */
}
 
private function findIndexAcct(acct:String):int {
var index:int = -1;

for (var i:int = 0; i < acctArray.length; i++) {
if ( acct == acctArray[i].acct) {
index = i;
}
}
trace(index);
return index;
}





[flexcoders] Re: Cache-Control header not working in HTTPService

2007-09-17 Thread dario.drome
The http headers to control (and avoid the cache) come from the 
server side, that is, it is not useful at all that you set the 
headers from the client side.
In order to avoid cache you need to set the header "Pragma" with the 
value "no-cache" and also set "Expires" with "-1" to give your 
content an inmediate expiration, but remember: set these values from 
the server, not from the client.

Regards.

--- In flexcoders@yahoogroups.com, Scott - FastLane <[EMAIL PROTECTED]> 
wrote:
>
> If you have control of the server side of your project, you could 
ask 
> them to include the cache in their response header... I believe 
that is 
> the way it is supposed to work.  The server indicates that the 
content 
> it is returning is dynamic in nature and should not be cached.  
While 
> adding the current time to each of your requests as a parameter 
will 
> avoid caching, it is a bit burdensome if you have a large system to 
> implement.  Note also that the no-cache response header is ignored 
by 
> IE/flashplayer when your request is over https as described here 
> http://blog.fastlanesw.com/?p=9.  Note: I also describe the 
workaround 
> that I use to get around this issue.
> 
> hth
> Scott
> 
> Dan Todor wrote:
> >
> > Try adding current system time as a parameter to your request, it 
will 
> > avoid caching.
> > hth
> >
> > On 9/17/07, *Guido* <[EMAIL PROTECTED] > wrote:
> >
> > Hi y'all,
> >
> > I've been having this problem for a while now, and I've went 
by
> > the docs on RPC components time and time again, getting no
> > solution for this.
> >
> > I have an HTTP service and I need to guarantee that its 
results
> > are not cached by either the app or the browser.
> >
> > My last attempt on this is:
> >
> >  > concurrency="last"
> > headers="{new URLRequestHeader("Cache-Control" ,
> > "no-cache")}"
> > makeObjectsBindable="true"
> > requestTimeout="10"
> > showBusyCursor="true"
> > useProxy="false"
> > url="{myServiceURL}"/>
> >
> > When debugging the app, the service's HTTP header property is
> > populated by the URLRequestHeader, so I believe It's getting 
built
> > adequately. Also, when inspecting the AsyncToken returned by
> > myService.send(), the message property has its headers also
> > populated by the URLRequestHeader.
> >
> > The thing is that when I check for adequate reception on the
> > server side, I don't get the Cache-Control header at all.
> >
> >
> > Does anyone know how to make HTTP headers work for 
HTTPServices?
> >
> > TIA,
> >
> > Guido.
> >
> >
> >
> >
> > -- 
> > All best,
> > Dan
> >
> > Zen is like looking for the spectacles that are sitting on your 
nose
> >
>




Re: [flexcoders] Changing styleName at run-time

2007-09-17 Thread Michael Schmalle
Hi,

.playSkins {
   upSkin:bla;
   overSkin:blah;
   etc...
}

.pauseSkins {
   upSkin:bla;
   overSkin:blah;
   etc...
}

playPauseButton.styleName = (isPlaying) ? "playStyles" : "pauseStyles";

Peace, Mike

On 9/17/07, williamkusumo <[EMAIL PROTECTED]> wrote:
>
>   Hi!
>
> I have a skinned play button that needs to turn into a pause button
> when clicked. Is it possible to change the styleName at run-time? If
> not, what is the recommended way to change the button skin when user
> clicks it?
>
> Appreciate the help!
>
>  
>



-- 
Teoti Graphix
http://www.teotigraphix.com

Blog - Flex2Components
http://www.flex2components.com

You can find more by solving the problem then by 'asking the question'.


[flexcoders] Re: Changing styleName at run-time

2007-09-17 Thread williamkusumo
Argh, my newbie-ness shows. styleName is part of the property, I can
just change it like any other prop. Sorry to waste your time :)

--- In flexcoders@yahoogroups.com, "williamkusumo" <[EMAIL PROTECTED]>
wrote:
>
> Hi!
> 
> I have a skinned play button that needs to turn into a pause button
> when clicked. Is it possible to change the styleName at run-time? If
> not, what is the recommended way to change the button skin when user
> clicks it?
> 
> Appreciate the help!
>




RE: [flexcoders] Buttons in Flex !

2007-09-17 Thread Alex Harui
You should be using UIComponent if you know you won't need scrollbars,
clipping, and probably a few other things.  That's why ListItemRenderer
and TreeItemRenderer subclass UIComponent and not HBox.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Troy Gilbert
Sent: Monday, September 17, 2007 1:54 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Buttons in Flex !

 

> Containers are very heavy.

Kind of a tangent, but if I had a ui component that had lots of child
ui components but I explicitly managed their position/layout, is there
something lighter weight than a Canvas I should be using? Should I
just be coding the object directly in AS, or is there an
MXML-supported component that's going to give me the freedom to do
composition without the weight of a container?

Troy.

 



RE: [flexcoders] Buttons in Flex !

2007-09-17 Thread Alex Harui
Check out skin states in Moxie.  It was done for situations like this.

 

Otherwise, yes, you have to have a giant switch or really smart
per-state animations that look smooth no matter what the previous state
is.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Troy Gilbert
Sent: Monday, September 17, 2007 1:51 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Buttons in Flex !

 

Then how would you recommend implementing a button with transitions?
Buttons go through transitions (they are simple state machines), but it
doesn't appear to me (on admittedly casual inspection) that there's any
way to act on those transitions (in a way similar to how effects work). 

Sure, you can create a multi-frame animation for a given button state,
and you don't even have to do that in Flash, a programmatic skin could
do it with programmatic animation. I'm just not clear on how would could
correctly and accurately handle transitions. 

For example, I can happily plan an animation in the up state. And then
when the user mouses over my button, my skin switches to an over state,
and I can play an animation for that. But is there a way to skin the
*transition* from one state to another? 

I guess you could mirror the button's state machine and handle
transitions transparently to the button. With a programmatic skin, you
basically (in one style of implementation) have a giant switch statement
that determines if the skin is "up", "over", "down", "focus", etc. You'd
just need to update this switch to account for "transition states" and
animate appropriately. You'd have the awkward scenario of the button
entering the the "over" state immediately while the skin was in the
"up_to_over" transition state, which may or may not be a problem
depending on the complexity of the animation. Is it possible to manually
control the states of a button or is it hardcoded to specific events
(mouse over, mouse down, etc.)? 

Troy.



On 9/17/07, Alex Harui <[EMAIL PROTECTED]  >
wrote:

Contianers are very heavy.  There's actually quite a bit of logic making
a button feel like a button.  You can approximate it with Canvas and
states, but you might miss some things.  It really depends on quality
and what you're comfortable with.  If you don't know Flash, it could
take you a while to figure out how to create a symbol.

 



From: flexcoders@yahoogroups.com 
[mailto: flexcoders@yahoogroups.com 
] On Behalf Of Troy Gilbert
Sent: Monday, September 17, 2007 11:15 AM


To: flexcoders@yahoogroups.com  
Subject: Re: [flexcoders] Buttons in Flex !

 

One option would be to use the effects of the button to do the
transitions. Unfortunately, they don't appear to be customized for the
Button class, so I don't know if you'd step on stuff the Button class
does in regards to mouseOver, mouseOut, etc. 

To be honest, depending on the complexity of your visuals and the number
of these buttons you need in your UI, it may be quicker to just create
an mx:Canvas that looks like a button and use effects (if you need a
container with children, e.g. labels and images), or just create a
UIComponent directly and manipulate it (if you've got just images).

Of course, that does depend on the overhead of Canvas which is something
I've been curious about (and perhaps Alex could answer): does mx:Canvas
introduce much overhead to the UI (as compared to UIComponent)? I know
mx:Canvas does a lot of layout chores, but are they relatively cheap if
the children are relatively cheap ( e.g. a few fixed sized components
with fixed positions)?

Troy.

On 9/17/07, Alex Harui <[EMAIL PROTECTED]  >
wrote:

You can design a skin as a multi-frame animation in Flash and use it in
Flex

 



From: flexcoders@yahoogroups.com 
[mailto: flexcoders@yahoogroups.com 
] On Behalf Of Troy Gilbert
Sent: Monday, September 17, 2007 10:38 AM
To: flexcoders@yahoogroups.com  
Subject: Re: [flexcoders] Buttons in Flex !

 

> I am creating some skins for my buttons, but i have one problem. I
want
> to have a nice transition from one skin (Up Skin) to another skin
(Down
> skin). In other words i want to create a button that lights when i do
> mouseOver but slowly. IS that possible?

Hmm, good question...

In the Flash IDE, you'd just create animations in each state
(transition is tricky, but you could easily have it play an animation
at the beginning of a state and loop).

In Flex, you could do it with a programmatic skin, but you'd be
responsible for juggling all the animation and state information.
Again, transitions would be difficult, i.e. Up to Down plays this
animation, but Up to Over plays this animation (or what

Re: [flexcoders] Math.cos...?

2007-09-17 Thread Jon Bradley

On Sep 17, 2007, at 4:49 PM, Mike Krotscheck wrote:

I may take you up on this challenge- I’ve got this strange  
masochistic urge to see if ML has the same restriction. I seem to  
recall proving e^i to an arbitrary significant digit, so Pi  
shouldn’t be too much different.


You could do that. But you cannot store PI or any other infinite  
sequence in the machine from which to perform calculations on.  
Getting a specific digit of PI, or something similar (say 22/7), is  
different than using it in a calculation.


- j



RE: [flexcoders] Hey, font question... blurry 8pt fonts in flex

2007-09-17 Thread Alex Harui
Embed the font

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Patrick Lemiuex
Sent: Monday, September 17, 2007 1:55 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Hey, font question... blurry 8pt fonts in flex

 

Hey, I gotta question:

I am getting blurry pixel fonts in flex using 8 point pixel fonts? 
Any suggestions how to fix please?
Thanks
patrick

 



[flexcoders] glow effect on component with border shifts insides of component

2007-09-17 Thread blc187
I have a component that I am using a glow effect for mouseover.
The component is an hbox with some labels and 2 images inside it, 
and a solid border around it.
However, when the mouseover triggers and the glow effect plays, the 
labels inside shift down a pixel or two.
When the border is removed, everything stays where it should on 
mouseover.

Anyone have any ideas why the shift?
Below is the mxml for the component (border of HBox mainBox is what 
can be removed to stop the shift)

























[flexcoders] Changing styleName at run-time

2007-09-17 Thread williamkusumo
Hi!

I have a skinned play button that needs to turn into a pause button
when clicked. Is it possible to change the styleName at run-time? If
not, what is the recommended way to change the button skin when user
clicks it?

Appreciate the help!



RE: [flexcoders] Math.cos...?

2007-09-17 Thread Mike Krotscheck
I may take you up on this challenge- I've got this strange masochistic
urge to see if ML has the same restriction. I seem to recall proving e^i
to an arbitrary significant digit, so Pi shouldn't be too much
different.

 

Michael Krotscheck

Senior Developer

 


RESOURCE INTERACTIVE

 www.resource.com  

[EMAIL PROTECTED]  



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Samuel R. Neff
Sent: Sunday, September 16, 2007 11:30 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Math.cos...?

 

 

It's not sloppy, it's just how floating point numbers work.  Try the
same thing in other programming languages and you still will not get
zero (unless they round the output).  For example, .NET reports the
result as 

6.12303176911189E-17.  

 

Sam

---
We're Hiring! Seeking a passionate developer to join our team building
Flex based products. Position is in the Washington D.C. metro area. If
interested contact [EMAIL PROTECTED]
  

 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mike Krotscheck
Sent: Sunday, September 16, 2007 5:19 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Math.cos...?

The documentation's actually fairly clear on this: "The cosine of a 90
degree angle is zero, but because of the inherent inaccuracy of decimal
calculations using binary numbers, Flash Player will report a number
extremely close to, but not exactly equal to, zero."

 

Nevertheless, it seems... sloppy to me.

 

Michael Krotscheck

Senior Developer

 




From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Troy Gilbert
Sent: Sunday, September 16, 2007 5:15 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Math.cos...?

 

> Why does Math.cos(Math.PI/2) not return zero?

Round-off error in the Math libs? It does return a value very close to
0 (1.7xe-17).

Troy.

 



[flexcoders] Cache-Control header not working in HTTPService

2007-09-17 Thread Guido
Hi y'all,

I've been having this problem for a while now, and I've went by the docs on
RPC components time and time again, getting no solution for this.

I have an HTTP service and I need to guarantee that its results are not
cached by either the app or the browser.

My last attempt on this is:



When debugging the app, the service's HTTP header property is populated by
the URLRequestHeader, so I believe It's getting built adequately. Also, when
inspecting the AsyncToken returned by myService.send(), the message property
has its headers also populated by the URLRequestHeader.

The thing is that when I check for adequate reception on the server side, I
don't get the Cache-Control header at all.


Does anyone know how to make HTTP headers work for HTTPServices?

TIA,

Guido.


Re: [flexcoders] Cache-Control header not working in HTTPService

2007-09-17 Thread Dan Todor
Try adding current system time as a parameter to your request, it will avoid
caching.
hth

On 9/17/07, Guido <[EMAIL PROTECTED]> wrote:
>
>   Hi y'all,
>
> I've been having this problem for a while now, and I've went by the docs
> on RPC components time and time again, getting no solution for this.
>
> I have an HTTP service and I need to guarantee that its results are not
> cached by either the app or the browser.
>
> My last attempt on this is:
>
>  concurrency="last"
> headers="{new URLRequestHeader("Cache-Control" , "no-cache")}"
> makeObjectsBindable="true"
> requestTimeout="10"
> showBusyCursor="true"
> useProxy="false"
> url="{myServiceURL}"/>
>
> When debugging the app, the service's HTTP header property is populated by
> the URLRequestHeader, so I believe It's getting built adequately. Also, when
> inspecting the AsyncToken returned by myService.send(), the message
> property has its headers also populated by the URLRequestHeader.
>
> The thing is that when I check for adequate reception on the server side,
> I don't get the Cache-Control header at all.
>
>
> Does anyone know how to make HTTP headers work for HTTPServices?
>
> TIA,
>
> Guido.
>  
>



-- 
All best,
Dan

Zen is like looking for the spectacles that are sitting on your nose


Re: [flexcoders] Cache-Control header not working in HTTPService

2007-09-17 Thread Scott - FastLane
If you have control of the server side of your project, you could ask 
them to include the cache in their response header... I believe that is 
the way it is supposed to work.  The server indicates that the content 
it is returning is dynamic in nature and should not be cached.  While 
adding the current time to each of your requests as a parameter will 
avoid caching, it is a bit burdensome if you have a large system to 
implement.  Note also that the no-cache response header is ignored by 
IE/flashplayer when your request is over https as described here 
http://blog.fastlanesw.com/?p=9.  Note: I also describe the workaround 
that I use to get around this issue.


hth
Scott

Dan Todor wrote:


Try adding current system time as a parameter to your request, it will 
avoid caching.

hth

On 9/17/07, *Guido* <[EMAIL PROTECTED] > wrote:

Hi y'all,

I've been having this problem for a while now, and I've went by
the docs on RPC components time and time again, getting no
solution for this.

I have an HTTP service and I need to guarantee that its results
are not cached by either the app or the browser.

My last attempt on this is:



When debugging the app, the service's HTTP header property is
populated by the URLRequestHeader, so I believe It's getting built
adequately. Also, when inspecting the AsyncToken returned by
myService.send(), the message property has its headers also
populated by the URLRequestHeader.

The thing is that when I check for adequate reception on the
server side, I don't get the Cache-Control header at all.


Does anyone know how to make HTTP headers work for HTTPServices?

TIA,

Guido.




--
All best,
Dan

Zen is like looking for the spectacles that are sitting on your nose
 




Re: [flexcoders] Buttons in Flex !

2007-09-17 Thread Troy Gilbert
> Containers are very heavy.

Kind of a tangent, but if I had a ui component that had lots of child
ui components but I explicitly managed their position/layout, is there
something lighter weight than a Canvas I should be using? Should I
just be coding the object directly in AS, or is there an
MXML-supported component that's going to give me the freedom to do
composition without the weight of a container?

Troy.


Re: [flexcoders] Cache-Control header not working in HTTPService

2007-09-17 Thread Guido
The thing is on my server side checkings I don't get the HTTP headers at all
(except for the default heders).

It's not a problem of the HTTP parameters, it's got to do with the HTTP
headers.

On 9/17/07, Dan Todor <[EMAIL PROTECTED]> wrote:
>
>   Try adding current system time as a parameter to your request, it will
> avoid caching.
> hth
>
>
> On 9/17/07, Guido <[EMAIL PROTECTED] > wrote:
> >
> >   Hi y'all,
> >
> > I've been having this problem for a while now, and I've went by the docs
> > on RPC components time and time again, getting no solution for this.
> >
> > I have an HTTP service and I need to guarantee that its results are not
> > cached by either the app or the browser.
> >
> > My last attempt on this is:
> >
> >  > concurrency="last"
> > headers="{new URLRequestHeader("Cache-Control" , "no-cache")}"
> > makeObjectsBindable="true"
> > requestTimeout="10"
> > showBusyCursor="true"
> > useProxy="false"
> > url="{myServiceURL}"/>
> >
> > When debugging the app, the service's HTTP header property is populated
> > by the URLRequestHeader, so I believe It's getting built adequately. Also,
> > when inspecting the AsyncToken returned by myService.send(), the message
> > property has its headers also populated by the URLRequestHeader.
> >
> > The thing is that when I check for adequate reception on the server
> > side, I don't get the Cache-Control header at all.
> >
> >
> > Does anyone know how to make HTTP headers work for HTTPServices?
> >
> > TIA,
> >
> > Guido.
> >
>
>
>
> --
> All best,
> Dan
>
> Zen is like looking for the spectacles that are sitting on your nose
>
>  
>


Re: [flexcoders] Math.cos...?

2007-09-17 Thread Troy Gilbert
ML == MathLab? Well, of course MathLab would go to great trouble to minimize
this issue as much as possible, including doing its calculations in such a
way that it preserves fractional representations and evaluates by truly
combining expressions and doing simplification, as opposed to rote
calculation to a numerical value then substitution.

I also wouldn't be surprised if ML didn't explicitly handle common Pi
constants. While it absolutely wouldn't be an optimization for standard trig
functions (it doesn't take many lookups on modern CPU's before just letting
the floating-point unit do its thing to be faster -- and if you start
choosing 'shortcuts' you'll never make everyone happy).

Troy.


On 9/17/07, Mike Krotscheck <[EMAIL PROTECTED]> wrote:
>
>  I may take you up on this challenge- I've got this strange masochistic
> urge to see if ML has the same restriction. I seem to recall proving e^i to
> an arbitrary significant digit, so Pi shouldn't be too much different.
>
>
>
> *Michael Krotscheck*
>
> Senior Developer
>
>
>
>
> *RESOURCE INTERACTIVE*
>
> www.resource.com
>
> [EMAIL PROTECTED]
>   --
>
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Samuel R. Neff
> *Sent:* Sunday, September 16, 2007 11:30 PM
> *To:* flexcoders@yahoogroups.com
> *Subject:* RE: [flexcoders] Math.cos...?
>
>
>
>
>
> It's not sloppy, it's just how floating point numbers work.  Try the same
> thing in other programming languages and you still will not get zero (unless
> they round the output).  For example, .NET reports the result as
>
> 6.12303176911189E-17.
>
>
>
> Sam
>
> ---
> We're Hiring! Seeking a passionate developer to join our team building
> Flex based products. Position is in the Washington D.C. metro area. If
> interested contact [EMAIL PROTECTED]
>
>
>
>
>
>  --
>
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Mike Krotscheck
> *Sent:* Sunday, September 16, 2007 5:19 PM
> *To:* flexcoders@yahoogroups.com
> *Subject:* RE: [flexcoders] Math.cos...?
>
> The documentation's actually fairly clear on this: "The cosine of a 90
> degree angle is zero, but because of the inherent inaccuracy of decimal
> calculations using binary numbers, Flash Player will report a number
> extremely close to, but not exactly equal to, zero."
>
>
>
> Nevertheless, it seems… sloppy to me.
>
>
>
> *Michael Krotscheck*
>
> Senior Developer
>
>
>
>   --
>
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Troy Gilbert
> *Sent:* Sunday, September 16, 2007 5:15 PM
> *To:* flexcoders@yahoogroups.com
> *Subject:* Re: [flexcoders] Math.cos...?
>
>
>
> > Why does Math.cos(Math.PI/2) not return zero?
>
> Round-off error in the Math libs? It does return a value very close to
> 0 (1.7xe-17).
>
> Troy.
>
> 
>


[flexcoders] Hey, font question... blurry 8pt fonts in flex

2007-09-17 Thread Patrick Lemiuex
Hey, I gotta question:

I am getting blurry pixel fonts in flex using 8 point pixel fonts?  
Any suggestions how to fix please?
Thanks
patrick


Re: [flexcoders] Buttons in Flex !

2007-09-17 Thread Troy Gilbert
Then how would you recommend implementing a button with transitions? Buttons
go through transitions (they are simple state machines), but it doesn't
appear to me (on admittedly casual inspection) that there's any way to act
on those transitions (in a way similar to how effects work).

Sure, you can create a multi-frame animation for a given button state, and
you don't even have to do that in Flash, a programmatic skin could do it
with programmatic animation. I'm just not clear on how would could correctly
and accurately handle transitions.

For example, I can happily plan an animation in the up state. And then when
the user mouses over my button, my skin switches to an over state, and I can
play an animation for that. But is there a way to skin the *transition* from
one state to another?

I guess you could mirror the button's state machine and handle transitions
transparently to the button. With a programmatic skin, you basically (in one
style of implementation) have a giant switch statement that determines if
the skin is "up", "over", "down", "focus", etc. You'd just need to update
this switch to account for "transition states" and animate appropriately.
You'd have the awkward scenario of the button entering the the "over" state
immediately while the skin was in the "up_to_over" transition state, which
may or may not be a problem depending on the complexity of the animation. Is
it possible to manually control the states of a button or is it hardcoded to
specific events (mouse over, mouse down, etc.)?

Troy.


On 9/17/07, Alex Harui <[EMAIL PROTECTED]> wrote:
>
>  Contianers are very heavy.  There's actually quite a bit of logic making
> a button feel like a button.  You can approximate it with Canvas and states,
> but you might miss some things.  It really depends on quality and what
> you're comfortable with.  If you don't know Flash, it could take you a while
> to figure out how to create a symbol.
>
>
>  --
>
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Troy Gilbert
> *Sent:* Monday, September 17, 2007 11:15 AM
> *To:* flexcoders@yahoogroups.com
> *Subject:* Re: [flexcoders] Buttons in Flex !
>
>
>
> One option would be to use the effects of the button to do the
> transitions. Unfortunately, they don't appear to be customized for the
> Button class, so I don't know if you'd step on stuff the Button class does
> in regards to mouseOver, mouseOut, etc.
>
> To be honest, depending on the complexity of your visuals and the number
> of these buttons you need in your UI, it may be quicker to just create an
> mx:Canvas that looks like a button and use effects (if you need a container
> with children, e.g. labels and images), or just create a UIComponent
> directly and manipulate it (if you've got just images).
>
> Of course, that does depend on the overhead of Canvas which is something
> I've been curious about (and perhaps Alex could answer): does mx:Canvas
> introduce much overhead to the UI (as compared to UIComponent)? I know
> mx:Canvas does a lot of layout chores, but are they relatively cheap if the
> children are relatively cheap ( e.g. a few fixed sized components with
> fixed positions)?
>
> Troy.
>
>  On 9/17/07, *Alex Harui* <[EMAIL PROTECTED] > wrote:
>
> You can design a skin as a multi-frame animation in Flash and use it in
> Flex
>
>
>  --
>
> *From:* flexcoders@yahoogroups.com [mailto: [EMAIL PROTECTED] *On
> Behalf Of *Troy Gilbert
> *Sent:* Monday, September 17, 2007 10:38 AM
> *To:* flexcoders@yahoogroups.com
> *Subject:* Re: [flexcoders] Buttons in Flex !
>
>
>
> > I am creating some skins for my buttons, but i have one problem. I want
> > to have a nice transition from one skin (Up Skin) to another skin (Down
> > skin). In other words i want to create a button that lights when i do
> > mouseOver but slowly. IS that possible?
>
> Hmm, good question...
>
> In the Flash IDE, you'd just create animations in each state
> (transition is tricky, but you could easily have it play an animation
> at the beginning of a state and loop).
>
> In Flex, you could do it with a programmatic skin, but you'd be
> responsible for juggling all the animation and state information.
> Again, transitions would be difficult, i.e. Up to Down plays this
> animation, but Up to Over plays this animation (or whatever
> transitions make sense).
>
> If you wanted to keep things as "high level" as possible, by which I
> mean doing it declaratively in MXML, you'd probably end up just
> skipping a subclass of mx:Button and instead subclass mx:Canvas and
> use effects/behaviors.
>
> Troy.
>
>
>
> 
>


Re: [flexcoders] Math.cos...?

2007-09-17 Thread Guido
Math.cos() (and every other trig function) should check the argument being
PI (or any other of its own constants) before calculating, since it would
better reflect the mathematical function and maybe even save up on some
performance.

On 9/17/07, Gordon Smith <[EMAIL PROTECTED]> wrote:
>
>In addition to Math.PI not being able to store the exact value of pi,
> the computation of trig functions involves approximations. For example, one
> definition of a cosine is in terms of an infinite series, and a computer
> can't calculate an infinite number of terms. Even if the argument passed to
> Math.cos() is exact, the result generally won't be.
>
> - Gordon
>
>  --
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Jon Bradley
> *Sent:* Sunday, September 16, 2007 2:49 PM
> *To:* flexcoders@yahoogroups.com
> *Subject:* Re: [flexcoders] Math.cos...?
>
>  That's pretty much it.
>
> To a computer Math.cos(Math.PI/2) is not 0. It's really close to 0,
> because PI is an infinite sequence and a computer can "only" store it as a
> double precision floating point number (ie, a fixed value).
>
> What you get back from this calculation is the error bound of the computer
> basically, which you can then use for  numerical calculations, ie,
> MathLib.ERROR_BOUND = Math.cos(Math.PI/2). Then you can feasibly use if
> you need numerical accuracy.
>
> IE, if result == MathLib.ERROR_BOUND, result = 0.
>
> Numerical accuracy in AS2 is not equivalent to that of AS3. I ran into
> this while porting the Mersenne Twister algorithm to AS2 - I couldn't even
> store 2^32 as a hex value in AS2 (0x1, which equals 4294967296).
>
> At least we can be somewhat numerically accurate now...
>
> good luck,
>
> jon
>
>
>  On Sep 16, 2007, at 5:15 PM, Troy Gilbert wrote:
>
> > Why does Math.cos(Math.PI/2) not return zero?
>
> Round-off error in the Math libs? It does return a value very close to
> 0 (1.7xe-17).
>
> Troy.
>
>
>   
>


RE: [flexcoders] Re: Reduce size of my module! Really boring....

2007-09-17 Thread Alex Harui
The host generates a link-report that the modules load-extern so that no
classes in the host are in the modules.

 

If you use the framework as an RSL, then compiling with that option on
should flush all of those classes as well.  If you generate link-reports
from your modules, you can see if everything that should be removed got
removed.

 

The shared code example on my blog also addresses how to deal with a set
of modules that share code among themselves.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of danielvlopes
Sent: Monday, September 17, 2007 1:28 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Reduce size of my module! Really boring

 

Hum... i will take a look in you blog. In my case application is only
"module caller" (don't had any component beyond viewstack and
moduleloader), and every components and codes is inside of my modules
(all modules is very similar).
Should use link-report in one module and load-externs in other modules
or i should still using link-report in application and load-externs in
modules?

In your first answer you said "Take a peek at the .xml to see if it
has everything it should. ", it is for looking at if all the
components that use are in xml?

--- In flexcoders@yahoogroups.com 
, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> I would recommend making your module project think it is using the
> shared framework RSL.
> 
> 
> 
> ANT is its own thing and does not need FB or eclipse, although I think
> there is eclipse integration. You can also just use shell scripts in
> cygwin. That's what I did on my blog.
> 
> 
> 
> The goal is to use load-extern enough times with enough stuff in it
that
> everything in the main app and the framework RSL is not in the module.
> 
> 
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com 
] On
> Behalf Of danielvlopes
> Sent: Monday, September 17, 2007 5:23 AM
> To: flexcoders@yahoogroups.com  
> Subject: [flexcoders] Re: Reduce size of my module! Really boring
> 
> 
> 
> I try use ant but don't find material necessary to know how use or how
> install... I can use ant in FB or i need to use eclipse with pluggin
> for Flex? Do know one site with tutorial about ant? 
> 
> When i use RSL for separete framework i still can use load extern
> whitout RSL in project of my module or i need to make module project
> with RSL to?
> 
> Thanks Alex.
> 
> --- In flexcoders@yahoogroups.com


> , "Alex Harui"  wrote:
> >
> > I haven't use FB to do this. I use ANT or batch scripts. Take a peek
> > at the .xml to see if it has everything it should. 
> > 
> > 
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com


> [mailto:flexcoders@yahoogroups.com


> ] On
> > Behalf Of danielvlopes
> > Sent: Sunday, September 16, 2007 12:28 PM
> > To: flexcoders@yahoogroups.com 
 
> > Subject: [flexcoders] Reduce size of my module! Really boring
> > 
> > 
> > 
> > Hello,
> > 
> > Now in Brasil is sunday, and i waste all my day trying reduce swf
size
> > of my modules... 
> > 
> > I had project with 11 modules... each module had approximately 90kb,
> > because in my project i'm using framework caching teached in this
> > video (http://labs.adobe.com/technologies/flex/videos/flex3rsls/
 
>  > 
> >  
>  > > ), all
> > modules are inside of my main project.
> > 
> > I try to put each module in separete project, in project properties
in
> > my main project i put this on compile line,
> > link-report=D:/Daniel/Trabalho/bms/painel_adm/report.xml to generate
> > report.xml .
> > 
> > In each of my modules i put
> > load-externs=D:/Daniel/Trabalho/bms/painel_adm/report.xml to try
> > reduce swf size of my modules.
> > 
> > But the problem is now each module had approximately 250kb, bigger
> > than with modules inside a single project.
> > 
> > What can i do to fix this problems?
> >
>

 



[flexcoders] Re: Reduce size of my module! Really boring....

2007-09-17 Thread danielvlopes
Hum... i will take a look in you blog. In my case application is only
"module caller" (don't had any component beyond viewstack and
moduleloader), and every components and codes is inside of my modules
(all modules is very similar).
Should use link-report in one module and load-externs in other modules
or i should still using link-report in application and load-externs in
modules?

In your first answer you said "Take a peek at the .xml to see if it
has everything it should. ", it is for looking at if all the
components that use are in xml?



--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> I would recommend making your module project think it is using the
> shared framework RSL.
> 
>  
> 
> ANT is its own thing and does not need FB or eclipse, although I think
> there is eclipse integration.  You can also just use shell scripts in
> cygwin.  That's what I did on my blog.
> 
>  
> 
> The goal is to use load-extern enough times with enough stuff in it that
> everything in the main app and the framework RSL is not in the module.
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of danielvlopes
> Sent: Monday, September 17, 2007 5:23 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Reduce size of my module! Really boring
> 
>  
> 
> I try use ant but don't find material necessary to know how use or how
> install... I can use ant in FB or i need to use eclipse with pluggin
> for Flex? Do know one site with tutorial about ant? 
> 
> When i use RSL for separete framework i still can use load extern
> whitout RSL in project of my module or i need to make module project
> with RSL to?
> 
> Thanks Alex.
> 
> --- In flexcoders@yahoogroups.com 
> , "Alex Harui"  wrote:
> >
> > I haven't use FB to do this. I use ANT or batch scripts. Take a peek
> > at the .xml to see if it has everything it should. 
> > 
> > 
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com 
> [mailto:flexcoders@yahoogroups.com 
> ] On
> > Behalf Of danielvlopes
> > Sent: Sunday, September 16, 2007 12:28 PM
> > To: flexcoders@yahoogroups.com  
> > Subject: [flexcoders] Reduce size of my module! Really boring
> > 
> > 
> > 
> > Hello,
> > 
> > Now in Brasil is sunday, and i waste all my day trying reduce swf size
> > of my modules... 
> > 
> > I had project with 11 modules... each module had approximately 90kb,
> > because in my project i'm using framework caching teached in this
> > video (http://labs.adobe.com/technologies/flex/videos/flex3rsls/
>  
> >   > ), all
> > modules are inside of my main project.
> > 
> > I try to put each module in separete project, in project properties in
> > my main project i put this on compile line,
> > link-report=D:/Daniel/Trabalho/bms/painel_adm/report.xml to generate
> > report.xml .
> > 
> > In each of my modules i put
> > load-externs=D:/Daniel/Trabalho/bms/painel_adm/report.xml to try
> > reduce swf size of my modules.
> > 
> > But the problem is now each module had approximately 250kb, bigger
> > than with modules inside a single project.
> > 
> > What can i do to fix this problems?
> >
>




[flexcoders] Overriding ValueObjects class

2007-09-17 Thread nhid
Hello,

Lets say I have a VO class Bar.as to be extended from Foo.as VO class.  I
get this error at variable "title" (see code below):

Overriding a function that is not marked for override.

How do I resolve this?  I saw Adobe's link saying I should remove [Bindable]
from base class, I did but that did not resolve the problem.  Any suggestion
is appreciated.

thank you.

**
// Foo.as
package com.xyz
{
  [Bindable]
  public class Foo
  {
public var title:String;
  }
}

// Bar.as
package com.xyz
{
  [Bindable]
  public class Bar extends Foo
  {
public var description:String;
public var title:String;
  }
}


RE: [flexcoders] air namespace (adobe)

2007-09-17 Thread Gordon Smith
No. This decision is consistent with the fact that the AIR team has put
their new classes like File into the flash.* package.
 
Both decisions are motivated by the fact that it's hard to know what
classes will exist on which platforms in the future. For example, the
Flash Player for mobile devices -- which isn't AIR -- may have a File
class. So our rule is that packages do not indicate the platform.
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of superabe superabe
Sent: Saturday, September 15, 2007 5:03 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] air namespace (adobe)



Are there any plans to create a separate namespace for AIR related
components in the SDK?
For e.g. I am looking inside the mx.controls package and I see controls
like FileSystemComboBox and FileSystemDataGrid listed, which dont seem
to be usable in a non-AIR flex context, thus leading to confusion. 

- superabe



 


RE: [flexcoders] Dynamic Array Object Keys

2007-09-17 Thread Gordon Smith
What's not working for you? Did you initialize thisArray to []? And what
is 'key'?
 
But why do you want to create an Array of Objects where the Object key
contains redundant information (i.e., the index of the Object in the
Array)?
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jeremy Rottman
Sent: Saturday, September 15, 2007 11:40 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Dynamic Array Object Keys



I finally figured out my issue with my dynamic datagrid columns, and
what not. However, I have run into a new problem with this little
project.

In previous versions of Actionscript, I have been able to create
dynamic array object keys. However in AS3, I am not able to figure out
how to do so. In previous versions of AS the creation of my array
would look something like this. 
for(var i:Number = 0; i

RE: [flexcoders] Listening for all creationComplete() events

2007-09-17 Thread Gordon Smith
In the Application's initialize handler, use addEventListener() to
register on the Application instance for creationComplete events in
their capture phase.
 
- Gordon
 


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: Monday, September 17, 2007 9:08 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Listening for all creationComplete() events



Capture phase



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Brian Holmes
Sent: Monday, September 17, 2007 8:40 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Listening for all creationComplete() events

Is there a way to listen for all creationComplete events across an
application?

Brian..



***
The information in this e-mail is confidential and intended solely for
the individual or entity to whom it is addressed. If you have received
this e-mail in error please notify the sender by return e-mail delete
this e-mail and refrain from any disclosure or action based on the
information.
*** 

 


RE: [flexcoders] Buttons in Flex !

2007-09-17 Thread Alex Harui
Contianers are very heavy.  There's actually quite a bit of logic making
a button feel like a button.  You can approximate it with Canvas and
states, but you might miss some things.  It really depends on quality
and what you're comfortable with.  If you don't know Flash, it could
take you a while to figure out how to create a symbol.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Troy Gilbert
Sent: Monday, September 17, 2007 11:15 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Buttons in Flex !

 

One option would be to use the effects of the button to do the
transitions. Unfortunately, they don't appear to be customized for the
Button class, so I don't know if you'd step on stuff the Button class
does in regards to mouseOver, mouseOut, etc. 

To be honest, depending on the complexity of your visuals and the number
of these buttons you need in your UI, it may be quicker to just create
an mx:Canvas that looks like a button and use effects (if you need a
container with children, e.g. labels and images), or just create a
UIComponent directly and manipulate it (if you've got just images).

Of course, that does depend on the overhead of Canvas which is something
I've been curious about (and perhaps Alex could answer): does mx:Canvas
introduce much overhead to the UI (as compared to UIComponent)? I know
mx:Canvas does a lot of layout chores, but are they relatively cheap if
the children are relatively cheap ( e.g. a few fixed sized components
with fixed positions)?

Troy.



On 9/17/07, Alex Harui <[EMAIL PROTECTED]  >
wrote:

You can design a skin as a multi-frame animation in Flash and use it in
Flex

 



From: flexcoders@yahoogroups.com 
[mailto: flexcoders@yahoogroups.com 
] On Behalf Of Troy Gilbert
Sent: Monday, September 17, 2007 10:38 AM
To: flexcoders@yahoogroups.com  
Subject: Re: [flexcoders] Buttons in Flex !

 

> I am creating some skins for my buttons, but i have one problem. I
want
> to have a nice transition from one skin (Up Skin) to another skin
(Down
> skin). In other words i want to create a button that lights when i do
> mouseOver but slowly. IS that possible?

Hmm, good question...

In the Flash IDE, you'd just create animations in each state
(transition is tricky, but you could easily have it play an animation
at the beginning of a state and loop).

In Flex, you could do it with a programmatic skin, but you'd be
responsible for juggling all the animation and state information.
Again, transitions would be difficult, i.e. Up to Down plays this
animation, but Up to Over plays this animation (or whatever
transitions make sense).

If you wanted to keep things as "high level" as possible, by which I
mean doing it declaratively in MXML, you'd probably end up just
skipping a subclass of mx:Button and instead subclass mx:Canvas and
use effects/behaviors.

Troy.

 

 



RE: [flexcoders] Math.cos...?

2007-09-17 Thread Gordon Smith
In addition to Math.PI not being able to store the exact value of pi,
the computation of trig functions involves approximations. For example,
one definition of a cosine is in terms of an infinite series, and a
computer can't calculate an infinite number of terms. Even if the
argument passed to Math.cos() is exact, the result generally won't be.
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jon Bradley
Sent: Sunday, September 16, 2007 2:49 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Math.cos...?



That's pretty much it. 

To a computer Math.cos(Math.PI/2) is not 0. It's really close to 0,
because PI is an infinite sequence and a computer can "only" store it as
a double precision floating point number (ie, a fixed value).

What you get back from this calculation is the error bound of the
computer basically, which you can then use for  numerical calculations,
ie, MathLib.ERROR_BOUND = Math.cos(Math.PI/2). Then you can feasibly use
if you need numerical accuracy.

IE, if result == MathLib.ERROR_BOUND, result = 0.

Numerical accuracy in AS2 is not equivalent to that of AS3. I ran into
this while porting the Mersenne Twister algorithm to AS2 - I couldn't
even store 2^32 as a hex value in AS2 (0x1, which equals
4294967296).

At least we can be somewhat numerically accurate now...

good luck,

jon


On Sep 16, 2007, at 5:15 PM, Troy Gilbert wrote:


> Why does Math.cos(Math.PI/2) not return zero?

Round-off error in the Math libs? It does return a value very
close to
0 (1.7xe-17).

Troy.


 


Re: [flexcoders] Flex Developer Center example

2007-09-17 Thread Michael Schmalle
Hi,

I think they used mx states.

We have a commercial component that does exactly that and more. It is also a
container with custom title bars, effects and tile layout class, preview
pane etc. This component was modeled after the the one you are looking at to
show how powerful and extensible custom components are.

http://www.teotigraphix.com/components/containers/rotatinglistfx

Thanks, Mike

On 9/17/07, hworke <[EMAIL PROTECTED]> wrote:
>
>
>
> Does any one know what was used to create the UI with 3 resizable
> window in Flex Developer Center web page:
>
> http://www.adobe.com/devnet/flex/
>
> Did they use mx:states? If any one could also send some similar
> code example that would be highly appreciated.
>
> Regards
>
>  
>



-- 
Teoti Graphix
http://www.teotigraphix.com

Blog - Flex2Components
http://www.flex2components.com

You can find more by solving the problem then by 'asking the question'.


RE: [flexcoders] Sandbox/Crossdomain problem on connecting Socket with webserver on port 6680

2007-09-17 Thread Alex Harui
I think you want to load the policy file w/o a port so it uses a simple HTTP 
fetch.

 

Security.loadPolicyFile("http://servico.servidor.com/crossdomain.xml 
 ");



The policy file should then allow access to port 6680

 



 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rogerio 
Gonzalez
Sent: Monday, September 17, 2007 10:06 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Sandbox/Crossdomain problem on connecting Socket with 
webserver on port 6680

 

Hello everybody.

I am developing a system for use of sockets to a telnet server on port 6677.
Locally, everything goes fine, even creating a projector(exe).

But when it goes online, it don´t connect because some kind of
crossdomain error.

The problem is that I don´t have access to the 80 port of the server,
so my webserver is on 6680 port.

I try use:
Security.loadPolicyFile("http://servico.servidor.com:6680/crossdomain.xml 
 ");

And also:
Security.loadPolicyFile("xmlsocket://servico.servidor.com:6680/crossdomain.xml 
 ");

But, for some reason, he keeps giving me the sandbox error.

I did several alterations like:
Security.allowDomain(host +":6680")
Security.allowInsecureDomain(host +":6680");
Security.loadPolicyFile("xmlsocket://"+ host
+":6680/crossdomain.xml");
Security.loadPolicyFile("http://"+ host +":6680/crossdomain.xml");

But still, nothing.

Somebody have any idea?

Regards!

Rogério Gonzalez

 



Re: [flexcoders] Re: Searching array for item

2007-09-17 Thread Tony Alves

I feel you buddy.  7days and average 10-14 hours here.
Glad to help out.  I may blog the example when I get time.

Regards,
Tony

candysmate wrote:


--- In flexcoders@yahoogroups.com 
, Tony Alves <[EMAIL PROTECTED]> wrote:

>
> Type "Three" into the "Value" Text Input.
> You can put "id" in the "Value Name" TextInput, then type the numeric
> numbers in "Value".
> This allows a change of the column in the ArrayCollection you will be
> searching.
>

Got it. Very nice inddded. Many thanks for your time and trouble Tony.
Sorry for being slow off the mark earlier. 7 days a week coding is
slowly wearing me down.

best Graham

 


RE: [flexcoders] Buttons in Flex !

2007-09-17 Thread Alex Harui
You can design a skin as a multi-frame animation in Flash and use it in
Flex

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Troy Gilbert
Sent: Monday, September 17, 2007 10:38 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Buttons in Flex !

 

> I am creating some skins for my buttons, but i have one problem. I
want
> to have a nice transition from one skin (Up Skin) to another skin
(Down
> skin). In other words i want to create a button that lights when i do
> mouseOver but slowly. IS that possible?

Hmm, good question...

In the Flash IDE, you'd just create animations in each state
(transition is tricky, but you could easily have it play an animation
at the beginning of a state and loop).

In Flex, you could do it with a programmatic skin, but you'd be
responsible for juggling all the animation and state information.
Again, transitions would be difficult, i.e. Up to Down plays this
animation, but Up to Over plays this animation (or whatever
transitions make sense).

If you wanted to keep things as "high level" as possible, by which I
mean doing it declaratively in MXML, you'd probably end up just
skipping a subclass of mx:Button and instead subclass mx:Canvas and
use effects/behaviors.

Troy.

 



RE: [flexcoders] Changing the image in a custom component item renderer

2007-09-17 Thread Alex Harui
Something like:

 

imagePath="{data[DataGridListData(listData).dataField]}"

 

You'll need to add a listData getter/setter and implement
IDropInListItemRenderer.  Copy the listData get/set from Label or
TextInput

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Paul Steven
Sent: Monday, September 17, 2007 10:32 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Changing the image in a custom component item
renderer

 

I am creating a datagrid that uses a custom component in an item
renderer to display one of 3 images (symbols of an embedded swf)

 

The data grid columns are created dynamically. I can't figure out how to
set the value of imagePath inside this custom component. 

 

The symbol names are the same as the value for xmlColumn.localName();

 

Any help really appreciated!!

 

 

e.g

 

dgc = new DataGridColumn();

dgc.headerText = xmlColumn.localName();
dgc.itemRenderer=new ClassFactory(statusComponent); 
dgc.dataField = xmlColumn.localName();

 

My custom component is as follows:

 


http://www.adobe.com/2006/mxml";
  width="100" height="30">







 

 



Re: [flexcoders] Buttons in Flex !

2007-09-17 Thread Troy Gilbert
One option would be to use the effects of the button to do the transitions.
Unfortunately, they don't appear to be customized for the Button class, so I
don't know if you'd step on stuff the Button class does in regards to
mouseOver, mouseOut, etc.

To be honest, depending on the complexity of your visuals and the number of
these buttons you need in your UI, it may be quicker to just create an
mx:Canvas that looks like a button and use effects (if you need a container
with children, e.g. labels and images), or just create a UIComponent
directly and manipulate it (if you've got just images).

Of course, that does depend on the overhead of Canvas which is something
I've been curious about (and perhaps Alex could answer): does mx:Canvas
introduce much overhead to the UI (as compared to UIComponent)? I know
mx:Canvas does a lot of layout chores, but are they relatively cheap if the
children are relatively cheap (e.g. a few fixed sized components with fixed
positions)?

Troy.


On 9/17/07, Alex Harui <[EMAIL PROTECTED]> wrote:
>
>  You can design a skin as a multi-frame animation in Flash and use it in
> Flex
>
>
>  --
>
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Troy Gilbert
> *Sent:* Monday, September 17, 2007 10:38 AM
> *To:* flexcoders@yahoogroups.com
> *Subject:* Re: [flexcoders] Buttons in Flex !
>
>
>
> > I am creating some skins for my buttons, but i have one problem. I want
> > to have a nice transition from one skin (Up Skin) to another skin (Down
> > skin). In other words i want to create a button that lights when i do
> > mouseOver but slowly. IS that possible?
>
> Hmm, good question...
>
> In the Flash IDE, you'd just create animations in each state
> (transition is tricky, but you could easily have it play an animation
> at the beginning of a state and loop).
>
> In Flex, you could do it with a programmatic skin, but you'd be
> responsible for juggling all the animation and state information.
> Again, transitions would be difficult, i.e. Up to Down plays this
> animation, but Up to Over plays this animation (or whatever
> transitions make sense).
>
> If you wanted to keep things as "high level" as possible, by which I
> mean doing it declaratively in MXML, you'd probably end up just
> skipping a subclass of mx:Button and instead subclass mx:Canvas and
> use effects/behaviors.
>
> Troy.
>
> 
>


RE: [flexcoders] Re: drag and drop an image object, over a list object

2007-09-17 Thread Alex Harui
It is a method, not a property.  I assume you have a dragdrop event
handler?  The one in LIstBase.as might serve as an example.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of flashcrow2000
Sent: Monday, September 17, 2007 10:56 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: drag and drop an image object, over a list
object

 

Which is not an option for a List item. I tried using it from the mxml
declaration (and it does not exist, according to Flash 2.0.1), and
also from AS (of course, with the same result). If i'm doing something
wrong, can you please provide a small code sample?

Thank you Alex
--- In flexcoders@yahoogroups.com 
, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> calculateDropIndex?
> 
> 
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com 
] On
> Behalf Of flashcrow2000
> Sent: Monday, September 17, 2007 5:56 AM
> To: flexcoders@yahoogroups.com  
> Subject: [flexcoders] drag and drop an image object, over a list
object
> 
> 
> 
> Hello all,
> 
> I have the following problem: I need to be able to drag an Image
> object over a list, and make some operations based on the specific row
> i'm dropping that picture on. The list contains names of different
> people, and each picture I drag over one name becomes assigned to that
> person.
> 
> I have the drag and drop capability all worked out (i'm using the
> DragManager of course, and the List object accepts the drop) but I
> can't seem to be able to actually find out on what row the user
> dropped the picture. Any ideas? (I'm sure it's simple, but I just
> don't see it yet)
> 
> Thanks, 
> Cosmin
>

 



[flexcoders] Re: Searching array for item

2007-09-17 Thread candysmate
--- In flexcoders@yahoogroups.com, Tony Alves <[EMAIL PROTECTED]> wrote:
>
> Type "Three" into the "Value" Text Input.
> You can put "id" in the "Value Name" TextInput, then type the numeric 
> numbers in "Value".
> This allows a change of the column in the ArrayCollection you will be 
> searching.
> 

Got it. Very nice inddded. Many thanks for your time and trouble Tony.
Sorry for being slow off the mark earlier. 7 days a week coding is
slowly wearing me down.

best  Graham



[flexcoders] Re: web cam live feed

2007-09-17 Thread flashcrow2000
Wow! thanks guys for your quick response! I knew I'll have to get down
and dirty with Flash Media Server, but I will also take a look at the
other servers you mentioned.

--- In flexcoders@yahoogroups.com, "greg h" <[EMAIL PROTECTED]> wrote:
>
> Hi Cosmin,
> 
> For true video, a server is required and Jobe's list of the server
options
> is comprehensive.
> 
> For a tutorial you can adapt from Renaun's "Video Conference with Flex &
> FMS".
> Article:
> http://mxdj.sys-con.com/read/295379.htm
> Source & Live Demo:
> http://renaun.com/blog/2006/10/28/139/
> 
> Renaun's article give you the webcam record side and the server
setup.  For
> viewers, you can use
>
mx.controls.VideoDisplaysetting
> the
>
source=property
> to the stream's RTMP URI.  Or, if you want a more lightweight swf
> for viewers you can use either ActionScript only with
>
flash.media.Video(used
> in Renaun's Video Conference in class
> VideoContainer.as), or Flash's FLVPlayback component.
> 
> If you want to publish video of higher quality, you can use the
Flash Media
> Encoder
(not
> Flex).
> 
> Please post back if you find this helpful or if you have further
questions.
> 
> hth,
> 
> g
> 
> 
> On 9/17/07, Jobe Makar <[EMAIL PROTECTED]> wrote:
> >
> >  Hi Cosmin,
> >
> > When it comes to live web cam feeds using Flash there are only a few
> > options:
> > Flash Media Server
> > ElectroServer 4 (a week or two from release) www.electro-server.com
> > Red 5
> > Wowza
> >
> > Jobe Makar
> > http://www.electrotank.com
> > http://www.electro-server.com
> > phone: 252-627-8026
> > mobile: 919-609-0408
> > fax: 919-882-1121
> >
>




[flexcoders] Re: drag and drop an image object, over a list object

2007-09-17 Thread flashcrow2000
Which is not an option for a List item. I tried using it from the mxml
declaration (and it does not exist, according to Flash 2.0.1), and
also from AS (of course, with the same result). If i'm doing something
wrong, can you please provide a small code sample?

Thank you Alex
--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> calculateDropIndex?
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of flashcrow2000
> Sent: Monday, September 17, 2007 5:56 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] drag and drop an image object, over a list object
> 
>  
> 
> Hello all,
> 
> I have the following problem: I need to be able to drag an Image
> object over a list, and make some operations based on the specific row
> i'm dropping that picture on. The list contains names of different
> people, and each picture I drag over one name becomes assigned to that
> person.
> 
> I have the drag and drop capability all worked out (i'm using the
> DragManager of course, and the List object accepts the drop) but I
> can't seem to be able to actually find out on what row the user
> dropped the picture. Any ideas? (I'm sure it's simple, but I just
> don't see it yet)
> 
> Thanks, 
> Cosmin
>




[flexcoders] New Charting Package for Flex2

2007-09-17 Thread reflexactions
We have finally released XPCharting for Flex2.

XPCharting is built on the Adobe Flex2 Framework and is 100% compatible 
with your Flex applications. 

It is more than just a straight port of the AS2 version, it marks a 
major revision with many new and enhanced features. New Series types, 
SubCharts, Advanced Date Handling, Multiple Axes, DragDropSupport, 
DataEffects, 3D, Palettes, Backgrounds and more.

You can find out more about XPCharting and see online demos at 
http://xpcomponents.com/charting.shtml

Trial version available.



[flexcoders] Re: xml data and drag related questions

2007-09-17 Thread g07m5064
--- In flexcoders@yahoogroups.com, Mathe Maema <[EMAIL PROTECTED]> wrote:
I think I found the solution to the first question though I can't
understand it. I trimmed contents of the node and refreshed the
project. The trimming was motivated by realising that the content in
excel is represented by # and despite increasing the column width.
Also I discovered that to actually display the content in the cell
formatting had to be changed to numbers...really strange! 

> Yes the node is called comments. I changed its name to commentary
but still all other nodes I can access using
{dg.selectedItem.nodeName} I really have no idea why things aren't
working.
> 
> Alex Harui <[EMAIL PROTECTED]> wrote:   
>   Is it really a tag called "comments" or did you use a comments tag

>   What gets displayed in the DG for the comments tag?
>
>   If the grid items are XML, then the items you get in the drop will
be XML and not of type Sport.
>
>   
> -
>   
>   From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of g07m5064
>  Sent: Sunday, September 16, 2007 1:45 PM
>  To: flexcoders@yahoogroups.com
>  Subject: [flexcoders] xml data and drag related questions
>   
>
> I have two questions. First, I have the following xml file:
>  
>  http://www.w3.org/2001/XMLSchema-instance";>
>  
>  Lewis Hamilton
>  22
>  English
>  Motorsport
>  Everything seems to come easy for the F1 ace. Hamilton
>  Academical, you might say. Never mind. He's British, very good, and
>  steered his way round a spying row and team turmoil. And can you ever
>  tire (tyre?) of seeing him as a cheeky karting schoolboy...?
>  
>  
>  Ricky Hatton
>  29
>  English
>  Boxing
>  Timing is crucial for the Manchester 'Hitman'. And his
>  super fight against Floyd Mayweather could not have been scheduled
>  better.
>  
>  
>  
>  I am buffled by the fact that the comments node is not accessible i.e.
>  I cannot display its contents in a grid though I have no problems with
>  other nodes. 
>  I am not sure of the reason. Any ideas?
>  
>  My second question is assuming I wanted to drag a row from the grid
>  into an HBox container with intentions of adding items
>  to an arraycollection so that the dragged items can effectively be
>  diplayed in another grid found in another 'page'.
>  
>  This is my code for the drop function:
>  
>  private function doDragDrop(event:DragEvent):void
>  {
>  var data:Object = event.dragSource.dataForFormat("items") as
>  Sport; //Sport is class
>  draggedData.addItem(data); //draggedData is an instance of
>  ArrayCollection whose contents will be used as dataProvider for the
>  other grid
>  } count++;// The HBox will display the count value of number
>  of dragged items
>   
>   
> 
>   
> 
> 
>  
>
> 
>
> -
>  For ideas on reducing your carbon footprint visit Yahoo! For Good
this month.
>




Re: [flexcoders] stage.quality in AIR vs Browser

2007-09-17 Thread Troy Gilbert
> You will notice the image quality is good when running as a flex app,
> but completely unusable as an AIR app. This is not a large image -
> 2878x1863. The inability to handle large images is another problem
> altogether :(

Not sure why you're seeing a difference between AIR and Flex (I would
assume they're both using the Flash Player, but I guess AIR uses a
special build of the Flash Player to ease security issues). Hopefully
someone else can address the AIR issue.

Looking at the specific image, though, I would urge you to use a
different format for your image data. For high-resolution B&W imagery
(grayscale is just masking the reduced resolution) you should either
use a specialized renderer (store the image as a ByteArray at either
1-bit or 8-bit depending on the zoom level you want, then render out
tiles manually), or if you can get the data in this format from the
source, store it as vectors (mxmlc can compile SVG into vector shapes
in an SWF, and you can probably find a vector to SVG converter for
whatever the originating SVG format is).

Troy.


[flexcoders] Need some help with Tooltips and Flex Component Kit

2007-09-17 Thread Mark
I have a Flash that has 2 items for use by my Flex app.  One is a 
flat circle to plot some points on and the other is the dot which 
will be those points.  In flex I'm duplicating and position these 
points from the data within my ArrayCollection.  That is woking just 
fine, but I have a tooltip on my points that takes a while to 
appear.  I have a trace on that function that returns the info right 
away, but the tooltip is very slow.  But if you roll over it anytime 
after it has been created the first time it works properly.  I think 
my AS is bad and was hoping someone could tell me what is wrong.

Here's what I have.



on the Circle I have a function that creates each point - 

public function plotRadarPoints() {
for (var i:int=0; i

[flexcoders] Changing the image in a custom component item renderer

2007-09-17 Thread Paul Steven
I am creating a datagrid that uses a custom component in an item renderer to
display one of 3 images (symbols of an embedded swf)

 

The data grid columns are created dynamically. I can't figure out how to set
the value of imagePath inside this custom component. 

 

The symbol names are the same as the value for xmlColumn.localName();

 

Any help really appreciated!!

 

 

e.g

 

dgc = new DataGridColumn();

dgc.headerText = xmlColumn.localName();
dgc.itemRenderer=new ClassFactory(statusComponent); 
dgc.dataField = xmlColumn.localName();

 

My custom component is as follows:

 


http://www.adobe.com/2006/mxml"; width="100"
height="30">







 



Re: [flexcoders] Buttons in Flex !

2007-09-17 Thread Troy Gilbert
> I am creating some skins for my buttons, but i have one problem. I want
> to have a nice transition from one skin (Up Skin) to another skin (Down
> skin). In other words i want to create a button that lights when i do
> mouseOver but slowly. IS that possible?

Hmm, good question...

In the Flash IDE, you'd just create animations in each state
(transition is tricky, but you could easily have it play an animation
at the beginning of a state and loop).

In Flex, you could do it with a programmatic skin, but you'd be
responsible for juggling all the animation and state information.
Again, transitions would be difficult, i.e. Up to Down plays this
animation, but Up to Over plays this animation (or whatever
transitions make sense).

If you wanted to keep things as "high level" as possible, by which I
mean doing it declaratively in MXML, you'd probably end up just
skipping a subclass of mx:Button and instead subclass mx:Canvas and
use effects/behaviors.

Troy.


Re: [flexcoders] Flash game ESC problem

2007-09-17 Thread Troy Gilbert
> I am creating a game in Flash, in fullscreen, but i dont want to allow
> users to exit fullscreen mode with Escape button, how can i disable
> that?

As Tom said, the answer is no, you can't do that, and for very good
security reasons.

>From a usability perspective, the answer would still be no, you
*shouldn't* do that, for very good usability reasons.

My question is, why do you want to do that? Why would it ever be smart
to *prevent* your user from have more control over their machine and
their interaction with your product?

Interestingly, this issue used to come up all the time in the DirectX
world with folks asking how to prevent users from ALT+TAB'ing away
from their game, or to prevent users from using CTRL+ALT+DEL, etc...
and the question was always, "why?"

Troy.


[flexcoders] Sandbox/Crossdomain problem on connecting Socket with webserver on port 6680

2007-09-17 Thread Rogerio Gonzalez
Hello everybody.

I am developing a system for use of sockets to a telnet server on port 6677.
Locally, everything goes fine, even creating a projector(exe).

But when it goes online, it don´t connect because some kind of
crossdomain error.

The problem is that I don´t have access to the 80 port of the server,
so my webserver is on 6680 port.

I try use:
Security.loadPolicyFile("http://servico.servidor.com:6680/crossdomain.xml";);

And also:
Security.loadPolicyFile("xmlsocket://servico.servidor.com:6680/crossdomain.xml");

But, for some reason, he keeps giving me the sandbox error.

I did several alterations like:
   Security.allowDomain(host +":6680")
   Security.allowInsecureDomain(host +":6680");
   Security.loadPolicyFile("xmlsocket://"+ host
+":6680/crossdomain.xml");
   Security.loadPolicyFile("http://"+ host +":6680/crossdomain.xml");

But still, nothing.

Somebody have any idea?

Regards!

Rogério Gonzalez


[flexcoders] Re: FABridge and Safari

2007-09-17 Thread Richard Rodseth
Sorry to repeat the question. I enabled the debug menu in Safari and
the JavaScript console reports an error "undefined value" at this
line:

var flexApp = FABridge.flash.root();

The code works fine on Firefox and IE. I'm using the FABridge included
with Moxie B1. Is there a later or earlier version I should be using?
Perhaps it only works with bridgeName set? (I'll try that). Thanks.

On 9/16/07, Richard Rodseth <[EMAIL PROTECTED]> wrote:
> I'm taking baby steps with FABridge, and I'm not a JavaScript
> developer, so bear with me please. The following works in Firefox, but
> not in Safari (I don't see the second alert)
>
> alert("hello");
>
>  var flexApp = FABridge.flash.root();
>
>  var appWidth = flexApp.getWidth();
>
> alert("hello again " + appWidth);
>
> Any ideas or comments about the viability of the bridge?
>


RE: [flexcoders] xml data and drag related questions

2007-09-17 Thread Mathe Maema
Yes the node is called comments. I changed its name to commentary but still all 
other nodes I can access using {dg.selectedItem.nodeName} I really have no idea 
why things aren't working.

Alex Harui <[EMAIL PROTECTED]> wrote:   
  Is it really a tag called “comments” or did you use a comments tag mailto:[EMAIL PROTECTED] On Behalf Of 
g07m5064
 Sent: Sunday, September 16, 2007 1:45 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] xml data and drag related questions
  
   
I have two questions. First, I have the following xml file:
 
 http://www.w3.org/2001/XMLSchema-instance";>
 
 Lewis Hamilton
 22
 English
 Motorsport
 Everything seems to come easy for the F1 ace. Hamilton
 Academical, you might say. Never mind. He's British, very good, and
 steered his way round a spying row and team turmoil. And can you ever
 tire (tyre?) of seeing him as a cheeky karting schoolboy...?
 
 
 Ricky Hatton
 29
 English
 Boxing
 Timing is crucial for the Manchester 'Hitman'. And his
 super fight against Floyd Mayweather could not have been scheduled
 better.
 
 
 
 I am buffled by the fact that the comments node is not accessible i.e.
 I cannot display its contents in a grid though I have no problems with
 other nodes. 
 I am not sure of the reason. Any ideas?
 
 My second question is assuming I wanted to drag a row from the grid
 into an HBox container with intentions of adding items
 to an arraycollection so that the dragged items can effectively be
 diplayed in another grid found in another 'page'.
 
 This is my code for the drop function:
 
 private function doDragDrop(event:DragEvent):void
 {
 var data:Object = event.dragSource.dataForFormat("items") as
 Sport; //Sport is class
 draggedData.addItem(data); //draggedData is an instance of
 ArrayCollection whose contents will be used as dataProvider for the
 other grid
 } count++;// The HBox will display the count value of number
 of dragged items
  
  

  


 
   

   
-
 For ideas on reducing your carbon footprint visit Yahoo! For Good this month.

[flexcoders] Multiple Axis in Flex 3 FLEX CHART

2007-09-17 Thread hworke


Hello!! I can see that Flax 3 charting now has multi axis ability. The
examples I got from the web has all the Y axis "side by side"!!! Is it
possible to stack up Y axis? I kind of want to STAKC up like 10 area
graphs with 10 multi Y axis so that I can view all of them at the same
time in one chart with one background. Please take a look at this
link, I need somthing like this:

http://www.visualmining.com/developers/examples/lines/linemultiaxes.htm

Thanks




Re: [flexcoders] SOAP Service Issue, kind of a big bug

2007-09-17 Thread Paul deCoursey
Alright, I've figured it out.  I was trying the property value to 
represent the text content of the element, but flex looks for the name 
of the element as the text content. Not exactly intuitive, but 
reasonable.  Some other issues have arisen however.  I have a response 
that looks like this:





And the profile Element is unbounded, and there can be none at all. I've 
noticed that if there are several, like 2-7 (I have not tried more) then 
the response objects that flex decodes look fine.  But if there is one, 
then I get an array for the only element is null, where is the Object?  
Any ideas?

Paul


Paul deCoursey wrote:
> Paul deCoursey wrote:
>   
>> Ok I have this WSDL:
>>
>>
>> 
>> http://examples.decoursey.com"; 
>> xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding"; 
>> xmlns:tns="http://examples.decoursey.com"; 
>> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
>> xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/"; 
>> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; 
>> xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/"; 
>> xmlns:soap12="http://www.w3.org/2003/05/soap-envelope";>
>>   
>> http://www.w3.org/2001/XMLSchema";
>> xmlns:tns="http://examples.decoursey.com";
>> elementFormDefault="qualified"
>> targetNamespace="http://examples.decoursey.com";>
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> 
>> 
>> 
>> 
>> > name="metadata" type="tns:metadata"/>
>> 
>> 
>> 
>>
>>
>>   
>>  
>> 
>>  
>>   
>>
>>
>>   
>>  
>>
>> > nillable="true" type="xsd:string"/>
>>  
>>   
>>
>>   
>>   
>> 
>>   
>>   
>>
>> 
>>   
>>   
>> 
>>   > message="tns:storeMetadataRequest"/>
>>   > message="tns:storeMetadataResponse"/>
>> 
>>   
>>   > type="tns:SimpleSoapExamplePortType">
>>
>> > transport="http://schemas.xmlsoap.org/soap/http"/>
>> 
>>   
>>   
>> 
>>   
>>   
>> 
>>   
>>
>> 
>>   
>>   
>> > binding="tns:SimpleSoapExampleHttpBinding">
>>   > location="http://localhost:8084/Webular/metadata/SimpleSoapExample"/>
>> 
>>   
>>
>>
>> 
>>
>>
>>
>> When I try to create the metas object with the metadata objects this is 
>> the response Flex is generating:
>>   
>> 
> Sorry I meant request here, the response is an error, because the SOAP 
> service is expecting something altogether different.
>
>   
>> > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
>>xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>>   
>>   http://examples.decoursey.com";>
>>  
>> 
>>
>> 
>> 
>>
>> 
>> 
>>
>> 
>> 
>>
>> 
>>  
>>   
>>   
>> 
>>
>> All of the ""  should just a a simple 
>> string, not and element and certainly not a nil element.  Anybody have 
>> any ideas?
>>
>> Paul
>>
>>
>>
>>   
>> 
>
>
>   



Re: [flexcoders] SalesBuilder in FLex(Source Code included)

2007-09-17 Thread Adam Reynolds
Online demo would be good.

Sheriff wrote:
> so did anyone download it? any opinions at all if it emulates the real one
>
> - Original Message 
> From: Sheriff <[EMAIL PROTECTED]>
> To: flexcoders@yahoogroups.com
> Sent: Saturday, September 15, 2007 9:10:30 PM
> Subject: [flexcoders] SalesBuilder in FLex(Source Code included)
>
> Hey, i decided that i am going to release the source code for the 
> SalesBuilder app done that was done in Air by
>
> Christophe Coenraets
> http://www.coenraet s.org/blog/ 
>
> Its under the MIT license so i have been told it is OK.
>
> I rewrote the entire thing to work in Flex, and added loads of 
> comments so anyone can understand what i am doing. Keep in mind that 
> this is my first programming language and i am only self taught. it's 
> been only ~5 month that i got into programing. So tell me if there is 
> something that i need to fix or if i am using wrong techniques. THis 
> program is functional about 85%, i still havent done the whole send 
> back to the database when somone clicks on save and some minor stuff 
> so it replicates it. I did the whole thing in one week before school 
> started so i am busy now and prob wont finish it till end of month. 
> Any how here is the link http://code. google.com/ p/salesbuilder/ 
> downloads/ list 
>
> --You need Coldfusion 8
> --Microsoft sql 2005
> --You must create a dataSource in the coldfusion admin called SalesBuilder
> -Database in sql must also be called SalesBuilder
> --I used 8500 for the port for coldfusion,
>
>  _ _ _ _ _ _
> Got a little couch potato?
> Check out fun summer activities for kids.
> http://search. yahoo.com/ search?fr= oni_on_mail& p=summer+ 
> activities+ for+kids& cs=bz 
> 
>  
>
>
>
>
> 
> Moody friends. Drama queens. Your life? Nope! - their life, your story.
> Play Sims Stories at Yahoo! Games. 
> 
>  



RE: [flexcoders] Flex component kit problem

2007-09-17 Thread Alex Harui
In Flex, components are constructed, then their properties are set.  I
would expect you to have the same problem in Flash if you did

 

Var foo = new MyComp()

Foo.label = "bar"

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of helix206
Sent: Monday, September 17, 2007 7:27 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex component kit problem

 

I have created a SWC component with Flash, simple one. I have a 
variable "label1" that i set from Flex when defining a component :



Variable label1 actualy changes but the textField in Flash doesent 
show it, anyone knows why?

This is part of AS code from Flash CS3.

public class MyComp extends UIMovieClip
{

public var label1:String ="" ;

public function MyComp():void{


setLabel();
}

public function setLabel():void{
labeltext.text = label1;
}

 



Re: [flexcoders] Invisible checkbox renderer

2007-09-17 Thread Scott - FastLane

Thanks Alex!  commitProperties() did not work, but updateDisplayList() did.

Scott

Alex Harui wrote:


The list classes set .visible on renderers as part of the recycling, 
so we're overriding yours.


 


You should be able to set it in commitProperties or later.

 




*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
*On Behalf Of *Scott - FastLane

*Sent:* Monday, September 17, 2007 3:32 AM
*To:* flexcoders@yahoogroups.com
*Subject:* [flexcoders] Invisible checkbox renderer

 


I am attempting to optimize my renderers in an AdvancedDataGrid. The
following code works perfectly, but it seems I should be able to do this
without the overhead of an HBox. So... I have implemented the following
code and am having trouble seeing why it won't work. If I debug, I see
that this.visible is being set to false... but it always appears
anyway. Seems this should be very simple, I must be overlooking something.

Any Help is appreciated.
Scott

*** This works, but is heavier weight ***












*** Would prefer this if it worked ***

public class MyCheckBox extends CenteredCheckBox
{
/**
* Called when the data is set.
*/
public override function set data(value:Object):void
{
var isTask:Boolean = value is Task;

this.visible = !(isTask);
this.invalidateProperties();
//note: have tried invalidateDisplayList() and
UIComponent(this.parent).invalidateDisplayList() as well

super.data = value;
}
}

 




RE: [flexcoders] Listening for all creationComplete() events

2007-09-17 Thread Alex Harui
Capture phase

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Brian Holmes
Sent: Monday, September 17, 2007 8:40 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Listening for all creationComplete() events

 

Is there a way to listen for all creationComplete events across an
application?

 

Brian..



***
The information in this e-mail is confidential and intended solely for
the individual or entity to whom it is addressed. If you have received
this e-mail in error please notify the sender by return e-mail delete
this e-mail and refrain from any disclosure or action based on the
information.
*** 

 



  1   2   >