[flexcoders] Re: Possible memory leak in e4x or in HttpService

2007-02-16 Thread lacito.domingo
The original data is filtered on server side.
And in the original application I use xml format, not e4x.
No leaking.

The test files:
It's a large file, yes. It consumes a lot of memory. But it's for testing.
That's why you can see the leaking in seconds.

But...

If you test the program with e4x and leaktest.xml it does not leak.
And leaktest.xml is a LARGE file.

By the way... Thanks for your reply! I really appreciate it. :)

Lacito


--- In flexcoders@yahoogroups.com, Paul DeCoursey [EMAIL PROTECTED] wrote:

 I kind of doubt it's a leak.  It's a large file and it's going to
 consume a lot of memory.  An XML file larger than a 100k isn't going
 to perform well using DOM or E4X kinds of operations. I think you'd be
 better off doing filtering operations on the server using XSLT perhaps
 or some other stream based method. Keep in mind that an XML file
 stored in memory for an E4X operation will take up probably 5-10 times
 more memory than the document size. Add on top of that some overhead
 for the actual E4X operation and it could easily start adding up into
 the hundreds of megs.
 
 --- In flexcoders@yahoogroups.com, lacito.domingo
 lacito.domingo@ wrote:
 
  Hello,
  
  There is a new pbentries.xml file. I have replaced double acute O
 with W.
  
  You can download it from:
  
  http://www.actionscript.org/forums/showthread.php3?t=127834
  
  And it leaks, too. :(
  
  Thanks,
  
  Lacito
 





[flexcoders] Embed an image

2007-02-16 Thread moni_singhal

Actually i want to retrieve an image in a Flex Component (Flex 1.5 
Application) from a java file (in java file i am getting the image 
from the database ).
As mx:Image tag only takes source as an attribute  .How should i do 
this ? 

Thanks,
Monika



[flexcoders] Getting notified when a user 'leaves/quits' the application

2007-02-16 Thread julien castelain

Hi all,

I was wondering if there was a way to be notified when the user leaves or
quits the application using AS3.

Thanks.


Re: [flexcoders] Exporting Charts as Image

2007-02-16 Thread Mickael RUELLAN

Hi,

Here is my way to export image (PNG or JPEG) to a PHP server. The image 
is available as if you post it on a HTML form, so in $_FILES variables.


First, I've added this 2 methods in JPEG and PNG encoder class :

   public function encodeFromUI(target:UIComponent):ByteArray {
   return this.encode(getUIComponentBitmapData(target));   
   }
  
   private function getUIComponentBitmapData( target : UIComponent 
) : BitmapData{
   var bd : BitmapData = new BitmapData( target.width, 
target.height );

   var m : Matrix = new Matrix();
   bd.draw( target , m );
   return bd; 
   }


I've created a new method that encode and send the image :

   var png:PNGEnc = new PNGEnc();   // PNGEnc is faster than JPEG encoder
   var imageData:ByteArray = png.encodeFromUI(UIComp);
  
   var url:URLRequest = new URLRequest('http://your_url/print_bitmap.php');
  
   var boundary:String = '--MIKA--';

   url.contentType = 'multipart/form-data; boundary='+boundary;
   boundary = '--'+boundary;
  
   var data:ByteArray = new ByteArray;
  
   data.writeUTFBytes(boundary+'\r\n');


   // start new part
   data.writeUTFBytes('Content-Disposition: form-data; 
name=file_upload; filename=image.png\r\n');

   data.writeUTFBytes('Content-Type: image/png\r\n');
   data.writeUTFBytes('Content-Transfer-Encoding: binary\r\n\r\n');
   // write image data
   data.writeBytes(imageData);
   // terminate part
   data.writeUTFBytes('\r\n'+boundary+'\r\n');
  
   // start a new part if you want to send other POST variables
   data.writeUTFBytes('Content-Disposition: form-data; 
name=test\r\n\r\n');

   data.writeUTFBytes('mikaflash');
   data.writeUTFBytes('\r\n'+boundary+'\r\n');

   url.data = data;
   url.method = URLRequestMethod.POST;
  
   /*var Loader:URLLoader = new URLLoader();

   Loader.addEventListener(Event.COMPLETE,onLoadComplete);
   Loader.load(url);
   */
   navigateToURL(url,'_self');  

Hope this helps you. May be there is a better way to do this, but it's 
working fine for me.


Mickael



Paramjit Jolly a écrit :


Hi Prateek,

 


 I have seen your query, I am also looking for similar solution.

 

Infact similar stuff I come across 3 years back When I was working 
with flash-java.


That time I used POI for exporting charts  grid data in excel sheets 
which are templates (place holders) in server.


 


Now our client wants similar look  feel charts as  Flex.

 


For report generation I have tested

Adobe life cycle is perfect product, I m trying for images of charts also.

 

Bty why u need image, if only for printing you can print using print 
job class.


 


Also check for flash paper.

 

 


Let me know if you get something goot for this.

 

 

 


Regards

Jolly

 



**Life Fitness** - A Division of Brunswick Corporation
Singapore-486066
http://www.lifefitness.com http://www.lifefitness.com | 
http://www.brunswick.com http://www.brunswick.com





*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
*On Behalf Of *., Prateek (MSAS Sys Dev IBD)

*Sent:* Wednesday, February 14, 2007 8:16 PM
*To:* flexcoders@yahoogroups.com
*Subject:* [flexcoders] Exporting Charts as Image

 


Hi All

 

We are using Flex charts in our web app. We also have a need to export 
the chart as an image so that the same can be embedded in an email 
sent out to users.


Any pointers ?

 


Thanks

Prateek



NOTICE: If received in error, please destroy and notify sender. Sender 
does not intend to waive confidentiality or privilege. Use of this 
email is prohibited when received in error.


 


[flexcoders] Re: Flex client and Python web service: any standard WSDL format?

2007-02-16 Thread nilsgildo
This sounds like a client-side problem.
Where does the Exception occure?

Use the Debugger to localize the problem.

Maybe you should first add an eventhandler for the result-event to
analyse the results properly.

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

 Hi
   I have written a web service in Python and trying to design a client
 in Flex 2.But some error or the other crops up.
I am able to make a call to the web service but the SOAP response
 from the python web service is not getting read properlyand so i
 am not able to read the response data from the SOAP request.
 
 The common error I keep getting is null object cannot have properties.
 I tried receiving the response in all types of data providers.
 ArrayColection ,XMLCollection but no success. Is the SOAP response not
 being read because of a non compatible WSDL format? (unlikely because
 the call is successful...but the return is not)
 
 here is my Flex client:
  
 mx:WebService id=wsXenmonService 
 wsdl=http://localhost/xenmon02.wsdl;
 useProxy=false fault=Alert.show(event.fault.faultString,
 'Error');
 mx:operation name=getMetrics
 mx:request
  /mx:request
 /mx:operation
 /mx:WebService

  mx:Button x=30 y=250 
 label=Get Xenmon Metrics
 click=wsXenmonService.getMetrics.send()/
 
  mx:ArrayCollection id=acX
 source={ArrayUtil.toArray(wsXenmonService.getMetrics.lastresult)}
 
 ms:DataGrid dataprovider=acX width=50% / 
 /mx:Application
 
 Is there any standard WSDL format I should stick to? 
 
 is there is any way to solve this problem...Would love to hear your
 suggestions...ThanksGood day





[flexcoders] Re: Space between rows in the Datagrid

2007-02-16 Thread lemasur
Please, give me a hint.

masu


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

 Hi there,
 
 I'd like to leave some space between 
 each row in a mx.controls.DataGrid ... 
 should look like this:
 
  -
  | colored row1  |
  -
  - transparent space
  -
  | colored row2  |
  -
 
 I guess this styling should be possible 
 when seeing this:
 

http://onreflexion.blogspot.com/2007/01/napkin-skins-stage-two-programmatic.html
 
 Has anyone an idea how to do this?
 
 thank you,
 masu





[flexcoders] Re: Propagating Serverside Exception as Flex Fault

2007-02-16 Thread nilsgildo
Hi,

this is a known issue in Flex/Flash.

If your WS returns HTTP STATUS CODE 500 your Flex App doesnt get the
qualified error message (soap:fault).

You can find many posts about this topic, but unfortunately no solutions.

BR
Nils



--- In flexcoders@yahoogroups.com, Lekha S [EMAIL PROTECTED] wrote:

 Hello, 
 
 My Flex component is not displaying the correct
 Exception Message as thrown by the server side
 component which is a WebService.For example,the
 Webservice class throws an exception with message
 Customer ID must be uinque.However on flex side,the
 code below always shows HTTP request error. 
 Alert.show(event.fault.faultString,fault); 
 
 I have confirmed that the request to the server is
 successful and the service returns a SOAP fault with
 correct message. 
 
 Please advice on how I could retrieve correct
 error/fault message from server in the Flex UI. 
 
 Thankyou in advance.
 
 
  


 Expecting? Get great news right away with email Auto-Check. 
 Try the Yahoo! Mail Beta.
 http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html





[flexcoders] Re: Granite Data Services 0.1.0 is released

2007-02-16 Thread fwolff999
Hi,

No list or forum at this time... You may however post bug reports,
feature requests, etc., to http://www.grantiteds.org/jira.

Regards, Franck.


 Wow...
 Do you have a specific testers list or forum?
 
 regards,
 Bjorn
 
 
 On 16/02/2007, at 1:17 AM, fwolff999 wrote:
 
  Hello,
 
  Granite Data Services 0.1.0 is available for download.
 
  Granite Data Services aims to be a free, open source (LGPL'd),  
  alternative to Adobe Flex 2 Data Services for J2EE application  
  servers. This first release focuses on AMF3 serialization/ 
  deserialization via mx:RemoteObject and EJB3 services (Session and  
  Entity Beans on JBoss/Hibernate).
 
  Note that alternative does not mean drop down replacement: you  
  won't be able to simply deploy a Flex 2 Data Services application  
  into Granite Data Services without modification. The main goal of  
  this project is to give an open source framework for Flex 2/EJB3  
  developments with full AMF3/RemoteObject  benefits.
 
  See more on http://www.graniteds.org  (download, documentation and  
  live demo).
 
  Franck Wolff.
 
 
 
 
 
 





[flexcoders] How to hide both Axes of a chart?

2007-02-16 Thread anewgene
Hi, group,
In my use case, I need to hide both axes of a chart? Is there a 
easy way to do that? I think it should be very simple, but I didn't 
find any luck from flex online docs.

Thanks,

Lei (a newcomer)



[flexcoders] Re: An open-source to Flex Data Services

2007-02-16 Thread fwolff999
Hi,

Not yet (RTMP is not implemented at this time, only AMF3), but this is
planned (can't give any date/roadmap by now).

Regards,
Franck Wolff.

--- In flexcoders@yahoogroups.com, Brian Dunphy [EMAIL PROTECTED] wrote:

 I read through most of the post/description of the open source
 package, one question though:
 
 Does this support Flex Messaging via RTMP (i.e. Producers/Consumers
 within Flex connected to JMS queues/topics)?
 
 Thanks,
 
 Brian
 
 -- Forwarded message --
 From: Scotty Scott [EMAIL PROTECTED]
 Date: Feb 15, 2007 2:28 PM
 Subject: Re: [flexcoders] An open-source to Flex Data Services
 To: flexcoders@yahoogroups.com
 
 
 
 
 
 
 
 
 awesome, cant wait to try this out.
 
 Thanks
 
 On 2/15/07, Igor Costa [EMAIL PROTECTED] wrote:
 
 
 
 
 
 
  Hey guys
 
  Maybe you see this as very instresting tool
 
  http://www.igorcosta.org/?p=22
 
 
  Regards.
 
  --
  
  Igor Costa
  www.igorcosta.org
  www.igorcosta.com
  skype: igorpcosta
 
 
 
 -- 
 Scotty Scott
 http://www.franciswscott.com
 
  
 
 -- 
 Brian Dunphy





[flexcoders] Re: Access SOAP fault code

2007-02-16 Thread nilsgildo
Hello Daniel,

did you find any solution for this problem?
Excepting the idea to add an error-property to all data types ;-)

Im using an ASP.NET Webservice as producer, like you.

Thx, BR
Nils

--- In flexcoders@yahoogroups.com, Daniel Tuppeny [EMAIL PROTECTED] wrote:

 Cool, I thought it just copied the one from IE! In any case, I guess the
 WinForms one would be different. Thanks :-)
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Carson Hager
 Sent: 20 June 2006 15:01
 To: flexcoders@yahoogroups.com; flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] Access SOAP fault code
 
 
 You can definitely do this so that only the flex app gets the affected
 response.  The FP has a unique user agent name that you can look at to
 determine if you need to change the http status code or not.  That's how
 we've done this.
  
  
 Carson
  
 
 
 
 From: flexcoders@yahoogroups.com on behalf of Daniel Tuppeny
 Sent: Tue 6/20/2006 9:50 AM
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] Access SOAP fault code
 
 
 
 We've not got many implementations so far, so there's not a great deal
 to change, it's the fact that it's messy that I don't like, rather than
 there's more work involved. Having real exceptions sent back to the
 client is way more convenient than try/catch'ing everything and
 returning a custom error object.
  
 Maybe we can add some HttpHandlers that catch our web services and
 change the response header, but it's a little nasty, especially given
 those services may be called by other apps (like ClickOnce WinForms),
 which we'd want to server the real response to.
  
 We'll play around when we get that far, and see what works best.
  
 Thanks for the info!
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Carson Hager
 Sent: 20 June 2006 14:22
 To: flexcoders@yahoogroups.com; flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] Access SOAP fault code
 
 
 Sorry. I got you mixed up with the original poster.
  
 I'd be really surprised if you couldn't do this in .NET more generically
 than that. I'd hate to see you have to change all of your
 implementations.  We made this very clear to Adobe that this was not
 acceptable but that didn't seem to matter. It was made pretty clear to
 us that the player would not be changing. Personally, I'd rather the
 product was delayed in order to get this right from the beginning. Once
 more people who have significant experience come to Flex, they are all
 going to find this as apalling as you have.  I'd hate to see Flex get a
 bad rap over this.
  
  
 Carson
  
 
 
 
 From: flexcoders@yahoogroups.com on behalf of Daniel Tuppeny
 Sent: Tue 6/20/2006 9:21 AM
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] Access SOAP fault code
 
 
 
 We're using .NET web services, no cold fusion.
  
 Looks like we'll have to wrap all responses in try/catch, and return an
 object with an error property, and the actual data as another property.
 Disgusting :-(
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Carson Hager
 Sent: 20 June 2006 14:11
 To: flexcoders@yahoogroups.com; flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] Access SOAP fault code
 
 
 Preaching to the choir. :)  Believe me...we feel the same way.  From
 everything we have heard from Adobe, this will not be addressed within
 the player within this release.
  
 That being said, does CF support anything like filters in J2EE that
 allow you to do things like alter the contents of all responses before
 they leave the server?  If so, you can simply change that HTTP status
 code to 200 for all CFC requests that have resulted in SOAP faults.
  
 Just to clarify, Adobe told  us informally that they would be coming up
 with various server side solutions that would take care of this for you.
 You would have to check with them to see if they are doing this for Cold
 Fusion.
  
  
 Carson
  
 
 
 
 From: flexcoders@yahoogroups.com on behalf of Daniel Tuppeny
 Sent: Tue 6/20/2006 9:06 AM
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] Access SOAP fault code
 
 
 
 This sounds pretty worrying. We're using SOAP without any server/proxy.
 So we won't be able to get the SOAP exceptions at all?
  
 That sounds like rather a fundamental flaw. It means we're unable to
 give the user any sensible messages, because we don't have the exception
 type. Is this not being fixed for the final release? :-(
  
  
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Carson Hager
 Sent: 20 June 2006 13:29
 To: flexcoders@yahoogroups.com; flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] Access SOAP fault code
 
 
 This is currently a limitation in the Flash Player ( 

RE: [flexcoders] Why do linked resources have to reside in project root directory?

2007-02-16 Thread Dimitrios Gianninas
yes I hate this too, I submitted a FB enchancement, do the same so it will get 
included into the next release, hopefully.
 
Dimitrios Gianninas
RIA Developer
Optimal Payments Inc.
 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tom 
Baggett
Sent: Thursday, February 15, 2007 7:37 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Why do linked resources have to reside in project root 
directory?



I'm using modules to break up my app into smaller chunks. I was
following the advice to create multiple projects (one for the main
app, one for each module) and link from the main app to the compiled
modules' SWF files that I've seen on this list as well as the revamped
Module documentation when I ran into a problem.

It was my understanding that I could create links from the main
application bin folder to the SWFs in the module projects bin folders.
However, the standalone version of Flex Builder 2.0.1 displays an
error in the New File dialog stating Cannot create linked resource
module.swf. Linked resources must have a project as their parent. if
I attempt to create the resource link in any of the project
subdirectories. The error disappears if I select the main project
folder as the parent.

This is really frustrating! Flex Builder won't compile a file into a
SWF (by marking it as an application) unless it is in the project
root. I thought that creating separate projects for modules and
linking to their SWF files would get around this limitation, only to
find it is just as limited. Am I really going to have to place the
source files for my shell app and all of my modules in a single
project root directory just so Flex Builder will build and place all
of them in a single bin folder?

I've already spent the past two days learning about Ant scripting so I
could compile source files that weren't in the project root. Once I
got that to work, I found that coding errors no longer show up in the
Problems view (bye bye double-clicking to open the file and jump to
the problem line) and the Run and Debug buttons won't launch the
compiled app.

What is the right way to make all of this work?



 

-- 
WARNING
---
This electronic message and its attachments may contain confidential, 
proprietary or legally privileged information, which is solely for the use of 
the intended recipient.  No privilege or other rights are waived by any 
unintended transmission or unauthorized retransmission of this message.  If you 
are not the intended recipient of this message, or if you have received it in 
error, you should immediately stop reading this message and delete it and all 
attachments from your system.  The reading, distribution, copying or other use 
of this message or its attachments by unintended recipients is unauthorized and 
may be unlawful.  If you have received this e-mail in error, please notify the 
sender.

AVIS IMPORTANT
--
Ce message électronique et ses pièces jointes peuvent contenir des 
renseignements confidentiels, exclusifs ou légalement privilégiés destinés au 
seul usage du destinataire visé.  L'expéditeur original ne renonce à aucun 
privilège ou à aucun autre droit si le présent message a été transmis 
involontairement ou s'il est retransmis sans son autorisation.  Si vous n'êtes 
pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, 
veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses 
pièces jointes, de votre système.  La lecture, la distribution, la copie ou 
tout autre usage du présent message ou de ses pièces jointes par des personnes 
autres que le destinataire visé ne sont pas autorisés et pourraient être 
illégaux.  Si vous avez reçu ce courrier électronique par erreur, veuillez en 
aviser l'expéditeur.



[flexcoders] Re: Getting notified when a user 'leaves/quits' the application

2007-02-16 Thread Evan Bellinger
Julien,

Not sure what you're really trying to do here.  A bit more of a
description would be useful.  I'll take a shot anyway.

I'm going to guess that you've got your application running in a
browser.  As such, you've got a couple options.

First, and most obviously, you could have a close button in your
application which logs you out or ends the chat or whatever.  Just
leech off of that event, and away you go.

Secondly, if you want to try to capture the closing of the browser
window, there's a javascript event that you'll want to capture and tie
it to a method in your application through the ExternalInterface.

Here's a quick snippet of something similar to what I use:

[Javascript]

window.onbeforeunload = browserClosing;

function browserClosing(event_)
{
   getSWF(MyTestApp).theBrowserIsClosing();
}

// Gets a reference to the specified SWF file by checking which browser is
// being used and using the appropriate JavaScript.
function getSWF(movieName)
{
   if (navigator.appName.indexOf(Microsoft) != -1)
  return window[movieName];
   else
  return document[movieName];
}

[/Javascript]

[MXML]

mx:Application ... creationComplete=load();
   Script![CDATA[
  private function load():void
  {
 if(ExternalInterface.available)
 {
try
{
   ExternalInterface.addCallback(theBrowserIsClosing,
theBrowserIsClosingHandler);
}
catch(e:Error){}
 }
  }

  private function theBrowserIsClosingHandler():String
  {
 //Do whatever needs to be done here.   
  }
   ]]/Script
/mx:Application

[/MXML]

When your user hits the browser's close button, the onbeforeunload
event will fire calling the javascript method 'browserClose' which in
turn will call the 'theBrowserIsClosing' method in your application.

Hope that gets you pointed in the right direction.  If not, be a bit
more specific about what you're trying to do.

Evan

--- In flexcoders@yahoogroups.com, julien castelain [EMAIL PROTECTED]
wrote:

 Hi all,
 
 I was wondering if there was a way to be notified when the user
leaves or
 quits the application using AS3.
 
 Thanks.





Re: [flexcoders] Re: Getting notified when a user 'leaves/quits' the application

2007-02-16 Thread jwopitz

I started to suggest the same thing about using the javaScript method.  But
I haven't tested it yet and I am curious to know will that method in the swf
that is called by the js fire quickly enough before the actual session
closes?

Take for instance you want to save user preferences to a local shared object
onClose.  I am just guessing here, but I would think that the browser's
internal close mechanics would not wait around for the js, and subsequent
swf methods to do their business.

Has this been tested and confirmed by anyone?

On 2/16/07, Evan Bellinger [EMAIL PROTECTED] wrote:


Julien,

Not sure what you're really trying to do here.  A bit more of a
description would be useful.  I'll take a shot anyway.

I'm going to guess that you've got your application running in a
browser.  As such, you've got a couple options.

First, and most obviously, you could have a close button in your
application which logs you out or ends the chat or whatever.  Just
leech off of that event, and away you go.

Secondly, if you want to try to capture the closing of the browser
window, there's a javascript event that you'll want to capture and tie
it to a method in your application through the ExternalInterface.

Here's a quick snippet of something similar to what I use:

[Javascript]

window.onbeforeunload = browserClosing;

function browserClosing(event_)
{
   getSWF(MyTestApp).theBrowserIsClosing();
}

// Gets a reference to the specified SWF file by checking which browser is
// being used and using the appropriate JavaScript.
function getSWF(movieName)
{
   if (navigator.appName.indexOf(Microsoft) != -1)
  return window[movieName];
   else
  return document[movieName];
}

[/Javascript]

[MXML]

mx:Application ... creationComplete=load();
   Script![CDATA[
  private function load():void
  {
 if(ExternalInterface.available)
 {
try
{
   ExternalInterface.addCallback(theBrowserIsClosing,
theBrowserIsClosingHandler);
}
catch(e:Error){}
 }
  }

  private function theBrowserIsClosingHandler():String
  {
 //Do whatever needs to be done here.
  }
   ]]/Script
/mx:Application

[/MXML]

When your user hits the browser's close button, the onbeforeunload
event will fire calling the javascript method 'browserClose' which in
turn will call the 'theBrowserIsClosing' method in your application.

Hope that gets you pointed in the right direction.  If not, be a bit
more specific about what you're trying to do.

Evan

--- In flexcoders@yahoogroups.com, julien castelain [EMAIL PROTECTED]
wrote:

 Hi all,

 I was wondering if there was a way to be notified when the user
leaves or
 quits the application using AS3.

 Thanks.





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







--
justin w. opitz
617.771.6639
jwopitz(at)gmail.com


[flexcoders] Re: Getting notified when a user 'leaves/quits' the application

2007-02-16 Thread Paul DeCoursey
What is the intent here?  The SystemManager has some events that might
be of interest. deactivate is fired when the flayer loses focus... not
sure if this is fired when the browser closes or when you browse to a
different page, might be worth exploring.  There is also idle, fired
if the user doesn't do anything for a period of time, only 1 second,
but could be useful if you are just wanting to save a state.

I'd play around with deactivate and see when it fires. The javascript
will probably be the best route however.

pd


--- In flexcoders@yahoogroups.com, julien castelain [EMAIL PROTECTED]
wrote:

 Hi all,
 
 I was wondering if there was a way to be notified when the user
leaves or
 quits the application using AS3.
 
 Thanks.





[flexcoders] Loading Image into BitmapData

2007-02-16 Thread beecee1977
Hi,

I have what I hope is a pretty simple problem, but I'm not sure how to 
do it. I want to load in an image file (png or whatever) from a url and 
store it locally in a BitmapData Object.

I suspect I need to use the Loader class, but I'm not sure how to get 
it out of this and into a BitmapData Object.

Any tips appreciated! 

P.S. I know I could probably load it into a UIComponent and then draw 
it onto the BitmapData Object, but I'd rather avoid that if possible.



Re: [flexcoders] Re: HELP! Flex Builder hangs on Design View

2007-02-16 Thread Nick Collins

Yeah, I did try cleaning the project. I did a disk defrag and that seems to
have helped, though the more complex mxml components where I have a
component that contains a component that contains a component... those still
hang FB every time.  If I comment out the nested components, then it draws
just fine.

On 2/15/07, Shannon Hicks [EMAIL PROTECTED] wrote:


   Did you try cleaning your project?

I also upgraded my PC's to 2 and 3 gig's ram, which helped FB's
performance a ton.

Shan


helihobby wrote:

 I had so many issues...
Flex used to crash every 30 min.

I got a new PC ( Dual Core ) and Clean windows and Flex has not
crashed once in 3 weeks ...

Sean.

--- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Nick
Collins [EMAIL PROTECTED]
wrote:

 I have 25 GB free, and have rebooted the system, which would free
the RAM of
 any memory consumption.

 On 2/15/07, Agent RR-007 [EMAIL PROTECTED] wrote:
 
  That was also happening to me.
  Make sure that you free up some space in your HD.
  And if you leave it on for a long time idling it can consume lots
of
  memory.
  Good luck.
 
  Always trust your Agent,
 
  RR-007
 
 
  On Thu, February 15, 2007 11:08 am, Nick Collins said:
   Has anyone else experienced this and found a solution?
  
   I have an app I've been working on that just yesterday started
giving
   me problems whenever I try going to the design view. The app
hits 50%
   CPU utilization, and just hangs there. The design view starts
to draw,
   then goes all gray, and freezes the entire IDE. I'm running
   FlexBuilder 2.0.1 as an eclipse plugin with Eclipse 3.2.1.
  
   I've been working on the app for two weeks with no problems,
then it
   just started yesterday. I tried uninstalling FlexBuilder then
   reinstalling it, and still the problem persists. Anyone have any
   ideas?
  
 
 
 



 



RE: [flexcoders] Exporting Charts as Image

2007-02-16 Thread Andrew Trice
I see your comment says png encoder is faster.  One thing to keep in mind... 
PNG encoder also creates larger bytearrays, which equates to larger file size, 
which leads to longer upload/download times; especially as the image dimensions 
increase.  

 

-Andy

 

_

Andrew Trice

Cynergy Systems, Inc.

http://www.cynergysystems.com

 

Blog: http://www.cynergysystems.com/blogs/page/andrewtrice

Email: [EMAIL PROTECTED]

Office: 866-CYNERGY 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mickael 
RUELLAN
Sent: Thursday, February 15, 2007 1:28 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Exporting Charts as Image

 

Hi,

Here is my way to export image (PNG or JPEG) to a PHP server. The image is 
available as if you post it on a HTML form, so in $_FILES variables.

First, I've added this 2 methods in JPEG and PNG encoder class :

public function encodeFromUI(target:UIComponent):ByteArray {
return this.encode(getUIComponentBitmapData(target));
}

private function getUIComponentBitmapData( target : UIComponent ) : 
BitmapData{ 
var bd : BitmapData = new BitmapData( target.width, target.height );
var m : Matrix = new Matrix();
bd.draw( target , m );
return bd;  
}

I've created a new method that encode and send the image :

var png:PNGEnc = new PNGEnc();   // PNGEnc is faster than JPEG encoder
var imageData:ByteArray = png.encodeFromUI(UIComp);

var url:URLRequest = new URLRequest('http://your_url/print_bitmap.php 
http://your_url/print_bitmap.php ');

var boundary:String = '--MIKA--';
url.contentType = 'multipart/form-data; boundary='+boundary;
boundary = '--'+boundary;

var data:ByteArray = new ByteArray;

data.writeUTFBytes(boundary+'\r\n');

// start new part
data.writeUTFBytes('Content-Disposition: form-data; name=file_upload; 
filename=image.png\r\n');
data.writeUTFBytes('Content-Type: image/png\r\n');
data.writeUTFBytes('Content-Transfer-Encoding: binary\r\n\r\n');
// write image data
data.writeBytes(imageData);
// terminate part
data.writeUTFBytes('\r\n'+boundary+'\r\n');

// start a new part if you want to send other POST variables
data.writeUTFBytes('Content-Disposition: form-data; name=test\r\n\r\n');
data.writeUTFBytes('mikaflash');
data.writeUTFBytes('\r\n'+boundary+'\r\n');

url.data = data;
url.method = URLRequestMethod.POST;

/*var Loader:URLLoader = new URLLoader();
Loader.addEventListener(Event.COMPLETE,onLoadComplete);
Loader.load(url);
*/
navigateToURL(url,'_self');   

Hope this helps you. May be there is a better way to do this, but it's working 
fine for me.

Mickael



Paramjit Jolly a écrit : 

Hi Prateek,

 

 I have seen your query, I am also looking for similar solution.

 

Infact similar stuff I come across 3 years back When I was working with 
flash-java.

That time I used POI for exporting charts  grid data in excel sheets 
which are templates (place holders) in server.

 

Now our client wants similar look  feel charts as  Flex.

 

For report generation I have tested 

Adobe life cycle is perfect product, I m trying for images of charts 
also.

 

Bty why u need image, if only for printing you can print using print 
job class.

 

Also check for flash paper.

 

 

Let me know if you get something goot for this.

 

 

 

Regards

Jolly

 


Life Fitness - A Division of Brunswick Corporation
Singapore-486066
http://www.lifefitness.com http://www.lifefitness.com  | 
http://www.brunswick.com http://www.brunswick.com  






From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
., Prateek (MSAS Sys Dev IBD)
Sent: Wednesday, February 14, 2007 8:16 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Exporting Charts as Image

 

Hi All

 

We are using Flex charts in our web app. We also have a need to export 
the chart as an image so that the same can be embedded in an email sent out to 
users.

Any pointers ?

 

Thanks

Prateek





NOTICE: If received in error, please destroy and notify sender. Sender 
does not intend to waive confidentiality or privilege. Use of this email is 
prohibited when received in error.

 



[flexcoders] Re: How to hide both Axes of a chart?

2007-02-16 Thread g_odds
Hi Lei,

Try setting the following in your chart:

mx:horizontalAxisRenderer
  mx:AxisRenderer showLabels=false showLine=false
tickPlacement=none /
/mx:horizontalAxisRenderer
mx:verticalAxisRenderer
  mx:AxisRenderer showLabels=false showLine=false
tickPlacement=none /
/mx:verticalAxisRenderer

Hope that works,

Graham


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

 Hi, group,
 In my use case, I need to hide both axes of a chart? Is there a 
 easy way to do that? I think it should be very simple, but I didn't 
 find any luck from flex online docs.
 
 Thanks,
 
 Lei (a newcomer)





[flexcoders] Re: Getting a component to hear click

2007-02-16 Thread jack_freud
I was able to get it to work by adding a listener for click but I 
don't understand why I had to do that.

Does anyone have a suggestion as to what was going on? 

Thanks,
Jack
--- In flexcoders@yahoogroups.com, jack_freud [EMAIL PROTECTED] wrote:

 I'm still pretty new to making components. Basically this one is 
like
 an image that navigates to a URL in HTML-land, except that I want to
 make it so you can set its text and URL as properties of the
 component. Seems to be utterly simple.
 
 But I can't get it to hear the click event...
 
 It extends VBox and contains a label. It has a member variable of a
 URL and a click event so that clicking on the box (or the label)
 should navigate to that url.  
 
 click does not show up in the auto-complete, but I get no errors
 when I implement it, and I see click there in the class hierarchy.
 
 But nothing happens. Breakpoints don't stop, nothing happens.
 
 What's got me puzzled is that in the mxml where I used this 
component,
 if I put code for the click event, it works flawlessly. Of course I
 could leave it there in the app, but naturally I'd prefer to
 encapsulate it so it has its own data and behaviors like any good
 little object.
 
 Is there something obvious I don't know?
 
 Thanks,
 
 Jack





Re: [flexcoders] Re: Getting notified when a user 'leaves/quits' the application

2007-02-16 Thread julien castelain

Thanks to all for the replies :)

So here's more details on what i wanted to acheive : A user is running the
application in a browser, can i get notified when he closes the browser
window, or switches to another page?

I was also thinking about the JS solution, but i was wondering if there was
a way to do this only using AS3 ... Paul's reply makes me think i should
have a look at SystemManager more closely :). I'll do my tests and see which
one i choose.

Ciao
Julien


On 2/16/07, Paul DeCoursey [EMAIL PROTECTED] wrote:


What is the intent here?  The SystemManager has some events that might
be of interest. deactivate is fired when the flayer loses focus... not
sure if this is fired when the browser closes or when you browse to a
different page, might be worth exploring.  There is also idle, fired
if the user doesn't do anything for a period of time, only 1 second,
but could be useful if you are just wanting to save a state.

I'd play around with deactivate and see when it fires. The javascript
will probably be the best route however.

pd


--- In flexcoders@yahoogroups.com, julien castelain [EMAIL PROTECTED]
wrote:

 Hi all,

 I was wondering if there was a way to be notified when the user
leaves or
 quits the application using AS3.

 Thanks.





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






[flexcoders] Re: Loading Image into BitmapData

2007-02-16 Thread shelleybrowning
Good Morning,

I've played around with this a bit to create pdf's from the chart 
components. I'm using a remote object to get the bit map data that 
is stored in database.  A little different than your case.

Here's how you would create a bit map object from an event result:

private function getBitMap_handler(event:ResultEvent):void{
var newBD : BitmapData = event.result;
targetImage.source = new Bitmap( newBD );
}

mx:RemoteObject id=BitmapCFC 
 destination=ColdFusion source=testingPDF1.Bitmap
mx:method name=getBitMap 
result=getBitMap_hanlder(event)
fault=getDataFault_handler(event)
mx:arguments
arg13D3C9DDD-123F-17FA-DFA5A5D93242EF5D/arg1
/mx:arguments
/mx:method
/mx:RemoteObject 

 mx:Image 
  id=targetImage 
  x=10 
  y=30/


Shelley Browning



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

 Hi,
 
 I have what I hope is a pretty simple problem, but I'm not sure 
how to 
 do it. I want to load in an image file (png or whatever) from a 
url and 
 store it locally in a BitmapData Object.
 
 I suspect I need to use the Loader class, but I'm not sure how to 
get 
 it out of this and into a BitmapData Object.
 
 Any tips appreciated! 
 
 P.S. I know I could probably load it into a UIComponent and then 
draw 
 it onto the BitmapData Object, but I'd rather avoid that if 
possible.





Re: [flexcoders] Embed TrueType font not working

2007-02-16 Thread David Chang
Hi,

I'm not sure if this is the same problem you're having cause it sounds 
like you're build goes thru fine with the font.  Anyways I'm on OSX also 
but none of my fonts embed when using the source attribute with the 
location of the font.  I've tested a dozen fonts and kept getting the 
message Error: exception during transcoding: Unexpected exception 
encountered while reading font file  Anyways providing the actual 
name of an installed font to the systemFont attribute worked every time 
so far...

[Embed(systemFont=Arial, fontName=myArial, 
mimeType=application/x-font)]
private var font1:Class;

I guess the compiler is only able to read windows-based truetype files.  
If this isn't the issue, did you bring over windows truetype fonts for 
embedding?

-David



flexcodersVK wrote:

 I've tried for several hours to use a embedded font without succes.

 I have:

 mx:Script
 ![CDATA[[
 [Embed(source=work/ttf/KIMSHAND.TTF,
 fontName=KIMSHAND,
 mimeType=application/x-font)]
 private var fontKIMSHAND:Class;
 ]]
 /mx:Script

 mx:Text
 id=helpText
 height=240
 width=240
 text=My help text
 fontSize=24 color=#ff fontFamily=KIMSHAND
 /mx:Text

 The .text isn't displayed when I run the project.
 I've trief a lot of other truetype fonts, but none are working.
 I'm using Flex 2.0.1 on OSX.

 Thanks for help!

 Jaap

  



[flexcoders] Windows Vista Flex

2007-02-16 Thread Bryan Clover
Hi All,

I'm new to this group and thought I'd start a topic where people can 
post their experiences with Flex Builder 2 and Windows Vista.  Here is 
mine:

1. Upgraded from Windows XP Home to Windows Vista Business.
   Chose the upgrade path..not the full reformat and clean install.
   (I wanted to see if I could get anway with not having to install the 
   5 million apps  utilities I use. Might have been mistake #1)

2. Day 1 - Vista appeared to install and run fine. Flex Builder worked 
   okay. However it did seem to compile / debug slower.

3. Day 2 - The trouble starts!  Several times Flex Builder just freezes
   up.  I can't even use task mangager to quit the application.  I'm
   forced to do a manual reboot.  Reminds me of the old Mac crashes!
   Ek. You know this is just bad stuff!  This happened 6 times or
   so during a full day of work. Occurred when trying to SAVE WORK!
   Ironic, but saving became something I was AFRAID TO DO!

4. Day 3 - Flex Builder really acting funky now.  When I try to
   compile / debug nothing appears in Firefox but a blank white page.
   This happens every time I try to debug or run my apps.  So I reboot.
   Still nothing!  Forced to uninstall Flex Builder.

5. After uninstalling Flex Builder I re-install it.  Everything goes
   smoothly during install.  Attempt to start application and get
   funky error that refers me to an error log. I locate error log,
   read thru it, and realize I'm screwed and can't fix things.
   Uninstall and re-install multiple times.  Same deal!
   NOTE: Using trial version installer of Flex Builder 2.0.1

6. Realizing I can no longer use Flex Builder, I am forced to go
   back to Windows XP.  While I reformat my machine (which is a
   Dell Latitude D820, Dual Core, Vista Capable machine) I'll be
   pulling out my Mac Powerbook.

Recommendation: Forget Windows Vista!  Stay with XP...or even better,
just stick with the Mac in the first place!  I always use both
platforms...just because...and my Mac always comes out on top!

I'm curious to hear what other people have experienced. Please share 
your experience

=BC=




[flexcoders] File Upload and Session

2007-02-16 Thread john_69_11
I'm trying to do a file upload to a server (running rails if that
matters).  When I upload the file it gets sent to the server fine, but
gets it's own seperate session.  There is also no way to pass a result
(like the stored filename) back to flash.  Does anyone know of a way
to get around this?

Thanks,

-John



Re: [flexcoders] Re: flex and IE 7 problems.

2007-02-16 Thread dorkie dork from dorktown

btw. to clear things up. my issue was with flash player 8 (haven't tried 9
with this same bug), flash and it had to do with IE security. can you try it
outside of your network? or come up with a simple example we can test?

try it without setting the content type (as just a string). also try
escaping the characters before you send them. if you can isolate the source
you have something to work with.

On 2/15/07, dorkie dork from dorktown [EMAIL PROTECTED]
wrote:


i've run into some problems with ie6, https and frames. i had to come up
with a crazy workaround. here is what you do. come up with a simple test
sandbox so that you can isolate the problem. if it persists then post it to
the list so we can verify.


On 2/14/07, mthielman11 [EMAIL PROTECTED] wrote:

 Yes this is a flex 2 app.  Nothing crazy going on at all.  A simple HTTP
 post to do a user
 login.  It sends 2 fields via xml back to the DB.  Server side its a
 resin server sending data to
 PostgreSQL.  When we tracked the logs its as REALLY strange.  a user was
 loggin in,
 username and was ferrall.  For some reason the log kept showing he was
 typing farrell.  we
 thought it was user error till we tried it and the same thing
 happened.  Also was changing
 other things we typed in.  SOme usernam e combos would cause the app to
 not even send
 anything to the server.  Again everything works perfectly fine in every
 other browser we have
 tried.  Only IE7 is causing the issue.



  I have been using IE 7 for a long time now with many, many flex apps
 and
  have not seen any issues. This is a flex 2 app right? Is there any
 other
  code involved on this login page outside of the swf? Perhaps some
  javascript or something else? Most of the changes in IE 7 that would
  break existing code are secure by default related. But it should not
  effect the Flash Player much at all. How are you doing your login?
 HTTP
  Post? Web service?




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







[flexcoders] Re: File Upload and Session

2007-02-16 Thread Paul DeCoursey
In the past I've had flash retrieve the sessionid and then I add that
to the file upload request so that they share the session.  I don't
use Rails so I'm sure of the details of how to accomplish it for your app.

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

 I'm trying to do a file upload to a server (running rails if that
 matters).  When I upload the file it gets sent to the server fine, but
 gets it's own seperate session.  There is also no way to pass a result
 (like the stored filename) back to flash.  Does anyone know of a way
 to get around this?
 
 Thanks,
 
 -John





Re: [flexcoders] File Upload and Session

2007-02-16 Thread Yiðit Boyar
i send a unique id with the file and when the uploading is done a service 
call(using the same unique id) is triggerred to get the name of the file.
i dont know if there is a better option but you should check mail archive...

- Original Message 
From: john_69_11 [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, February 16, 2007 5:30:25 PM
Subject: [flexcoders] File Upload and Session









  



I'm trying to do a file upload to a server (running rails if that

matters).  When I upload the file it gets sent to the server fine, but

gets it's own seperate session.  There is also no way to pass a result

(like the stored filename) back to flash.  Does anyone know of a way

to get around this?



Thanks,



-John






  







!--

#ygrp-mlmsg {font-size:13px;font-family:arial,helvetica,clean,sans-serif;}
#ygrp-mlmsg table {font-size:inherit;font:100%;}
#ygrp-mlmsg select, input, textarea {font:99% arial,helvetica,clean,sans-serif;}
#ygrp-mlmsg pre, code {font:115% monospace;}
#ygrp-mlmsg * {line-height:1.22em;}
#ygrp-text{
font-family:Georgia;
}
#ygrp-text p{
margin:0 0 1em 0;
}
#ygrp-tpmsgs{
font-family:Arial;
clear:both;
}
#ygrp-vitnav{
padding-top:10px;
font-family:Verdana;
font-size:77%;
margin:0;
}
#ygrp-vitnav a{
padding:0 1px;
}
#ygrp-actbar{
clear:both;
margin:25px 0;
white-space:nowrap;
color:#666;
text-align:right;
}
#ygrp-actbar .left{
float:left;
white-space:nowrap;
}
.bld{font-weight:bold;}
#ygrp-grft{
font-family:Verdana;
font-size:77%;
padding:15px 0;
}
#ygrp-ft{
font-family:verdana;
font-size:77%;
border-top:1px solid #666;
padding:5px 0;
}
#ygrp-mlmsg #logo{
padding-bottom:10px;
}

#ygrp-vital{
background-color:#e0ecee;
margin-bottom:20px;
padding:2px 0 8px 8px;
}
#ygrp-vital #vithd{
font-size:77%;
font-family:Verdana;
font-weight:bold;
color:#333;
text-transform:uppercase;
}
#ygrp-vital ul{
padding:0;
margin:2px 0;
}
#ygrp-vital ul li{
list-style-type:none;
clear:both;
border:1px solid #e0ecee;
}
#ygrp-vital ul li .ct{
font-weight:bold;
color:#ff7900;
float:right;
width:2em;
text-align:right;
padding-right:.5em;
}
#ygrp-vital ul li .cat{
font-weight:bold;
}
#ygrp-vital a {
text-decoration:none;
}

#ygrp-vital a:hover{
text-decoration:underline;
}

#ygrp-sponsor #hd{
color:#999;
font-size:77%;
}
#ygrp-sponsor #ov{
padding:6px 13px;
background-color:#e0ecee;
margin-bottom:20px;
}
#ygrp-sponsor #ov ul{
padding:0 0 0 8px;
margin:0;
}
#ygrp-sponsor #ov li{
list-style-type:square;
padding:6px 0;
font-size:77%;
}
#ygrp-sponsor #ov li a{
text-decoration:none;
font-size:130%;
}
#ygrp-sponsor #nc {
background-color:#eee;
margin-bottom:20px;
padding:0 8px;
}
#ygrp-sponsor .ad{
padding:8px 0;
}
#ygrp-sponsor .ad #hd1{
font-family:Arial;
font-weight:bold;
color:#628c2a;
font-size:100%;
line-height:122%;
}
#ygrp-sponsor .ad a{
text-decoration:none;
}
#ygrp-sponsor .ad a:hover{
text-decoration:underline;
}
#ygrp-sponsor .ad p{
margin:0;
}
o {font-size:0;}
.MsoNormal {
margin:0 0 0 0;
}
#ygrp-text tt{
font-size:120%;
}
blockquote{margin:0 0 0 4px;}
.replbq {margin:4;}
--








 

The fish are biting. 
Get more visitors on your site using Yahoo! Search Marketing.
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php

[flexcoders] remove ToolTip

2007-02-16 Thread Pablo

Hi All.

package components
{
   import mx.core.IToolTip;
   import mx.managers.ToolTipManager;

   public class FastSearchPanel
   {
   private var parent:AdvancedTitleWindow;
   private var tooltip:IToolTip;

   public function FastSearchPanel(__parent:AdvancedTitleWindow)
   {
   parent=__parent;
   }

   public function showString(__string:String):void
   {
   if (tooltip==null)
   {
   open();
   }
   tooltip.text=__string
   }

   public function open():void
   {
   tooltip=ToolTipManager.createToolTip(,parent.x,parent.y);
   }

   public function close():void
   {
   if (tooltip!=null)
   {
   ToolTipManager.destroyToolTip(tooltip)
   }
   }
   }
}

when calling ToolTipManager.destroyToolTip(tooltip) builder display error:

ArgumentError: Error #2025: The supplied DisplayObject must be a child of
the caller.
   at flash.display::DisplayObjectContainer/getChildIndex()
   at
mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::rawChildren_getChildIndex
()[C:\dev\flex_201_gmc\sdk\frameworks\mx\managers\SystemManager.as:1659]
   at mx.managers::SystemChildrenList/removeChild
()[C:\dev\flex_201_gmc\sdk\frameworks\mx\managers\SystemChildrenList.as:130]
   at mx.managers::ToolTipManagerImpl/destroyToolTip
()[C:\dev\flex_201_gmc\sdk\frameworks\mx\managers\ToolTipManagerImpl.as:1137]
   at mx.managers::ToolTipManager$/destroyToolTip
()[C:\dev\flex_201_gmc\sdk\frameworks\mx\managers\ToolTipManager.as:341]
   at cad.components::FastSearchPanel/close
()[D:\_Projects\WebApps\CAD\application\cad\components\FastSearchPanel.as:34]
   at cad.view::InquireForm/view:InquireForm::onLostFocus
()[D:\_Projects\WebApps\application\view\InquireForm.mxml:103]

What wrong?


[flexcoders] Call for Beta Participation

2007-02-16 Thread Eric D Anderson
Hello,

I wanted to let you know about the beta program for the next generation
of Data Services technology that is currently available.  This beta
includes a number of new capabilities targeted at Flex application
development using both Flex Data Services or application development
using the Flex SDK including: 

* A new Flex SDK which includes updates to the client-side Web Services
library
* Server-side PDF generation capabilities for RIA applications
* Runtime configuration of data destinations in Data Services
* Support for WSRP portal deployment of Flex applications
* Per Client Messaging QoS allowing Flex clients to select custom data
access policies for real-time data
* AJAX Data Services enabling AJAX applications to take advantage of the
data management and messaging capabilities available in Data Services
* Improved off-line message caching for Flex applications
* RTMP tunneling (RTMPT)
* A SQL adaptor which dramatically simplifies the development of
applications using data management services
* JSP Tags for MXML development
* Several important enhancements to core Data Services performance and
scalability

If you are available and interested in participating in this beta
program please feel free to get in touch with me directly and we'll get
you set up.

Thanks

Eric

Eric Anderson | Product Manager, Flex | Adobe Systems Incorporated | W:
+1 617 219 2306 | C: +1 508 471 6696



Re: [flexcoders] Re: Getting notified when a user 'leaves/quits' the application

2007-02-16 Thread Clint Modien

Currently there's no event notification in AS3.

I haven't implemented it myself (yet) but I've read that the javascript
onBeforeUnload event works best.

Currently we're using the session timeout on the server to tell us that the
user has gone away.

On 2/16/07, julien castelain [EMAIL PROTECTED] wrote:


  Thanks to all for the replies :)

So here's more details on what i wanted to acheive : A user is running the
application in a browser, can i get notified when he closes the browser
window, or switches to another page?

I was also thinking about the JS solution, but i was wondering if there
was a way to do this only using AS3 ... Paul's reply makes me think i should
have a look at SystemManager more closely :). I'll do my tests and see which
one i choose.

Ciao
Julien


On 2/16/07, Paul DeCoursey [EMAIL PROTECTED] wrote:

 What is the intent here?  The SystemManager has some events that might
 be of interest. deactivate is fired when the flayer loses focus... not
 sure if this is fired when the browser closes or when you browse to a
 different page, might be worth exploring.  There is also idle, fired
 if the user doesn't do anything for a period of time, only 1 second,
 but could be useful if you are just wanting to save a state.

 I'd play around with deactivate and see when it fires. The javascript
 will probably be the best route however.

 pd


 --- In flexcoders@yahoogroups.com, julien castelain [EMAIL PROTECTED]
 wrote:
 
  Hi all,
 
  I was wondering if there was a way to be notified when the user
 leaves or
  quits the application using AS3.
 
  Thanks.
 




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




 



[flexcoders] new HTTPService() using AS

2007-02-16 Thread pdflibpilot
I need to specify variable result events for HTTPservice request I
hope to create dynamically.

I can build the request using 

var requestHTTP = new HTTPService();
requestHTTP.url = http://mydomain.com/my.php;  
requestHTTP.method
= POST; etc.

but I have not be successful specifying a variable result event. Is
there not a solution that would allow a totally dynamic HTTPService
request to be generated ? 

Otherwise I have to hard-code each of the possibilities as a separate
component.



[flexcoders] Re: Embed an image

2007-02-16 Thread Doug Lowder
One way is to create a JSP page on your server that reads the 
database and streams the content to the servlet output.  In Flex, 
you can then set the mx:Image tag's source property to the URL of 
the JSP page.

HTH,
Doug

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

 
 Actually i want to retrieve an image in a Flex Component (Flex 1.5 
 Application) from a java file (in java file i am getting the image 
 from the database ).
 As mx:Image tag only takes source as an attribute  .How should i 
do 
 this ? 
 
 Thanks,
 Monika





RE: [flexcoders] Re: Access SOAP fault code

2007-02-16 Thread Carson Hager
Someone posted the solution for IIS some time ago. I would search the
archive.
 
 
Carson

 
Carson Hager
Cynergy Systems, Inc.
http://www.cynergysystems.com http://www.cynergysystems.com/ 
 
Email:  [EMAIL PROTECTED]
Office:  866-CYNERGY
Mobile: 1.703.489.6466

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of nilsgildo
Sent: Friday, February 16, 2007 6:06 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Access SOAP fault code



Hello Daniel,

did you find any solution for this problem?
Excepting the idea to add an error-property to all data types ;-)

Im using an ASP.NET Webservice as producer, like you.

Thx, BR
Nils

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Daniel Tuppeny [EMAIL PROTECTED] wrote:

 Cool, I thought it just copied the one from IE! In any case, I guess
the
 WinForms one would be different. Thanks :-)
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of Carson Hager
 Sent: 20 June 2006 15:01
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ;
flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: RE: [flexcoders] Access SOAP fault code
 
 
 You can definitely do this so that only the flex app gets the affected
 response. The FP has a unique user agent name that you can look at to
 determine if you need to change the http status code or not. That's
how
 we've done this.
 
 
 Carson
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
on behalf of Daniel Tuppeny
 Sent: Tue 6/20/2006 9:50 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: RE: [flexcoders] Access SOAP fault code
 
 
 
 We've not got many implementations so far, so there's not a great deal
 to change, it's the fact that it's messy that I don't like, rather
than
 there's more work involved. Having real exceptions sent back to the
 client is way more convenient than try/catch'ing everything and
 returning a custom error object.
 
 Maybe we can add some HttpHandlers that catch our web services and
 change the response header, but it's a little nasty, especially given
 those services may be called by other apps (like ClickOnce WinForms),
 which we'd want to server the real response to.
 
 We'll play around when we get that far, and see what works best.
 
 Thanks for the info!
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of Carson Hager
 Sent: 20 June 2006 14:22
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ;
flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: RE: [flexcoders] Access SOAP fault code
 
 
 Sorry. I got you mixed up with the original poster.
 
 I'd be really surprised if you couldn't do this in .NET more
generically
 than that. I'd hate to see you have to change all of your
 implementations. We made this very clear to Adobe that this was not
 acceptable but that didn't seem to matter. It was made pretty clear to
 us that the player would not be changing. Personally, I'd rather the
 product was delayed in order to get this right from the beginning.
Once
 more people who have significant experience come to Flex, they are all
 going to find this as apalling as you have. I'd hate to see Flex get a
 bad rap over this.
 
 
 Carson
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
on behalf of Daniel Tuppeny
 Sent: Tue 6/20/2006 9:21 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: RE: [flexcoders] Access SOAP fault code
 
 
 
 We're using .NET web services, no cold fusion.
 
 Looks like we'll have to wrap all responses in try/catch, and return
an
 object with an error property, and the actual data as another
property.
 Disgusting :-(
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of Carson Hager
 Sent: 20 June 2006 14:11
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ;
flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: RE: [flexcoders] Access SOAP fault code
 
 
 Preaching to the choir. :) Believe me...we feel the same way. From
 everything we have heard from Adobe, this will not be addressed within
 the player within this release.
 
 That being said, does CF support anything like filters in J2EE that
 allow you to do things like alter the contents of all responses before
 they leave the server? If so, you can simply change that HTTP status
 code to 200 

[flexcoders] A cool TimeSelector component for you guys to downlod ...

2007-02-16 Thread helihobby
I posted a cool easy to extend time selector as a thank you for the 
support this group has given me.

You may download here:

http://www.adobe.com/cfusion/exchange/index.cfm?
view=sn101yourExID=uploads#loc=en_usview=sn611viewName=%
20authorid=77552239page=0scrollPos=0subcatid=0snid=sn611itemnumber
=0extid=1144469catid=0yourExID=uploads

Regards,

Sean - HeliHobby.com



Re: [flexcoders] new HTTPService() using AS

2007-02-16 Thread Yiðit Boyar
you need to add an event listener for the result event of httpService.
here is an example code for you :
public function listen(e:Event):void{
trace('listening');
}
public function dynamicReq():void{
var req:HTTPService=new HTTPService();
req.url=http://mydomain. com/my.php   
;
req.addEventListener(result,listen);
req.send();
trace('sent req');
}

- Original Message 
From: pdflibpilot [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, February 16, 2007 6:57:15 PM
Subject: [flexcoders] new HTTPService() using AS









  



I need to specify variable result events for HTTPservice request I

hope to create dynamically.



I can build the request using 



var requestHTTP = new HTTPService( );

requestHTTP. url = http://mydomain. com/my.php
requestHTTP. method

= POST; etc.



but I have not be successful specifying a variable result event. Is

there not a solution that would allow a totally dynamic HTTPService

request to be generated ? 



Otherwise I have to hard-code each of the possibilities as a separate

component.






  







!--

#ygrp-mlmsg {font-size:13px;font-family:arial,helvetica,clean,sans-serif;}
#ygrp-mlmsg table {font-size:inherit;font:100%;}
#ygrp-mlmsg select, input, textarea {font:99% arial,helvetica,clean,sans-serif;}
#ygrp-mlmsg pre, code {font:115% monospace;}
#ygrp-mlmsg * {line-height:1.22em;}
#ygrp-text{
font-family:Georgia;
}
#ygrp-text p{
margin:0 0 1em 0;
}
#ygrp-tpmsgs{
font-family:Arial;
clear:both;
}
#ygrp-vitnav{
padding-top:10px;
font-family:Verdana;
font-size:77%;
margin:0;
}
#ygrp-vitnav a{
padding:0 1px;
}
#ygrp-actbar{
clear:both;
margin:25px 0;
white-space:nowrap;
color:#666;
text-align:right;
}
#ygrp-actbar .left{
float:left;
white-space:nowrap;
}
.bld{font-weight:bold;}
#ygrp-grft{
font-family:Verdana;
font-size:77%;
padding:15px 0;
}
#ygrp-ft{
font-family:verdana;
font-size:77%;
border-top:1px solid #666;
padding:5px 0;
}
#ygrp-mlmsg #logo{
padding-bottom:10px;
}

#ygrp-vital{
background-color:#e0ecee;
margin-bottom:20px;
padding:2px 0 8px 8px;
}
#ygrp-vital #vithd{
font-size:77%;
font-family:Verdana;
font-weight:bold;
color:#333;
text-transform:uppercase;
}
#ygrp-vital ul{
padding:0;
margin:2px 0;
}
#ygrp-vital ul li{
list-style-type:none;
clear:both;
border:1px solid #e0ecee;
}
#ygrp-vital ul li .ct{
font-weight:bold;
color:#ff7900;
float:right;
width:2em;
text-align:right;
padding-right:.5em;
}
#ygrp-vital ul li .cat{
font-weight:bold;
}
#ygrp-vital a {
text-decoration:none;
}

#ygrp-vital a:hover{
text-decoration:underline;
}

#ygrp-sponsor #hd{
color:#999;
font-size:77%;
}
#ygrp-sponsor #ov{
padding:6px 13px;
background-color:#e0ecee;
margin-bottom:20px;
}
#ygrp-sponsor #ov ul{
padding:0 0 0 8px;
margin:0;
}
#ygrp-sponsor #ov li{
list-style-type:square;
padding:6px 0;
font-size:77%;
}
#ygrp-sponsor #ov li a{
text-decoration:none;
font-size:130%;
}
#ygrp-sponsor #nc {
background-color:#eee;
margin-bottom:20px;
padding:0 8px;
}
#ygrp-sponsor .ad{
padding:8px 0;
}
#ygrp-sponsor .ad #hd1{
font-family:Arial;
font-weight:bold;
color:#628c2a;
font-size:100%;
line-height:122%;
}
#ygrp-sponsor .ad a{
text-decoration:none;
}
#ygrp-sponsor .ad a:hover{
text-decoration:underline;
}
#ygrp-sponsor .ad p{
margin:0;
}
o {font-size:0;}
.MsoNormal {
margin:0 0 0 0;
}
#ygrp-text tt{
font-size:120%;
}
blockquote{margin:0 0 0 4px;}
.replbq {margin:4;}
--








 

It's here! Your new message!  
Get new email alerts with the free Yahoo! Toolbar.
http://tools.search.yahoo.com/toolbar/features/mail/

Re: [flexcoders] Embed TrueType font not working

2007-02-16 Thread Paul Hastings
On 2/16/07, David Chang [EMAIL PROTECTED] wrote:
 Hi,

 I'm not sure if this is the same problem you're having cause it sounds
 like you're build goes thru fine with the font.  Anyways I'm on OSX also
 but none of my fonts embed when using the source attribute with the
 location of the font.  I've tested a dozen fonts and kept getting the

this works for us:

// north arrow
 [Embed(mimeType=application/x-font,
source=assets/fonts/northArrows.ttf,fontName=North Arrows)]
private var northArrowClass:Class;


[flexcoders] Re: A cool TimeSelector component for you guys to downlod ...

2007-02-16 Thread helihobby
a href=http://www.adobe.com/cfusion/exchange/index.cfm?
view=sn610#loc=en_usview=sn611viewName=%
20authorid=0page=0scrollPos=0subcatid=0snid=sn611itemnumber=-
1extid=1144469catid=0Click here to download/a/b

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

 I posted a cool easy to extend time selector as a thank you for the 
 support this group has given me.
 
 You may download here:
 
 http://www.adobe.com/cfusion/exchange/index.cfm?
 view=sn101yourExID=uploads#loc=en_usview=sn611viewName=%
 
20authorid=77552239page=0scrollPos=0subcatid=0snid=sn611itemnumber
 =0extid=1144469catid=0yourExID=uploads
 
 Regards,
 
 Sean - HeliHobby.com





Re: [flexcoders] A cool TimeSelector component for you guys to downlod ...

2007-02-16 Thread jwopitz

You should also post a reference to flexcomponents@yahoogroups.com so as to
receive more feedback and visibility.  Pretty cool

On 2/16/07, helihobby [EMAIL PROTECTED] wrote:


I posted a cool easy to extend time selector as a thank you for the
support this group has given me.

You may download here:

http://www.adobe.com/cfusion/exchange/index.cfm?
view=sn101yourExID=uploads#loc=en_usview=sn611viewName=%
20authorid=77552239page=0scrollPos=0subcatid=0snid=sn611itemnumber
=0extid=1144469catid=0yourExID=uploads

Regards,

Sean - HeliHobby.com



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







--
justin w. opitz
617.771.6639
jwopitz(at)gmail.com


Re: [flexcoders] Re: addEventListener and additional arguments?

2007-02-16 Thread Troy Gilbert

The reason I suggested an anonymous function was that it gave you the
opportunity to tie additional arguments to the function without the callee
being aware of it -- which was the original poster's question, how can you
pass additional arguments into a function that'll be called by an event
handler. This was my initial thought on how to do this (since functions are
objects).

If performance was a problem, I guess you could just create a wrapper object
with a single method. You'd create a new instance of that wrapper object for
each customized invocation of the function you wanted. Though that feels a
lot heavier, since the function that's bound to the event handler is a
method I guess its easier on the VM.

Troy.


On 2/15/07, Francis Cheng [EMAIL PROTECTED] wrote:


   Another reason the anonymous function technique is not recommended for
event handlers is that the 'this' keyword in an anonymous function refers to
the global object whereas if you use a method, the 'this' keyword refers to
that method's associated object.



Francis


 --

*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *Gordon Smith
*Sent:* Thursday, February 15, 2007 3:45 PM
*To:* flexcoders@yahoogroups.com
*Subject:* RE: [flexcoders] Re: addEventListener and additional arguments?



The expense is in making an activation frame (or something like that)
for anonymous functions. I don't have numbers on how much worse the
performance is. It probably doesn't make a significant difference for
occasional events.



Nevertheless, when we write framework classes, we almost always use
methods for event handlers. Is there a reason that you prefer to use an
anonymous function?



- Gordon


 --

*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *Troy Gilbert
*Sent:* Thursday, February 15, 2007 11:59 AM
*To:* flexcoders@yahoogroups.com
*Subject:* Re: [flexcoders] Re: addEventListener and additional arguments?

How much worse is the performance? Are we talking on the order of a dozen
or so extra instructions or orders of magnitude more?

And I guess it would depend on the event being handled, right? Sure, it
may be cost-prohibitive for onEnterFrame, but what something like
onMouseDown or even onCreationComplete?

[Note: I'm using the old style event names as I find it more readable when
discussing them.]

And what's the expensive part? The binding of the anonymous function
object rather than a method, or executing the function object rather than a
method? I would assume the latter, since the former should be identical
(they're both objects, right?).

And doesn't an event listener just store a collection of Function objects?
So it's already dispatching through a function object, which makes me think
that the overhead is in managing closure, etc?

Troy.

 On 2/15/07, *Gordon Smith* [EMAIL PROTECTED] wrote:

Using anonymous functions as event handlers isn't recommended, as they
have worse performance than using methods.



- Gordon


 --

*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *Troy Gilbert
*Sent:* Wednesday, February 14, 2007 9:44 PM
*To:* flexcoders@yahoogroups.com
*Subject:* Re: [flexcoders] Re: addEventListener and additional arguments?

Remember, functions are objects to (so you can treat them like fancy
functors in C++):

var functor:Function = function(arg:String):String { return arg +
functor[param]; }
functor[param] = dolly;
trace(functor(hello); // outputs hellodolly


or, for events:

var myEventHandler:Function = function(event:MouseEvent):void {
trace(myEventHandler[extraData]); }
myEventHandler[extraData] = hellodolly;
this.stage.addEventListener(MouseEvent.CLICK , myEventHandler);
// when you click on the stage, you'll get the debug message hellodolly



This'll give you what you're looking for. Not sure what the best way to
copy a functor object would be... but you could definitely just create a
new, separately named Function object for each form item that wraps your
function, passing in the the extraData.

Troy.

 On 2/14/07, *Gordon Smith*  [EMAIL PROTECTED] wrote:

Here's an example of what I meant:



?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml 

mx:Script
![CDATA[

private var foo:int = 7;

private function clickHandler(event:MouseEvent):void
{
trace(foo);
}



 ]]
 /mx:Script

mx:Button click=clickHandler(event)/



/mx:Application

Note that the Button's clickHandler() can access the instance variable
'foo', despite the fact that 'foo' isn't passed to clickHandler() and 'foo'
isn't a property of event.target, which is the Button.



The reason that clickHandler() can access 'foo' is that when
clickHandler() executes, 'this' is the Application (or whatever component
you're writing).



- Gordon


 --

*From:* 

Re: [flexcoders] Windows Vista Flex

2007-02-16 Thread Eric Zelermyer
I have been using Windows Vista Home Premium with Eclipse and the Flex 
Builder plugin for several weeks now without any issues. I upgraded my 
machine with a clean install, and I made sure to use Eclipse 3.2.2. From 
what I understand 3.3 and 3.2.2 both include Vista-specific fixes, but 
Flex Builder has issues with 3.3. Everything is running smoothly, in 
fact Eclipse seems to load faster than it did under XP (but I am on a 
high-end machine with 2 gigs of RAM).

   - Eric

Bryan Clover wrote:

 Hi All,

 I'm new to this group and thought I'd start a topic where people can
 post their experiences with Flex Builder 2 and Windows Vista. Here is
 mine:

 1. Upgraded from Windows XP Home to Windows Vista Business.
 Chose the upgrade path..not the full reformat and clean install.
 (I wanted to see if I could get anway with not having to install the
 5 million apps  utilities I use. Might have been mistake #1)

 2. Day 1 - Vista appeared to install and run fine. Flex Builder worked
 okay. However it did seem to compile / debug slower.

 3. Day 2 - The trouble starts! Several times Flex Builder just freezes
 up. I can't even use task mangager to quit the application. I'm
 forced to do a manual reboot. Reminds me of the old Mac crashes!
 Ek. You know this is just bad stuff! This happened 6 times or
 so during a full day of work. Occurred when trying to SAVE WORK!
 Ironic, but saving became something I was AFRAID TO DO!

 4. Day 3 - Flex Builder really acting funky now. When I try to
 compile / debug nothing appears in Firefox but a blank white page.
 This happens every time I try to debug or run my apps. So I reboot.
 Still nothing! Forced to uninstall Flex Builder.

 5. After uninstalling Flex Builder I re-install it. Everything goes
 smoothly during install. Attempt to start application and get
 funky error that refers me to an error log. I locate error log,
 read thru it, and realize I'm screwed and can't fix things.
 Uninstall and re-install multiple times. Same deal!
 NOTE: Using trial version installer of Flex Builder 2.0.1

 6. Realizing I can no longer use Flex Builder, I am forced to go
 back to Windows XP. While I reformat my machine (which is a
 Dell Latitude D820, Dual Core, Vista Capable machine) I'll be
 pulling out my Mac Powerbook.

 Recommendation: Forget Windows Vista! Stay with XP...or even better,
 just stick with the Mac in the first place! I always use both
 platforms...just because...and my Mac always comes out on top!

 I'm curious to hear what other people have experienced. Please share
 your experience

 =BC=

  


Re: [flexcoders] Re: A cool TimeSelector component for you guys to downlod ...

2007-02-16 Thread jwopitz

This is what I am talking about not the flex exchange:

http://tech.groups.yahoo.com/group/flexcomponents/

On 2/16/07, helihobby [EMAIL PROTECTED] wrote:


a href=http://www.adobe.com/cfusion/exchange/index.cfm?
view=sn610#loc=en_usview=sn611viewName=%
20authorid=0page=0scrollPos=0subcatid=0snid=sn611itemnumber=-
1extid=1144469catid=0Click here to download/a/b

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

 I posted a cool easy to extend time selector as a thank you for the
 support this group has given me.

 You may download here:

 http://www.adobe.com/cfusion/exchange/index.cfm?
 view=sn101yourExID=uploads#loc=en_usview=sn611viewName=%

20authorid=77552239page=0scrollPos=0subcatid=0snid=sn611itemnumber
 =0extid=1144469catid=0yourExID=uploads

 Regards,

 Sean - HeliHobby.com





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







--
justin w. opitz
617.771.6639
jwopitz(at)gmail.com


[flexcoders] Wet Behind the ears

2007-02-16 Thread Wally Callerio
Hello group... I am wet behind the ears and just getting into flex so
please don't make fun of my ignorance. 

 

Combobox:

I am trying to get the objects in my array to trigger different states..
How would I do this?

 

Regards,

Wally 

 

 



[flexcoders] Re: FDS/Hibernate Sample of updating hierarchical list of values

2007-02-16 Thread parkerwhirlow
Thats very unfortunate. I'm getting farther and farther into hot water
not being able to reliably update our data model using Flex.

Last it was just wait for 2.0.1, there's a lot of Hibernate/FDS fixes
in it and now we're waiting for another unknown amount of time for
fixes we can only hope will help our situation.

I'm apologize, I understand it's not your fault, and I really
appreciate the insight you provide as to what can be causing our
problems, I'm just getting up to my neck in unsolved problems.

If you have any insight as to roughly when this next release could
occur, can you tip me off?

thanks,
PW

--- In flexcoders@yahoogroups.com, Jeff Vroom [EMAIL PROTECTED] wrote:

 I have finished making the changes and the use of the merge call seems
 to be a) much simpler and b) more robust than the way the current code
 works.   
 
  
 
 Unfortunately we've made enough changes to the code surrounding the
 HibernateAssembler so I can't just send you the updated file and have it
 work in FDS2.  It will be in an upcoming public beta but I don't think
 we've announced the dates on that.  
 
  
 
 Jeff
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of parkerwhirlow
 Sent: Thursday, February 15, 2007 3:29 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: FDS/Hibernate Sample of updating hierarchical
 list of values
 
  
 
 Hey Jeff, just curious if you've got any updated HibernateAssembler
 code with some fixes? Any idea when this would be available?
 
 thanks,
 PW
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Jeff Vroom jvroom@ wrote:
 
  My apologies - this does look like a bug. I need to do more testing on
  this case myself, but I think one of the big problems here is that we
  are trying to do conflict detection on our own in the hibernate
  assembler's updateItem method. Unless you are using a strict isolation
  level in your DB (repeatable read or serializable) this is not going
 to
  be transactionally correct anyway since the DB version can be modified
  after we have executed the query and before we do our update. We
  probably should not be getting the server version at all... hibernate
  has its own optimistic concurrency support that we should be using if
 it
  is enabled. That is probably the only way to get atomic conflict
  detection without resorting to using those particularly slow isolation
  levels. 
  
  
  
  That would potentially get rid of the conflicting version of the item
 in
  the transaction. The other thing I need to look into is the merge
  method in hibernate. Seems like we should probably be using that in
 the
  updateItem method? I'll be working on this next week so will send out
  any updates I can to the code.
  
  
  
  Jeff
  
  
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of parkerwhirlow
  Sent: Thursday, February 01, 2007 6:05 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] FDS/Hibernate Sample of updating hierarchical
 list
  of values
  
  
  
  
  Hi all,
  
  I have been tearing my hair out trying to get FDS/Hibernate to update
  a hierarchical list of values. Even the simplest of collection
  mappings in Hibernate cause various exceptions when trying to update.
  
  Before I post my details, does anyone have any examples of this that
  work? Has anyone ever even gotten this to work?
  
  I have two objects mapped in Hibernate:
  
  - Family
  Person
  
  where a Family has a Set of Person familyMembers.
  
  My FDS destination is to Family, and I am trying to update a family
  member (just the name) through this destination.
  
  First, I was getting Hibernate NonUniqueObjectException, which I
  finally tracked down to having my hibernate collection mapping set to
  lazy=false This caused all of the family member Person objects to be
  loaded into the PersistenceContext when the HibernateAssembler loaded
  the serverVersion of the Family. 
  
  Then, once I set lazy=true on the collection mapping, I was getting an
  exception that A collection with cascade=all-delete-orphan was no
  longer referenced by the owning entity instance... since it is
  assigning a whole new collection to the familyMembers property one
  becomes unreferenced, and the other referenced. Sooo I can't use
  delete orphan to delete the family members when the family is
  deleted... OK. So then I make cascade=all.
  
  Now I'm getting ORA-01407: cannot update
  (SCHEMA.T_PERSON.FAMILYID) to NULL... I'm guessing that it's
  processing the dereferenced collection first (trying to detatch any
  Person's from the family before they're re-attached by the new
  collection. I can't believe this is so difficult...
  
  For more info on my setup and test case, please see my original post:
  

[flexcoders] Cannot access a property or method of a null object reference

2007-02-16 Thread napearson99
I often get this error and I usually know why.  Does anyone know how
to check for a null reference?

i.e.

if (dataprovider[i].someValue is null){
 dothis();
}

Where dataprovider[i] does not have a someValue property.  I bet this
is pretty simple and I just don't know the syntax.  Thanks in advance!



[flexcoders] Re: Cannot access a property or method of a null object reference

2007-02-16 Thread Paul DeCoursey
if (dataprovider[i].someValue == null){
...
}

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

 I often get this error and I usually know why.  Does anyone know how
 to check for a null reference?
 
 i.e.
 
 if (dataprovider[i].someValue is null){
  dothis();
 }
 
 Where dataprovider[i] does not have a someValue property.  I bet this
 is pretty simple and I just don't know the syntax.  Thanks in advance!





[flexcoders] Re: Cannot access a property or method of a null object reference

2007-02-16 Thread napearson99
What if the property.someValue does not exist?  How do I check if the
reference to dataprovider[i].someValue property is null?

my dataprovider is an arraycollection and holds different objects. 
Some objects have .someValue property and some do not.  When i try to
step through it it doesn't like it when it expects a property but it
is not there.

ReferenceError: Error #1069: Property Desc not found on
DragDrop_inlineComponent1 and there is no default value.

--- In flexcoders@yahoogroups.com, Paul DeCoursey [EMAIL PROTECTED] wrote:

 if (dataprovider[i].someValue == null){
 ...
 }
 
 --- In flexcoders@yahoogroups.com, napearson99 napearson99@ wrote:
 
  I often get this error and I usually know why.  Does anyone know how
  to check for a null reference?
  
  i.e.
  
  if (dataprovider[i].someValue is null){
   dothis();
  }
  
  Where dataprovider[i] does not have a someValue property.  I bet this
  is pretty simple and I just don't know the syntax.  Thanks in advance!
 





[flexcoders] FDS/Hibernate - LazyInitializationException when writing AMF output

2007-02-16 Thread parkerwhirlow
Hi again =)

I've just started getting this exception inconsistently... sometimes
it happens 3 times in a row, other times I can go all afternoon
without getting it. Once the exception occurs, it will occur every
time the client loads until FDS is restarted.

Note this occurs on multiple collections. I tried setting the
offending collection to lazy=false (in Hibernate), and the exception
occurred on a different collection. I can't set every one of  my
collections to lazy=false. Especially since at this point, they HAVE
to be lazy for the updateItem via hierarchical values to almost work.

I also noticed that the collection does not necessarily need to have
any  items in it. (And possibly is caused specifically by NOT having
any items in it, I can't tell for sure). The collection referenced in
the exception below has no values, and there's another collection in
that same class with values that doesn't seem to cause the exception.

See below the hibernate mapping, and exception output when this
occurs. (Note there are no FDS managed associations for this collection)

Thanks for any insight you have as to what is causing this.

PW
_


joined-subclass name=Adult table=T_ADULT extends=Person
key
column name=ID length=22 /
/key
set name=children 
inverse=false
cascade=all-delete-orphan 
key
   column name=PARENTID length=22 not-null=false /
/key
one-to-many class=Person /
/set
...
/joined-subclass


10:19:42,093  WARN ProxyWarnLog - Narrowing proxy to class
config.test.Adult - this operation breaks ==
10:19:44,687 ERROR LazyInitializationException - failed to lazily
initialize a collection of role: config.test.Adult.children, no
session or session was closed
org.hibernate.LazyInitializationException: failed to lazily initialize
a collection of role: config.test.Adult.children, no session or
session was closed
at
org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358)
at
org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.j
ava:350)
at
org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:97)
at
org.hibernate.collection.PersistentSet.size(PersistentSet.java:139)
at java.util.ArrayList.init(ArrayList.java:133)
at
flex.messaging.io.ArrayCollection.init(ArrayCollection.java:44)
at
flex.messaging.io.amf.Amf3Output.writeArrayCollection(Amf3Output.java:407)
at
flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:147)
at
flex.messaging.io.amf.Amf3Output.writeObjectProperty(Amf3Output.java:215)
at
flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:495)
at
flex.messaging.io.amf.Amf3Output.writeCustomObject(Amf3Output.java:467)
at
flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:165)
at
flex.messaging.io.amf.Amf3Output.writeObjectArray(Amf3Output.java:730)
at
flex.messaging.io.amf.Amf3Output.writeAMFArray(Amf3Output.java:386)
at
flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:151)
at
flex.messaging.io.ArrayCollection.writeExternal(ArrayCollection.java:97)
at
flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:485)
at
flex.messaging.io.amf.Amf3Output.writeArrayCollection(Amf3Output.java:414)
at
flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:147)
at
flex.messaging.io.amf.Amf3Output.writeObjectProperty(Amf3Output.java:215)
at
flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:495)
at
flex.messaging.io.amf.Amf3Output.writeCustomObject(Amf3Output.java:467)
at
flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:165)
at
flex.messaging.io.amf.Amf3Output.writeObjectArray(Amf3Output.java:730)
at
flex.messaging.io.amf.Amf3Output.writeAMFArray(Amf3Output.java:386)
at
flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:151)
at
flex.messaging.io.ArrayCollection.writeExternal(ArrayCollection.java:97)
at
flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:485)
at
flex.messaging.io.amf.Amf3Output.writeArrayCollection(Amf3Output.java:414)
at
flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:147)
at
flex.messaging.io.amf.Amf3Output.writeObjectProperty(Amf3Output.java:215)
at
flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:495)
at
flex.messaging.io.amf.Amf3Output.writeCustomObject(Amf3Output.java:467)
at
flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:165)
at
flex.messaging.io.amf.Amf3Output.writeObjectArray(Amf3Output.java:730)
at
flex.messaging.io.amf.Amf3Output.writeAMFArray(Amf3Output.java:386)
at

[flexcoders] Re: Error 2025 with images?

2007-02-16 Thread John Wilker

No one?

On 2/12/07, John Wilker [EMAIL PROTECTED] wrote:


I'm working on a quicky little RSS Reader and having some trouble.

I've got a DG on one side, which then populates a textArea on the other
side.

Here's the feed (mine) http://www.red-omega.com/blog/rss.cfm?mode=full

When I hit the entry Blogito Ergo Sum when I click to entry in the DG I
get the below.

It seems to happen when entries have images linked from other sites.

[SWF] Users:johnwilker:Documents:Flex Builder 2:360FlexRSS:bin:
main-debug.swf - 972,300 bytes after decompression
getting the feed: http://www.red-omega.com/blog/rss.cfm?mode=full
You Selected index: 7
You Selected index: 8
ArgumentError: Error #2025: The supplied DisplayObject must be a child of
the caller.
at flash.text::TextField/set htmlText()
at 
mx.core::UITextField/sethtmlText()[C:\dev\flex_201_gmc\sdk\frameworks\mx\core\UITextField.as:319]
at mx.controls::TextArea/mx.controls:TextArea::commitProperties
()[C:\dev\flex_201_gmc\sdk\frameworks\mx\controls\TextArea.as:1841]
at mx.core::UIComponent/validateProperties
()[C:\dev\flex_201_gmc\sdk\frameworks\mx\core\UIComponent.as:5300]
at
mx.managers::LayoutManager/mx.managers:LayoutManager::validateProperties()[C:\dev\flex_201_gmc\sdk\frameworks\mx\managers\LayoutManager.as:517]

at
mx.managers::LayoutManager/mx.managers:LayoutManager::doPhasedInstantiation
()[C:\dev\flex_201_gmc\sdk\frameworks\mx\managers\LayoutManager.as:667]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at mx.core::UIComponent/mx.core:UIComponent::callLaterDispatcher2
()[C:\dev\flex_201_gmc\sdk\frameworks\mx\core\UIComponent.as:7909]
at 
mx.core::UIComponent/mx.core:UIComponent::callLaterDispatcher()[C:\dev\flex_201_gmc\sdk\frameworks\mx\core\UIComponent.as:7852]

at flash.utils::Timer/flash.utils:Timer::_timerDispatch()
at flash.utils::Timer/flash.utils:Timer::tick()

Any thoughts?


--
John Wilker
Vice President Software Development/Writer
Red Omega Solutions, Inc.
www.johnwilker.com / www.red-omega.com

Everything changes, nothing remains without change. ~Buddha c.483 bc





--
John Wilker
Vice President Software Development/Writer
Red Omega Solutions, Inc.
www.johnwilker.com / www.red-omega.com

Everything changes, nothing remains without change. ~Buddha c.483 bc


[flexcoders] Re: Datagrid Tabbing breaks when itemrenderer is added to one cell

2007-02-16 Thread Mike_Robinson_98
--- In flexcoders@yahoogroups.com, jfournet [EMAIL PROTECTED] wrote:

 When I add a custom itemrenderer to a cell of my datagrid, the tabbing 
 order of my screen is broken, i.e., the cell with the itemrenderer is 
 skipped over in the tab order.  Any ideas on how to fix this?

What you need to do in this situation is handle your own tabbing
through the DataGrid. This can be accomplished by adding a
'keyFocusChange' handler to the grid.

The handler will have to listen for tab character. If it finds there
was one, then depending on the current row and column, it moves the
focus to the next cell desired. In this way you can skip cells you do
not want to have focused.

Here is a sample piece of code I used to manage tabbing in a grid that
has a renderer and editor in it.

// handler for request to move focus to next column when using tab key
in the DataGrid
private function handleKeyFocusChange(event:FocusEvent):void{
// make sure it is a focus change envent and the tab character
if(event.type == FocusEvent.KEY_FOCUS_CHANGE  event.keyCode == 9){
 var eip:Object; // used to set the focus at a row and column
 if((DataGrid(event.currentTarget)).editedItemPosition != null){
  var colPosition : int =
   (DataGrid(event.currentTarget)).editedItemPosition.columnIndex;
  var rowPosition : int =
   (DataGrid(event.currentTarget)).editedItemPosition.rowIndex;
   if(rowPosition = 0){ 
 // going backwards off the datagrid
 if(rowPosition == 0  colPosition ==0  event.shiftKey == true)
cb_manufacturer.setFocus(); // somewhere on the page
 // going forward off the datagrid
 else if(rowPosition == (receiptItems.length -1)  colPosition ==
2  event.shiftKey == false)
ti_heat_number.setFocus(); // somewhere else on the page //
going forward/backward in grid
 else{
switch(colPosition){
  case COLUMN_QUANTITY: // QUANTITY
 colPosition = event.shiftKey ? COLUMN_LOCATION : COLUMN_LENGTH;
 rowPosition = event.shiftKey ? rowPosition - 1 : rowPosition;
 break;
  case COLUMN_LENGTH:   // LENGTH
 colPosition =  event.shiftKey ? COLUMN_QUANTITY : COLUMN_LOCATION;
 break;
  case COLUMN_LOCATION: // PACKAGE
 colPosition =  event.shiftKey ? COLUMN_LENGTH : COLUMN_QUANTITY;
 rowPosition = event.shiftKey ? rowPosition : rowPosition + 1;
 break;
} // end switch
eip = {columnIndex:colPosition, rowIndex:rowPosition};
// focusColumn method sets the focus on the proper column
callLater(focusColumn,[eip]);   
  } // end else 
 }  // end if
   }// end if
 }
}

### example of focusColumn method
private function focusColumn(eip:Object):void{
   // dg_receivedLength is my DataGrid id
   dg_receivedLength.editedItemPosition=eip;
}



[flexcoders] Programmatic chart data tip

2007-02-16 Thread Tom Fitzpatrick
In a Plot chart, given the x  y coordinates of a datapoint (or the data 
values for the datapoint) is there a way to programmatically turn on and 
turn off the data tip for just that point?

- Tom




[flexcoders] Re: Windows Vista Flex

2007-02-16 Thread Mike Morearty
Hi Bryan,

I'm not sure if this will help me, but I would be interested to see
the Eclipse log file.  The log is workspacedir\.metadata\.log.


--- In flexcoders@yahoogroups.com, Bryan Clover [EMAIL PROTECTED] wrote:

 Hi All,
 
 I'm new to this group and thought I'd start a topic where people can 
 post their experiences with Flex Builder 2 and Windows Vista.  Here is 
 mine:
 
 1. Upgraded from Windows XP Home to Windows Vista Business.
Chose the upgrade path..not the full reformat and clean install.
(I wanted to see if I could get anway with not having to install the 
5 million apps  utilities I use. Might have been mistake #1)
 
 2. Day 1 - Vista appeared to install and run fine. Flex Builder worked 
okay. However it did seem to compile / debug slower.
 
 3. Day 2 - The trouble starts!  Several times Flex Builder just freezes
up.  I can't even use task mangager to quit the application.  I'm
forced to do a manual reboot.  Reminds me of the old Mac crashes!
Ek. You know this is just bad stuff!  This happened 6 times or
so during a full day of work. Occurred when trying to SAVE WORK!
Ironic, but saving became something I was AFRAID TO DO!
 
 4. Day 3 - Flex Builder really acting funky now.  When I try to
compile / debug nothing appears in Firefox but a blank white page.
This happens every time I try to debug or run my apps.  So I reboot.
Still nothing!  Forced to uninstall Flex Builder.
 
 5. After uninstalling Flex Builder I re-install it.  Everything goes
smoothly during install.  Attempt to start application and get
funky error that refers me to an error log. I locate error log,
read thru it, and realize I'm screwed and can't fix things.
Uninstall and re-install multiple times.  Same deal!
NOTE: Using trial version installer of Flex Builder 2.0.1
 
 6. Realizing I can no longer use Flex Builder, I am forced to go
back to Windows XP.  While I reformat my machine (which is a
Dell Latitude D820, Dual Core, Vista Capable machine) I'll be
pulling out my Mac Powerbook.
 
 Recommendation: Forget Windows Vista!  Stay with XP...or even better,
 just stick with the Mac in the first place!  I always use both
 platforms...just because...and my Mac always comes out on top!
 
 I'm curious to hear what other people have experienced. Please share 
 your experience
 
 =BC=





RE: [flexcoders] Programmatic chart data tip

2007-02-16 Thread Ely Greenfield
 
 
Unfortunately, no.  You'll have to create your own datatips if that's
what you want to do.
 
http://www.quietlyscheming.com/blog/charts/easy-custom-charts/
 
Ely.
 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tom Fitzpatrick
Sent: Friday, February 16, 2007 11:24 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Programmatic chart data tip



In a Plot chart, given the x  y coordinates of a datapoint (or the data

values for the datapoint) is there a way to programmatically turn on and

turn off the data tip for just that point?

- Tom



 


Re: [flexcoders] Re: Windows Vista Flex

2007-02-16 Thread Mitch Grasso
I have a clean install of Vista Ultimate. The only problem I have had with Flex 
Builder is that I get dumped into Windows Vista Basic Color Scheme when I 
launch any designer pages. Since the Aero look is pretty much the only neat 
thing I have found with Vista, it does make the upgrade somewhat worthless 
(unless you care about UAC - which i promptly turned off).

Additionally, I am experiencing memory parity bluescreens with Vista 
occasionally. This is probably related to some additional RAM I added prior to 
the install, but it has been a looong time since I had a PC bluescreen.

mitch

- Original Message 
From: Mike Morearty [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, February 16, 2007 11:27:18 AM
Subject: [flexcoders] Re: Windows Vista  Flex









  



Hi Bryan,



I'm not sure if this will help me, but I would be interested to see

the Eclipse log file.  The log is workspacedir \.metadata\ .log.



--- In [EMAIL PROTECTED] ups.com, Bryan Clover [EMAIL PROTECTED] .. wrote:



 Hi All,

 

 I'm new to this group and thought I'd start a topic where people can 

 post their experiences with Flex Builder 2 and Windows Vista.  Here is 

 mine:

 

 1. Upgraded from Windows XP Home to Windows Vista Business.

Chose the upgrade path..not the full reformat and clean install.

(I wanted to see if I could get anway with not having to install the 

5 million apps  utilities I use. Might have been mistake #1)

 

 2. Day 1 - Vista appeared to install and run fine. Flex Builder worked 

okay. However it did seem to compile / debug slower.

 

 3. Day 2 - The trouble starts!  Several times Flex Builder just freezes

up.  I can't even use task mangager to quit the application.  I'm

forced to do a manual reboot.  Reminds me of the old Mac crashes!

Ek. You know this is just bad stuff!  This happened 6 times or

so during a full day of work. Occurred when trying to SAVE WORK!

Ironic, but saving became something I was AFRAID TO DO!

 

 4. Day 3 - Flex Builder really acting funky now.  When I try to

compile / debug nothing appears in Firefox but a blank white page.

This happens every time I try to debug or run my apps.  So I reboot.

Still nothing!  Forced to uninstall Flex Builder.

 

 5. After uninstalling Flex Builder I re-install it.  Everything goes

smoothly during install.  Attempt to start application and get

funky error that refers me to an error log. I locate error log,

read thru it, and realize I'm screwed and can't fix things.

Uninstall and re-install multiple times.  Same deal!

NOTE: Using trial version installer of Flex Builder 2.0.1

 

 6. Realizing I can no longer use Flex Builder, I am forced to go

back to Windows XP.  While I reformat my machine (which is a

Dell Latitude D820, Dual Core, Vista Capable machine) I'll be

pulling out my Mac Powerbook.

 

 Recommendation: Forget Windows Vista!  Stay with XP...or even better,

 just stick with the Mac in the first place!  I always use both

 platforms... just because...and my Mac always comes out on top!

 

 I'm curious to hear what other people have experienced. Please share 

 your experience.. ..

 

 =BC=








  







!--

#ygrp-mlmsg {font-size:13px;font-family:arial,helvetica,clean,sans-serif;}
#ygrp-mlmsg table {font-size:inherit;font:100%;}
#ygrp-mlmsg select, input, textarea {font:99% arial,helvetica,clean,sans-serif;}
#ygrp-mlmsg pre, code {font:115% monospace;}
#ygrp-mlmsg * {line-height:1.22em;}
#ygrp-text{
font-family:Georgia;
}
#ygrp-text p{
margin:0 0 1em 0;
}
#ygrp-tpmsgs{
font-family:Arial;
clear:both;
}
#ygrp-vitnav{
padding-top:10px;
font-family:Verdana;
font-size:77%;
margin:0;
}
#ygrp-vitnav a{
padding:0 1px;
}
#ygrp-actbar{
clear:both;
margin:25px 0;
white-space:nowrap;
color:#666;
text-align:right;
}
#ygrp-actbar .left{
float:left;
white-space:nowrap;
}
.bld{font-weight:bold;}
#ygrp-grft{
font-family:Verdana;
font-size:77%;
padding:15px 0;
}
#ygrp-ft{
font-family:verdana;
font-size:77%;
border-top:1px solid #666;
padding:5px 0;
}
#ygrp-mlmsg #logo{
padding-bottom:10px;
}

#ygrp-vital{
background-color:#e0ecee;
margin-bottom:20px;
padding:2px 0 8px 8px;
}
#ygrp-vital #vithd{
font-size:77%;
font-family:Verdana;
font-weight:bold;
color:#333;
text-transform:uppercase;
}
#ygrp-vital ul{
padding:0;
margin:2px 0;
}
#ygrp-vital ul li{
list-style-type:none;
clear:both;
border:1px solid #e0ecee;
}
#ygrp-vital ul li .ct{
font-weight:bold;
color:#ff7900;
float:right;
width:2em;
text-align:right;
padding-right:.5em;
}
#ygrp-vital ul li .cat{
font-weight:bold;
}
#ygrp-vital a {
text-decoration:none;
}

#ygrp-vital a:hover{
text-decoration:underline;
}

#ygrp-sponsor #hd{
color:#999;
font-size:77%;
}
#ygrp-sponsor #ov{
padding:6px 13px;
background-color:#e0ecee;
margin-bottom:20px;
}
#ygrp-sponsor #ov ul{
padding:0 0 0 8px;
margin:0;
}
#ygrp-sponsor #ov li{
list-style-type:square;

[flexcoders] Re: Embed an image

2007-02-16 Thread Shannon
You should just be able to send the content-type:image/jpg header in 
the response (from your servlet/bean) and load it from the url of the 
servlet. No?

Also, if you have retreived the binary data and are looking to push 
that into the Image component (and this is very strange, and maybe 
someone can explain this) but you can also pass a class into the very 
same attribute and it will display the image. Here is a sample 
derived from the Image documentation where you embed an image during 
compile time and use that embedded data in place of the string. 

mx:Script
![CDATA[
[Bindable][Embed(source=theme/filetype/ico_wmrm.png)]public var 
wmrmICO:Class;
]]
/mx:Script
mx:Image source={wmrmICO}/

Hope this is helpful...

Shanimal

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

 
 Actually i want to retrieve an image in a Flex Component (Flex 1.5 
 Application) from a java file (in java file i am getting the image 
 from the database ).
 As mx:Image tag only takes source as an attribute  .How should i do 
 this ? 
 
 Thanks,
 Monika





[flexcoders] AS2 to AS3 - looping over loaded SWF

2007-02-16 Thread thibs73
Hi there,
I am trying to convert some AS2 code to AS3 with some difficulty... 
What I am trying to do is flip all nested MovieClips in a loaded SWF….

I loaded a swf with SwfLoader, casted it as a MovieClip. I am now 
trying to loop thru the loaded SWF to flip all movie clips…

I've done this before in AS2 like this:

for (var i in targetClip) {
  if (typeof targetClip[i] == movieclip){
  targetClip[i].scaleX = targetClip[i].scaleX * -1   
  }
}

What properties of the SWF or MovieClip Object should I target for my 
loop. Or am I way off base?
Any help, would be appreciated.
Thanks in advance.




Re: [flexcoders] Re: Windows Vista Flex

2007-02-16 Thread Ketan Bengali

Flex Builder works great on my laptop with Vista Premium installed. Till
date I have not faced any problems
with Flex Builder. I do have 2 gigs of RAM.

I know this group is for Flex discussions but since this was related to
Windows Vista also I have a non Flex question. Does anyone tried installing
Apache ? I would like to hear your experiences on this.
I could not install Apache on Vista. I installed XAMPP later.


Regards,
Ketan Bengali.


On 16/02/07, Mike Morearty [EMAIL PROTECTED] wrote:


  Hi Bryan,

I'm not sure if this will help me, but I would be interested to see
the Eclipse log file. The log is workspacedir\.metadata\.log.

--- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Bryan
Clover [EMAIL PROTECTED] wrote:

 Hi All,

 I'm new to this group and thought I'd start a topic where people can
 post their experiences with Flex Builder 2 and Windows Vista. Here is
 mine:

 1. Upgraded from Windows XP Home to Windows Vista Business.
 Chose the upgrade path..not the full reformat and clean install.
 (I wanted to see if I could get anway with not having to install the
 5 million apps  utilities I use. Might have been mistake #1)

 2. Day 1 - Vista appeared to install and run fine. Flex Builder worked
 okay. However it did seem to compile / debug slower.

 3. Day 2 - The trouble starts! Several times Flex Builder just freezes
 up. I can't even use task mangager to quit the application. I'm
 forced to do a manual reboot. Reminds me of the old Mac crashes!
 Ek. You know this is just bad stuff! This happened 6 times or
 so during a full day of work. Occurred when trying to SAVE WORK!
 Ironic, but saving became something I was AFRAID TO DO!

 4. Day 3 - Flex Builder really acting funky now. When I try to
 compile / debug nothing appears in Firefox but a blank white page.
 This happens every time I try to debug or run my apps. So I reboot.
 Still nothing! Forced to uninstall Flex Builder.

 5. After uninstalling Flex Builder I re-install it. Everything goes
 smoothly during install. Attempt to start application and get
 funky error that refers me to an error log. I locate error log,
 read thru it, and realize I'm screwed and can't fix things.
 Uninstall and re-install multiple times. Same deal!
 NOTE: Using trial version installer of Flex Builder 2.0.1

 6. Realizing I can no longer use Flex Builder, I am forced to go
 back to Windows XP. While I reformat my machine (which is a
 Dell Latitude D820, Dual Core, Vista Capable machine) I'll be
 pulling out my Mac Powerbook.

 Recommendation: Forget Windows Vista! Stay with XP...or even better,
 just stick with the Mac in the first place! I always use both
 platforms...just because...and my Mac always comes out on top!

 I'm curious to hear what other people have experienced. Please share
 your experience

 =BC=








--
Regards,
Ketan Bengali


[flexcoders] Re: Flex 2 Compiler / Metadata Question

2007-02-16 Thread gtuhl
I've clarified the issue - posting so that if someone else runs into a
similar issue they can work around it.

In Flex Builder, the Additional compiler arguments field that is
available in Project-Properties-Flex Compiler is only applied when
the debug swf is built.  They are not applied for the non-debug swf
(or at least the keep-as3-metadata argument isn't).

This obviously is a bug, but it is a bug in Flex Builder specifically
and not in the Flex2 compiler or sdk.

If you want to use custom metadata in run mode you will have to build
your project with Ant.  I recommend using the new-ish Flex Ant tasks
even though they are quirky.  The additional problem with these is
that the mxmlc task doesn't support the keep-as3-metadata argument.  I
am guessing that a corresponding stub hasn't yet been included in the
Ant task to route the argument to mxmlc.

To get around this you will need to create a configuration file for
your project.  It might be named myProject-config.xml and might look
like this:

?xml version=1.0?
flex-config xmlns=http://www.adobe.com/2006/flex-config;
compiler
keep-as3-metadata
nameCollection/name
/keep-as3-metadata
keep-generated-actionscripttrue/keep-generated-actionscript
/compiler
/flex-config

Where Collection is the custom metadata tag we want to use in our
code.  You can put multiple name tags inside the keep-as3-metadata
tag.  Now instead of just having this in your mxmlc ant task:

load-config filename=${FLEX_HOME}/frameworks/flex-config.xml/

You will need this:

load-config filename=${FLEX_HOME}/frameworks/flex-config.xml/
load-config filename=myProject-config.xml/

It will first process the default config file and then bring in your
additional configuration information.

Let me know if I am mistaken with any of the above, but we are up and
running now with custom metadata.  We just develop in debug mode and
then use an Ant task to build and deploy a run mode swf to JBoss when
applicable.

Joe


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

 Ely,
 
 Thanks for the response.  Here is a brief example.  I am now aware of
 the [ArrayElementType] tag, but it still illustrates the issue well.
 
 We have a value object that has some properties marked with metadata
 like this:
 
 
 public class ContactVO{
  [Collection(type=String)]
  public var phoneNumbers: ArrayCollection = new ArrayCollection();
 
  // more properties and methods follow
 }
 
 
 Now we have some code that attempts to read the type attribute out
 of the [Collection] metadata tag we used.  Here is a intentionally
 drawn out example that uses hardcoded values to illustrate the
problem.  
 
 
 var contact:ContactVO = new ContactVO();
 
 // get the E4X XML object description
 var typeInfo:XML = describeType(contact);
 
 // get the phoneNumbers property we marked up with metadata
 var phoneDesc:XMLList = typeInfo..accessor.(@name == phoneNumbers);
 
 // grab the Collection metadata description
 var phoneMetaData:XMLList = 
  phoneDesc..metadata.(@name == Collection);
 
 // grab the type argument from the Collection metadata
 var metaDataDesc:XMLList = phoneMetaData..arg.(@key == type);
 
 // finally, grab the value of this type argument
 var typeValue:String = [EMAIL PROTECTED];
 
 Alert.show(typeValue);
 
 
 In debug mode all of the above works perfectly, and we see an alert
 box with String.  In run mode at some point in the metadata reading
 code I get the following:
 
 
 ReferenceError: Error #1065: Variable is not defined
  at global/flash.utils:getDefinitionByName()
  // more stuff, but in our code
 
 
 It is difficult to show you where exactly the failure occurs because
 in debug mode it works great - this prevents me from using
 breakpoints, getting line numbers, or using trace.
 
 Now to debug this in some manner, we added an Alert.show(typeInfo)
 immediately after:
 var typeInfo:XML = describeType(contact);
 
 In debug mode, it looks roughly like this (clipped out stuff that
 isn't relevant).
 
 
 type name=ContactVO ...
  accessor name=phoneNumbers ...
   metadata name=Bindable .../
   metadata name=Collection .../
  /accessor
 /type
 
 
 In run mode, it looks like this:
 
 
 type name=ContactVO ...
  accessor name=phoneNumbers ...
   metadata name=Bindable .../
  /accessor
 /type
 
 
 Note that the only difference is that in run mode, the second
 metadata tag corresponding with our custom [Collection] tag has been
 thrown out.  We can provide a more complete example if desired, but
 the xml difference really makes us believe the tag is being dropped.
 
 In ALL of the above we are using a -keep-as3-metadata+=Collection
 argument.  Literally the only difference is whether or not we are
 running in debug mode.
 
 I appreciate any assistance with this,
 
 Joe Uhl
 
 --- In flexcoders@yahoogroups.com, Ely Greenfield egreenfi@ wrote:
 
   
   
   
  I checked around internally, and the 

[flexcoders] TileList Object Parameters

2007-02-16 Thread jmfillman
I have a variety of TileLists that I can't quite make work the way I 
need. 

When I drag a row from a DataGrid and drop it on the TileList, I want 
to take the data from 3 of the 4 columns in the DataGrid, and drop them 
into the TileList. Currently it just shows {object Object}.

I need to determine programatically if the TileList has anything in it. 
When something is dropped in the TileList, I need to prevent additional 
drops and I need to change the Alpha to 1.

Additionally, if the item is removed from the TileList, I need set 
dropEnabled back to true and the Alpha to 0.



[flexcoders] Re: Wet Behind the ears

2007-02-16 Thread jmfillman
Wally,

You are looking for the close event on the ComboBox. Take a look at 
the code below.

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; 
layout=absolute
mx:states
mx:State name=State2
mx:AddChild position=lastChild
mx:Label x=234 y=39 
text=State2 width=167 fontWeight=bold textAlign=center 
fontSize=20/
/mx:AddChild
mx:RemoveChild target={stateC}/
/mx:State
/mx:states
mx:Script
![CDATA[
public function changeState():void {
if (stateCB.selectedItem.data==2){
currentState='State2';
}
}
]]
/mx:Script
mx:ComboBox id=stateCB x=73 y=64 close=changeState()
mx:ArrayCollection
mx:Object label=-- data=1/
mx:Object label=State 2 data=2/
/mx:ArrayCollection

/mx:ComboBox

/mx:Application




Re: [flexcoders] AS2 to AS3 - looping over loaded SWF

2007-02-16 Thread leds usop
have you tried alex's distortion effects? there are a
lot of great flips you can implement from the samples
alone. although im not sure if you will run into
performance issues once you deal with several
movieclips. Any insight on that guys?

--- thibs73 [EMAIL PROTECTED] wrote:

 Hi there,
 I am trying to convert some AS2 code to AS3 with
 some difficulty... 
 What I am trying to do is flip all nested MovieClips
 in a loaded SWF….
 
 I loaded a swf with SwfLoader, casted it as a
 MovieClip. I am now 
 trying to loop thru the loaded SWF to flip all movie
 clips…
 
 I've done this before in AS2 like this:
 
 for (var i in targetClip) {
   if (typeof targetClip[i] == movieclip){
   targetClip[i].scaleX = targetClip[i].scaleX *
 -1   
   }
 }
 
 What properties of the SWF or MovieClip Object
 should I target for my 
 loop. Or am I way off base?
 Any help, would be appreciated.
 Thanks in advance.
 
 
 



 

Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/


[flexcoders] Re: Wet Behind the ears

2007-02-16 Thread jmfillman
Slight correction:

Change this row:

mx:RemoveChild target={stateC}/

To this:

mx:RemoveChild target={stateCB}/




[flexcoders] DIspatch custom event within a SIngleton's constructor.

2007-02-16 Thread leds usop
will the event fire appropriately? I have tried firing
one from the singleton pattern implementation which
doesnt use a hidden helper class - just like in ted's
JAM: Singleton take 2(?). I was trying to dispatch a
custom event right after the first instantiation of a
singleton class and have it bubble up through
indefinite parent/container classes. Is this a bad
idea? any alternative ideas on how to fire the event
from the class itself upon it's first instantiation?
Is placing it in the constructor the same as placing
it in the getInstance method? THnx!


 

Never Miss an Email
Stay connected with Yahoo! Mail on your mobile.  Get started!
http://mobile.yahoo.com/services?promote=mail


RE: [flexcoders] Re: Wet Behind the ears

2007-02-16 Thread Wally Callerio
Thanks!!

 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of jmfillman
Sent: Friday, February 16, 2007 1:01 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Wet Behind the ears

 

Wally,

You are looking for the close event on the ComboBox. Take a look at 
the code below.

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml  
layout=absolute
mx:states
mx:State name=State2
mx:AddChild position=lastChild
mx:Label x=234 y=39 
text=State2 width=167 fontWeight=bold textAlign=center 
fontSize=20/
/mx:AddChild
mx:RemoveChild target={stateC}/
/mx:State
/mx:states
mx:Script
![CDATA[
public function changeState():void {
if (stateCB.selectedItem.data==2){
currentState='State2';
}
}
]]
/mx:Script 
mx:ComboBox id=stateCB x=73 y=64 close=changeState()
mx:ArrayCollection
mx:Object label=-- data=1/
mx:Object label=State 2 data=2/
/mx:ArrayCollection

/mx:ComboBox

/mx:Application

 



[flexcoders] How to show theme when app is loading?

2007-02-16 Thread bartonlistick
I'm trying to figure out how to seemlessly display my theme's 
gradient (or background image) right at the start of the load phase 
and all the way through initialization. In other words, I don't want 
the default theme during the load, with a visual glitch when my 
custom theme kicks in.

Here's what I've learned so far:

 - If you set the style on the app's initialize 
or preinitialize, those changes aren't visible during the app's 
loading phase, so you end up getting the default theme until the 
loading is complete.

 - The backgroundColor property takes effect right at the start of 
loading, but backgroundGradientColors (to get a nice gradient during 
the load) doesn't seem to work.

 - The backgroundImage property will display an image after about 1 
second (into the load), but the image doesn't fill the window (i.e. 
it isn't scaled) until after the load.

Anyone have any ideas?




[flexcoders] exporting into CSV format

2007-02-16 Thread Mrinmoyee Sanyal

How to export a Flex Chart and a Flex grid into CSV format?

Thank you
-MS


[flexcoders] preloader or viewstate while charts initiailize

2007-02-16 Thread Grant Davies
Hi guys,
 
I need to display something while my charts are loading in a dashboard
style interface where different things are initializing at different
times, I wondered how people where showing this busy state, use a
viewstate to switch between the charrt and another state with the
animation, is there something built into the graph ?  In flash I would
have overlayed an invisible button to act as a modal with an animation
in the middle..
 
cheers
Grant
 
 
...
 b l u e t u b e i n t e r a c t i v e.
.: grant davies
.: 404.428.6839 (c)
.: 708-983-1577 (F)
 [EMAIL PROTECTED]
 http://www.bluetube.com/bti http://www.bluetube.com/bti 
 A Tribal Chicken Designs Affiliate http://www.tribalchicken.com/ 

 
attachment: small.jpg


[flexcoders] Re: Getting notified when a user 'leaves/quits' the application

2007-02-16 Thread Evan Bellinger
In the application that I'm developing, I do use the onbeforeunload
event and it works well for me.  I do a check against the data that's
being worked on, and return an error message for a JS alert if it
hasn't been saved.  The speed is exceptionally fast, but if you have
concerns you can preemptively pop up an alert and ask them if they
really want to quit, while in the background doing whatever AS stuff
you want.

Evan

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

 I started to suggest the same thing about using the javaScript
method.  But
 I haven't tested it yet and I am curious to know will that method in
the swf
 that is called by the js fire quickly enough before the actual session
 closes?
 
 Take for instance you want to save user preferences to a local
shared object
 onClose.  I am just guessing here, but I would think that the browser's
 internal close mechanics would not wait around for the js, and
subsequent
 swf methods to do their business.
 
 Has this been tested and confirmed by anyone?
 
 On 2/16/07, Evan Bellinger [EMAIL PROTECTED] wrote:
 
  Julien,
 
  Not sure what you're really trying to do here.  A bit more of a
  description would be useful.  I'll take a shot anyway.
 
  I'm going to guess that you've got your application running in a
  browser.  As such, you've got a couple options.
 
  First, and most obviously, you could have a close button in your
  application which logs you out or ends the chat or whatever.  Just
  leech off of that event, and away you go.
 
  Secondly, if you want to try to capture the closing of the browser
  window, there's a javascript event that you'll want to capture and tie
  it to a method in your application through the ExternalInterface.
 
  Here's a quick snippet of something similar to what I use:
 
  [Javascript]
 
  window.onbeforeunload = browserClosing;
 
  function browserClosing(event_)
  {
 getSWF(MyTestApp).theBrowserIsClosing();
  }
 
  // Gets a reference to the specified SWF file by checking which
browser is
  // being used and using the appropriate JavaScript.
  function getSWF(movieName)
  {
 if (navigator.appName.indexOf(Microsoft) != -1)
return window[movieName];
 else
return document[movieName];
  }
 
  [/Javascript]
 
  [MXML]
 
  mx:Application ... creationComplete=load();
 Script![CDATA[
private function load():void
{
   if(ExternalInterface.available)
   {
  try
  {
 ExternalInterface.addCallback(theBrowserIsClosing,
  theBrowserIsClosingHandler);
  }
  catch(e:Error){}
   }
}
 
private function theBrowserIsClosingHandler():String
{
   //Do whatever needs to be done here.
}
 ]]/Script
  /mx:Application
 
  [/MXML]
 
  When your user hits the browser's close button, the onbeforeunload
  event will fire calling the javascript method 'browserClose' which in
  turn will call the 'theBrowserIsClosing' method in your application.
 
  Hope that gets you pointed in the right direction.  If not, be a bit
  more specific about what you're trying to do.
 
  Evan
 
  --- In flexcoders@yahoogroups.com, julien castelain jcastelain@
  wrote:
  
   Hi all,
  
   I was wondering if there was a way to be notified when the user
  leaves or
   quits the application using AS3.
  
   Thanks.
  
 
 
 
 
  --
  Flexcoders Mailing List
  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
  Yahoo! Groups Links
 
 
 
 
 
 
 -- 
 justin w. opitz
 617.771.6639
 jwopitz(at)gmail.com





[flexcoders] Row index

2007-02-16 Thread metalbeard
Hi,
Can you help me getting the row index of some item in the data provider 
of a tree component.
The dataProvider[0] is an XMLList and there is no method that could 
give the row index of any item inside the data provider without 
dispatching an event. The case is as follows:
I want to check if the selectedItem index is higher than the index of a 
specified item (a reference) inside the tree but I couldn't get the 
index of the specified item since it is not clicked nor it dispatched 
any event. So can you help me with this?

Thanks.
Wael



Re: [flexcoders] How to get the current build options FB uses?

2007-02-16 Thread Derek Vadneau

What is in the library-path of the dumped config file? Is there a
path-element involving 'libs'?

library-path
   path-elementlibs/path-element
   path-elementlocale/{locale}/path-element
/library-path

I'm told that any relative paths in the dumped XML config file are relative
to the frameworks directory (the location of the normal flex-config.xmlfile).


Ok, I can work with that. Obviously it would be ideal to not have to do
this, but adding the paths should be easy enough for a simple script/app.
... I just added ${flexlib}/ in places where a path looked like it was
needed and that worked.

You should be able to create an XML config file with all the options you
need. You should not have to specify any of them on the command line except
perhaps -load-config.

That's great! The only problem right now, besides the above issues, is that
SWCs added to the Library paths don't show up in the config XML. Are they
supposed to?

Right now this is what I see in the include-libraries node:


!-- compiler.include-libraries: a list of libraries (SWCs) to completely
include in the SWF--
!-- compiler.include-libraries usage:
include-libraries
   librarystring/library
   librarystring/library
/include-libraries
--

The SWC that I've included is a Library project that Flex Builder recognizes
from my projects.

Here is the commandline I'm using to try to compile:
mxmlc D:/Flex/test/test.mxml

The -load-config isn't required - because it's in the same directory as the
MXML file? - and if included in this case, gets loaded twice.

However, the compilation fails with an error because my SWC isn't included
in the config XML.

So close ...


On 2/15/07, Gordon Smith [EMAIL PROTECTED] wrote:


Error: unable to open 'libs'

What is in the library-path of the dumped config file? Is there a
path-element involving 'libs'?

 can you tell me what the config XML is used for?

To dump out all the options used for a compilation, in the same format as
the flex-config.file. However, I'm afraid that the compiler team and the
FlexBuilder team are separate, that this option is not widely used, and that
we haven't done a good job of making it easy to create one in FlexBuilder
and then use it for command-line compilation.

 And will it enable me to do what I originally set out to do, which is: I
want to setup my project in Flex Builder and then build the very same
project from the commandline without having to manually add all of the
options that Flex Builder is adding.

Yes, it should enable this but you may need to adjust some file system
paths. I'm told that any relative paths in the dumped XML config file are
relative to the frameworks directory (the location of the normal
flex-config.xml file).
 My company owns multiple copies of Flex Builder, so I'm not trying to
get around having to use Flex Builder

No problem even if you were, Adobe loves to sell copies of FlexBuilder,
but we know we're never going to get to our goal of having a million Flex
developers unless a whole lot of them are using the free SDK.

 If I HAVE to do this manually by writing everything on the commandline
then fine.

You should be able to create an XML config file with all the options you
need. You should not have to specify any of them on the command line except
perhaps -load-config.

- Gordon

 --
*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *Derek Vadneau
*Sent:* Thursday, February 15, 2007 11:01 AM
*To:* flexcoders@yahoogroups.com
*Subject:* Re: [flexcoders] How to get the current build options FB uses?

 When I run this:
mxmlc -dump-config test-config.xml test.mxml

I still get an error stating that there is a Call to a possibly undefined
method. In FB there's no problem because I added the SWC to my Library
paths.

I then edited the config file, as you suggested, to include the full path
to mxml-manifest.xml and now there is no error displayed in FB (after the
config file has been created).

However, I still can't use it to build from the commandline.

I ran this:
mxmlc -load-config test-config.xml

In the command prompt I get:
Loading configuration file D:\Flex\test\test-config.xml
D:\Flex\test\test-config.xml(91): Error: unable to open 'libs'

  /library-path

I'm guessing there's something else I need to change here.

I appreciate the help in this matter, however before we continue on what
might be wrong with the config file, can you tell me what the config XML is
used for? And will it enable me to do what I originally set out to do, which
is:

I want to setup my project in Flex Builder and then build the very same
project from the commandline without having to manually add all of the
options that Flex Builder is adding.

My company owns multiple copies of Flex Builder, so I'm not trying to get
around having to use Flex Builder. I really want to use Flex Builder to
create my projects and then let our build process pull in the source and
build the output files.

If I HAVE to do this 

[flexcoders] Determining Drop Index in a List

2007-02-16 Thread Paul Whitelock
When doing a drag-and-drop between two Lists, the target List shows a
line to indicate where in the target List the source item will be
placed when it is dropped. Is there any way to tell what this index is
in the target List while handling the dragDrop event? Thanks!

Paul

---
Paul Whitelock
Denver, Colorado



[flexcoders] WebService, destination, Basic Auth

2007-02-16 Thread ecpmaz
I've been struggling for hours to understand what is said in the
livedoc but I do not manage to figure out how to do that !!! Adobe
surely have to improve their data acess and interconnectivity help
part !

So, I want to access a WebService which requires to be authentified by
a Basic Anthentication process. How would you that ?

Apparently I have to define a so-called destination, in config
files... here's what i dended up with (not working obviously) :

-- services-config.xml --

?xml version=1.0 encoding=UTF-8?
services-config
services
!-- PROXY SERVICE --
service-include file-path=proxy-config.xml/
/services
/services-config

-- proxy-config.xml --

?xml version=1.0 encoding=UTF-8?
destination id=bmDestination
adapter ref=soap-proxy /
properties

wsdlhttp://localhost:/BubbleMindServer/services/bubblemind?wsdl/wsdl

soaphttp://localhost:/BubbleMindServer/services/bubblemind/soap
/properties
/destination

-- and in my mxml --

mx:WebService
id=bmSoapService
destination=bmDestination
useProxy=true
showBusyCursor=false
/

Any help please ?

{Maz}



[flexcoders] Re: Search algorithm for objects in memory

2007-02-16 Thread ecpmaz

 Why not simply use the filterFunction property of the
ArrayCollection class and see if that does the trick for you. I use it
for a similar purpose and it search a list of 2000+ object and returns
the filtered results in a microsecond, really fast, love it.
  
 Dimitrios Gianninas
 RIA Developer
 Optimal Payments Inc.
  


Thanks, I'll try that

{Maz}


 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of ecpmaz
 Sent: Thursday, February 15, 2007 9:22 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Search algorithm for objects in memory
 
 
 
 Nobody ?
 
 Something similar is Lucene in Java... but in actionScript ???
 
  What I want to do is searching for a term or expression in an
  ArrayCollection of objects (simple objects containing many members,
  some of them being Strings).
  Is there any library/api able to do that ?:
  - relevance sorting (nb of occurences for instance...)
  - some extra capabilities for the parsing of the expression (ie.
  search for all terms / search for any..)
  
  I can do that myself but I'm sure something it exists somewhere !! Do
  you have any link/suggestion ?
  
  Maz



RE: [flexcoders] Windows Vista Flex

2007-02-16 Thread Michael Imhoff
Hi Bryan,

 

Sorry to hear about your experiences.  I also have a Dell D820 running RC1
of Vista Ultimate and haven't had any of these issues.  The only issue I've
had was with incorrect problem information showing up in flex builder, which
I explained in the following blog post, but I honestly think this was a flex
builder issue.

 

http://michael.omnicypher.com/2007/01/wheres-problem.html

 

I was running Flex Builder 2.0 but have now upgraded to 2.0.1.  I hope I
don't run into these issues when installing the final release of Vista.

 

Has anyone else made the jump from RC1 to the Final?

 

Hope everyone has a good weekend,

Michael

 

  _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Bryan Clover
Sent: Friday, February 16, 2007 10:47 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Windows Vista  Flex

 

Hi All,

I'm new to this group and thought I'd start a topic where people can 
post their experiences with Flex Builder 2 and Windows Vista. Here is 
mine:

1. Upgraded from Windows XP Home to Windows Vista Business.
Chose the upgrade path..not the full reformat and clean install.
(I wanted to see if I could get anway with not having to install the 
5 million apps  utilities I use. Might have been mistake #1)

2. Day 1 - Vista appeared to install and run fine. Flex Builder worked 
okay. However it did seem to compile / debug slower.

3. Day 2 - The trouble starts! Several times Flex Builder just freezes
up. I can't even use task mangager to quit the application. I'm
forced to do a manual reboot. Reminds me of the old Mac crashes!
Ek. You know this is just bad stuff! This happened 6 times or
so during a full day of work. Occurred when trying to SAVE WORK!
Ironic, but saving became something I was AFRAID TO DO!

4. Day 3 - Flex Builder really acting funky now. When I try to
compile / debug nothing appears in Firefox but a blank white page.
This happens every time I try to debug or run my apps. So I reboot.
Still nothing! Forced to uninstall Flex Builder.

5. After uninstalling Flex Builder I re-install it. Everything goes
smoothly during install. Attempt to start application and get
funky error that refers me to an error log. I locate error log,
read thru it, and realize I'm screwed and can't fix things.
Uninstall and re-install multiple times. Same deal!
NOTE: Using trial version installer of Flex Builder 2.0.1

6. Realizing I can no longer use Flex Builder, I am forced to go
back to Windows XP. While I reformat my machine (which is a
Dell Latitude D820, Dual Core, Vista Capable machine) I'll be
pulling out my Mac Powerbook.

Recommendation: Forget Windows Vista! Stay with XP...or even better,
just stick with the Mac in the first place! I always use both
platforms...just because...and my Mac always comes out on top!

I'm curious to hear what other people have experienced. Please share 
your experience

=BC=

 



RE: [flexcoders] How to show theme when app is loading?

2007-02-16 Thread Michael Imhoff
You might want to take a look at the following blog post which discusses
preloaders.

 

http://www.onflex.org/ted/2006/07/flex-2-custom-preloaders.php

 

  _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of bartonlistick
Sent: Friday, February 16, 2007 4:43 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How to show theme when app is loading?

 

I'm trying to figure out how to seemlessly display my theme's 
gradient (or background image) right at the start of the load phase 
and all the way through initialization. In other words, I don't want 
the default theme during the load, with a visual glitch when my 
custom theme kicks in.

Here's what I've learned so far:

- If you set the style on the app's initialize 
or preinitialize, those changes aren't visible during the app's 
loading phase, so you end up getting the default theme until the 
loading is complete.

- The backgroundColor property takes effect right at the start of 
loading, but backgroundGradientColors (to get a nice gradient during 
the load) doesn't seem to work.

- The backgroundImage property will display an image after about 1 
second (into the load), but the image doesn't fill the window (i.e. 
it isn't scaled) until after the load.

Anyone have any ideas?

 



Re: [flexcoders] FDS/Hibernate - LazyInitializationException when writing AMF output

2007-02-16 Thread Dima Gutzeit
Hi,

You have to initialize the collections before AMF serializes them. The 
problem occurs since you closing Hibernate session without first 
initializing the arrays, and since you are using lazy initialization the 
problem arise.

You have two options :

1. Use lazy=false
2. Better one, is calling /Hibernate.initialize(your_array_reference);/ 
before you close the Hibernate session.

Regards,
Dima Gutzeit.

parkerwhirlow wrote:

 Hi again =)

 I've just started getting this exception inconsistently... sometimes
 it happens 3 times in a row, other times I can go all afternoon
 without getting it. Once the exception occurs, it will occur every
 time the client loads until FDS is restarted.

 Note this occurs on multiple collections. I tried setting the
 offending collection to lazy=false (in Hibernate), and the exception
 occurred on a different collection. I can't set every one of my
 collections to lazy=false. Especially since at this point, they HAVE
 to be lazy for the updateItem via hierarchical values to almost work.

 I also noticed that the collection does not necessarily need to have
 any items in it. (And possibly is caused specifically by NOT having
 any items in it, I can't tell for sure). The collection referenced in
 the exception below has no values, and there's another collection in
 that same class with values that doesn't seem to cause the exception.

 See below the hibernate mapping, and exception output when this
 occurs. (Note there are no FDS managed associations for this collection)

 Thanks for any insight you have as to what is causing this.

 PW
 _

 joined-subclass name=Adult table=T_ADULT extends=Person
 key
 column name=ID length=22 /
 /key
 set name=children
 inverse=false
 cascade=all-delete-orphan 
 key
 column name=PARENTID length=22 not-null=false /
 /key
 one-to-many class=Person /
 /set
 ...
 /joined-subclass

 10:19:42,093 WARN ProxyWarnLog - Narrowing proxy to class
 config.test.Adult - this operation breaks ==
 10:19:44,687 ERROR LazyInitializationException - failed to lazily
 initialize a collection of role: config.test.Adult.children, no
 session or session was closed
 org.hibernate.LazyInitializationException: failed to lazily initialize
 a collection of role: config.test.Adult.children, no session or
 session was closed
 at
 org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358)
 at
 org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.j
 ava:350)
 at
 org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:97)
 at
 org.hibernate.collection.PersistentSet.size(PersistentSet.java:139)
 at java.util.ArrayList.init(ArrayList.java:133)
 at
 flex.messaging.io.ArrayCollection.init(ArrayCollection.java:44)
 at
 flex.messaging.io.amf.Amf3Output.writeArrayCollection(Amf3Output.java:407)
 at
 flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:147)
 at
 flex.messaging.io.amf.Amf3Output.writeObjectProperty(Amf3Output.java:215)
 at
 flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:495)
 at
 flex.messaging.io.amf.Amf3Output.writeCustomObject(Amf3Output.java:467)
 at
 flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:165)
 at
 flex.messaging.io.amf.Amf3Output.writeObjectArray(Amf3Output.java:730)
 at
 flex.messaging.io.amf.Amf3Output.writeAMFArray(Amf3Output.java:386)
 at
 flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:151)
 at
 flex.messaging.io.ArrayCollection.writeExternal(ArrayCollection.java:97)
 at
 flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:485)
 at
 flex.messaging.io.amf.Amf3Output.writeArrayCollection(Amf3Output.java:414)
 at
 flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:147)
 at
 flex.messaging.io.amf.Amf3Output.writeObjectProperty(Amf3Output.java:215)
 at
 flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:495)
 at
 flex.messaging.io.amf.Amf3Output.writeCustomObject(Amf3Output.java:467)
 at
 flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:165)
 at
 flex.messaging.io.amf.Amf3Output.writeObjectArray(Amf3Output.java:730)
 at
 flex.messaging.io.amf.Amf3Output.writeAMFArray(Amf3Output.java:386)
 at
 flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:151)
 at
 flex.messaging.io.ArrayCollection.writeExternal(ArrayCollection.java:97)
 at
 flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:485)
 at
 flex.messaging.io.amf.Amf3Output.writeArrayCollection(Amf3Output.java:414)
 at
 flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:147)
 at
 flex.messaging.io.amf.Amf3Output.writeObjectProperty(Amf3Output.java:215)
 at
 flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:495)
 at
 flex.messaging.io.amf.Amf3Output.writeCustomObject(Amf3Output.java:467)
 at
 

[flexcoders] Re: FDS/Hibernate - LazyInitializationException when writing AMF output

2007-02-16 Thread parkerwhirlow
This is happening from FDS... flex.data.assemblers.HibernateAssembler
uses a function called fetchObjectProperties() that's supposed to load
them all while the session is open right?

I've seen in other posts that FDS eager fetches the properties in the
Assembler, so that they are available during serialization... 

am I missing something here?

thanks,
PW



--- In flexcoders@yahoogroups.com, Dima Gutzeit [EMAIL PROTECTED] wrote:

 Hi,
 
 You have to initialize the collections before AMF serializes them. The 
 problem occurs since you closing Hibernate session without first 
 initializing the arrays, and since you are using lazy initialization
the 
 problem arise.
 
 You have two options :
 
 1. Use lazy=false
 2. Better one, is calling /Hibernate.initialize(your_array_reference);/ 
 before you close the Hibernate session.
 
 Regards,
 Dima Gutzeit.
 
 parkerwhirlow wrote:
 
  Hi again =)
 
  I've just started getting this exception inconsistently... sometimes
  it happens 3 times in a row, other times I can go all afternoon
  without getting it. Once the exception occurs, it will occur every
  time the client loads until FDS is restarted.
 
  Note this occurs on multiple collections. I tried setting the
  offending collection to lazy=false (in Hibernate), and the exception
  occurred on a different collection. I can't set every one of my
  collections to lazy=false. Especially since at this point, they HAVE
  to be lazy for the updateItem via hierarchical values to almost work.
 
  I also noticed that the collection does not necessarily need to have
  any items in it. (And possibly is caused specifically by NOT having
  any items in it, I can't tell for sure). The collection referenced in
  the exception below has no values, and there's another collection in
  that same class with values that doesn't seem to cause the exception.
 
  See below the hibernate mapping, and exception output when this
  occurs. (Note there are no FDS managed associations for this
collection)
 
  Thanks for any insight you have as to what is causing this.
 
  PW
  _
 
  joined-subclass name=Adult table=T_ADULT extends=Person
  key
  column name=ID length=22 /
  /key
  set name=children
  inverse=false
  cascade=all-delete-orphan 
  key
  column name=PARENTID length=22 not-null=false /
  /key
  one-to-many class=Person /
  /set
  ...
  /joined-subclass
 
  10:19:42,093 WARN ProxyWarnLog - Narrowing proxy to class
  config.test.Adult - this operation breaks ==
  10:19:44,687 ERROR LazyInitializationException - failed to lazily
  initialize a collection of role: config.test.Adult.children, no
  session or session was closed
  org.hibernate.LazyInitializationException: failed to lazily initialize
  a collection of role: config.test.Adult.children, no session or
  session was closed
  at
 
org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358)
  at
 
org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.j
  ava:350)
  at
 
org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:97)
  at
  org.hibernate.collection.PersistentSet.size(PersistentSet.java:139)
  at java.util.ArrayList.init(ArrayList.java:133)
  at
  flex.messaging.io.ArrayCollection.init(ArrayCollection.java:44)
  at
 
flex.messaging.io.amf.Amf3Output.writeArrayCollection(Amf3Output.java:407)
  at
  flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:147)
  at
 
flex.messaging.io.amf.Amf3Output.writeObjectProperty(Amf3Output.java:215)
  at
 
flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:495)
  at
 
flex.messaging.io.amf.Amf3Output.writeCustomObject(Amf3Output.java:467)
  at
  flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:165)
  at
  flex.messaging.io.amf.Amf3Output.writeObjectArray(Amf3Output.java:730)
  at
  flex.messaging.io.amf.Amf3Output.writeAMFArray(Amf3Output.java:386)
  at
  flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:151)
  at
 
flex.messaging.io.ArrayCollection.writeExternal(ArrayCollection.java:97)
  at
 
flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:485)
  at
 
flex.messaging.io.amf.Amf3Output.writeArrayCollection(Amf3Output.java:414)
  at
  flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:147)
  at
 
flex.messaging.io.amf.Amf3Output.writeObjectProperty(Amf3Output.java:215)
  at
 
flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:495)
  at
 
flex.messaging.io.amf.Amf3Output.writeCustomObject(Amf3Output.java:467)
  at
  flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:165)
  at
  flex.messaging.io.amf.Amf3Output.writeObjectArray(Amf3Output.java:730)
  at
  flex.messaging.io.amf.Amf3Output.writeAMFArray(Amf3Output.java:386)
  at
  flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:151)
  at
 

[flexcoders] Re: Cannot access a property or method of a null object reference

2007-02-16 Thread Nate Pearson
Does anyone know?  This would help me immensely.  

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

 What if the property.someValue does not exist?  How do I check if the
 reference to dataprovider[i].someValue property is null?
 
 my dataprovider is an arraycollection and holds different objects. 
 Some objects have .someValue property and some do not.  When i try to
 step through it it doesn't like it when it expects a property but it
 is not there.
 
 ReferenceError: Error #1069: Property Desc not found on
 DragDrop_inlineComponent1 and there is no default value.
 
 --- In flexcoders@yahoogroups.com, Paul DeCoursey paul@ wrote:
 
  if (dataprovider[i].someValue == null){
  ...
  }
  
  --- In flexcoders@yahoogroups.com, napearson99 napearson99@ wrote:
  
   I often get this error and I usually know why.  Does anyone
know how
   to check for a null reference?
   
   i.e.
   
   if (dataprovider[i].someValue is null){
dothis();
   }
   
   Where dataprovider[i] does not have a someValue property.  I bet
this
   is pretty simple and I just don't know the syntax.  Thanks in
advance!
  
 





[flexcoders] combobox- array trippering states

2007-02-16 Thread Wally Callerio
Combobox:

I am trying to get the objects in my array to trigger different states.
I know its probably easy but...How would I do this? Any help would be
appreciated.

 

 

Regards,

Wally 

 



[flexcoders] Weird WS Error

2007-02-16 Thread John Wilker

I've got an app using Web Services. I make the WS call once and it's just
fine, I make the same call again (any call. this happens with each WS in the
app)

and I get an error. The RPC fault is
FaultEvent fault=[RPC Fault faultString=Array of input arguments did not
contain a required parameter at position 3 faultCode=Client.Input
faultDetail=null] messageId=null type=fault bubbles=false
cancelable=true eventPhase=2]

Here's the code in question.

App services.mxml

mx:WebService id=orderService wsdl=
http://localhost:8300/NameChange/Components/order.cfc?wsdl; fault=
event.token.faultHandler(event) showBusyCursor=true
   mx:operation name=CreateOrder
fault=event.token.faultHandler(event)
result=event.token.resultHandler(event) makeObjectsBindable=false /
   mx:operation name=OrderAddItem
fault=event.token.faultHandler(event)
result=event.token.resultHandler(event) makeObjectsBindable=false /
   mx:operation name=GetOrders fault=event.token.faultHandler(event)
result=event.token.resultHandler(event) makeObjectsBindable=false
resultFormat=object /
   mx:operation name=GetOrderByID fault=myFault(event) result=
event.token.resultHandler(event) makeObjectsBindable=false /
   mx:operation name=RemoveItemFromOrder fault=
event.token.faultHandler(event) result=event.token.resultHandler(event)
makeObjectsBindable=false /
   /mx:WebService

my delegate
public function getOrderByID(datasource:String,
   OrderID:Number):void
   {
   //Alert.show(Hello from the delegate:getOrderByID.,
DEBUG);
   //var thisService:AbstractService = service.getService
(orderService);

   var call:Object = OrderSvc.GetOrderByID(datasource, OrderID);
   call.resultHandler = responder.result
   call.faultHandler = responder.fault;
   }

getorderby is the functionality I've been using to debug. I just can't seem
to figure it out.

As I said, when I load the app, hit this functionality, it works fine. Come
back again, call the same functionality. I get the above error.

Oh, CarGram :) app in case it matters.

Thanks!

J

--
John Wilker
Vice President Software Development/Writer
Red Omega Solutions, Inc.
www.johnwilker.com / www.red-omega.com

Everything changes, nothing remains without change. ~Buddha c.483 bc


Re: [flexcoders] Re: Getting notified when a user 'leaves/quits' the application

2007-02-16 Thread Clint Modien

Hey Evan... do you think it would it be possible to post a simple example of
this?

It would be used by quite a few people I would imagine.

On 2/16/07, Evan Bellinger [EMAIL PROTECTED] wrote:


  In the application that I'm developing, I do use the onbeforeunload
event and it works well for me. I do a check against the data that's
being worked on, and return an error message for a JS alert if it
hasn't been saved. The speed is exceptionally fast, but if you have
concerns you can preemptively pop up an alert and ask them if they
really want to quit, while in the background doing whatever AS stuff
you want.

Evan

--- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, jwopitz
[EMAIL PROTECTED] wrote:

 I started to suggest the same thing about using the javaScript
method. But
 I haven't tested it yet and I am curious to know will that method in
the swf
 that is called by the js fire quickly enough before the actual session
 closes?

 Take for instance you want to save user preferences to a local
shared object
 onClose. I am just guessing here, but I would think that the browser's
 internal close mechanics would not wait around for the js, and
subsequent
 swf methods to do their business.

 Has this been tested and confirmed by anyone?

 On 2/16/07, Evan Bellinger [EMAIL PROTECTED] wrote:
 
  Julien,
 
  Not sure what you're really trying to do here. A bit more of a
  description would be useful. I'll take a shot anyway.
 
  I'm going to guess that you've got your application running in a
  browser. As such, you've got a couple options.
 
  First, and most obviously, you could have a close button in your
  application which logs you out or ends the chat or whatever. Just
  leech off of that event, and away you go.
 
  Secondly, if you want to try to capture the closing of the browser
  window, there's a javascript event that you'll want to capture and tie
  it to a method in your application through the ExternalInterface.
 
  Here's a quick snippet of something similar to what I use:
 
  [Javascript]
 
  window.onbeforeunload = browserClosing;
 
  function browserClosing(event_)
  {
  getSWF(MyTestApp).theBrowserIsClosing();
  }
 
  // Gets a reference to the specified SWF file by checking which
browser is
  // being used and using the appropriate JavaScript.
  function getSWF(movieName)
  {
  if (navigator.appName.indexOf(Microsoft) != -1)
  return window[movieName];
  else
  return document[movieName];
  }
 
  [/Javascript]
 
  [MXML]
 
  mx:Application ... creationComplete=load();
  Script![CDATA[
  private function load():void
  {
  if(ExternalInterface.available)
  {
  try
  {
  ExternalInterface.addCallback(theBrowserIsClosing,
  theBrowserIsClosingHandler);
  }
  catch(e:Error){}
  }
  }
 
  private function theBrowserIsClosingHandler():String
  {
  //Do whatever needs to be done here.
  }
  ]]/Script
  /mx:Application
 
  [/MXML]
 
  When your user hits the browser's close button, the onbeforeunload
  event will fire calling the javascript method 'browserClose' which in
  turn will call the 'theBrowserIsClosing' method in your application.
 
  Hope that gets you pointed in the right direction. If not, be a bit
  more specific about what you're trying to do.
 
  Evan
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
julien castelain jcastelain@
  wrote:
  
   Hi all,
  
   I was wondering if there was a way to be notified when the user
  leaves or
   quits the application using AS3.
  
   Thanks.
  
 
 
 
 
  --
  Flexcoders Mailing List
  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
  Yahoo! Groups Links
 
 
 
 


 --
 justin w. opitz
 617.771.6639
 jwopitz(at)gmail.com


 



RE: [flexcoders] Re: Cannot access a property or method of a null object reference

2007-02-16 Thread Gordon Smith
 Some objects have .someValue property and some do not. 
 
It sounds like the objects in your dataProvider are instances of various
non-dynamic classes, where some of the classes declare a someValue
property and others don't. 
 
Is this correct? If so, you don't ant to write code like
 
   if (dataProvider[i].someValue == null)
 
because you get a ReferenceError if you access a nonexistend property of
a non-dynamic class. You should only write this if your dataProvider
objects are dynamic.
 
Instead, try
 
   if (dataProvider[i].hasOwnProperty(someValue))
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Nate Pearson
Sent: Friday, February 16, 2007 4:48 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Cannot access a property or method of a null
object reference



Does anyone know? This would help me immensely. 

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, napearson99 [EMAIL PROTECTED] wrote:

 What if the property.someValue does not exist? How do I check if the
 reference to dataprovider[i].someValue property is null?
 
 my dataprovider is an arraycollection and holds different objects. 
 Some objects have .someValue property and some do not. When i try to
 step through it it doesn't like it when it expects a property but it
 is not there.
 
 ReferenceError: Error #1069: Property Desc not found on
 DragDrop_inlineComponent1 and there is no default value.
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com , Paul DeCoursey paul@ wrote:
 
  if (dataprovider[i].someValue == null){
  ...
  }
  
  --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com , napearson99 napearson99@
wrote:
  
   I often get this error and I usually know why. Does anyone
know how
   to check for a null reference?
   
   i.e.
   
   if (dataprovider[i].someValue is null){
   dothis();
   }
   
   Where dataprovider[i] does not have a someValue property. I bet
this
   is pretty simple and I just don't know the syntax. Thanks in
advance!
  
 




 


RE: [flexcoders] Re: Getting a component to hear click

2007-02-16 Thread Gordon Smith
I can't follow your description of what you're doing. Can you post code
for a very simple version of this component -- and an simple app that
uses it -- in which the click doesn't work?
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of jack_freud
Sent: Friday, February 16, 2007 7:24 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Getting a component to hear click



I was able to get it to work by adding a listener for click but I 
don't understand why I had to do that.

Does anyone have a suggestion as to what was going on? 

Thanks,
Jack
--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, jack_freud [EMAIL PROTECTED] wrote:

 I'm still pretty new to making components. Basically this one is 
like
 an image that navigates to a URL in HTML-land, except that I want to
 make it so you can set its text and URL as properties of the
 component. Seems to be utterly simple.
 
 But I can't get it to hear the click event...
 
 It extends VBox and contains a label. It has a member variable of a
 URL and a click event so that clicking on the box (or the label)
 should navigate to that url. 
 
 click does not show up in the auto-complete, but I get no errors
 when I implement it, and I see click there in the class hierarchy.
 
 But nothing happens. Breakpoints don't stop, nothing happens.
 
 What's got me puzzled is that in the mxml where I used this 
component,
 if I put code for the click event, it works flawlessly. Of course I
 could leave it there in the app, but naturally I'd prefer to
 encapsulate it so it has its own data and behaviors like any good
 little object.
 
 Is there something obvious I don't know?
 
 Thanks,
 
 Jack




 


RE: [flexcoders] How to get the current build options FB uses?

2007-02-16 Thread Gordon Smith
 The only problem right now, besides the above issues, is that SWCs
added to the Library paths don't show up in the config XML. Are they
supposed to?
 
Yes.
 
Right now this is what I see in the include-libraries node: 
 
When I add a SWC to FlexBuilder's Library Path pane, it appears in the
library-path node of the dumped config file. I don't think FlexBuilder
uses the include-libraries option, which I believe is for forcing a SWC
to be included even if it isn't used by the application.
 
- Gordon




From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Derek Vadneau
Sent: Friday, February 16, 2007 2:30 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] How to get the current build options FB uses?



What is in the library-path of the dumped config file? Is there a
path-element involving 'libs'?

library-path
path-elementlibs/path-element
path-elementlocale/{locale}/path-element
/library-path 

I'm told that any relative paths in the dumped XML config file are
relative to the frameworks directory (the location of the normal
flex-config.xml file).

Ok, I can work with that. Obviously it would be ideal to not have to do
this, but adding the paths should be easy enough for a simple
script/app. ... I just added ${flexlib}/ in places where a path looked
like it was needed and that worked. 

You should be able to create an XML config file with all the options
you need. You should not have to specify any of them on the command line
except perhaps -load-config.

That's great! The only problem right now, besides the above issues, is
that SWCs added to the Library paths don't show up in the config XML.
Are they supposed to?

Right now this is what I see in the include-libraries node: 


!-- compiler.include-libraries: a list of libraries (SWCs) to
completely include in the SWF--
!-- compiler.include-libraries usage:
include-libraries
librarystring/library 
librarystring/library
/include-libraries
--

The SWC that I've included is a Library project that Flex Builder
recognizes from my projects.

Here is the commandline I'm using to try to compile: 
mxmlc D:/Flex/test/test.mxml

The -load-config isn't required - because it's in the same directory as
the MXML file? - and if included in this case, gets loaded twice.

However, the compilation fails with an error because my SWC isn't
included in the config XML. 

So close ...



On 2/15/07, Gordon Smith [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
wrote: 


 Error: unable to open 'libs' 
 



What is in the library-path of the dumped config file? Is
there a path-element involving 'libs'?


 can you tell me what the config XML is used for? 
 
To dump out all the options used for a compilation, in the same
format as the flex-config.file. However, I'm afraid that the compiler
team and the FlexBuilder team are separate, that this option is not
widely used, and that we haven't done a good job of making it easy to
create one in FlexBuilder and then use it for command-line compilation.

 
 And will it enable me to do what I originally set out to do,
which is: I want to setup my project in Flex Builder and then build the
very same project from the commandline without having to manually add
all of the options that Flex Builder is adding.
 
Yes, it should enable this but you may need to adjust some file
system paths. I'm told that any relative paths in the dumped XML config
file are relative to the frameworks directory (the location of the
normal flex-config.xml file).


 My company owns multiple copies of Flex Builder, so I'm not
trying to get around having to use Flex Builder
 
No problem even if you were, Adobe loves to sell copies of
FlexBuilder, but we know we're never going to get to our goal of having
a million Flex developers unless a whole lot of them are using the free
SDK.

 
 If I HAVE to do this manually by writing everything on the
commandline then fine.
 
You should be able to create an XML config file with all the
options you need. You should not have to specify any of them on the
command line except perhaps -load-config. 
 
- Gordon



From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com http://yahoogroups.com ] On Behalf
Of Derek Vadneau
Sent: Thursday, February 15, 2007 11:01 AM 

To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] How to get the current build options
FB uses?




When I run this:
mxmlc -dump-config test-config.xml test.mxml

I still get an error stating that there is a Call to a possibly
undefined method. In FB there's no problem because I added the SWC to
my Library paths. 

I then edited the config file, as 

[flexcoders] Error: Only one root tag is allowed.

2007-02-16 Thread Dave
Newbie question here.
  Got the error: Only one root tag is allowed.
   
  The error appears on the mx:XML line. Is an XML tree in dataProvider not 
allowed?
  Thanks anyone.
  Dave
   
   
  The application is:
   
  ?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute
mx:Panel height=100% title=My Links fontSize=18
   mx:Tree x=76 y=102 width=343 id=treLinks fontSize=10
  mx:dataProvider
mx:XML
   node label=Folder1
  node label=Leaf1 nodeURL=http://www.qa.com/
   /node
   node label=Folder2
  node label=Leaf2 nodeURL=http://www.yahoo.com; /
   /node
/mx:XML
 /mx:dataProvider
 /mx:Tree
   /mx:Panel
/mx:Application


RE: [flexcoders] preloader or viewstate while charts initiailize

2007-02-16 Thread Dimitrios Gianninas
I've created a little StatusWindow component (that is modal) that I use to 
relay any kind of message to a user. So it basically appears while a remote 
operation is occuring, but I guess u can use it whenever u want. So u can do 
similar.

Dimitrios Gianninas
Optimal Payments Inc.



-Original Message-
From: flexcoders@yahoogroups.com on behalf of Grant Davies
Sent: Fri 2/16/2007 5:02 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] preloader or viewstate while charts initiailize
 
Hi guys,
 
I need to display something while my charts are loading in a dashboard
style interface where different things are initializing at different
times, I wondered how people where showing this busy state, use a
viewstate to switch between the charrt and another state with the
animation, is there something built into the graph ?  In flash I would
have overlayed an invisible button to act as a modal with an animation
in the middle..
 
cheers
Grant
 
 
...
 b l u e t u b e i n t e r a c t i v e.
.: grant davies
.: 404.428.6839 (c)
.: 708-983-1577 (F)
 [EMAIL PROTECTED]
 http://www.bluetube.com/bti http://www.bluetube.com/bti 
 A Tribal Chicken Designs Affiliate http://www.tribalchicken.com/ 

 

-- 
WARNING
---
This electronic message and its attachments may contain confidential, 
proprietary or legally privileged information, which is solely for the use of 
the intended recipient.  No privilege or other rights are waived by any 
unintended transmission or unauthorized retransmission of this message.  If you 
are not the intended recipient of this message, or if you have received it in 
error, you should immediately stop reading this message and delete it and all 
attachments from your system.  The reading, distribution, copying or other use 
of this message or its attachments by unintended recipients is unauthorized and 
may be unlawful.  If you have received this e-mail in error, please notify the 
sender.

AVIS IMPORTANT
--
Ce message électronique et ses pièces jointes peuvent contenir des 
renseignements confidentiels, exclusifs ou légalement privilégiés destinés au 
seul usage du destinataire visé.  L'expéditeur original ne renonce à aucun 
privilège ou à aucun autre droit si le présent message a été transmis 
involontairement ou s'il est retransmis sans son autorisation.  Si vous n'êtes 
pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, 
veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses 
pièces jointes, de votre système.  La lecture, la distribution, la copie ou 
tout autre usage du présent message ou de ses pièces jointes par des personnes 
autres que le destinataire visé ne sont pas autorisés et pourraient être 
illégaux.  Si vous avez reçu ce courrier électronique par erreur, veuillez en 
aviser l'expéditeur.

winmail.dat

RE: [flexcoders] Can't we access MovieClips contained in embedded SWF's?

2007-02-16 Thread Mike Anderson
Hello Scott (in particular) :)
 
You mentioned a Proxy - what you do mean by this exactly?
 
Is this supposed to be some custom class that I write?  If so, what is
supposed to be contained within it?
 
I did read up on the Document Object, and I am now doing my Flash 9 FLA
files with a custom Document Class, representing the Root Timeline.  I
am pretty sure I did it right, since I am getting no compile errors.
 
But my question is, is the AS3 Class File I used for the Document
Object, strictly used for the FLA file?  Or is this also used inside of
Flex Builder, after I bring the external SWF file in?
 
This is where I am getting a little confused.
 
All the articles I find on this topic, covers the Flash side of things -
and they never take that next step, and tell you how to reference it
inside of Flex.
 
If you have anything else on this topic, I'd really be grateful for your
help.
 
Thanks,
 
Mike



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of slangeberg
Sent: Wednesday, February 14, 2007 10:53 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Can't we access MovieClips contained in
embedded SWF's?


If you are using Flash 9, you can use a document class (I believe) at
the root level and have Flex reference it by that. Your document class
would set up an API, so you don't have to peer into the movie itself.
Basically a proxy. Sorry I don't have the implementation in front of me,
but I believe it's possible. 

So, if previous code was correct, could do something like:

var platProxy:YourProxy = platObject.getChildByName('instancename') as
YourProxy
platProxy.hideAll();
platProxy.showByID( {id:'plat_xxx'} ); 

Just an idea!

-Scott


On 2/14/07, Mike Anderson [EMAIL PROTECTED] wrote: 



Oh man, you are kidding me!
 
See, this particular SWF is a Plat Overview of a subdivision -
and there are 140 Lots, each individually defined as a unique MovieClip.
 
So, if I need access to each MovieClip programmatically, I will
have to define 140 variables?
 
Now that would be a bummer :-(
 
Could you clarify on that?
 
Thank you for the information nevertheless - I was actually
going to try the getChild method next, so that saves me some time.
 
Mike



From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Matt Wicks
Sent: Wednesday, February 14, 2007 10:18 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Can't we access MovieClips contained
in embedded SWF's?



You need to get the object as a display object  

var xxx:MovieClip = platObject.getChildByName('instancename') as
MovieClip

Matt
On 14 Feb 2007, at 16:13, Mike Anderson wrote:




Hello all,

I have a Flash Player 9, AS3 version of a SWF that I am
bringing into
Flex, using the SWFLoader Component.

Once I bring the SWF in, I am creating a MovieClip
variable and
assigning to it, the SWFLoader.content. Here is a quick
code example:

var platObject:MovieClip = mySWFLoader.content;

So once that assignment is made, you can execute certain
built-in
methods available to any Flash Movie - for example:

platObject.play ();
platObject.loaderIn fo.[etc]
And so on...

That is all well and good - but what about MovieClips
that reside in the
Root Timeline? In this particular SWF File, I have a
MovieClip called
platMovieClip - and I am trying to access it's
properties and methods
from within Flex. For example, I'd like to toggle the
visibility, so I
tried this code:

platObject.platMovi eClip._visible = false;

When I try this command, I get an error that says the
property
platMovieClip is unknown or something to that effect...

If we can't access the assets that reside in SWF Files,
then what is the
whole point of all this? Or maybe there is something
that I am
overlooking - but as far as I can tell, the platObject
should represent
the SWF...

Could any of you shed some light on this topic for me?
This
functionality is VERY important to the success of my
website launch.

Thanks in advance,

Mike













-- 

: : ) Scott  


Re: [flexcoders] Can't we access MovieClips contained in embedded SWF's?

2007-02-16 Thread slangeberg

Yeah, sorry. I'm not 100%, but you should be able to reference your loaded
movie by that class type (your document class), from within Flex. I believe
another gentleman referred to that, in this thread. Hold on, I did it, with
a loader... I'll try to attach code.

The proxy is just a design idea, meaning you define an interface to your
movie in your class, instead of referencing elements within the movie from
Flex. Then, the only thing that will break your flash / flex connection is
to break that interface. For instance, your map(?) class could have
functions like:

showPlat( id:Object );

where the class implementation can decide what to do with the call, instead
of having your flex app nose through the contents. That's a good design
practice to get into:

'Always code to interfaces, not implementations.'

Ok, so here's one of those do as I say, deals.. Also, my implementation may
be a bit different here, than what we were talking about. This was a quick
fix to enable custom loading logic, for the default Flex 2 application
loading bar. In this case, I'm actually assigning the class under the
'linkage' option of my library clip (progress bar) to point to:
com.tc.view.preload.ProgressBarSymbol, and publishing in Flash 9. Then, when
you instantiate the class in Flex 2, you'll get a direct link. In your case,
i would suggest a document class, for the entire movie.

//I just used this class to enable me to access a loading bar quick. If this
was going to
//scale / change, I would have defined public methods to update this view.
//I swear!!
package com.tc.view.preload
{
   import flash.display.*;
   import flash.text.TextField;

   [Embed(source=/library.swf, symbol=
com.tc.view.preload.ProgressBarSymbol)]
   public class ProgressBarSymbol extends Sprite
   {
   public var progress_bar:MovieClip;
   public var loading_text:TextField;
   }
}

//And instantiated in Flex 2 by using:

var bar:ProgressBarSymbol = new ProgressBarSymbol();
this.addChild( bar );

Hope this gives ideas, not confusion!

-Scott

On 2/16/07, Mike Anderson [EMAIL PROTECTED] wrote:


   Hello Scott (in particular) :)

You mentioned a Proxy - what you do mean by this exactly?

Is this supposed to be some custom class that I write?  If so, what is
supposed to be contained within it?

I did read up on the Document Object, and I am now doing my Flash 9 FLA
files with a custom Document Class, representing the Root Timeline.  I am
pretty sure I did it right, since I am getting no compile errors.

But my question is, is the AS3 Class File I used for the Document Object,
strictly used for the FLA file?  Or is this also used inside of Flex
Builder, after I bring the external SWF file in?

This is where I am getting a little confused.

All the articles I find on this topic, covers the Flash side of things -
and they never take that next step, and tell you how to reference it inside
of Flex.

If you have anything else on this topic, I'd really be grateful for your
help.

Thanks,

Mike

 --
*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *slangeberg
*Sent:* Wednesday, February 14, 2007 10:53 AM
*To:* flexcoders@yahoogroups.com
*Subject:* Re: [flexcoders] Can't we access MovieClips contained in
embedded SWF's?

If you are using Flash 9, you can use a document class (I believe) at the
root level and have Flex reference it by that. Your document class would set
up an API, so you don't have to peer into the movie itself. Basically a
proxy. Sorry I don't have the implementation in front of me, but I believe
it's possible.

So, if previous code was correct, could do something like:

var platProxy:YourProxy = platObject.getChildByName('instancename') as
YourProxy
platProxy.hideAll();
platProxy.showByID( {id:'plat_xxx'} );

Just an idea!

-Scott

On 2/14/07, Mike Anderson [EMAIL PROTECTED] wrote:

Oh man, you are kidding me!

 See, this particular SWF is a Plat Overview of a subdivision - and there
 are 140 Lots, each individually defined as a unique MovieClip.

 So, if I need access to each MovieClip programmatically, I will have to
 define 140 variables?

 Now that would be a bummer :-(

 Could you clarify on that?

 Thank you for the information nevertheless - I was actually going to try
 the getChild method next, so that saves me some time.

 Mike

  --
 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Matt Wicks
 *Sent:* Wednesday, February 14, 2007 10:18 AM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Can't we access MovieClips contained in
 embedded SWF's?

  You need to get the object as a display object
 var xxx:MovieClip = platObject.getChildByName('instancename') as
 MovieClip

 Matt
  On 14 Feb 2007, at 16:13, Mike Anderson wrote:

   Hello all,

 I have a Flash Player 9, AS3 version of a SWF that I am bringing into
 Flex, using the SWFLoader Component.

 Once I bring the SWF in, I am creating a MovieClip 

Re: [flexcoders] Can't we access MovieClips contained in embedded SWF's?

2007-02-16 Thread slangeberg

Mike,

I tried setting up a document class for Flash 9, but when you place named
items on stage, you get this error:

ReferenceError: Error #1056: Cannot create property square_mc on
com.cpile.flextoflash.FlexToFlashMain.
   at flash.display::Sprite/flash.display:Sprite::constructChildren()
   at flash.display::Sprite$iinit()
   at flash.display::MovieClip$iinit()
   at com.cpile.flextoflash::FlexToFlashMain$iinit()

Adobe guys, is this correct? My understanding from looking around is that
with the document class in Flash 9, you can only add items to the stage
through code. That seems to negate a lot of the advantage of using a
graphical interface... ok, so you could have a clip in your library that has
the stage set up... hmmm that may do it! I'll write back when I have
something. Otherwise, what i have sent is an effective way to access items
on the stage.

-Scott

On 2/16/07, slangeberg [EMAIL PROTECTED] wrote:


Yeah, sorry. I'm not 100%, but you should be able to reference your loaded
movie by that class type (your document class), from within Flex. I believe
another gentleman referred to that, in this thread. Hold on, I did it, with
a loader... I'll try to attach code.

The proxy is just a design idea, meaning you define an interface to your
movie in your class, instead of referencing elements within the movie from
Flex. Then, the only thing that will break your flash / flex connection is
to break that interface. For instance, your map(?) class could have
functions like:

showPlat( id:Object );

where the class implementation can decide what to do with the call,
instead of having your flex app nose through the contents. That's a good
design practice to get into:

'Always code to interfaces, not implementations.'

Ok, so here's one of those do as I say, deals.. Also, my implementation
may be a bit different here, than what we were talking about. This was a
quick fix to enable custom loading logic, for the default Flex 2 application
loading bar. In this case, I'm actually assigning the class under the
'linkage' option of my library clip (progress bar) to point to:
com.tc.view.preload.ProgressBarSymbol, and publishing in Flash 9. Then,
when you instantiate the class in Flex 2, you'll get a direct link. In your
case, i would suggest a document class, for the entire movie.

//I just used this class to enable me to access a loading bar quick. If
this was going to
//scale / change, I would have defined public methods to update this view.

//I swear!!
package com.tc.view.preload
{
import flash.display.*;
import flash.text.TextField;

[Embed(source=/library.swf, symbol=
com.tc.view.preload.ProgressBarSymbol)]
public class ProgressBarSymbol extends Sprite
{
public var progress_bar:MovieClip;
public var loading_text:TextField;
}
}

//And instantiated in Flex 2 by using:

var bar:ProgressBarSymbol = new ProgressBarSymbol();
this.addChild( bar );

Hope this gives ideas, not confusion!

-Scott

On 2/16/07, Mike Anderson  [EMAIL PROTECTED] wrote:

Hello Scott (in particular) :)

 You mentioned a Proxy - what you do mean by this exactly?

 Is this supposed to be some custom class that I write?  If so, what is
 supposed to be contained within it?

 I did read up on the Document Object, and I am now doing my Flash 9 FLA
 files with a custom Document Class, representing the Root Timeline.  I am
 pretty sure I did it right, since I am getting no compile errors.

 But my question is, is the AS3 Class File I used for the Document
 Object, strictly used for the FLA file?  Or is this also used inside of Flex
 Builder, after I bring the external SWF file in?

 This is where I am getting a little confused.

 All the articles I find on this topic, covers the Flash side of things -
 and they never take that next step, and tell you how to reference it inside
 of Flex.

 If you have anything else on this topic, I'd really be grateful for your
 help.

 Thanks,

 Mike

  --
 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *slangeberg
 *Sent:* Wednesday, February 14, 2007 10:53 AM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Can't we access MovieClips contained in
 embedded SWF's?

 If you are using Flash 9, you can use a document class (I believe) at
 the root level and have Flex reference it by that. Your document class would
 set up an API, so you don't have to peer into the movie itself. Basically a
 proxy. Sorry I don't have the implementation in front of me, but I believe
 it's possible.

 So, if previous code was correct, could do something like:

 var platProxy:YourProxy = platObject.getChildByName('instancename') as
 YourProxy
 platProxy.hideAll();
 platProxy.showByID( {id:'plat_xxx'} );

 Just an idea!

 -Scott

 On 2/14/07, Mike Anderson [EMAIL PROTECTED] wrote:
 
 Oh man, you are kidding me!
 
  See, this particular SWF is a Plat Overview of a subdivision - and
  there are 140 Lots, each 

[flexcoders] Flash 9 - Flex 2 interface (previously): Can't we access MovieClips contained in embedded SWF's?

2007-02-16 Thread slangeberg

Any Adobe or other people who have some resources out there for interfacing
Flash 9 - Flex 2 apps? This seems to be a critical area, as Flash 9 IDE
release looms..

Here's some interesting info on using Flash 9, but still not a solution to
the Flex interface.

http://www.adobe.com/devnet/flash/articles/flash9_as3_preview.html


-Scott

On 2/16/07, slangeberg [EMAIL PROTECTED] wrote:


Mike,

I tried setting up a document class for Flash 9, but when you place named
items on stage, you get this error:

ReferenceError: Error #1056: Cannot create property square_mc on
com.cpile.flextoflash.FlexToFlashMain .
at flash.display::Sprite/flash.display:Sprite::constructChildren()
at flash.display::Sprite$iinit()
at flash.display::MovieClip$iinit()
at com.cpile.flextoflash::FlexToFlashMain$iinit()

Adobe guys, is this correct? My understanding from looking around is that
with the document class in Flash 9, you can only add items to the stage
through code. That seems to negate a lot of the advantage of using a
graphical interface... ok, so you could have a clip in your library that has
the stage set up... hmmm that may do it! I'll write back when I have
something. Otherwise, what i have sent is an effective way to access items
on the stage.

-Scott

On 2/16/07, slangeberg [EMAIL PROTECTED] wrote:

 Yeah, sorry. I'm not 100%, but you should be able to reference your
 loaded movie by that class type (your document class), from within Flex. I
 believe another gentleman referred to that, in this thread. Hold on, I did
 it, with a loader... I'll try to attach code.

 The proxy is just a design idea, meaning you define an interface to your
 movie in your class, instead of referencing elements within the movie from
 Flex. Then, the only thing that will break your flash / flex connection is
 to break that interface. For instance, your map(?) class could have
 functions like:

 showPlat( id:Object );

 where the class implementation can decide what to do with the call,
 instead of having your flex app nose through the contents. That's a good
 design practice to get into:

 'Always code to interfaces, not implementations.'

 Ok, so here's one of those do as I say, deals.. Also, my implementation
 may be a bit different here, than what we were talking about. This was a
 quick fix to enable custom loading logic, for the default Flex 2 application
 loading bar. In this case, I'm actually assigning the class under the
 'linkage' option of my library clip (progress bar) to point to:
 com.tc.view.preload.ProgressBarSymbol, and publishing in Flash 9. Then,
 when you instantiate the class in Flex 2, you'll get a direct link. In your
 case, i would suggest a document class, for the entire movie.

 //I just used this class to enable me to access a loading bar quick. If
 this was going to
 //scale / change, I would have defined public methods to update this
 view.
 //I swear!!
 package com.tc.view.preload
 {
 import flash.display.*;
 import flash.text.TextField;

 [Embed(source=/library.swf, symbol=
 com.tc.view.preload.ProgressBarSymbol)]
 public class ProgressBarSymbol extends Sprite
 {
 public var progress_bar:MovieClip;
 public var loading_text:TextField;
 }
 }

 //And instantiated in Flex 2 by using:

 var bar:ProgressBarSymbol = new ProgressBarSymbol();
 this.addChild( bar );

 Hope this gives ideas, not confusion!

 -Scott

 On 2/16/07, Mike Anderson  [EMAIL PROTECTED] wrote:
 
 Hello Scott (in particular) :)
 
  You mentioned a Proxy - what you do mean by this exactly?
 
  Is this supposed to be some custom class that I write?  If so, what is
  supposed to be contained within it?
 
  I did read up on the Document Object, and I am now doing my Flash 9
  FLA files with a custom Document Class, representing the Root Timeline.  I
  am pretty sure I did it right, since I am getting no compile errors.
 
  But my question is, is the AS3 Class File I used for the Document
  Object, strictly used for the FLA file?  Or is this also used inside of Flex
  Builder, after I bring the external SWF file in?
 
  This is where I am getting a little confused.
 
  All the articles I find on this topic, covers the Flash side of things
  - and they never take that next step, and tell you how to reference it
  inside of Flex.
 
  If you have anything else on this topic, I'd really be grateful for
  your help.
 
  Thanks,
 
  Mike
 
   --
  *From:* flexcoders@yahoogroups.com [mailto:flexcoders@ yahoogroups.com]
  *On Behalf Of *slangeberg
  *Sent:* Wednesday, February 14, 2007 10:53 AM
  *To:* flexcoders@yahoogroups.com
  *Subject:* Re: [flexcoders] Can't we access MovieClips contained in
  embedded SWF's?
 
  If you are using Flash 9, you can use a document class (I believe) at
  the root level and have Flex reference it by that. Your document class would
  set up an API, so you don't have to peer into the movie itself. Basically a
  proxy. Sorry I don't have the 

RE: [flexcoders] Can't we access MovieClips contained in embedded SWF's?

2007-02-16 Thread Merrill, Jason
My understanding from looking around is that with the document class
in Flash 9, 
you can only add items to the stage through code. That seems to negate
a lot of the 
advantage of using a graphical interface..
 
Remember, it's not really Flash 9, it's really just Flash 8 with a
preview of AS 3.0, even if they are calling it Flash 9 Pro AS3 preview
- Flash 8 with a compiler to compile to Flash 9 player/AS3.  When Flash
9 comes out, I'm sure you'll be able to add items to the stage through
the GUI.  I think they kinda made a mistake calling it Flash 9 Pro AS3
Preview, it's confused a lot of people.  At least the docs on their
site explain it well. 
 
http://www.adobe.com/devnet/flash/articles/flash9_as3_preview.html
 

Jason Merrill 
Bank of America
Learning  Organizational Effectiveness 
  
  
  
  
  

 




From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of slangeberg
Sent: Friday, February 16, 2007 10:58 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Can't we access MovieClips contained
in embedded SWF's?



Mike, 

I tried setting up a document class for Flash 9, but when you
place named items on stage, you get this error:

ReferenceError: Error #1056: Cannot create property square_mc on
com.cpile.flextoflash.FlexToFlashMain .
at
flash.display::Sprite/flash.display:Sprite::constructChildren()
at flash.display::Sprite$iinit()
at flash.display::MovieClip$iinit()
at com.cpile.flextoflash::FlexToFlashMain$iinit()

Adobe guys, is this correct? My understanding from looking
around is that with the document class in Flash 9, you can only add
items to the stage through code. That seems to negate a lot of the
advantage of using a graphical interface... ok, so you could have a clip
in your library that has the stage set up... hmmm that may do it! I'll
write back when I have something. Otherwise, what i have sent is an
effective way to access items on the stage. 

-Scott


On 2/16/07, slangeberg [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote: 

Yeah, sorry. I'm not 100%, but you should be able to
reference your loaded movie by that class type (your document class),
from within Flex. I believe another gentleman referred to that, in this
thread. Hold on, I did it, with a loader... I'll try to attach code. 

The proxy is just a design idea, meaning you define an
interface to your movie in your class, instead of referencing elements
within the movie from Flex. Then, the only thing that will break your
flash / flex connection is to break that interface. For instance, your
map(?) class could have functions like: 

showPlat( id:Object );

where the class implementation can decide what to do
with the call, instead of having your flex app nose through the
contents. That's a good design practice to get into:

'Always code to interfaces, not implementations.' 

Ok, so here's one of those do as I say, deals.. Also, my
implementation may be a bit different here, than what we were talking
about. This was a quick fix to enable custom loading logic, for the
default Flex 2 application loading bar. In this case, I'm actually
assigning the class under the 'linkage' option of my library clip
(progress bar) to point to: com.tc.view.preload.ProgressBarSymbol, and
publishing in Flash 9. Then, when you instantiate the class in Flex 2,
you'll get a direct link. In your case, i would suggest a document
class, for the entire movie.

//I just used this class to enable me to access a
loading bar quick. If this was going to 
//scale / change, I would have defined public methods to
update this view. 
//I swear!!
package com.tc.view.preload
{
import flash.display.*;
import flash.text.TextField;

[Embed(source=/library.swf,
symbol=com.tc.view.preload.ProgressBarSymbol)]
public class ProgressBarSymbol extends Sprite 
{
public var progress_bar:MovieClip;  
public var loading_text:TextField; 
}
}

//And instantiated in Flex 2 by using:

var bar:ProgressBarSymbol = new ProgressBarSymbol(); 
this.addChild( bar ); 

Hope this gives ideas, not confusion!

-Scott 



On 2/16/07, Mike Anderson  [EMAIL PROTECTED]

[flexcoders] Re: How to hide both Axes of a chart?

2007-02-16 Thread anewgene
Yeah, that works. Thanks a lot.

lei

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

 Hi Lei,
 
 Try setting the following in your chart:
 
 mx:horizontalAxisRenderer
   mx:AxisRenderer showLabels=false showLine=false
 tickPlacement=none /
 /mx:horizontalAxisRenderer
 mx:verticalAxisRenderer
   mx:AxisRenderer showLabels=false showLine=false
 tickPlacement=none /
 /mx:verticalAxisRenderer
 
 Hope that works,
 
 Graham
 
 
 --- In flexcoders@yahoogroups.com, anewgene anewgene@ wrote:
 
  Hi, group,
  In my use case, I need to hide both axes of a chart? Is there 
a 
  easy way to do that? I think it should be very simple, but I 
didn't 
  find any luck from flex online docs.
  
  Thanks,
  
  Lei (a newcomer)
 





Re: [flexcoders] Populating DataGrid from XML attributes

2007-02-16 Thread Andrey

or in your datagrid datacolumn for the dataField just use
@attributename, such as @name or @value.

for an xml such as this: var myXML:XML = usersuser name=blah
value=asdf/users;

you can bind it to dataprovider like this: myGrid.dataprovider =
myXML.children();
which produces an XMLList which is bindable.

now, if you want to really bind it and make sure changes are propagated back
to the list you just create a variable of xmllist type, assign
myxml.children() to it, and set it to bindable such as this:

[Bindable]
var myXMLList = myXML.children();

mygrid.dataprovider = myXMLList;

that's it!

-A


On 2/14/07, Pablo [EMAIL PROTECTED] wrote:


  The XML:
root
item
name value=Pete type=1 /
city value=NY type=2 /
phone value=33-22-555 type=1 /
count value=10 type=1 /
/item
item
name value=Pete2 type=2 /
city value=NY type=1 /
phone value=33-22-555 type=1 /
count value=10 type=3 /
/item
item
name value=Pete3 type=1 /
city value=NY type=1 /
phone value=33-22-555 type=1 /
count value=10 type=1 /
/item
/root


The CODE:
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute
creationComplete=init();dgRPC.send()
mx:Script
![CDATA[
import components.CellColorer;
import vo.DGCellContainer;
import mx.collections.ArrayCollection ;
import mx.rpc.events.ResultEvent;

[Bindable]
private var dgData:ArrayCollection=new ArrayCollection();

private var aColors:Array=new
Array('','0xff','0x00ff00','0xff');

private function init():void
{

var nameCellColorer:ClassFactory=new
ClassFactory(CellColorer);
nameCellColorer.properties={bShowName:true};
colName.itemRenderer=nameCellColorer;

var cityCellColorer:ClassFactory=new
ClassFactory(CellColorer);
cityCellColorer.properties={bShowCity:true};
colCity.itemRenderer=cityCellColorer;

}

private function onDataGridResult(event:ResultEvent):void
{
var dgc:DGCellContainer;
trace(!)
for each(var p:XML in event.result..item)
{
dgc=new DGCellContainer();
[EMAIL PROTECTED];
dgc.nameColor=aColors [Number([EMAIL PROTECTED])];
[EMAIL PROTECTED];
dgc.cityColor=aColors[Number([EMAIL PROTECTED])];
[EMAIL PROTECTED];
dgc.phoneColor=aColors [Number([EMAIL PROTECTED])];
[EMAIL PROTECTED];
dgc.countColor=aColors[Number([EMAIL PROTECTED])];
dgData.addItem(dgc);
}
}
]]
/mx:Script

mx:HTTPService url=stub/ColoredDataGrid.xml id=dgRPC
result=onDataGridResult(event) resultFormat=e4x/
mx:DataGrid x=0 y=0 width=378 height=192
dataProvider={dgData} headerColors={[0xff]}
mx:columns
mx:DataGridColumn id=colName headerText=Name
dataField=name/
mx:DataGridColumn id=colCity headerText=City
dataField=city/
mx:DataGridColumn headerText=Phone dataField=phone/
mx:DataGridColumn headerText=Count dataField=count/
/mx:columns
/mx:DataGrid
/mx:Application
 



[flexcoders] no code completion with cairngorm

2007-02-16 Thread Grant Davies
Do I need something special to get code completion with cairngorm swc?
I'm getting a lot of typos, but when I do com.adobe.  and wait, I never
get the code completion... is there something I need to setup ?
 
Grant
 
 
...
 b l u e t u b e i n t e r a c t i v e.
.: grant davies
.: 404.428.6839 (c)
.: 708-983-1577 (F)
 [EMAIL PROTECTED]
 http://www.bluetube.com/bti http://www.bluetube.com/bti 
 A Tribal Chicken Designs Affiliate http://www.tribalchicken.com/ 

 
attachment: small.jpg