Re: [flexcoders] Drag and drop vs scrolling

2010-04-21 Thread Alex Harui
Some folks have tried making the renderer a drop target in order to add 
different meaning to dropping in folders.  In theory it should work, but I 
think I’d work from the Tree instead, and then I would expect autoscroll to 
work.


On 4/20/10 3:31 PM, Richard Rodseth rrods...@gmail.com wrote:






I inherited some code which supports drag and drop from a list to a
node of a tree. Unfortunately it does not work when the tree is
scrolled.
Not only does the tree not autoscroll, but even if you scroll the
target item into view before beginning the drag, incorrect nodes
highlight.

I didn't see any code that's doing coordinate transformations, but did
notice that there is a custom TreeItemRenderer, which contains the
listeners for dragEnter etc.
I'm guessing this is the root of the problem, since renderers are recycled.

I've no idea why things were done this way, and am wondering if this
is a legitimate idiom, or if I need to start over with listeners
defined at the Tree level.

Also, is autoscroll supported if you do things the right way?





--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] TitleWindow.title won't update from a setter

2010-04-21 Thread Alex Harui
Are you sure your setter is getting called?  If so, when is it called?  Maybe 
it is being called inside commitProperties after super.commitProperties.


On 4/20/10 3:07 PM, Nick Middleweek n...@middleweek.co.uk wrote:






Hi,

I've got a small MXML Component based on TitleWindow which I'm opening with 
PopupManager that has a setter and getter called iFormID.

In the setter I have this code...

public function set iFormID ( value : String ) : void
{
if ( _iFormID == value )
return;

_iFormID = value;


if(iFormID.length  0)
{
this.title = Create Vendor;
}
else
{
this.title = Create Vendor by iForm;
}

}


I am find that the title remains blank, but then if I close the PopUp and open 
it again, the last value the .title should have been is now visible...

Is there some a refresh issue with TitleWindow.title?

If I set the .title outside of the component, after I've used PopupManager, 
then it's set as expected but I want to control the .title from the setter 
function.


Does anyone have an idea what I should be doing?

I've also tried setting a dirty_flag, calling invalidateProperties() and 
setting the .title from within commitProperties() but no joy there either...


Thanks for any help...
Nick






--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui


[flexcoders] LInkButton in ActionScript--how to write the attribute 'icon in Action Script -----PLEASE ANY HELP

2010-04-21 Thread Nini7016 Nini7016

Hello 

I have this code in MXML file : 
   [Bindable]
public var start :Class = BpmnResource.getInstance().icon_tool_start;

.
   mx:LinkButton id=btn icon={iconClass} width=20 height=20 
buttonMode=false /

I would like to transform it in Action script 

   [Bindable]
public var start :Class = BpmnResource.getInstance().icon_tool_start;
.
var icon_start : LinkButton = new LinkButton();
icon_start.buttonMode = false;
icon_start.height = 20;
icon_start.width = 20;
   
But i don't find the equivalent of icon={iconClass} in ActionScript :( :( :( 

Any Help please please 

Thank you very much 
  
_
Hotmail arrive sur votre téléphone ! Compatible Iphone, Windows Phone, 
Blackberry, …
http://www.messengersurvotremobile.com/?d=Hotmail

Re: [flexcoders] Re: security flex

2010-04-21 Thread Tom Chiverton
On Tuesday 20 Apr 2010, Alex Harui wrote:
 the user still sees HTTP in the
 browser address bar if your SWF and wrapper were served over HTTP and none
 of the other security hints like the lock symbol or custom icons will be
 available, so many folks like me will chicken out of entering such data.

Remember that most normal users are totally blind to said hints, and will 
enter anything you ask for anyway.

-- 
Helping to assertively generate eigth-generation cross-platform frictionless 
channels as part of the IT team of the year 2010, '09 and '08



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 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office together with a 
list of those non members who are referred to as partners.  We use the word 
?partner? to refer to a member of the LLP, or an employee or consultant with 
equivalent standing and qualifications. Regulated by the Solicitors Regulation 
Authority.

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 2500.

For more information about Halliwells LLP visit www.halliwells.com.

Re: [flexcoders] Flex 4: How to make draggable and resizable modules?

2010-04-21 Thread Adnan Doric

Thank you for your response, I already saw your blog post :)

But in Flex 4, I can't find the mx.core.FlexModuleFactory. What to use 
instead ?





On 20/04/2010 23:41, Alex Harui wrote:


You can try starting here: 
http://blogs.adobe.com/aharui/2007/08/popup_dialogs_as_modules.html 
http://blogs.adobe.com/aharui/2007/08/popup_dialogs_as_modules.html


Someone else probably has an example of how to add resizing to a 
TitleWindow.



On 4/20/10 7:35 AM, astronaute75 astrona...@gmail.com 
astrona...@gmail.com wrote:







Hello,

I would like to make an application using Flex modules
(mx.modules.Module), the requirement is that those modules have to
be draggable and resizable inside the main application shell.

What is the best practice to make this kind of applications in Flex 4?

Thank you in advance for your help,
Adnan






--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui http://blogs.adobe.com/aharui




Re: [flexcoders] TitleWindow.title won't update from a setter

2010-04-21 Thread Nick Middleweek
Hi,

When tracing the setter, it is definately getting called. I'm currently just
trying to set this.title from the iFormID setter.

Here's my setup...

I have an MXML ArrayCollection with the CreateVendorDialog component inside
of the Array so it's created but not displayed (not sure if this is goood
practice but I picked it up along somewhere :) The component
ID=createVendor)

In my main Application I have a controlbar with two buttons, Create Vendor
and Create Vendor from iForm, they both call the same function but one
passes an extra string.

private function createVendorDialog(iFormID : String = ) : void
{
   createVendor.iFormID = iFormID;
   PopupManager.addPopUp(createVendor);
   //createVendor.title  = test;
}

The iFormID setter is getting called and this.title is being set but it's
not rendering. The only way I can get it working is to put this code in the
TitleWindow MXML component but that's a bit hacky isn't it?...

mx:TitleWindow
title = {(iFormID.length  0) ? 'Create Vendor by iForm' :
'Create Vendor'}
.
.
.
 /

Perhaps I need to take a step back somewhere?...


Thanks,
Nick



On 21 April 2010 07:39, Alex Harui aha...@adobe.com wrote:



 Are you sure your setter is getting called?  If so, when is it called?
  Maybe it is being called inside commitProperties after
 super.commitProperties.



 On 4/20/10 3:07 PM, Nick Middleweek n...@middleweek.co.uk wrote:






 Hi,

 I've got a small MXML Component based on TitleWindow which I'm opening with
 PopupManager that has a setter and getter called iFormID.

 In the setter I have this code...

 public function set iFormID ( value : String ) : void
 {
 if ( _iFormID == value )
 return;

 _iFormID = value;


 if(iFormID.length  0)
 {
 this.title = Create Vendor;
 }
 else
 {
 this.title = Create Vendor by iForm;
 }

 }


 I am find that the title remains blank, but then if I close the PopUp and
 open it again, the last value the .title should have been is now visible...

 Is there some a refresh issue with TitleWindow.title?

 If I set the .title outside of the component, after I've used PopupManager,
 then it's set as expected but I want to control the .title from the setter
 function.


 Does anyone have an idea what I should be doing?

 I've also tried setting a dirty_flag, calling invalidateProperties() and
 setting the .title from within commitProperties() but no joy there either...


 Thanks for any help...
 Nick






 --
 Alex Harui
 Flex SDK Team
 Adobe System, Inc.
 http://blogs.adobe.com/aharui
  



[flexcoders] Re: Problems With my XML Created Array Collection

2010-04-21 Thread valdhor
I am a little late to this party but I would have to recommend using AMF to 
pass your data back and forth. this allows you to pass objects and arrays of 
objects both ways. No need to convert objects to XML and back to objects - they 
are all just objects.

When the data comes in you can use ArrayUtil.toArray on the result and create 
an ArrayCollection from this array. An empty result will have created a zero 
length array and you can trap on that.

I use WebORB for PHP (Community Edition which is free) as the PHP middleware 
and have never had a problem. I have posted many examples on this forum of how 
to pass data back and forth. If you need any further help, I am but a post away 
;-}

I started out in my Flex learning going the XML route but soon got very 
confused, especially with trying to send arrays of data TO the server. As soon 
as I figured out how to do it with AMF I converted everything and now will not 
go back.


Best Regards



Steve



[flexcoders] Reference for flex tutorial

2010-04-21 Thread sony antony
Hi,

Could any one please suggest me a book I can refer for flex which could cover 
possibly everything in it.??

Thanks, 

Sony.



[flexcoders] Alive Pdf To Slow

2010-04-21 Thread Christophe
Hello,

I generate a Report with Alive Pdf from my web application. 

But the Pdf appears in about 3 minutes. it is too long for the customers.

How to generates more rapidly a Pdf ? 

Thank you,
Christophe, 




[flexcoders] Re: What is the Correct Type of Component For This?

2010-04-21 Thread valdhor
Take a look at SuperTabNavigator which is part of FlexLib 
(http://code.google.com/p/flexlib/). From your description, it looks like it 
would do the trick.

--- In flexcoders@yahoogroups.com, James garymoorcroft_...@... wrote:

 I'm lost as to what component to use for navigation within my application. 
 Across the top of my app I want something which horizontally displays a list 
 of categories which the user can click to select. This is fine if I use a 
 tilelist but I also want to allow my client to add and remove categories and 
 for the width of the component to adjust so that new categories fit in but it 
 seems impossible to apply fit to content to a tilelist the way you can to a 
 hbox which obviously means scrollbars will appear and if you switch the 
 scroll policy off this simply means any added categories won't be visible if 
 they are past the set width.
 
 If a hbox had a selecteditem property that would be perfect. Is there any 
 such way of getting a component to work like this?





Re: [flexcoders] Reference for flex tutorial

2010-04-21 Thread John McCormack
This is very through:
Professional Flex 3
from www.wrox.com
p2p.wrox.com
isbn: 978-0-470-22364-2

This does tutorials
Adobe Flex 3 Training from the Source
isbn-13: 978-0-321-52918-3
www.adobepress.com

John


sony antony wrote:


 Hi,

 Could any one please suggest me a book I can refer for flex which 
 could cover possibly everything in it.??

 Thanks, 

 Sony.



 




[flexcoders] Re: Problems With my XML Created Array Collection

2010-04-21 Thread James
Hi Steve. As I said earlier about using e4x I'm reluctant to use amfphp 1. 
because I already have eveything set up using regular php code and 2. I. 
struggle to find examples of how to use such methods compared to the regular 
methods of using traditional php.

Would you happen to know if it is possible to send a copy of the array 
collection that I'm receiving somehow? I basically want it so that when the 
user logs in it gets the data that we've been discussing throughout this topic 
and sets it as an array collection in flex and then sends this whole array to 
the userlinks table I have in my mysql so each user basically has a whole copy 
of the links table to themselves and can edit this by setting favourites etc. 
How would you go about this judging by the code that I've got here (the code 
that Robert provided). I'd prefer to stick to php to upload the array as this 
project is for my uni course in which I've used php throughout but I suppose I 
could use amfphp to upload the arrays?

Cheers for the advice so far.

--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 I am a little late to this party but I would have to recommend using AMF to 
 pass your data back and forth. this allows you to pass objects and arrays of 
 objects both ways. No need to convert objects to XML and back to objects - 
 they are all just objects.
 
 When the data comes in you can use ArrayUtil.toArray on the result and create 
 an ArrayCollection from this array. An empty result will have created a zero 
 length array and you can trap on that.
 
 I use WebORB for PHP (Community Edition which is free) as the PHP middleware 
 and have never had a problem. I have posted many examples on this forum of 
 how to pass data back and forth. If you need any further help, I am but a 
 post away ;-}
 
 I started out in my Flex learning going the XML route but soon got very 
 confused, especially with trying to send arrays of data TO the server. As 
 soon as I figured out how to do it with AMF I converted everything and now 
 will not go back.
 
 
 Best Regards
 
 
 
 Steve





[flexcoders] Re: Alive Pdf To Slow

2010-04-21 Thread valdhor
You could try using your back end server to create the PDF. I have had 
excellent results with TCPDF 
(http://www.tecnick.com/public/code/cp_dpage.php?aiocp_dp=tcpdf) on my PHP 
server. One caveat - my server has 16 dual core processors and 32GB of RAM. 
YMMV.

--- In flexcoders@yahoogroups.com, Christophe christophe_jacque...@... 
wrote:

 Hello,
 
 I generate a Report with Alive Pdf from my web application. 
 
 But the Pdf appears in about 3 minutes. it is too long for the customers.
 
 How to generates more rapidly a Pdf ? 
 
 Thank you,
 Christophe,





[flexcoders] Re: What is the Correct Type of Component For This?

2010-04-21 Thread James
Heres an image of my icons which is basically what I'm after.

http://i223.photobucket.com/albums/dd147/jimmyoneshot/theicons.jpg

The only difference is these are all just static ones I put in myself, now I 
need them to be dynamic i.e. the user can add and remove icons which is why I 
need it to resize. I've found a way of getting a tilelist to autoresize but 
there is a problem witrh this.

I also want them to have a glow effect as you can see there. In that last 
version on application complete all of those images were converted to greyscale 
then got converted to color when each one was hovered over. I need to achieve 
this same effect again but I'm not sure if a tilelist can achieve this either 
as it simply has that dull blue theme box. I know this box can be removed using 
actionscript but how can one add in the glow effect to a tilelist hovered  over 
item?

--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 Take a look at SuperTabNavigator which is part of FlexLib 
 (http://code.google.com/p/flexlib/). From your description, it looks like it 
 would do the trick.
 
 --- In flexcoders@yahoogroups.com, James garymoorcroft_ict@ wrote:
 
  I'm lost as to what component to use for navigation within my application. 
  Across the top of my app I want something which horizontally displays a 
  list of categories which the user can click to select. This is fine if I 
  use a tilelist but I also want to allow my client to add and remove 
  categories and for the width of the component to adjust so that new 
  categories fit in but it seems impossible to apply fit to content to a 
  tilelist the way you can to a hbox which obviously means scrollbars will 
  appear and if you switch the scroll policy off this simply means any added 
  categories won't be visible if they are past the set width.
  
  If a hbox had a selecteditem property that would be perfect. Is there any 
  such way of getting a component to work like this?
 





Re: [flexcoders] Re: What is the Correct Type of Component For This?

2010-04-21 Thread Oleg Sivokon
I'd really go for a custom layout than.
Maybe you can take ListBase for a superclass, or just base it on
UIComponent, or Group.

Best.

Oleg.


[flexcoders] Re: What is the Correct Type of Component For This?

2010-04-21 Thread James
Hi oleg. Yep that seems like a good idea but I'd prefer to just use the 
tilelist for now. I've found a way of removing tilelists blue theme boxes and 
also found a way to make them auto resize based on how many items they have in 
them. Do you know of any way of how to apply a glow effect to a tilelist 
hovered item or perhaps selected item? I know it's easy to get a glow effect to 
target full components like buttons etc but is there any way to get such an 
effect to target a component's selected/hovered over items?

--- In flexcoders@yahoogroups.com, Oleg Sivokon olegsivo...@... wrote:

 I'd really go for a custom layout than.
 Maybe you can take ListBase for a superclass, or just base it on
 UIComponent, or Group.
 
 Best.
 
 Oleg.





[flexcoders] Re: Problems With my XML Created Array Collection

2010-04-21 Thread valdhor
James

First off, I would not use AMFPHP as it is deprecated in favor of ZendAMF (Part 
of Zend Framework). I found WebORB much easier to integrate than ZendAMF.

With WebORB you use Object Oriented PHP. You create data transfer classes in 
both Flex and PHP and map them to each other. then you use class hinting in PHP 
to receive data from Flex.

You can definitely send the arraycollection to PHP. It will arrive as an array 
of objects.

One thing I think you should look into is SharedObjects in Flex. This allows 
you to save data to the local machine (Kind of like cookies but you have 100K 
of space you can use) and is very useful to hold these kinds of preferences.


Steve

--- In flexcoders@yahoogroups.com, James garymoorcroft_...@... wrote:

 Hi Steve. As I said earlier about using e4x I'm reluctant to use amfphp 1. 
 because I already have eveything set up using regular php code and 2. I. 
 struggle to find examples of how to use such methods compared to the regular 
 methods of using traditional php.
 
 Would you happen to know if it is possible to send a copy of the array 
 collection that I'm receiving somehow? I basically want it so that when the 
 user logs in it gets the data that we've been discussing throughout this 
 topic and sets it as an array collection in flex and then sends this whole 
 array to the userlinks table I have in my mysql so each user basically has a 
 whole copy of the links table to themselves and can edit this by setting 
 favourites etc. How would you go about this judging by the code that I've got 
 here (the code that Robert provided). I'd prefer to stick to php to upload 
 the array as this project is for my uni course in which I've used php 
 throughout but I suppose I could use amfphp to upload the arrays?
 
 Cheers for the advice so far.
 
 --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
 
  I am a little late to this party but I would have to recommend using AMF to 
  pass your data back and forth. this allows you to pass objects and arrays 
  of objects both ways. No need to convert objects to XML and back to objects 
  - they are all just objects.
  
  When the data comes in you can use ArrayUtil.toArray on the result and 
  create an ArrayCollection from this array. An empty result will have 
  created a zero length array and you can trap on that.
  
  I use WebORB for PHP (Community Edition which is free) as the PHP 
  middleware and have never had a problem. I have posted many examples on 
  this forum of how to pass data back and forth. If you need any further 
  help, I am but a post away ;-}
  
  I started out in my Flex learning going the XML route but soon got very 
  confused, especially with trying to send arrays of data TO the server. As 
  soon as I figured out how to do it with AMF I converted everything and now 
  will not go back.
  
  
  Best Regards
  
  
  
  Steve
 





[flexcoders] Re: What is the Correct Type of Component For This?

2010-04-21 Thread valdhor
I have never tried to do anything like this but just thinking off the top of my 
head...

Try skinning components in Flex. 
http://www.davidflatley.com/2007/12/17/programmatic-button-skins-in-flex-3/ may 
be a good starting point.

Look at using DeGrafa (http://www.degrafa.org) and/or ScaleNine 
(http://www.scalenine.com) to skin components. 

Have multiple sizes of graphics available and check the width of the screen and 
the number of icons and pick an appropriate size to show.

--- In flexcoders@yahoogroups.com, James garymoorcroft_...@... wrote:

 Heres an image of my icons which is basically what I'm after.
 
 http://i223.photobucket.com/albums/dd147/jimmyoneshot/theicons.jpg
 
 The only difference is these are all just static ones I put in myself, now I 
 need them to be dynamic i.e. the user can add and remove icons which is why I 
 need it to resize. I've found a way of getting a tilelist to autoresize but 
 there is a problem witrh this.
 
 I also want them to have a glow effect as you can see there. In that last 
 version on application complete all of those images were converted to 
 greyscale then got converted to color when each one was hovered over. I need 
 to achieve this same effect again but I'm not sure if a tilelist can achieve 
 this either as it simply has that dull blue theme box. I know this box can be 
 removed using actionscript but how can one add in the glow effect to a 
 tilelist hovered  over item?
 
 --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
 
  Take a look at SuperTabNavigator which is part of FlexLib 
  (http://code.google.com/p/flexlib/). From your description, it looks like 
  it would do the trick.
  
  --- In flexcoders@yahoogroups.com, James garymoorcroft_ict@ wrote:
  
   I'm lost as to what component to use for navigation within my 
   application. Across the top of my app I want something which horizontally 
   displays a list of categories which the user can click to select. This is 
   fine if I use a tilelist but I also want to allow my client to add and 
   remove categories and for the width of the component to adjust so that 
   new categories fit in but it seems impossible to apply fit to content 
   to a tilelist the way you can to a hbox which obviously means scrollbars 
   will appear and if you switch the scroll policy off this simply means any 
   added categories won't be visible if they are past the set width.
   
   If a hbox had a selecteditem property that would be perfect. Is there any 
   such way of getting a component to work like this?
  
 





[flexcoders] Re: Problems With my XML Created Array Collection

2010-04-21 Thread valdhor
Maybe a combination of Server based and locally saved preferences?

This is what I do. The user can set his/her own display preferences which are 
saved in SharedObjects and the data is retrieved from the server.

--- In flexcoders@yahoogroups.com, Gary Moorcroft garymoorcroft_...@... wrote:

 Actually the whole app was previously made entirely using shared objects 
 with no web based dynamic data where the user could save all of the links to 
 their local machine. The problem was of course my client wanted to add new 
 links and update the existing links as time went on which means obviously it 
 needs to all be web based.
 
 --- On Wed, 21/4/10, valdhor valdhorli...@... wrote:
 
 
 From: valdhor valdhorli...@...
 Subject: [flexcoders] Re: Problems With my XML Created Array Collection
 To: flexcoders@yahoogroups.com
 Date: Wednesday, 21 April, 2010, 13:49
 
 
   
 
 
 
 James
 
 First off, I would not use AMFPHP as it is deprecated in favor of ZendAMF 
 (Part of Zend Framework). I found WebORB much easier to integrate than 
 ZendAMF.
 
 With WebORB you use Object Oriented PHP. You create data transfer classes in 
 both Flex and PHP and map them to each other. then you use class hinting in 
 PHP to receive data from Flex.
 
 You can definitely send the arraycollection to PHP. It will arrive as an 
 array of objects.
 
 One thing I think you should look into is SharedObjects in Flex. This allows 
 you to save data to the local machine (Kind of like cookies but you have 100K 
 of space you can use) and is very useful to hold these kinds of preferences.
 
 Steve
 
 --- In flexcod...@yahoogro ups.com, James garymoorcroft_ ict@ wrote:
 
  Hi Steve. As I said earlier about using e4x I'm reluctant to use amfphp 1. 
  because I already have eveything set up using regular php code and 2. I. 
  struggle to find examples of how to use such methods compared to the 
  regular methods of using traditional php.
  
  Would you happen to know if it is possible to send a copy of the array 
  collection that I'm receiving somehow? I basically want it so that when the 
  user logs in it gets the data that we've been discussing throughout this 
  topic and sets it as an array collection in flex and then sends this whole 
  array to the userlinks table I have in my mysql so each user basically has 
  a whole copy of the links table to themselves and can edit this by setting 
  favourites etc. How would you go about this judging by the code that I've 
  got here (the code that Robert provided). I'd prefer to stick to php to 
  upload the array as this project is for my uni course in which I've used 
  php throughout but I suppose I could use amfphp to upload the arrays?
  
  Cheers for the advice so far.
  
  --- In flexcod...@yahoogro ups.com, valdhor valdhorlists@  wrote:
  
   I am a little late to this party but I would have to recommend using AMF 
   to pass your data back and forth. this allows you to pass objects and 
   arrays of objects both ways. No need to convert objects to XML and back 
   to objects - they are all just objects.
   
   When the data comes in you can use ArrayUtil.toArray on the result and 
   create an ArrayCollection from this array. An empty result will have 
   created a zero length array and you can trap on that.
   
   I use WebORB for PHP (Community Edition which is free) as the PHP 
   middleware and have never had a problem. I have posted many examples on 
   this forum of how to pass data back and forth. If you need any further 
   help, I am but a post away ;-}
   
   I started out in my Flex learning going the XML route but soon got very 
   confused, especially with trying to send arrays of data TO the server. As 
   soon as I figured out how to do it with AMF I converted everything and 
   now will not go back.
   
   
   Best Regards
   
   
   
   Steve
  
 





Re: [flexcoders] Re: Problems With my XML Created Array Collection

2010-04-21 Thread Gary Moorcroft
Actually the whole app was previously made entirely using shared objects with 
no web based dynamic data where the user could save all of the links to their 
local machine. The problem was of course my client wanted to add new links and 
update the existing links as time went on which means obviously it needs to all 
be web based.

--- On Wed, 21/4/10, valdhor valdhorli...@embarqmail.com wrote:


From: valdhor valdhorli...@embarqmail.com
Subject: [flexcoders] Re: Problems With my XML Created Array Collection
To: flexcoders@yahoogroups.com
Date: Wednesday, 21 April, 2010, 13:49


  



James

First off, I would not use AMFPHP as it is deprecated in favor of ZendAMF (Part 
of Zend Framework). I found WebORB much easier to integrate than ZendAMF.

With WebORB you use Object Oriented PHP. You create data transfer classes in 
both Flex and PHP and map them to each other. then you use class hinting in PHP 
to receive data from Flex.

You can definitely send the arraycollection to PHP. It will arrive as an array 
of objects.

One thing I think you should look into is SharedObjects in Flex. This allows 
you to save data to the local machine (Kind of like cookies but you have 100K 
of space you can use) and is very useful to hold these kinds of preferences.

Steve

--- In flexcod...@yahoogro ups.com, James garymoorcroft_ i...@... wrote:

 Hi Steve. As I said earlier about using e4x I'm reluctant to use amfphp 1. 
 because I already have eveything set up using regular php code and 2. I. 
 struggle to find examples of how to use such methods compared to the regular 
 methods of using traditional php.
 
 Would you happen to know if it is possible to send a copy of the array 
 collection that I'm receiving somehow? I basically want it so that when the 
 user logs in it gets the data that we've been discussing throughout this 
 topic and sets it as an array collection in flex and then sends this whole 
 array to the userlinks table I have in my mysql so each user basically has a 
 whole copy of the links table to themselves and can edit this by setting 
 favourites etc. How would you go about this judging by the code that I've got 
 here (the code that Robert provided). I'd prefer to stick to php to upload 
 the array as this project is for my uni course in which I've used php 
 throughout but I suppose I could use amfphp to upload the arrays?
 
 Cheers for the advice so far.
 
 --- In flexcod...@yahoogro ups.com, valdhor valdhorlists@  wrote:
 
  I am a little late to this party but I would have to recommend using AMF to 
  pass your data back and forth. this allows you to pass objects and arrays 
  of objects both ways. No need to convert objects to XML and back to objects 
  - they are all just objects.
  
  When the data comes in you can use ArrayUtil.toArray on the result and 
  create an ArrayCollection from this array. An empty result will have 
  created a zero length array and you can trap on that.
  
  I use WebORB for PHP (Community Edition which is free) as the PHP 
  middleware and have never had a problem. I have posted many examples on 
  this forum of how to pass data back and forth. If you need any further 
  help, I am but a post away ;-}
  
  I started out in my Flex learning going the XML route but soon got very 
  confused, especially with trying to send arrays of data TO the server. As 
  soon as I figured out how to do it with AMF I converted everything and now 
  will not go back.
  
  
  Best Regards
  
  
  
  Steve
 










  

[flexcoders] Dynamic background on a Spark Container

2010-04-21 Thread Wally Kolcz
In my Flex3 version of my application I was able to use a Canvas and add 
a dynamic background image as part of a coloring book, but with Flex4, I 
cannot do that in the Spark Theme. Is there any way to set a dynamic 
background in a Spark container or is there a way to create a Container 
Skin that pulls from a dynamic source that can be updated on the fly?



Re: [flexcoders] Re: Is MATE framework appropriate for my project?

2010-04-21 Thread Wally Kolcz

You can always reach me at wko...@isavepets.com

On 4/20/2010 3:38 PM, md_ars wrote:


Great amount of knowledge. I need some time to discuss it with my 
other team mate who is expert in OOP and also taking care of 
webservice part. I appreciate your prompt replies and willingness to 
share your knowledge. How do I contact you once we design something 
you suggested? Should I reply to the same thread after some time(may 
be days)or send an email directly.


Thanks
Ars

--- In flexcoders@yahoogroups.com 
mailto:flexcoders%40yahoogroups.com, Wally Kolcz wko...@... wrote:


 One of the joys of Mate is that you can create a 'Services' component
 set to fx:object and set up all your data services (web services) and
 give them ID's and the wsdl address, then, in your map per eventhandler
 call a different method on that web services via the 
WebServicesInvoker.

 Then depending on what Manager you want to tweek the data, call then in
 the resultsHandler and MethodInvoker. Focus on creating custom 
events to

 handler different scenerios of data needs. You can also create an
 EventHandler that invokes other EventHandlers to set up multiple data
 needs per view.

 Lets say you have a email client where you need all messages and
 emailaddresses (for a phonebook). Rather than having the view fire off
 multiple events to retrieve the different datas, you can have a single
 Event (MessengerEvent.START) and in your EventHandler, have it perform
 multiple single event calls.

 EventHandlers type={MessengerEvent.START}
 EventAnnouncer type={MessEvent.LIST}
 Properties username={event.username} /
 /EventAnnouncer
 EventAnnouncer type={PhoneBookEvent.LIST}
 Properties username={event.username} /
 /EventAnnouncer
 /EventHandlers

 This way you can preserve the individual Events incase another view
 needs only one. For example another view just wants the phone book, it
 can just call the PhoneBookEvent.LIST event and have that view be 
binded

 to that ArrayCollection also.

 A manager is just there to tweek the data and put it into a dataholder.
 It doesn't care where it goes to or how many elements are using it. As
 long as it can support it.

 Split your managers up by category and you can have as many as you 
like.

 I break mine up by view (or view category). For my child portal
 application I have ChatManager, ArtManager, UserManager, UsageManager,
 JournalManager, MailManager, AppManager, and about a dozen others. 
Don't

 make a generic manager that handler EVERYTHING, especially if you are
 talking over 100 views.

 Also, as your EventMap grows, break it up into other EventMaps. I have
 mine by Event type letters (A-L, M-R, S-Z). For Example MailEvent goes
 in M-R, JournalEvent goes in A-L, etc.

 Hope that helps. If you need anything else. Let me know. I can share
 what knowledge I have.

 On 4/20/2010 2:55 PM, md_ars wrote:
 
 
 
  Thanks Wally. It worked. I don't know where I was missing. I started
  from the same because with one panel I tested it successfully to
  populate data in a DataGrid. When I added multiple modules and 
menu, I

  modified DataManage and might have missed either some sequence or
  properties.
 
  I am using only one menu which is the starting page. Main Application
  call this page(view as this page and Eventmap) then event is
  dispatched from this module to get the data for menu. I have added
  addEventListener(MenuEvent.ITEM_CLICK,onMenuClick) to call the other
  modules(component) attached to menu items. Hope this is appropriate.
  Now my concern is every called module(mxml component) as well as menu
  using the same webservice and same method with different arguments.
  Does this need a separate event handler for each module(component) as
  it is doing for menu(given below) and in the SAME eventmap. Do I need
  to write a separate method in DataManger for each result handler. One
  module may have more than one operation (fetch and save). My worry is
  it will become huge if I add 150 screens and 100 reports. Is there 
any

  way to make event handler generic and same with DataManger. Please
  suggest. I am new to both OOP and Flex.
 
  EventHandlers type={GetDataEvent.GET_M} debug=true
  WebServiceInvoker wsdl=http://10d/MyApps/App?WSDL 
http://10d/MyApps/App?WSDL

  http://10d/MyApps/App?WSDL http://10d/MyApps/App?WSDL
  method=mtExecute
  arguments={[SessionManager.dbSessionID, event.dbParam]}
  debug=true
  resultHandlers
  !-- parse the results --
  MethodInvoker generator={DataManager} method=saveMenuData
  arguments={resultObject} /
  EventAnnouncer generator={GetDataEvent}
  type={EventSequenceDispatcher.EVENT_FINISHED} /
  /resultHandlers
  /WebServiceInvoker
  /EventHandlers
 
  --- In flexcoders@yahoogroups.com 
mailto:flexcoders%40yahoogroups.com

  mailto:flexcoders%40yahoogroups.com, Wally Kolcz wkolcz@ wrote:
  
   If you created an ArrayCollection in your DataManager, did you set
  it to
   [Bindable]? The AC doesn't care where it is injected or into what
   

[flexcoders] Problem sorting AdvancedDataGrid

2010-04-21 Thread Tom McNeer
Hi,

I have read posts in this group, as well as many blog entries, regarding the
frequent need to manually sort the items in an AdvancedDataGrid when the
underlying data changes. ((I'm using SDK 3.5.)

And I have instances of the ADG where I have, in fact, successfully created
and used a sort that fires when the underlying data provider changes.

But I've got one now that just doesn't want to work, and I think the problem
must lie somehow in the grouping that goes on after the data provider is
refreshed.

In short, here's the scenario. I have an ArrayCollection that represents a
flat data hierarchy. In each item of the AC, there is a ProcedureID. There
may be multiple Items for a Procedure, so you may typically have four or
five items in the AC with the same ProcedureID, but differing ItemIDs.

The GroupingCollection is set around the ProcedureID, and the idea is that
the sort should be on the ProcedureID descending.

Here's the sort function that fires on data change. The GroupingCollection
is rc. The ADG is requestGrid.


public function refreshGrid(e:Event):void{
rc.refresh();
requestGrid.validateNow();
var sort:Sort = new Sort();
sort.fields = [new SortField(ProcedureID,false,true)];
IHierarchicalCollectionView(requestGrid.dataProvider).sort =
sort;
IHierarchicalCollectionView(requestGrid.dataProvider).refresh();
}



When I step through this in the debugger, I can see that the sort is created
correctly, and that the data provider is sorted and refreshed. But then the
grid shows its contents in an apparently random order. The parent-child
items in the grid are grouped correctly, but the ordering is incorrect.

Can someone suggest how to troubleshoot this further, please?

-- 
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.com
1735 Johnson Road NE
Atlanta, GA 30306
404.589.0560


[flexcoders] Re: What is the Correct Type of Component For This?

2010-04-21 Thread James
I originally considered using a repeater inside a h box to repeat all of the 
items but the problem is a repeater doesn't allow items to be selected 
otherwise it would be perfect. You see I have a filter function that has been 
applied to my links based on what category item is selected.

Overall what it needs to do is this:-

- Have no blue theme boxes
- Autoresize based on how many items are in it
- On application complete all of the images in it are converted to greyscale 
(as shown in my pic)
- The text and image of each item in it must glow and convert to colour as they 
are hovered over and convert back to greyscale and unglow as they are 
unhoevered over (again this can be seen in my app)

All of the above effects are simple with static components but they are pretty 
much impossible to apply to a component that has the selcteditem/index 
properties i.e. is populated via a dataprovider.

I wish the repeater component had a selected item property as I think that'd 
work.

--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 I have never tried to do anything like this but just thinking off the top of 
 my head...
 
 Try skinning components in Flex. 
 http://www.davidflatley.com/2007/12/17/programmatic-button-skins-in-flex-3/ 
 may be a good starting point.
 
 Look at using DeGrafa (http://www.degrafa.org) and/or ScaleNine 
 (http://www.scalenine.com) to skin components. 
 
 Have multiple sizes of graphics available and check the width of the screen 
 and the number of icons and pick an appropriate size to show.
 
 --- In flexcoders@yahoogroups.com, James garymoorcroft_ict@ wrote:
 
  Heres an image of my icons which is basically what I'm after.
  
  http://i223.photobucket.com/albums/dd147/jimmyoneshot/theicons.jpg
  
  The only difference is these are all just static ones I put in myself, now 
  I need them to be dynamic i.e. the user can add and remove icons which is 
  why I need it to resize. I've found a way of getting a tilelist to 
  autoresize but there is a problem witrh this.
  
  I also want them to have a glow effect as you can see there. In that last 
  version on application complete all of those images were converted to 
  greyscale then got converted to color when each one was hovered over. I 
  need to achieve this same effect again but I'm not sure if a tilelist can 
  achieve this either as it simply has that dull blue theme box. I know this 
  box can be removed using actionscript but how can one add in the glow 
  effect to a tilelist hovered  over item?
  
  --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
  
   Take a look at SuperTabNavigator which is part of FlexLib 
   (http://code.google.com/p/flexlib/). From your description, it looks like 
   it would do the trick.
   
   --- In flexcoders@yahoogroups.com, James garymoorcroft_ict@ wrote:
   
I'm lost as to what component to use for navigation within my 
application. Across the top of my app I want something which 
horizontally displays a list of categories which the user can click to 
select. This is fine if I use a tilelist but I also want to allow my 
client to add and remove categories and for the width of the component 
to adjust so that new categories fit in but it seems impossible to 
apply fit to content to a tilelist the way you can to a hbox which 
obviously means scrollbars will appear and if you switch the scroll 
policy off this simply means any added categories won't be visible if 
they are past the set width.

If a hbox had a selecteditem property that would be perfect. Is there 
any such way of getting a component to work like this?
   
  
 





[flexcoders] Check if route has point (Google maps)

2010-04-21 Thread gabriela.perry
Hello

I wanted to know if there´s a way to see if a route has a point.
For example: my route goes from A to B, passing through C, and I want to see if 
points D and E are inside it.

I never worked with the GMaps API before, but I read the docs and found nothing 
that could solve this problem.

If GMpas can´t really work this out, do you guys know any solution (whatever 
server/client side, language and cost), so I can see if this is a solvable 
problem?

Thanx in advance



[flexcoders] Re: What is the Correct Type of Component For This?

2010-04-21 Thread valdhor
A...Why do you say repeater items can't be selected?

I built a custom component that responds to a mouse click and then repeat this 
component multiple times using a repeater from data that is returned from my 
server (Essentially this is a list of regions containing customers. Each user 
is only authorized to see specific regions/customers so the number of custom 
components repeated is set from this data).

The custom component is fully self contained and responds to mouse clicks. If 
the underlying application needs to know about the clicks, I dispatch a 
bubbling event which the app listens for.

So, in your case create a custom component with your different skins 
(greyscal/colored). The component should contain multiple sizes of images as 
well as a public var to set the size. The app should know the stage size as 
well as the number of items to display (From the server call). In your 
repeater, set the public var to the size you need. Each custom component can 
have its own overskin etc and respond appropriately as well as its own event 
listener for mouse clicks.

--- In flexcoders@yahoogroups.com, James garymoorcroft_...@... wrote:

 I originally considered using a repeater inside a h box to repeat all of the 
 items but the problem is a repeater doesn't allow items to be selected 
 otherwise it would be perfect. You see I have a filter function that has been 
 applied to my links based on what category item is selected.
 
 Overall what it needs to do is this:-
 
 - Have no blue theme boxes
 - Autoresize based on how many items are in it
 - On application complete all of the images in it are converted to greyscale 
 (as shown in my pic)
 - The text and image of each item in it must glow and convert to colour as 
 they are hovered over and convert back to greyscale and unglow as they are 
 unhoevered over (again this can be seen in my app)
 
 All of the above effects are simple with static components but they are 
 pretty much impossible to apply to a component that has the selcteditem/index 
 properties i.e. is populated via a dataprovider.
 
 I wish the repeater component had a selected item property as I think that'd 
 work.
 
 --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
 
  I have never tried to do anything like this but just thinking off the top 
  of my head...
  
  Try skinning components in Flex. 
  http://www.davidflatley.com/2007/12/17/programmatic-button-skins-in-flex-3/ 
  may be a good starting point.
  
  Look at using DeGrafa (http://www.degrafa.org) and/or ScaleNine 
  (http://www.scalenine.com) to skin components. 
  
  Have multiple sizes of graphics available and check the width of the screen 
  and the number of icons and pick an appropriate size to show.
  
  --- In flexcoders@yahoogroups.com, James garymoorcroft_ict@ wrote:
  
   Heres an image of my icons which is basically what I'm after.
   
   http://i223.photobucket.com/albums/dd147/jimmyoneshot/theicons.jpg
   
   The only difference is these are all just static ones I put in myself, 
   now I need them to be dynamic i.e. the user can add and remove icons 
   which is why I need it to resize. I've found a way of getting a tilelist 
   to autoresize but there is a problem witrh this.
   
   I also want them to have a glow effect as you can see there. In that last 
   version on application complete all of those images were converted to 
   greyscale then got converted to color when each one was hovered over. I 
   need to achieve this same effect again but I'm not sure if a tilelist can 
   achieve this either as it simply has that dull blue theme box. I know 
   this box can be removed using actionscript but how can one add in the 
   glow effect to a tilelist hovered  over item?
   
   --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
   
Take a look at SuperTabNavigator which is part of FlexLib 
(http://code.google.com/p/flexlib/). From your description, it looks 
like it would do the trick.

--- In flexcoders@yahoogroups.com, James garymoorcroft_ict@ wrote:

 I'm lost as to what component to use for navigation within my 
 application. Across the top of my app I want something which 
 horizontally displays a list of categories which the user can click 
 to select. This is fine if I use a tilelist but I also want to allow 
 my client to add and remove categories and for the width of the 
 component to adjust so that new categories fit in but it seems 
 impossible to apply fit to content to a tilelist the way you can to 
 a hbox which obviously means scrollbars will appear and if you switch 
 the scroll policy off this simply means any added categories won't be 
 visible if they are past the set width.
 
 If a hbox had a selecteditem property that would be perfect. Is there 
 any such way of getting a component to work like this?

   
  
 





Re: [flexcoders] Re: What is the Correct Type of Component For This?

2010-04-21 Thread Oleg Sivokon
Well, if the objective is to not write the components yourself, then I'd
look into:
ASDocs for available styling for the existing components
Tweener / TweenLight / TweenMax and similar. I think they have the effects
you are talking about out of the box.


[flexcoders] Re: What is the Correct Type of Component For This?

2010-04-21 Thread James
That does sound like essentially what I'm after yes but the problem is I'm not 
sure how to actually do it as I have zero experience at 1. bubbling and 2. 
creating custom components :'-( Plus I think the answer may be within an edited 
tilelist component now.

What I've managed to get so far (from another site) is a custom component based 
on a tilelist with my item renderer added into it. It has the blue themed 
rollover and selection squares completely removed for both rollover and 
selection but what I need to do is edit this code to instead do what I've 
described i.e. selection itself produces no visual effects but whilst an item 
is hovered over it's image converts to colour and it's image and label glows 
and when it is unhovered over the image returns to greyscale and all glow 
effects stop. Can you help me with this by any chance or point out what I would 
have to do to this code to achieve my own such component that allows the visual 
effects I need? I have some glow/unglow effects aswell as converttogreyscale 
and converttocolor effects from previous apps :-) Here's the code I've got for 
the component:-

?xml version=1.0 encoding=utf-8?
mx:TileList xmlns:mx=http://www.adobe.com/2006/mxml;
   mx:itemRenderer
   mx:Component
mx:Canvas width=125 height=145
mx:Image source={data.icon} height=64 width=64 
top=10 horizontalCenter=0/
mx:Label text={data.label} bottom=1 
horizontalCenter=0 color=#FF fontWeight=bold fontSize=12/ 
/mx:Canvas
   /mx:Component
   /mx:itemRenderer

mx:Script
![CDATA[
import mx.core.EdgeMetrics;
import mx.core.IFlexDisplayObject;
import mx.skins.halo.ListDropIndicator;
import mx.events.DragEvent;
import mx.controls.listClasses.IListItemRenderer;
use namespace mx_internal;
 
override protected function drawSelectionIndicator(
indicator:Sprite, x:Number, y:Number,
width:Number, height:Number, color:uint,
itemRenderer:IListItemRenderer):void
{

}
 
 
// Remove the Selection indicator
override protected function drawHighlightIndicator(
indicator:Sprite, x:Number, y:Number,
width:Number, height:Number, color:uint,
itemRenderer:IListItemRenderer):void
{

}
 
]] 
/mx:Script

/mx:TileList

Thanks for your help so far.

--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 A...Why do you say repeater items can't be selected?
 
 I built a custom component that responds to a mouse click and then repeat 
 this component multiple times using a repeater from data that is returned 
 from my server (Essentially this is a list of regions containing customers. 
 Each user is only authorized to see specific regions/customers so the number 
 of custom components repeated is set from this data).
 
 The custom component is fully self contained and responds to mouse clicks. If 
 the underlying application needs to know about the clicks, I dispatch a 
 bubbling event which the app listens for.
 
 So, in your case create a custom component with your different skins 
 (greyscal/colored). The component should contain multiple sizes of images as 
 well as a public var to set the size. The app should know the stage size as 
 well as the number of items to display (From the server call). In your 
 repeater, set the public var to the size you need. Each custom component can 
 have its own overskin etc and respond appropriately as well as its own event 
 listener for mouse clicks.
 
 --- In flexcoders@yahoogroups.com, James garymoorcroft_ict@ wrote:
 
  I originally considered using a repeater inside a h box to repeat all of 
  the items but the problem is a repeater doesn't allow items to be selected 
  otherwise it would be perfect. You see I have a filter function that has 
  been applied to my links based on what category item is selected.
  
  Overall what it needs to do is this:-
  
  - Have no blue theme boxes
  - Autoresize based on how many items are in it
  - On application complete all of the images in it are converted to 
  greyscale (as shown in my pic)
  - The text and image of each item in it must glow and convert to colour as 
  they are hovered over and convert back to greyscale and unglow as they are 
  unhoevered over (again this can be seen in my app)
  
  All of the above effects are simple with static components but they are 
  pretty much impossible to apply to a component that has the 
  selcteditem/index properties i.e. is populated via a dataprovider.
  
  I wish the repeater component had a 

[flexcoders] Re: Problem sorting AdvancedDataGrid

2010-04-21 Thread tntomek
If im not mistaken, debuggin through GroupingCollection, the part where it 
actually creates the subgrouped nodes (or leaf nodes), you will notice sort is 
not used on those sub array collections. GC is a really worthwhile class to 
understand if you are dealing with hierarchical data, it's overwhelming at 
first but stick to it. You might have to tweak it a bit to force it to sort the 
sub collections.

I'm using quite large groups at times and actually took GC2 from Flex 4. So far 
so good, there is nothing Flex 4 specific about that class.

-Tom (http://tomek.me)

--- In flexcoders@yahoogroups.com, Tom McNeer tmcn...@... wrote:

 Hi,
 
 I have read posts in this group, as well as many blog entries, regarding the
 frequent need to manually sort the items in an AdvancedDataGrid when the
 underlying data changes. ((I'm using SDK 3.5.)
 
 And I have instances of the ADG where I have, in fact, successfully created
 and used a sort that fires when the underlying data provider changes.
 
 But I've got one now that just doesn't want to work, and I think the problem
 must lie somehow in the grouping that goes on after the data provider is
 refreshed.
 
 In short, here's the scenario. I have an ArrayCollection that represents a
 flat data hierarchy. In each item of the AC, there is a ProcedureID. There
 may be multiple Items for a Procedure, so you may typically have four or
 five items in the AC with the same ProcedureID, but differing ItemIDs.
 
 The GroupingCollection is set around the ProcedureID, and the idea is that
 the sort should be on the ProcedureID descending.
 
 Here's the sort function that fires on data change. The GroupingCollection
 is rc. The ADG is requestGrid.
 
 
 public function refreshGrid(e:Event):void{
 rc.refresh();
 requestGrid.validateNow();
 var sort:Sort = new Sort();
 sort.fields = [new SortField(ProcedureID,false,true)];
 IHierarchicalCollectionView(requestGrid.dataProvider).sort =
 sort;
 IHierarchicalCollectionView(requestGrid.dataProvider).refresh();
 }
 
 
 
 When I step through this in the debugger, I can see that the sort is created
 correctly, and that the data provider is sorted and refreshed. But then the
 grid shows its contents in an apparently random order. The parent-child
 items in the grid are grouped correctly, but the ordering is incorrect.
 
 Can someone suggest how to troubleshoot this further, please?
 
 -- 
 Thanks,
 
 Tom
 
 Tom McNeer
 MediumCool
 http://www.mediumcool.com
 1735 Johnson Road NE
 Atlanta, GA 30306
 404.589.0560





[flexcoders] Re: Problems With my XML Created Array Collection

2010-04-21 Thread Amy


--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 James
 
 First off, I would not use AMFPHP as it is deprecated in favor of ZendAMF 
 (Part of Zend Framework). I found WebORB much easier to integrate than 
 ZendAMF.
 
 With WebORB you use Object Oriented PHP. You create data transfer classes in 
 both Flex and PHP and map them to each other. then you use class hinting in 
 PHP to receive data from Flex.
 
 You can definitely send the arraycollection to PHP. It will arrive as an 
 array of objects.
 
 One thing I think you should look into is SharedObjects in Flex. This allows 
 you to save data to the local machine (Kind of like cookies but you have 100K 
 of space you can use) and is very useful to hold these kinds of preferences.

I would disagree that AMFPHP is deprecated... They just released a new version 
in February.

-Amy



[flexcoders] Re: Problems With my XML Created Array Collection

2010-04-21 Thread Amy


--- In flexcoders@yahoogroups.com, James garymoorcroft_...@... wrote:

 Hi Amy. Sorry I missed your post yesterday. e4x does seem good but I was just 
 a little bit worried about implementing it. As a flex beginner I tend to 
 stick to the traditional most widely used methods of doing things as a lot of 
 the times I work by looking at previous examples and applying them to my own 
 code and it's hard to find examples of things such as handling results of e4x 
 etc.

Hi, James;

If you want to do things in the traditional most widely used method, then you 
_definitely_ want to go with using e4x.  To be blunt, what Robert has told you 
to do is a newbie workaround, which could easily have been avoided by just 
using e4x.  It's unfortunate that object is the default return type for 
HTTPService, but it's very easy and quick to figure out how to fix it, 
especially if you read the FAQ's for this group.

When you have a ton of extra code to implement an unnecessary workaround, it's 
just that much more code to maintain, bloats your file size, and slows 
performance.  And, as Tracy says, in this particular instance, you also risk 
your data integrity.

If you're worried about working with e4x, I found this guide very helpful when 
I first was learning it http://dispatchevent.org/roger/as3-e4x-rundown/.

However, I'd agree with Steve that if you need to pass data both ways, you're 
probably better off using RPC remoting.  If you're interested in AMFPHP, you 
can get a fully working example here: 
http://flexdiary.blogspot.com/2009/01/lazy-loading-tree-example-file-posted.html

HTH;

Amy



[flexcoders] Re: Exceeding Flash's Capabilities?

2010-04-21 Thread jer_ela
I've never tried to display more than 20 or so series, but I do have an app 
that has 5692 records with 4 series each for a total of 17076 data points. It 
is displayed in a bar chart.  Well it isn't actually displayed since that's 
about 17 bars per pixel, but the bars are actually there and you get data tips 
when you mouse over where the bars should be.  I hide the chart from users when 
there is too much data, and show them the data in a data grid .  But when the 
data is filtered down to around 3 or 4 bars per pixel the chart updates and the 
bars display.  

So while there is too much data to actually plot due to the limitations of the 
screen there is no problem working with it in Flex and I am able to display it 
in a data grid with no problem.  In fact the the 6000 records I end up with are 
the end result of some complex processing of 30 K objects of various types.

Sounds like your users want a plot of a plate of spaghetti.

--- In flexcoders@yahoogroups.com, trefalgar trefal...@... wrote:

 66 line series with 218 plot points each for a total of 14388 plot points, if 
 we're looking for specifics. It's a lot of data that doesn't look 
 particularly good because of the sheer volume, but it's what they want.
 
 I'm using a line chart. Using AMF3 to retrieve the data. The time it takes to 
 query the data, or transmit the data, isn't an issue. Also, the problem 
 doesn't happen over time, it could be the first request someone makes on the 
 application - I don't believe it's a memory leak.
 
 The method used to populate the graph is thus:
 
 var ls:LineSeries = new LineSeries();
 ls.dataProvider = data[o];
ls.yField = counter;
ls.xField = dtime;
ls.displayName = o.valueOf();
if ( circleplots.selected ) {
   ls.setStyle('itemRenderer', new ClassFactory(CircleItemRenderer));
}
   var currentSeries:Array = linechart1.series;
 currentSeries.push(ls);
 linechart1.series = currentSeries;
 
 Storing the data in an internal array, and possibly sending it to the clip 
 board isn't a big issue. It's trying to display that much data within a flex 
 construct that causes the problem(s).
 
 Jacob
 
 --- In flexcoders@yahoogroups.com, Richard Rodseth rrodseth@ wrote:
 
  How many items are you (and the Excel user) talking about?
  What sort of Flex charts are you using?
  Are you using AMF, XML or JSON to retrieve the data?
  
  On Wed, Apr 14, 2010 at 3:48 PM, trefalgar trefalgar@ wrote:
  
  
  
   The majority of my flex work revolves around graphing data. If for some
   reason a user picks a lot of statistics to graph, over an even longer 
   period
   of time, the amount of data that comes back to the Flash application
   overwhelms flash, consuming all of the boxes resources and regularly
   crashing the browser.
  
   Is there anything in the developers bag of tricks to help with this kind 
   of
   problem, or is the sheer amount of data too much for the
   application/SDK/solution to handle?
  
   I understand I can put a limit on the amount of data returned, but as the
   user states, I can pull it out of the database, via Excel, and it works.
  
   Tref
  

  
 





[flexcoders] Re: How to clear cache for all major browsers (IE, Mozilla, Safari and Chrome)

2010-04-21 Thread handitan
Bump this thread up to see if other people has any opinion on this.

Thx for reading!

--- In flexcoders@yahoogroups.com, handitan handi@... wrote:

 Thx Tracy!
 
 I have a diff question relating to this caching issue.
 My app is composed with a main-swf, a library-swf, and several module-swfs.
 
 To my understanding, this incrementing-build-version solution only applies to 
 the main-swf.
 So that means the library-swf and module-swfs that I updated would be loaded 
 from the browser-cache instead of from the server.
 Is my understanding correct?
 
 Thx! 
 
 
 --- In flexcoders@yahoogroups.com, Tracy Spratt tracy@ wrote:
 
  Yes.  Manually incrementing the version at each build will be more work for
  you, but will be a better experience for your users.
  
   
  
  Tracy Spratt,
  
  Lariat Services, development services available
  
_  
  
  From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
  Behalf Of handitan
  Sent: Monday, April 19, 2010 8:17 PM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Re: How to clear cache for all major browsers (IE,
  Mozilla, Safari and Chrome)
  
   
  

  
  Hi Cato or anyone,
  
  Where do you put that change?
  Is it on this part of index.template.html?
  
  else if (hasRequestedVersion) {
  // if we've detected an acceptable version
  // embed the Flash Content SWF when all tests are passed
  AC_FL_RunContent(
  src, ${swf}?version=1.0,
  width, ${width},
  height, ${height},
  
  Thanks for the help!
  
  --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com,
  Cato Paus cato1@ wrote:
  
   Or just do this 
   
   src, ${swf}?version=1.0,
   
   and increment it each time you crate a new build, I have filed a request
  to adobe about this issue
   https://bugs. https://bugs.adobe.com/jira/browse/FB-16764
  adobe.com/jira/browse/FB-16764 
   go and vote for it :)
   
   
   
   
   --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com,
  Tracy Spratt tspratt@ wrote:
   
The only reliable, cross platform/browser solution I have seen is to
  append
a unique string to the swf url. Modify the index.template like this:

AC_FL_RunContent(

src, ${swf}?nocache=+(new
Date()).getTime(),



It does make that app slow to load every time.



Tracy Spratt,

Lariat Services, development services available

_ 

From: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com
  [mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com]
  On
Behalf Of anuj181
Sent: Tuesday, March 17, 2009 7:32 PM
To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com
Subject: [flexcoders] How to clear cache for all major browsers (IE,
Mozilla, Safari and Chrome)



Hi Guys
Anyone has any idea which is the best way to clear the cache for my web
application (which is made in Flex and PHP), For some reason it keeps on
pulling old entries from cache and is confusing user and me with the
inconsistent results, I guess that it is pulling values from the cache
  as
everything works fine when I manually clear the cache.I did little
  research
and tried following tags in the index.template.html but somehow it is
  not
working efficiently , Whats the best way to clear the cache for all the
major browsers (IE, Mozilla, Safari and Chrome) for my web application?
Anyone has any idea?
Thanks in advance for your help,

head
meta http-equiv=Content-Type content=text/html; charset=utf-8 /
meta http-equiv=Pragma content=no-cache /
meta http-equiv=Expires content=-1 /
/head
   
  
 





[flexcoders] Security error !!!

2010-04-21 Thread Mihai C
Hi!

 

I made a Flex3+J2EE project.

 

The flex app is on http://custom.starlinginteractive.com/michebag/index.html

OnCreationComplete of the application I made

Security.loadPolicyFile(http://www.custommiche.com/crossdomain.xml;);

The hosting site is http://www.custommiche.com/ and use SXORCH API.

and have crossdomain.xml on http://www.custommiche.com/crossdomain.xml

 

If press Add to cart - Next Step - Goto checkout I receive a Security error!

 

Why I still receive this error?

 

Thanks

Mihai



[flexcoders] FB4: Create screenshot (bitmap) from loaded swf

2010-04-21 Thread azona26

I am loading an external swf into  my flex application using the SWF
Loader. Once loaded, I would like to  capture/copy the SWF into a bitmap
and then unload the original swf. I  only need/want to capture the image
(1st frame) of the SWF as opposed to  the having the SWF play in my Flex
application. I have tried the  following but doesn't work as it appears
the entire swf is still loaded:


 var bitmapData:BitmapData = new BitmapData( 125, 125
);
 var swfLoader:SWFLoader = new SWFLoader()

 bitmapData.draw( IBitmapDrawable( swfLoader ));
 swfBitmap = new Bitmap( bitmapData );
 swfLoader.source = swfBitmap;
 addElement( swfLoader )



I have also  tried loading the external swf using Loader and then upon
completion  executing the bitmap code setting bitmapData.draw to
loader.content.



Thanks for any and all replies.



[flexcoders] SWFAddress anchor tags and broken preloaders

2010-04-21 Thread Patrick
Eh, I hate the issue where the flex preloader is broken when an anchor tag is 
used, Plugin meh

Is there a way to make a preloader in javascript for a flex app.  

Why are things so F*N difficult?

Thanks for your help, another frustrated developer like *YOU*




[flexcoders] Efficient SOAP WebService invocation

2010-04-21 Thread sasuke

Hi all,

In my application, each server data request creates a new WebService object,
sets the wsdl url and loads the wsdl. I feel that repeating these three
steps for each web service call carries a certain performance penalty in
terms of loading the WSDL, parsing operations and so on. This is pretty
evident given that the jittery user interaction when fetching server data.

Is there any way I can optimize this? The most obvious solution here seems
to be to load the URL only once and retrieve the Operation object from the
WebService object each time a web service call is made. Does this idea sound
good or are there any problems associated with it?

Any clarifications or suggestions on how to tackle this situation would be
much appreciated.

TIA,
sasuke
-- 
View this message in context: 
http://old.nabble.com/Efficient-SOAP-WebService-invocation-tp28288046p28288046.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Re: Problems With my XML Created Array Collection

2010-04-21 Thread valdhor
Amy

That I didn't know. AMFPHP is probably a viable option then, especially seeing 
as it is being updated.

I left AMFPHP behind once I went with WebORB and have never looked back until 
now.

--- In flexcoders@yahoogroups.com, Amy amyblankens...@... wrote:

 
 
 --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
 
  James
  
  First off, I would not use AMFPHP as it is deprecated in favor of ZendAMF 
  (Part of Zend Framework). I found WebORB much easier to integrate than 
  ZendAMF.
  
  With WebORB you use Object Oriented PHP. You create data transfer classes 
  in both Flex and PHP and map them to each other. then you use class hinting 
  in PHP to receive data from Flex.
  
  You can definitely send the arraycollection to PHP. It will arrive as an 
  array of objects.
  
  One thing I think you should look into is SharedObjects in Flex. This 
  allows you to save data to the local machine (Kind of like cookies but you 
  have 100K of space you can use) and is very useful to hold these kinds of 
  preferences.
 
 I would disagree that AMFPHP is deprecated... They just released a new 
 version in February.
 
 -Amy





Re: [flexcoders] Re: Problem sorting AdvancedDataGrid

2010-04-21 Thread Tom McNeer
Hi Tom,

Thanks for the reply.

On Wed, Apr 21, 2010 at 10:18 AM, tntomek tnto...@yahoo.com wrote:

  the part where it actually creates the subgrouped nodes (or leaf nodes),
 you will notice sort is not used on those sub array collections.


Actually, though, my sort is breaking down earlier - on the main nodes of
the group. It's the absolute top level of grouping where the sort is being
ignored.

Any thoughts about that?


 GC is a really worthwhile class to understand if you are dealing with
 hierarchical data, it's overwhelming at first but stick to it. You might
 have to tweak it a bit to force it to sort the sub collections.


 I'm using quite large groups at times and actually took GC2 from Flex 4. So
 far so good, there is nothing Flex 4 specific about that class.

So using that class creates correct sorting?

As I say, the part that I don't understand is why the main groups aren't
sorted correctly. Similar sorts have worked for me in other ADGs.

-- 
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.com
1735 Johnson Road NE
Atlanta, GA 30306
404.589.0560


[flexcoders] Security error !!!

2010-04-21 Thread Mihai C
Hi!


I made a Flex3+J2EE project.


The flex app is on http://custom.swfsitedomain.com/swfapp/index.html

OnCreationComplete of the application I made

Security.loadPolicyFile(http://www.hostsitedomain.com/crossdomain.xml;);

The hosting site is http://www.hostsitedomain.com/ and use SXORCH API.

and have crossdomain.xml on http://www.hostsitedomain.com/crossdomain.xml


When I try to access from swfsitedomain a link from hostsitedomain I get an 
security violation sandbox.


Why I still receive this error?


Thanks

Mihai



Re: [flexcoders] Re: How to clear cache for all major browsers (IE, Mozilla, Safari and Chrome)

2010-04-21 Thread Wally Kolcz

Firefox = Tools  Clear Recent History  Today

On 4/21/2010 11:04 AM, handitan wrote:


Bump this thread up to see if other people has any opinion on this.

Thx for reading!

--- In flexcoders@yahoogroups.com 
mailto:flexcoders%40yahoogroups.com, handitan handi@... wrote:


 Thx Tracy!

 I have a diff question relating to this caching issue.
 My app is composed with a main-swf, a library-swf, and several 
module-swfs.


 To my understanding, this incrementing-build-version solution only 
applies to the main-swf.
 So that means the library-swf and module-swfs that I updated would 
be loaded from the browser-cache instead of from the server.

 Is my understanding correct?

 Thx!


 --- In flexcoders@yahoogroups.com 
mailto:flexcoders%40yahoogroups.com, Tracy Spratt tracy@ wrote:

 
  Yes. Manually incrementing the version at each build will be more 
work for

  you, but will be a better experience for your users.
 
 
 
  Tracy Spratt,
 
  Lariat Services, development services available
 
  _
 
  From: flexcoders@yahoogroups.com 
mailto:flexcoders%40yahoogroups.com 
[mailto:flexcoders@yahoogroups.com 
mailto:flexcoders%40yahoogroups.com] On

  Behalf Of handitan
  Sent: Monday, April 19, 2010 8:17 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
  Subject: [flexcoders] Re: How to clear cache for all major 
browsers (IE,

  Mozilla, Safari and Chrome)
 
 
 
 
 
  Hi Cato or anyone,
 
  Where do you put that change?
  Is it on this part of index.template.html?
 
  else if (hasRequestedVersion) {
  // if we've detected an acceptable version
  // embed the Flash Content SWF when all tests are passed
  AC_FL_RunContent(
  src, ${swf}?version=1.0,
  width, ${width},
  height, ${height},
 
  Thanks for the help!
 
  --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com 
ups.com,

  Cato Paus cato1@ wrote:
  
   Or just do this
  
   src, ${swf}?version=1.0,
  
   and increment it each time you crate a new build, I have filed a 
request

  to adobe about this issue
   https://bugs. https://bugs.adobe.com/jira/browse/FB-16764 
https://bugs.adobe.com/jira/browse/FB-16764

  adobe.com/jira/browse/FB-16764
   go and vote for it :)
  
  
  
  
   --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com 
ups.com,

  Tracy Spratt tspratt@ wrote:
   
The only reliable, cross platform/browser solution I have seen 
is to

  append
a unique string to the swf url. Modify the index.template like 
this:

   
AC_FL_RunContent(
   
src, ${swf}?nocache=+(new
Date()).getTime(),
   
   
   
It does make that app slow to load every time.
   
   
   
Tracy Spratt,
   
Lariat Services, development services available
   
_
   
From: flexcod...@yahoogro 
mailto:flexcoders%40yahoogroups.com ups.com
  [mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com 
ups.com]

  On
Behalf Of anuj181
Sent: Tuesday, March 17, 2009 7:32 PM
To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com 
ups.com
Subject: [flexcoders] How to clear cache for all major 
browsers (IE,

Mozilla, Safari and Chrome)
   
   
   
Hi Guys
Anyone has any idea which is the best way to clear the cache 
for my web
application (which is made in Flex and PHP), For some reason 
it keeps on
pulling old entries from cache and is confusing user and me 
with the
inconsistent results, I guess that it is pulling values from 
the cache

  as
everything works fine when I manually clear the cache.I did little
  research
and tried following tags in the index.template.html but 
somehow it is

  not
working efficiently , Whats the best way to clear the cache 
for all the
major browsers (IE, Mozilla, Safari and Chrome) for my web 
application?

Anyone has any idea?
Thanks in advance for your help,
   
head
meta http-equiv=Content-Type content=text/html; /
meta http-equiv=Pragma content=no-cache /
meta http-equiv=Expires content=-1 /
/head
   
  
 







Re: [flexcoders] FB4: Create screenshot (bitmap) from loaded swf

2010-04-21 Thread Oleg Sivokon
With Loader you'd need to call (content as MovieClip).stop(), unload() or
unloadAndStop() - depends on player version. Be aware that images that
originate from other application domains are subject to security
restrictions.


[flexcoders] as 2 to as 3 question

2010-04-21 Thread markflex2007
I need convert as 2 to as 3.

which functions in as3 are same with following functions in as 2

   _loc1 = attachMovie(movie, movie, depth);
_loc1.gotoAndPlay(frame);
_loc1.easeSpeed = easeSpeed;
_loc1._y = yPosInit;
_loc1.yTo = yTo;

Do you think if some tool can do the convert automatically.

Thanks

Mark



Re: [flexcoders] Efficient SOAP WebService invocation

2010-04-21 Thread Oleg Sivokon
Speaking of optimization, SOAP is a shot in your own foot :) However, if
given no choice, I'd go with something similar to decorators.
That is, I'd have an AS3 webservice extending class that would allow to set
/ reset the functional part of it.
Example:

class DecoratedService extends WebService {

public function set decorator(value:IServiceDecorator):void {
this._decorator = value; }

private var _busy:Boolean;
private var _queur:Array = [];

public function call(who:String, whatToSay:Array):Boolean
{
if (this._busy) _queue.push(arguments);
else
{
this._decorator[who].apply(this._decorator, whatToSay);
this._busy = true;
}
}

private function resultHandler(event:Event):void
{
if (this._queue.length  2) this._busy = false;
this.call.apply(this, this._queue.shift());
}
// same for result handler

Sorry, I was typing it right here, but the idea should be visible :)

Best.

Oleg


[flexcoders] Problem with Cairngorm as RSL inside Flex 3.5 / Air 1.5 application

2010-04-21 Thread julrich_ts
Hi everybody,I have a problem with using Cairngorm as RSL for an
AIR-application.We need to use Cairngorm as RSL inside the
Air-application because we cannot deploy Cairngorm with the application
itself (especially not compiled into it) because of legal reasons
(support for components that are part of the official rollout).RSLs seem
like a good place to look, but unfortunately I ran into some problems
while switching everything from Merged into code to Runtime shared
library (RSL).I switched the external libraries to Link Type: Runtime
shared library (RSL) and also changed the Framework linkage to
Runtime shared library (RSL).The problem I run into is expressed
through the following exception:

VerifyError: Error #1014: Class mx.rpc.soap::WebService could not be
found. at global$init() at
_com_sap_coe_microloanmanagement_business_ServicesWatcherSetupUtil$/init\
() at
mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::d\
ocFrameHandler()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\
\managers\SystemManager.as:3217] at
mx.managers::SystemManager/docFrameListener()[C:\autobuild\3.5.0\framewo\
rks\projects\framework\src\mx\managers\SystemManager.as:3069]

After researching for quite some time, it seems this may have something
to do with dependencies or the load order of the RSLs, exemplary
described here:

https://bugs.adobe.com/jira/browse/SDK-24747?page=com.atlassian.jira.plu\
gin.system.issuetabpanels%3Acomment-tabpanel
and here:
https://bugs.adobe.com/jira/browse/FB-11222

The problem vanishes when I switch to the Flex 4 SDK, but unfortunately
we need to stay on Flex 3.5. This also hints at a depedency / load order
problem, as one of the bugs above was fixed for Flex 4 / Flash Builder
4.If I create a new project in Flash Builder 4, adding exactly the same
swc-components as RSLs with nothing inside the MainApplication.mxml, I
can start the project just fine. Further looking into it, I can run our
project, too, if I remove all the controllers and the
service-definitions from the main-.mxml-file.Has anybody ever run into
such problems and knows where the error happens, or how to fix it. It
would be greatly appreciated!My setup is as follows:
* Flash Builder 4
* Flex SDK 3.5
* Air 1.5
* Cairngorm 2.2.1
If I forgot something important, I'll be glad to add it.with kind
regards,Jonas


[flexcoders] Re: What is the Correct Type of Component For This?

2010-04-21 Thread dannyvenier
Why not use a tileList or if spark, a List with tile layout.  You can use a 
custom itemrenderer which can re-render when additional buttons are added and 
in rendering, can determine the optimum size based on running an algorithm on 
your dataprovider.  There are all sorts of edge conditions to worry about (what 
if the total text width exceeds that of your container etc., etc.., but those 
have to be dealt with in any case, and I imagine you need a custom renderer 
anyway, to build your list items.



--- In flexcoders@yahoogroups.com, James garymoorcroft_...@... wrote:

 I'm lost as to what component to use for navigation within my application. 
 Across the top of my app I want something which horizontally displays a list 
 of categories which the user can click to select. This is fine if I use a 
 tilelist but I also want to allow my client to add and remove categories and 
 for the width of the component to adjust so that new categories fit in but it 
 seems impossible to apply fit to content to a tilelist the way you can to a 
 hbox which obviously means scrollbars will appear and if you switch the 
 scroll policy off this simply means any added categories won't be visible if 
 they are past the set width.
 
 If a hbox had a selecteditem property that would be perfect. Is there any 
 such way of getting a component to work like this?





[flexcoders] Pb with a Carousel

2010-04-21 Thread Christophe
Hello, 

I use a 3D carousel made by dougmccune.

In a new Flex Project the Carousel is working, but when I copy the code in my 
application, it is very slow. 

What could be the problem ?

Thank you,
Christophe Jacquelin,




Re: [flexcoders] TitleWindow.title won't update from a setter

2010-04-21 Thread Alex Harui
Interesting.  Try calling validateNow after addPopUp.


On 4/21/10 2:55 AM, Nick Middleweek n...@middleweek.co.uk wrote:






Hi,

When tracing the setter, it is definately getting called. I'm currently just 
trying to set this.title from the iFormID setter.

Here's my setup...

I have an MXML ArrayCollection with the CreateVendorDialog component inside of 
the Array so it's created but not displayed (not sure if this is goood practice 
but I picked it up along somewhere :) The component ID=createVendor)

In my main Application I have a controlbar with two buttons, Create Vendor 
and Create Vendor from iForm, they both call the same function but one passes 
an extra string.

private function createVendorDialog(iFormID : String = ) : void
{
   createVendor.iFormID = iFormID;
   PopupManager.addPopUp(createVendor);
   //createVendor.title  = test;
}

The iFormID setter is getting called and this.title is being set but it's not 
rendering. The only way I can get it working is to put this code in the 
TitleWindow MXML component but that's a bit hacky isn't it?...

mx:TitleWindow
title = {(iFormID.length  0) ? 'Create Vendor by iForm' : 
'Create Vendor'}
.
.
.
 /

Perhaps I need to take a step back somewhere?...


Thanks,
Nick



On 21 April 2010 07:39, Alex Harui aha...@adobe.com wrote:





Are you sure your setter is getting called?  If so, when is it called?  Maybe 
it is being called inside commitProperties after super.commitProperties.



On 4/20/10 3:07 PM, Nick Middleweek n...@middleweek.co.uk 
http://n...@middleweek.co.uk  wrote:






Hi,

I've got a small MXML Component based on TitleWindow which I'm opening with 
PopupManager that has a setter and getter called iFormID.

In the setter I have this code...

public function set iFormID ( value : String ) : void
{
if ( _iFormID == value )
return;

_iFormID = value;


if(iFormID.length  0)
{
this.title = Create Vendor;
}
else
{
this.title = Create Vendor by iForm;
}

}


I am find that the title remains blank, but then if I close the PopUp and open 
it again, the last value the .title should have been is now visible...

Is there some a refresh issue with TitleWindow.title?

If I set the .title outside of the component, after I've used PopupManager, 
then it's set as expected but I want to control the .title from the setter 
function.


Does anyone have an idea what I should be doing?

I've also tried setting a dirty_flag, calling invalidateProperties() and 
setting the .title from within commitProperties() but no joy there either...


Thanks for any help...
Nick






--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui


[flexcoders] Re: What is the Correct Type of Component For This?

2010-04-21 Thread James
Yes but it's the glow effect that I require. when each item is hovered over it 
needs to glow rather than just having the blue themed square. Have you got any 
idea how to do this?

--- In flexcoders@yahoogroups.com, dannyvenier dannyven...@... wrote:

 Why not use a tileList or if spark, a List with tile layout.  You can use a 
 custom itemrenderer which can re-render when additional buttons are added and 
 in rendering, can determine the optimum size based on running an algorithm on 
 your dataprovider.  There are all sorts of edge conditions to worry about 
 (what if the total text width exceeds that of your container etc., etc.., but 
 those have to be dealt with in any case, and I imagine you need a custom 
 renderer anyway, to build your list items.
 
 
 
 --- In flexcoders@yahoogroups.com, James garymoorcroft_ict@ wrote:
 
  I'm lost as to what component to use for navigation within my application. 
  Across the top of my app I want something which horizontally displays a 
  list of categories which the user can click to select. This is fine if I 
  use a tilelist but I also want to allow my client to add and remove 
  categories and for the width of the component to adjust so that new 
  categories fit in but it seems impossible to apply fit to content to a 
  tilelist the way you can to a hbox which obviously means scrollbars will 
  appear and if you switch the scroll policy off this simply means any added 
  categories won't be visible if they are past the set width.
  
  If a hbox had a selecteditem property that would be perfect. Is there any 
  such way of getting a component to work like this?
 





Re: [flexcoders] as 2 to as 3 question

2010-04-21 Thread Oleg Sivokon
You have already found a tool to decompile it, try finding an tool that will
code that for you too ;)


[flexcoders] Re: What is the Correct Type of Component For This?

2010-04-21 Thread valdhor
OK, I did some googling and this looks like exactly what you are after...

http://flexaired.blogspot.com/2008/07/sample-image-tile-list.html

--- In flexcoders@yahoogroups.com, James garymoorcroft_...@... wrote:

 Yes but it's the glow effect that I require. when each item is hovered over 
 it needs to glow rather than just having the blue themed square. Have you got 
 any idea how to do this?
 
 --- In flexcoders@yahoogroups.com, dannyvenier dannyvenier@ wrote:
 
  Why not use a tileList or if spark, a List with tile layout.  You can use a 
  custom itemrenderer which can re-render when additional buttons are added 
  and in rendering, can determine the optimum size based on running an 
  algorithm on your dataprovider.  There are all sorts of edge conditions to 
  worry about (what if the total text width exceeds that of your container 
  etc., etc.., but those have to be dealt with in any case, and I imagine you 
  need a custom renderer anyway, to build your list items.
  
  
  
  --- In flexcoders@yahoogroups.com, James garymoorcroft_ict@ wrote:
  
   I'm lost as to what component to use for navigation within my 
   application. Across the top of my app I want something which horizontally 
   displays a list of categories which the user can click to select. This is 
   fine if I use a tilelist but I also want to allow my client to add and 
   remove categories and for the width of the component to adjust so that 
   new categories fit in but it seems impossible to apply fit to content 
   to a tilelist the way you can to a hbox which obviously means scrollbars 
   will appear and if you switch the scroll policy off this simply means any 
   added categories won't be visible if they are past the set width.
   
   If a hbox had a selecteditem property that would be perfect. Is there any 
   such way of getting a component to work like this?
  
 





Re: [flexcoders] TitleWindow.title won't update from a setter

2010-04-21 Thread Nick Middleweek
Alex,

That has fixed it but has now made me realise I'm initialising my private
var _iFormID : String = ;

And the first time I was opening the Popup, I was setting the .iFormID = ,
so the setter was *not* getting called. I'm now initialising it to null and
it's working fine...


Thanks for your help...


Nick




On 21 April 2010 18:09, Alex Harui aha...@adobe.com wrote:



 Interesting.  Try calling validateNow after addPopUp.



[flexcoders] Re: What is the Correct Type of Component For This?

2010-04-21 Thread James
Thanks so much for helping me out valdhor. I've been racking my brains trying 
to find it. I've even been trying to draw circles which glow inside the 
drawselectionindicator of my tilelist component but that would look a bit bland 
and is a pain to position them.

In that code you found there are 2 very interesting lines of code mainly those 
which relate to the image inside of his item renderer abd the code which they 
are pointing to for their glow effect:-

mx:Image id=myImage source={data.image} width=100 height=100 
alpha=0.6 
rollOutEffect={outerDocument.myOut} rollOverEffect={outerDocument.myOver}/ 

And this:-

mx:Parallel id=myOver 
mx:Blur blurXFrom=30 blurYFrom=30 / 
mx:Fade alphaFrom=0.6 alphaTo=1 / 
mx:Resize widthTo=150 heightTo=150 easingFunction=Back.easeOut/ 
mx:Glow alphaTo=20 blurYTo=20 blurXTo=20 color=0x00ff00 / 
/mx:Parallel 

I'm assuming that if I can incorporate my effects into that code then I'll be 
able to do the same. At least I hope. But what exactly does outerdocument mean? 
I've came across it but never used it and I also have what a parallel is but if 
it works I could care less :-)

Thanks for being so helpful. I'll let you know how it goes here.

--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 OK, I did some googling and this looks like exactly what you are after...
 
 http://flexaired.blogspot.com/2008/07/sample-image-tile-list.html
 
 --- In flexcoders@yahoogroups.com, James garymoorcroft_ict@ wrote:
 
  Yes but it's the glow effect that I require. when each item is hovered over 
  it needs to glow rather than just having the blue themed square. Have you 
  got any idea how to do this?
  
  --- In flexcoders@yahoogroups.com, dannyvenier dannyvenier@ wrote:
  
   Why not use a tileList or if spark, a List with tile layout.  You can use 
   a custom itemrenderer which can re-render when additional buttons are 
   added and in rendering, can determine the optimum size based on running 
   an algorithm on your dataprovider.  There are all sorts of edge 
   conditions to worry about (what if the total text width exceeds that of 
   your container etc., etc.., but those have to be dealt with in any case, 
   and I imagine you need a custom renderer anyway, to build your list items.
   
   
   
   --- In flexcoders@yahoogroups.com, James garymoorcroft_ict@ wrote:
   
I'm lost as to what component to use for navigation within my 
application. Across the top of my app I want something which 
horizontally displays a list of categories which the user can click to 
select. This is fine if I use a tilelist but I also want to allow my 
client to add and remove categories and for the width of the component 
to adjust so that new categories fit in but it seems impossible to 
apply fit to content to a tilelist the way you can to a hbox which 
obviously means scrollbars will appear and if you switch the scroll 
policy off this simply means any added categories won't be visible if 
they are past the set width.

If a hbox had a selecteditem property that would be perfect. Is there 
any such way of getting a component to work like this?
   
  
 





[flexcoders] Re: What is the Correct Type of Component For This?

2010-04-21 Thread valdhor
I also looked at TourDeFlex to get some ideas.

Here is a small example that I created that shows how to create a custom
component as well as do the Glow effect on an image. (I got the image
from downloading the file inside TourDeFlex under Glow):

Application:
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=vertical verticalAlign=top
 horizontalAlign=center
backgroundGradientColors=[0x00,0x323232] paddingTop=0
 xmlns:components = *
 mx:Script
 ![CDATA[
 [Bindable] private var dp:Array = [
 {text: First, image: helmet},
 {text: Second, image: helmet},
 {text: Third, image: helmet},
 {text: Fourth, image: helmet},
 {text: Fifth, image: helmet}
 ];
 ]]
 /mx:Script
 mx:HBox
 mx:Repeater id=myImages dataProvider={dp}
 components:MyImageComponent
theItem={myImages.currentItem}/
 /mx:Repeater
 /mx:HBox
/mx:Application

MyImageComponent.mxml
?xml version=1.0 encoding=utf-8?
mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml;
horizontalAlign=center width=200 height=200
 creationComplete=onCreationComplete()
 mx:Script
 ![CDATA[
 public var theItem:Object;
 [Bindable] private var imageLocation:String;

 private function onCreationComplete():void
 {
 thisText.text = theItem.text;
 thisImage.source = images/ + theItem.image + .png;
 }
 ]]
 /mx:Script
 mx:Image id=thisImage rollOverEffect={glowImage}
rollOutEffect={unglowImage}
 autoLoad=true/
 mx:Text id=thisText fontSize=24/
 mx:Glow id=glowImage duration=1000 alphaFrom=1.0
alphaTo=0.3 blurXFrom=0.0
 blurXTo=50.0 blurYFrom=0.0 blurYTo=50.0 color=0x22A050/
 mx:Glow id=unglowImage duration=1000 alphaFrom=0.3
alphaTo=1.0 blurXFrom=50.0
 blurXTo=0.0 blurYFrom=50.0 blurYTo=0.0 color=0x3380DD/
/mx:VBox


BTW. I only found one png image so I used it repeatedly. Also, I have
only one size. You should make multiple sizes and place them in the
images folder. You should also set the width and height inside the
custom component depending on the size you want (I have them hard coded
in my example). Then you would pass a size to the custom component by
exposing a public variable and use a switch statement to select the
correct size.

HTH




Steve



--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 OK, I did some googling and this looks like exactly what you are
after...

 http://flexaired.blogspot.com/2008/07/sample-image-tile-list.html

 --- In flexcoders@yahoogroups.com, James garymoorcroft_ict@ wrote:
 
  Yes but it's the glow effect that I require. when each item is
hovered over it needs to glow rather than just having the blue themed
square. Have you got any idea how to do this?
 
  --- In flexcoders@yahoogroups.com, dannyvenier dannyvenier@
wrote:
  
   Why not use a tileList or if spark, a List with tile layout.  You
can use a custom itemrenderer which can re-render when additional
buttons are added and in rendering, can determine the optimum size based
on running an algorithm on your dataprovider.  There are all sorts of
edge conditions to worry about (what if the total text width exceeds
that of your container etc., etc.., but those have to be dealt with in
any case, and I imagine you need a custom renderer anyway, to build your
list items.
  
  
  
   --- In flexcoders@yahoogroups.com, James garymoorcroft_ict@
wrote:
   
I'm lost as to what component to use for navigation within my
application. Across the top of my app I want something which
horizontally displays a list of categories which the user can click to
select. This is fine if I use a tilelist but I also want to allow my
client to add and remove categories and for the width of the component
to adjust so that new categories fit in but it seems impossible to apply
fit to content to a tilelist the way you can to a hbox which obviously
means scrollbars will appear and if you switch the scroll policy off
this simply means any added categories won't be visible if they are past
the set width.
   
If a hbox had a selecteditem property that would be perfect. Is
there any such way of getting a component to work like this?
   
  
 




[flexcoders] Images not getting reloaded when source changes?

2010-04-21 Thread Peter Davis
I'm trying to fix a *very* simply app. that just displays some images, 
and is supposed to refresh the images when their URL parameters change.  
In particular, these are supposed to be images of data tables, and the 
query string specifies a table style, a text color and a border color.  
The tables display correctly when loaded, but they don't respond when I 
change the source URLs.  I've verified that the sourceChange event is 
triggered.  I even put the new URL into a TextInput control, and 
verified that this URL works (display the correct table) in another 
browser tab.  But the images in the Flex app don't ever change.


Thanks for any suggestions.

Here's the whole thing:


?xml version=1.0 encoding=utf-8?
s:Application xmlns:fx=http://ns.adobe.com/mxml/2009 
http://ns.adobe.com/mxml/2009
   xmlns:s=library://ns.adobe.com/flex/spark 
http://ns.adobe.com/flex/spark
   xmlns:mx=library://ns.adobe.com/flex/mx 
http://ns.adobe.com/flex/mx minWidth=800 minHeight=600

fx:Script
![CDATA[
import mx.events.ColorPickerEvent;
import mx.controls.Alert;

private function imgInit(s:int):void
{
switch (s)
{
case 1:
table1.addEventListener(
sourceChanged, image_sourceChanged);
break;

case 3:
table3.addEventListener(sourceChanged, 
image_sourceChanged);

break;

case 5:
table5.addEventListener(sourceChanged, 
image_sourceChanged);

break;

default:
}
}

private function image_sourceChanged(evt:Event):void
{
Alert.show(evt.toString() + \nSrc:  + 
Image(evt.target).source, evt.type);

}

public var colorArr:Array =[0x231F20, 0x9E280E, 
0x8A713C, 0x007236, 0x007D97,
2E3092, 0x5D1E79, 0x4C4C4E, 0x88191C, 
0xF5821F, 0x727C28, 0x1E9860,
00837D, 0x0071BC, 0x7C51A1, 0x939598, 
0xED1C24, 0xFCAF17, 0xA5A85A,
57BD7C, 0x57C5C7, 0x00AEEF, 0xAA4A9C, 
0xA7A9AC, 0xEC008C, 0xFFCE71,
FFF200, 0xBED630, 0x95D5D1, 0x42C7F4, 
0xBC7BB5, 0xDCDDDE, 0xF49AC1,
FEDCC6, 0xFFF78F, 0xE5F0CB, 0xE2F3F4, 
0x9FC9EB, 0xC7B2D6, 0xFF];
var urlBase:String = http://localhost.us/viewtable.aspx 
http://localhost.us/viewtable.aspx;

var textColorIndex:uint = 0;
var textColor:String = 00;
var borderColorIndex:uint = 0;
var borderColor = 00;

protected function updateTables():void
{
//url1.text = urlBase + ?styleIndex=1textColor=%23 + 
textColor + borderColor=%23 + borderColor;
table1.source = urlBase + ?styleIndex=1textColor=%23 
+ textColor + borderColor=%23 + borderColor;

url1.text = String(table1.source);
table1.load(String(table1.source));
table3.source = urlBase + ?styleIndex=3textColor=%23 
+ textColor + borderColor=%23 + borderColor;

table3.load(String(table3.source));
table5.source = urlBase + ?styleIndex=5textColor=%23 
+ textColor + borderColor=%23 + borderColor;

table5.load(String(table5.source));
}

protected function 
textColor_changeHandler(event:ColorPickerEvent):void

{
textColorIndex = ColorPicker(event.target).selectedIndex;
var fullName:String = colorArr[textColorIndex];
textColor = fullName.substr(2);
updateTables()
}

protected function 
borderColor_changeHandler(event:ColorPickerEvent):void

{
borderColorIndex = ColorPicker(event.target).selectedIndex;
var fullName:String = colorArr[borderColorIndex];
borderColor = fullName.substr(2);
updateTables();
}

]]
/fx:Script
fx:Declarations
!-- Place non-visual elements (e.g., services, value objects) here --
/fx:Declarations
s:Label x=25 y=30 text=Table Test fontSize=24 fontWeight=bold/
s:Label x=42 y=73 text=Text color:#xd;/
mx:ColorPicker x=109 y=63 dataProvider={colorArr} 
change=textColor_changeHandler(event)/

s:Label x=25 y=113 text=Border color:#xd;/
mx:ColorPicker x=109 y=103 dataProvider={colorArr} 
change=borderColor_changeHandler(event)/

s:TextInput id=url1 x=25 y=145 width=600 text=/
mx:Image id=table1 x=25 y=185 initialize=imgInit(1); 
source=http://localhost.us/viewtable.aspx?styleIndex=1 
http://localhost.us/viewtable.aspx?styleIndex=1/

!--
mx:Image id=table1 x=25 y=185 
source=http://localhost.us/viewtable.aspx?styleIndex=1 
http://localhost.us/viewtable.aspx?styleIndex=1/

--
mx:Image id=table3 x=25 y=335 
source=http://localhost.us/viewtable.aspx?styleIndex=3 

[flexcoders] Re: What is the Correct Type of Component For This?

2010-04-21 Thread James
Another superb example mate. Thanks a lot. That's a great use of a 
repeater/custom component. I don't need to worry about width as if I used that 
I could probably leave the width out and allow it t auto adjust based on the 
size of my text. Plus the images I'm using are already up on the net and are 
all 64X64 icon pngs so I don't have to worry about accomodating for image size 
either. Plus if I allow my client to add new categories I'll limit the amount 
of characters they can enter into the category names and add a function in so 
that if they upload a new category image it will be scaled to 64x64 anyway. 
I've been working on the tilelist custom component based on the last example 
you gave me and came up with this so far:-

?xml version=1.0 encoding=utf-8?
mx:TileList xmlns:mx=http://www.adobe.com/2006/mxml;
   mx:itemRenderer
   mx:Component
mx:Canvas width=125 height=145
mx:Image id=im rollOverEffect={outerDocument.glow} 
rollOutEffect={outerDocument.unglow} 
source={'http://www.coolvisiontest.com/interfaceimages/images/'+data.icon+'.png'}
 height=64 width=64 top=10 horizontalCenter=0/
mx:Label id=lab text={data.label} 
rollOverEffect={outerDocument.glow} rollOutEffect={outerDocument.unglow} 
horizontalCenter=0 color=#FF fontWeight=bold fontSize=12 
bottom=1/   
/mx:Canvas
   /mx:Component
   /mx:itemRenderer

mx:Glow id=glow duration=100 alphaFrom=0 alphaTo=1 blurXFrom=0.0 
blurXTo=30.0 blurYFrom=0.0 blurYTo=30.0 strength=2 color=0x14b8fc/   
 
mx:Glow id=unglow duration=150 alphaFrom=1 alphaTo=0 
blurXFrom=30.0 blurXTo=0.0 blurYFrom=30.0 blurYTo=0.0 strength=2 
color=0x14b8fc/

mx:Script
![CDATA[

import mx.core.EdgeMetrics;
import mx.core.IFlexDisplayObject;
import mx.skins.halo.ListDropIndicator;
import mx.events.DragEvent;
import mx.controls.listClasses.IListItemRenderer;
use namespace mx_internal;
 
override protected function drawSelectionIndicator(
indicator:Sprite, x:Number, y:Number,
width:Number, height:Number, color:uint,
itemRenderer:IListItemRenderer):void
{

}
  
override protected function drawHighlightIndicator(
indicator:Sprite, x:Number, y:Number,
width:Number, height:Number, color:uint,
itemRenderer:IListItemRenderer):void
{

}
 
]] 
/mx:Script

/mx:TileList

The problem is though the way I want it to work is when a user hovers over the 
image both the text AND the image glow the same for when they hover over the 
text. It doesn't seem like I can do this with that previous example because it 
seem impossible to target components inside an item renderer otherwise I would 
have simply been able to apply multiple targets (the image and the label) to 
the glow effect and unglow effect. Also in that previous example it seemed 
impossible to implement my convert to greyscale and convert to color effects as 
they are basically code rather than inbuilt effects like the glow effect is.

It seems these would all be applicable to your recent example though so I'll 
try it out now and see if I can fit it all in there. Can't believe how helpful 
you've been. Thanks again. I'll let you know how it goes.

--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 I also looked at TourDeFlex to get some ideas.
 
 Here is a small example that I created that shows how to create a custom
 component as well as do the Glow effect on an image. (I got the image
 from downloading the file inside TourDeFlex under Glow):
 
 Application:
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=vertical verticalAlign=top
  horizontalAlign=center
 backgroundGradientColors=[0x00,0x323232] paddingTop=0
  xmlns:components = *
  mx:Script
  ![CDATA[
  [Bindable] private var dp:Array = [
  {text: First, image: helmet},
  {text: Second, image: helmet},
  {text: Third, image: helmet},
  {text: Fourth, image: helmet},
  {text: Fifth, image: helmet}
  ];
  ]]
  /mx:Script
  mx:HBox
  mx:Repeater id=myImages dataProvider={dp}
  components:MyImageComponent
 theItem={myImages.currentItem}/
  /mx:Repeater
  /mx:HBox
 /mx:Application
 
 MyImageComponent.mxml
 ?xml version=1.0 encoding=utf-8?
 mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml;
 horizontalAlign=center width=200 height=200
  

[flexcoders] Re: How to clear cache for all major browsers (IE, Mozilla, Safari and Chrome)

2010-04-21 Thread handitan
You're not reading the qs correctly.

I am reposting my qs here:
I have a diff question relating to this caching issue.
My app is composed with a main-swf, a library-swf (RSL), and several 
module-swfs.

To my understanding, this incrementing-build-version solution only 
applies to the main-swf.
So that means the library-swf and module-swfs that I updated would 
be loaded from the browser-cache instead of from the server.
Is my understanding correct?

Thx!

--- In flexcoders@yahoogroups.com, Wally Kolcz wko...@... wrote:

 Firefox = Tools  Clear Recent History  Today
 
 On 4/21/2010 11:04 AM, handitan wrote:
 
  Bump this thread up to see if other people has any opinion on this.
 
  Thx for reading!
 
  --- In flexcoders@yahoogroups.com 
  mailto:flexcoders%40yahoogroups.com, handitan handi.tan@ wrote:
  
   Thx Tracy!
  
   I have a diff question relating to this caching issue.
   My app is composed with a main-swf, a library-swf, and several 
  module-swfs.
  
   To my understanding, this incrementing-build-version solution only 
  applies to the main-swf.
   So that means the library-swf and module-swfs that I updated would 
  be loaded from the browser-cache instead of from the server.
   Is my understanding correct?
  
   Thx!
  
  
   --- In flexcoders@yahoogroups.com 
  mailto:flexcoders%40yahoogroups.com, Tracy Spratt tracy@ wrote:
   
Yes. Manually incrementing the version at each build will be more 
  work for
you, but will be a better experience for your users.
   
   
   
Tracy Spratt,
   
Lariat Services, development services available
   
_
   
From: flexcoders@yahoogroups.com 
  mailto:flexcoders%40yahoogroups.com 
  [mailto:flexcoders@yahoogroups.com 
  mailto:flexcoders%40yahoogroups.com] On
Behalf Of handitan
Sent: Monday, April 19, 2010 8:17 PM
To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
Subject: [flexcoders] Re: How to clear cache for all major 
  browsers (IE,
Mozilla, Safari and Chrome)
   
   
   
   
   
Hi Cato or anyone,
   
Where do you put that change?
Is it on this part of index.template.html?
   
else if (hasRequestedVersion) {
// if we've detected an acceptable version
// embed the Flash Content SWF when all tests are passed
AC_FL_RunContent(
src, ${swf}?version=1.0,
width, ${width},
height, ${height},
   
Thanks for the help!
   
--- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com 
  ups.com,
Cato Paus cato1@ wrote:

 Or just do this

 src, ${swf}?version=1.0,

 and increment it each time you crate a new build, I have filed a 
  request
to adobe about this issue
 https://bugs. https://bugs.adobe.com/jira/browse/FB-16764 
  https://bugs.adobe.com/jira/browse/FB-16764
adobe.com/jira/browse/FB-16764
 go and vote for it :)




 --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com 
  ups.com,
Tracy Spratt tspratt@ wrote:
 
  The only reliable, cross platform/browser solution I have seen 
  is to
append
  a unique string to the swf url. Modify the index.template like 
  this:
 
  AC_FL_RunContent(
 
  src, ${swf}?nocache=+(new
  Date()).getTime(),
 
 
 
  It does make that app slow to load every time.
 
 
 
  Tracy Spratt,
 
  Lariat Services, development services available
 
  _
 
  From: flexcod...@yahoogro 
  mailto:flexcoders%40yahoogroups.com ups.com
[mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com 
  ups.com]
On
  Behalf Of anuj181
  Sent: Tuesday, March 17, 2009 7:32 PM
  To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com 
  ups.com
  Subject: [flexcoders] How to clear cache for all major 
  browsers (IE,
  Mozilla, Safari and Chrome)
 
 
 
  Hi Guys
  Anyone has any idea which is the best way to clear the cache 
  for my web
  application (which is made in Flex and PHP), For some reason 
  it keeps on
  pulling old entries from cache and is confusing user and me 
  with the
  inconsistent results, I guess that it is pulling values from 
  the cache
as
  everything works fine when I manually clear the cache.I did little
research
  and tried following tags in the index.template.html but 
  somehow it is
not
  working efficiently , Whats the best way to clear the cache 
  for all the
  major browsers (IE, Mozilla, Safari and Chrome) for my web 
  application?
  Anyone has any idea?
  Thanks in advance for your help,
 
  head
  meta http-equiv=Content-Type content=text/html; /
  meta http-equiv=Pragma content=no-cache /
  meta http-equiv=Expires content=-1 /
  /head
 

   
  
 
 





[flexcoders] Re: What is the Correct Type of Component For This?

2010-04-21 Thread James
Valdhor I've implemented the code from the last example you gave me and 
visually I have it working perfectly now, converting to color/grayscale, 
glowing/unglowing everything. I only have one problem with it which is I'm 
totally unsure as to how to get it to simulate the selecteditem click in the 
app itsef. You see previously I used a combobox as my category navigation/links 
filterer which had the index 0 set as the default selected item and as the user 
clicked each combobox item it filtered the links data within my links tilelist. 
How can I implement the selected item property into the repeater so that as the 
user clicks on each item it is set as the selected item the way it would be in 
a combobox/tilelist?

You see the problem is I have a filter function which gets applied to my links 
tilelist array collection dataprovider which was previously (when I used the 
combobox) set to:-

if(category.categoryid == 
categorySelectorDropdown.selectedItem.categoryid) { 
return true; 
}
else{ 
return false; 
} 
}

So as you can see without being able to have a selected item property I can't 
use this filter function effectively :-( Sorry to be a pain but it's just that 
I remember you mentioned you used a repeater which simulated a tilelist 
selecteditem click and I was wondering how this could be done with my code so 
the repeater we have acted in this way?

--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 I also looked at TourDeFlex to get some ideas.
 
 Here is a small example that I created that shows how to create a custom
 component as well as do the Glow effect on an image. (I got the image
 from downloading the file inside TourDeFlex under Glow):
 
 Application:
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=vertical verticalAlign=top
  horizontalAlign=center
 backgroundGradientColors=[0x00,0x323232] paddingTop=0
  xmlns:components = *
  mx:Script
  ![CDATA[
  [Bindable] private var dp:Array = [
  {text: First, image: helmet},
  {text: Second, image: helmet},
  {text: Third, image: helmet},
  {text: Fourth, image: helmet},
  {text: Fifth, image: helmet}
  ];
  ]]
  /mx:Script
  mx:HBox
  mx:Repeater id=myImages dataProvider={dp}
  components:MyImageComponent
 theItem={myImages.currentItem}/
  /mx:Repeater
  /mx:HBox
 /mx:Application
 
 MyImageComponent.mxml
 ?xml version=1.0 encoding=utf-8?
 mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml;
 horizontalAlign=center width=200 height=200
  creationComplete=onCreationComplete()
  mx:Script
  ![CDATA[
  public var theItem:Object;
  [Bindable] private var imageLocation:String;
 
  private function onCreationComplete():void
  {
  thisText.text = theItem.text;
  thisImage.source = images/ + theItem.image + .png;
  }
  ]]
  /mx:Script
  mx:Image id=thisImage rollOverEffect={glowImage}
 rollOutEffect={unglowImage}
  autoLoad=true/
  mx:Text id=thisText fontSize=24/
  mx:Glow id=glowImage duration=1000 alphaFrom=1.0
 alphaTo=0.3 blurXFrom=0.0
  blurXTo=50.0 blurYFrom=0.0 blurYTo=50.0 color=0x22A050/
  mx:Glow id=unglowImage duration=1000 alphaFrom=0.3
 alphaTo=1.0 blurXFrom=50.0
  blurXTo=0.0 blurYFrom=50.0 blurYTo=0.0 color=0x3380DD/
 /mx:VBox
 
 
 BTW. I only found one png image so I used it repeatedly. Also, I have
 only one size. You should make multiple sizes and place them in the
 images folder. You should also set the width and height inside the
 custom component depending on the size you want (I have them hard coded
 in my example). Then you would pass a size to the custom component by
 exposing a public variable and use a switch statement to select the
 correct size.
 
 HTH
 
 
 
 
 Steve
 
 
 
 --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
 
  OK, I did some googling and this looks like exactly what you are
 after...
 
  http://flexaired.blogspot.com/2008/07/sample-image-tile-list.html
 
  --- In flexcoders@yahoogroups.com, James garymoorcroft_ict@ wrote:
  
   Yes but it's the glow effect that I require. when each item is
 hovered over it needs to glow rather than just having the blue themed
 square. Have you got any idea how to do this?
  
   --- In flexcoders@yahoogroups.com, dannyvenier dannyvenier@
 wrote:
   
Why not use a tileList or if spark, a List with tile layout.  You
 can use a custom itemrenderer which can re-render when additional
 buttons are added and in rendering, can determine the optimum size based
 on running an algorithm on your dataprovider.  There are all sorts of
 edge conditions to worry 

Re: [flexcoders] Drag and drop vs scrolling

2010-04-21 Thread Richard Rodseth
Thanks. I was able to fix the highlighting issue by modifying some code that
used listData.rowIndex to use  calculateDropIndex() instead. Autoscroll
doesn't work, but I can live with that.

On Tue, Apr 20, 2010 at 11:41 PM, Alex Harui aha...@adobe.com wrote:



 Some folks have tried making the renderer a drop target in order to add
 different meaning to dropping in folders.  In theory it should work, but I
 think I’d work from the Tree instead, and then I would expect autoscroll to
 work.



 On 4/20/10 3:31 PM, Richard Rodseth rrods...@gmail.com wrote:






 I inherited some code which supports drag and drop from a list to a
 node of a tree. Unfortunately it does not work when the tree is
 scrolled.
 Not only does the tree not autoscroll, but even if you scroll the
 target item into view before beginning the drag, incorrect nodes
 highlight.

 I didn't see any code that's doing coordinate transformations, but did
 notice that there is a custom TreeItemRenderer, which contains the
 listeners for dragEnter etc.
 I'm guessing this is the root of the problem, since renderers are recycled.

 I've no idea why things were done this way, and am wondering if this
 is a legitimate idiom, or if I need to start over with listeners
 defined at the Tree level.

 Also, is autoscroll supported if you do things the right way?





 --
 Alex Harui
 Flex SDK Team
 Adobe System, Inc.
 http://blogs.adobe.com/aharui
  



[flexcoders] Re: Efficient SOAP WebService invocation

2010-04-21 Thread Mike
Once created, the WebService and Operation objects can be used many times, 
including multiple concurrent invocations.

I am putting together a manuscript on enterprise-grade web services.  You can 
track progress at http://slinnbooks.com and/or follow me on twitter: mslinn.

Mike



[flexcoders] Re: What is the Correct Type of Component For This?

2010-04-21 Thread James
Basically what I mean is I previously had a combo box populated by an array 
collection that contained the property categoryid and a tilelist populated by 
an array collection that also contained the property category id. So therefore 
when a user selected an item in the tilelist only the items that had a 
categoryid which matched the category id of that selected item were shown 
within the tilelist. Is this possible to implement into this new example?

--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 I also looked at TourDeFlex to get some ideas.
 
 Here is a small example that I created that shows how to create a custom
 component as well as do the Glow effect on an image. (I got the image
 from downloading the file inside TourDeFlex under Glow):
 
 Application:
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=vertical verticalAlign=top
  horizontalAlign=center
 backgroundGradientColors=[0x00,0x323232] paddingTop=0
  xmlns:components = *
  mx:Script
  ![CDATA[
  [Bindable] private var dp:Array = [
  {text: First, image: helmet},
  {text: Second, image: helmet},
  {text: Third, image: helmet},
  {text: Fourth, image: helmet},
  {text: Fifth, image: helmet}
  ];
  ]]
  /mx:Script
  mx:HBox
  mx:Repeater id=myImages dataProvider={dp}
  components:MyImageComponent
 theItem={myImages.currentItem}/
  /mx:Repeater
  /mx:HBox
 /mx:Application
 
 MyImageComponent.mxml
 ?xml version=1.0 encoding=utf-8?
 mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml;
 horizontalAlign=center width=200 height=200
  creationComplete=onCreationComplete()
  mx:Script
  ![CDATA[
  public var theItem:Object;
  [Bindable] private var imageLocation:String;
 
  private function onCreationComplete():void
  {
  thisText.text = theItem.text;
  thisImage.source = images/ + theItem.image + .png;
  }
  ]]
  /mx:Script
  mx:Image id=thisImage rollOverEffect={glowImage}
 rollOutEffect={unglowImage}
  autoLoad=true/
  mx:Text id=thisText fontSize=24/
  mx:Glow id=glowImage duration=1000 alphaFrom=1.0
 alphaTo=0.3 blurXFrom=0.0
  blurXTo=50.0 blurYFrom=0.0 blurYTo=50.0 color=0x22A050/
  mx:Glow id=unglowImage duration=1000 alphaFrom=0.3
 alphaTo=1.0 blurXFrom=50.0
  blurXTo=0.0 blurYFrom=50.0 blurYTo=0.0 color=0x3380DD/
 /mx:VBox
 
 
 BTW. I only found one png image so I used it repeatedly. Also, I have
 only one size. You should make multiple sizes and place them in the
 images folder. You should also set the width and height inside the
 custom component depending on the size you want (I have them hard coded
 in my example). Then you would pass a size to the custom component by
 exposing a public variable and use a switch statement to select the
 correct size.
 
 HTH
 
 
 
 
 Steve
 
 
 
 --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
 
  OK, I did some googling and this looks like exactly what you are
 after...
 
  http://flexaired.blogspot.com/2008/07/sample-image-tile-list.html
 
  --- In flexcoders@yahoogroups.com, James garymoorcroft_ict@ wrote:
  
   Yes but it's the glow effect that I require. when each item is
 hovered over it needs to glow rather than just having the blue themed
 square. Have you got any idea how to do this?
  
   --- In flexcoders@yahoogroups.com, dannyvenier dannyvenier@
 wrote:
   
Why not use a tileList or if spark, a List with tile layout.  You
 can use a custom itemrenderer which can re-render when additional
 buttons are added and in rendering, can determine the optimum size based
 on running an algorithm on your dataprovider.  There are all sorts of
 edge conditions to worry about (what if the total text width exceeds
 that of your container etc., etc.., but those have to be dealt with in
 any case, and I imagine you need a custom renderer anyway, to build your
 list items.
   
   
   
--- In flexcoders@yahoogroups.com, James garymoorcroft_ict@
 wrote:

 I'm lost as to what component to use for navigation within my
 application. Across the top of my app I want something which
 horizontally displays a list of categories which the user can click to
 select. This is fine if I use a tilelist but I also want to allow my
 client to add and remove categories and for the width of the component
 to adjust so that new categories fit in but it seems impossible to apply
 fit to content to a tilelist the way you can to a hbox which obviously
 means scrollbars will appear and if you switch the scroll policy off
 this simply means any added categories won't be visible if they are past
 the set width.

 If a hbox had a selecteditem property that would be perfect. Is
 there any such way 

Re: [flexcoders] Re: How to clear cache for all major browsers (IE, Mozilla, Safari and Chrome)

2010-04-21 Thread vijay chaudhary
Following code when run with flash 9.0.24 shows ADG grid lines properly.
Scroll to the very end horizontally.
Same code run with 10.0.0 and up makes the grid lines disappear towards the
end. Scroll to the very end horizontally.

Is this a bug with newer flash version(s). If so how could this be fixed.






?xml version=1.0 encoding=utf-8?
mx:Application width=100% height=100%
xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute
creationComplete=init()
mx:Canvas width=100% height=100%
mx:Script
![CDATA[
import mx.controls.advancedDataGridClasses.AdvancedDataGridColumnGroup;
import mx.controls.advancedDataGridClasses.AdvancedDataGridColumn;
private function init() : void {
var colsReportGrid:Array = reportGrid.groupedColumns;
var arr1:Array = [Test1, Test2, Test3];
var arr2:Array = [Sample1, Sample2, Sample3];
for each (var test:String in arr1) {
var colTest:AdvancedDataGridColumnGroup = new
AdvancedDataGridColumnGroup(test);
for each(var sample:String in arr2) {
var colSample:AdvancedDataGridColumnGroup = new
AdvancedDataGridColumnGroup(sample);
colSample.children = getDataColumns();
colTest.children.push(colSample);
}
colsReportGrid.push(colTest);
}
reportGrid.groupedColumns = colsReportGrid;

}
private function getDataColumns() : Array {

var colMed:AdvancedDataGridColumn = new AdvancedDataGridColumn(Medium);

var colClientMed:AdvancedDataGridColumn = new AdvancedDataGridColumn(Client
Medium);

var colHigh:AdvancedDataGridColumn = new AdvancedDataGridColumn(High);

var colClientHigh:AdvancedDataGridColumn = new
AdvancedDataGridColumn(Client High);

var colLow:AdvancedDataGridColumn = new AdvancedDataGridColumn(Low);

var colClientLow:AdvancedDataGridColumn = new AdvancedDataGridColumn(Client
Low);

return [colMed, colHigh, colLow, colClientMed, colClientHigh,
colClientLow];
}

]]
/mx:Script
mx:AdvancedDataGrid id=reportGrid width=100% height=100%
verticalScrollPolicy=auto horizontalScrollPolicy=auto
mx:groupedColumns
mx:AdvancedDataGridColumn headerText=Column 1 /
mx:AdvancedDataGridColumn headerText=Column 2 /
mx:AdvancedDataGridColumn headerText=Column 3/
/mx:groupedColumns
/mx:AdvancedDataGrid
/mx:Canvas
/mx:Application





[flexcoders] Re: What is the Correct Type of Component For This?

2010-04-21 Thread valdhor
The way I would do it is to have a click event listener in the custom
component that would dispatch a custom bubbling event that the
application can listen for and handle. Modified example follows:

Application:
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=vertical verticalAlign=top
 horizontalAlign=center
backgroundGradientColors=[0x00,0x323232] paddingTop=0
 xmlns:components = * initialize=onInit()
 mx:Script
 ![CDATA[
 import mx.controls.Alert;

 [Bindable] private var dp:Array = [
 {text: First, image: helmet},
 {text: Second, image: helmet},
 {text: Third, image: helmet},
 {text: Fourth, image: helmet},
 {text: Fifth, image: helmet}
 ];

 private function onInit():void
 {

addEventListener(MyCustomEvent.WHAT_YOU_WANT_TO_USE_AS_AN_EVENT_CONSTANT\
, MyCustomEventHndler);
 }

 private function
MyCustomEventHndler(event:MyCustomEvent):void
 {
 // Do what you need to here
 event.stopImmediatePropagation();
 Alert.show(event.currentItem.text);
 }
 ]]
 /mx:Script
 mx:HBox
 mx:Repeater id=myImages dataProvider={dp}
 components:MyImageComponent
theItem={myImages.currentItem}/
 /mx:Repeater
 /mx:HBox
/mx:Application

MyCustomComponent.mxml
?xml version=1.0 encoding=utf-8?
mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml;
horizontalAlign=center width=200 height=200
 creationComplete=onCreationComplete()
 mx:Script
 ![CDATA[
 public var theItem:Object;
 [Bindable] private var imageLocation:String;

 private function onCreationComplete():void
 {
 thisText.text = theItem.text;
 thisImage.source = images/ + theItem.image + .png;
 }

 private function handleClick(event:MouseEvent):void
 {
 event.stopImmediatePropagation();
 dispatchEvent(new
MyCustomEvent(MyCustomEvent.WHAT_YOU_WANT_TO_USE_AS_AN_EVENT_CONSTANT,
theItem));
 }
 ]]
 /mx:Script
 mx:Image id=thisImage rollOverEffect={glowImage}
rollOutEffect={unglowImage}
 autoLoad=true click=handleClick(event)/
 mx:Text id=thisText fontSize=24 click=handleClick(event)/
 mx:Glow id=glowImage duration=1000 alphaFrom=1.0
alphaTo=0.3 blurXFrom=0.0
 blurXTo=50.0 blurYFrom=0.0 blurYTo=50.0 color=0x22A050/
 mx:Glow id=unglowImage duration=1000 alphaFrom=0.3
alphaTo=1.0 blurXFrom=50.0
 blurXTo=0.0 blurYFrom=50.0 blurYTo=0.0 color=0x3380DD/
/mx:VBox

MyCustomEvent.as
package
{
 import flash.events.Event;

 public class MyCustomEvent extends Event
 {
 public static const
WHAT_YOU_WANT_TO_USE_AS_AN_EVENT_CONSTANT:String = blahblah;

 private var _currentItem:Object;

 public function MyCustomEvent(type:String, currentItem:Object,
bubbles:Boolean=true, cancelable:Boolean=true)
 {
 super(type, bubbles, cancelable);
 _currentItem = currentItem;
 }

 public override function clone():Event
 {
 return new MyCustomEvent(type, _currentItem, bubbles,
cancelable);
 }

 public function get currentItem():Object {return _currentItem;}

 public function set currentItem(currentItem:Object):void
{_currentItem = currentItem;}
 }
}



HTH



Steve




--- In flexcoders@yahoogroups.com, James garymoorcroft_...@...
wrote:

 Basically what I mean is I previously had a combo box populated by an
array collection that contained the property categoryid and a tilelist
populated by an array collection that also contained the property
category id. So therefore when a user selected an item in the tilelist
only the items that had a categoryid which matched the category id of
that selected item were shown within the tilelist. Is this possible to
implement into this new example?

 --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
 
  I also looked at TourDeFlex to get some ideas.
 
  Here is a small example that I created that shows how to create a
custom
  component as well as do the Glow effect on an image. (I got the
image
  from downloading the file inside TourDeFlex under Glow):
 
  Application:
  ?xml version=1.0 encoding=utf-8?
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
  layout=vertical verticalAlign=top
   horizontalAlign=center
  backgroundGradientColors=[0x00,0x323232] paddingTop=0
   xmlns:components = *
   mx:Script
   ![CDATA[
   [Bindable] private var dp:Array = [
   {text: First, image: helmet},
   {text: Second, image: helmet},
   {text: Third, image: helmet},
 

[flexcoders] Re: What is the Correct Type of Component For This?

2010-04-21 Thread valdhor
Ooops. That should have been MyImageComponent.mxml instead of 
MyCustomComponent.mxml.

BTW, where are you from? I am an ex pat Kiwi now living in the states.

--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 The way I would do it is to have a click event listener in the custom
 component that would dispatch a custom bubbling event that the
 application can listen for and handle. Modified example follows:
 
 Application:
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=vertical verticalAlign=top
  horizontalAlign=center
 backgroundGradientColors=[0x00,0x323232] paddingTop=0
  xmlns:components = * initialize=onInit()
  mx:Script
  ![CDATA[
  import mx.controls.Alert;
 
  [Bindable] private var dp:Array = [
  {text: First, image: helmet},
  {text: Second, image: helmet},
  {text: Third, image: helmet},
  {text: Fourth, image: helmet},
  {text: Fifth, image: helmet}
  ];
 
  private function onInit():void
  {
 
 addEventListener(MyCustomEvent.WHAT_YOU_WANT_TO_USE_AS_AN_EVENT_CONSTANT\
 , MyCustomEventHndler);
  }
 
  private function
 MyCustomEventHndler(event:MyCustomEvent):void
  {
  // Do what you need to here
  event.stopImmediatePropagation();
  Alert.show(event.currentItem.text);
  }
  ]]
  /mx:Script
  mx:HBox
  mx:Repeater id=myImages dataProvider={dp}
  components:MyImageComponent
 theItem={myImages.currentItem}/
  /mx:Repeater
  /mx:HBox
 /mx:Application
 
 MyCustomComponent.mxml
 ?xml version=1.0 encoding=utf-8?
 mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml;
 horizontalAlign=center width=200 height=200
  creationComplete=onCreationComplete()
  mx:Script
  ![CDATA[
  public var theItem:Object;
  [Bindable] private var imageLocation:String;
 
  private function onCreationComplete():void
  {
  thisText.text = theItem.text;
  thisImage.source = images/ + theItem.image + .png;
  }
 
  private function handleClick(event:MouseEvent):void
  {
  event.stopImmediatePropagation();
  dispatchEvent(new
 MyCustomEvent(MyCustomEvent.WHAT_YOU_WANT_TO_USE_AS_AN_EVENT_CONSTANT,
 theItem));
  }
  ]]
  /mx:Script
  mx:Image id=thisImage rollOverEffect={glowImage}
 rollOutEffect={unglowImage}
  autoLoad=true click=handleClick(event)/
  mx:Text id=thisText fontSize=24 click=handleClick(event)/
  mx:Glow id=glowImage duration=1000 alphaFrom=1.0
 alphaTo=0.3 blurXFrom=0.0
  blurXTo=50.0 blurYFrom=0.0 blurYTo=50.0 color=0x22A050/
  mx:Glow id=unglowImage duration=1000 alphaFrom=0.3
 alphaTo=1.0 blurXFrom=50.0
  blurXTo=0.0 blurYFrom=50.0 blurYTo=0.0 color=0x3380DD/
 /mx:VBox
 
 MyCustomEvent.as
 package
 {
  import flash.events.Event;
 
  public class MyCustomEvent extends Event
  {
  public static const
 WHAT_YOU_WANT_TO_USE_AS_AN_EVENT_CONSTANT:String = blahblah;
 
  private var _currentItem:Object;
 
  public function MyCustomEvent(type:String, currentItem:Object,
 bubbles:Boolean=true, cancelable:Boolean=true)
  {
  super(type, bubbles, cancelable);
  _currentItem = currentItem;
  }
 
  public override function clone():Event
  {
  return new MyCustomEvent(type, _currentItem, bubbles,
 cancelable);
  }
 
  public function get currentItem():Object {return _currentItem;}
 
  public function set currentItem(currentItem:Object):void
 {_currentItem = currentItem;}
  }
 }
 
 
 
 HTH
 
 
 
 Steve
 
 
 
 
 --- In flexcoders@yahoogroups.com, James garymoorcroft_ict@
 wrote:
 
  Basically what I mean is I previously had a combo box populated by an
 array collection that contained the property categoryid and a tilelist
 populated by an array collection that also contained the property
 category id. So therefore when a user selected an item in the tilelist
 only the items that had a categoryid which matched the category id of
 that selected item were shown within the tilelist. Is this possible to
 implement into this new example?
 
  --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
  
   I also looked at TourDeFlex to get some ideas.
  
   Here is a small example that I created that shows how to create a
 custom
   component as well as do the Glow effect on an image. (I got the
 image
   from downloading the file inside TourDeFlex under Glow):
  
   Application:
   ?xml version=1.0 encoding=utf-8?
   mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
   

[flexcoders] Error #2014 when trying to use FileReference.save()

2010-04-21 Thread dustyjewett
I've searched high and low, but cannot find ANY reference to people having this 
issue.  This is not intermittent, happens every time, but only in one 
application, while another application (running same code, from a swc) can save 
files just fine.

Here is the error itself:
Error: Error #2014: Feature is not available at this time.
at flash.net::FileReference/_save()
at flash.net::FileReference/save()
at 
com.active.fnd.core.controller.util::ObjectPersistenceUtil$/saveObjectToFilesystem()[D:\...\ObjectPersistenceUtil.as:82]
at Function/anonymous()[C:\...\CancelRegistrationTask.as:178]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()
at mx.controls.alertClasses::AlertForm/removeAlert()
at mx.controls.alertClasses::AlertForm/clickHandler()


The anonymous is from an Alert that I popped up, as I thought it might have 
something to do with the absence of a MouseEvent in the stack... alas, this did 
not help my dilemma.

Google searches find nothing the helps, just lists of adobe error codes.

TIA!
-Dusty





Re: [flexcoders] Images not getting reloaded when source changes?

2010-04-21 Thread Alex Harui
Simplify the test case further.  Just press a button and change the image 
source.  Then set a breakpoint in Image.as or SWFLoader.as and see what it is 
doing.


On 4/21/10 12:20 PM, Peter Davis p...@peterdavis.info wrote:






I'm trying to fix a *very* simply app. that just displays some images, and is 
supposed to refresh the images when their URL parameters change.  In 
particular, these are supposed to be images of data tables, and the query 
string specifies a table style, a text color and a border color.  The tables 
display correctly when loaded, but they don't respond when I change the source 
URLs.  I've verified that the sourceChange event is triggered.  I even put the 
new URL into a TextInput control, and verified that this URL works (display the 
correct table) in another browser tab.  But the images in the Flex app don't 
ever change.

Thanks for any suggestions.

Here's the whole thing:


?xml version=1.0 encoding=utf-8?
s:Application xmlns:fx=http://ns.adobe.com/mxml/2009;
   xmlns:s=library://ns.adobe.com/flex/spark 
http://ns.adobe.com/flex/spark 
   xmlns:mx=library://ns.adobe.com/flex/mx 
http://ns.adobe.com/flex/mx  minWidth=800 minHeight=600
fx:Script
![CDATA[
import mx.events.ColorPickerEvent;
import mx.controls.Alert;

private function imgInit(s:int):void
{
switch (s)
{
case 1:
table1.addEventListener(
sourceChanged, image_sourceChanged);
break;

case 3:
table3.addEventListener(sourceChanged, 
image_sourceChanged);
break;

case 5:
table5.addEventListener(sourceChanged, 
image_sourceChanged);
break;

default:
}
}

private function image_sourceChanged(evt:Event):void
{
Alert.show(evt.toString() + \nSrc:  + 
Image(evt.target).source, evt.type);
}

public var colorArr:Array =[0x231F20, 0x9E280E, 0x8A713C, 
0x007236, 0x007D97,
2E3092, 0x5D1E79, 0x4C4C4E, 0x88191C, 0xF5821F, 
0x727C28, 0x1E9860,
00837D, 0x0071BC, 0x7C51A1, 0x939598, 0xED1C24, 
0xFCAF17, 0xA5A85A,
57BD7C, 0x57C5C7, 0x00AEEF, 0xAA4A9C, 0xA7A9AC, 
0xEC008C, 0xFFCE71,
FFF200, 0xBED630, 0x95D5D1, 0x42C7F4, 0xBC7BB5, 
0xDCDDDE, 0xF49AC1,
FEDCC6, 0xFFF78F, 0xE5F0CB, 0xE2F3F4, 0x9FC9EB, 
0xC7B2D6, 0xFF];
var urlBase:String = http://localhost.us/viewtable.aspx;;
var textColorIndex:uint = 0;
var textColor:String = 00;
var borderColorIndex:uint = 0;
var borderColor = 00;

protected function updateTables():void
{
//url1.text = urlBase + ?styleIndex=1textColor=%23 + 
textColor + borderColor=%23 + borderColor;
table1.source = urlBase + ?styleIndex=1textColor=%23 + 
textColor + borderColor=%23 + borderColor;
url1.text = String(table1.source);
table1.load(String(table1.source));
table3.source = urlBase + ?styleIndex=3textColor=%23 + 
textColor + borderColor=%23 + borderColor;
table3.load(String(table3.source));
table5.source = urlBase + ?styleIndex=5textColor=%23 + 
textColor + borderColor=%23 + borderColor;
table5.load(String(table5.source));
}

protected function 
textColor_changeHandler(event:ColorPickerEvent):void
{
textColorIndex = ColorPicker(event.target).selectedIndex;
var fullName:String = colorArr[textColorIndex];
textColor = fullName.substr(2);
updateTables()
}

protected function 
borderColor_changeHandler(event:ColorPickerEvent):void
{
borderColorIndex = ColorPicker(event.target).selectedIndex;
var fullName:String = colorArr[borderColorIndex];
borderColor = fullName.substr(2);
updateTables();
}

]]
/fx:Script
fx:Declarations
!-- Place non-visual elements (e.g., services, value objects) here --
/fx:Declarations
s:Label x=25 y=30 text=Table Test fontSize=24 fontWeight=bold/
s:Label x=42 y=73 text=Text color:#xd;/
mx:ColorPicker x=109 y=63 dataProvider={colorArr} 
change=textColor_changeHandler(event)/
s:Label x=25 y=113 text=Border color:#xd;/
mx:ColorPicker x=109 y=103 dataProvider={colorArr} 
change=borderColor_changeHandler(event)/
s:TextInput id=url1 x=25 y=145 width=600 text=/
mx:Image id=table1 x=25 y=185 initialize=imgInit(1); 
source=http://localhost.us/viewtable.aspx?styleIndex=1/
!--
mx:Image id=table1 x=25 y=185