Re: [flexcoders] Using an Alert when handling another event?
You need to use preventDefault() in the confirmTabDelete function and then display the Alert box. Then when the user clicks ok, close the tab programmatically. I'm not familiar with SuperTabNavigator but normally this kind of events are only dispatched as a result of a user action, so when you close the tab programmatically the second time, this will really close it without going through the event handler. private function confirmTabDelete( event:SuperTabEv ent):void { Alert.show( Are you sure you want to delete this tab?, Confirm delete, Alert.YES | Alert.NO, this, alertListener, null, Alert.NO); event.preventDefault(); // Prevent default here } private function alertListener( eventObj: CloseEvent) :void { if (eventObj.detail= =Alert.NO) { closeTab(); // Really close the tab here } } -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com --- On Sat, 2/21/09, lanekelly5 lkel...@gmail.com wrote: From: lanekelly5 lkel...@gmail.com Subject: [flexcoders] Using an Alert when handling another event? To: flexcoders@yahoogroups.com Date: Saturday, February 21, 2009, 10:18 PM I'm using a SuperTabNavigator control from the flexlib package. When the user clicks on the close button for a tab it fires the tabClose event. I have specified a handler for this in the mxml for the SuperTabNavigator component: tabClose=confirmTa bDelete(event) ; In the confirmTabDelete function I would like to pop up an Alert with YES | NO buttons. According to the SuperTabNavigator docs I can cancel the delete action by calling event.preventDefaul t() within the confirmTabDelete function. My problem is that the Alert box uses its own handler function for the YES/NO button clicks. I'm not sure how that handler function can reference the event object to call preventDefault( ). private function confirmTabDelete( event:SuperTabEv ent):void { Alert.show( Are you sure you want to delete this tab?, Confirm delete, Alert.YES | Alert.NO, this, alertListener, null, Alert.NO); } private function alertListener( eventObj: CloseEvent) :void { if (eventObj.detail= =Alert.NO) { //Now what? How to call preventDefault( ) on the event object in confirmTabDelete? } } Is the secret in the this which is being used as the parent for the Alert? Any help would be great. }
Re: [flexcoders] Drawing on skinned component
I have tried using a Sprite as the topmost child and drawing on it I think that's the way to do it. To make sure that your sprite is always on top, just add addChild(yourSprite) at the end of the updateDisplayList function. If the sprite is not on the display list, it's going to be added to it, and if it's already there, it's going to be pushed on top of all the other sprites. -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com --- On Fri, 2/20/09, civilu007 civilu.gro...@gmail.com wrote: From: civilu007 civilu.gro...@gmail.com Subject: [flexcoders] Drawing on skinned component To: flexcoders@yahoogroups.com Date: Friday, February 20, 2009, 8:53 AM Hello, I'm trying to draw something on a component skinned using a Flash skin, but nothing is drawn (or better said, I don't see anything because the drawing is done beneath the skin). My code looks something like public class TestButton extends Button { public function TestButton() { super(); } override protected function updateDisplayList( w:Number, h:Number):void { super.updateDisplay List(w, h); var g:Graphics = graphics; g.moveTo(0, unscaledHeight / 2); g.lineStyle( 1, 0x00); g.lineTo(unscaledWi dth, unscaledHeight / 2); } } I have tried using a Sprite as the topmost child and drawing on it, but apparently there's always something above my Sprite and I still can't see what I draw. I've googled and searched the group archives for a similar problem, but either I'm not using the right search terms or nobody had such a problem before because I can't seem to find anything of help. So, does anybody have some pointers as to what might one do to draw on such a component? Thank you!
Re: [flexcoders] Pointers like in C
No, there's no pointers. All the objects are passed to functions by reference, except for the basic types (Number, String, etc.) which are passed by value. -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com --- On Fri, 2/20/09, christophe_jacquelin christophe_jacque...@yahoo.fr wrote: From: christophe_jacquelin christophe_jacque...@yahoo.fr Subject: [flexcoders] Pointers like in C To: flexcoders@yahoogroups.com Date: Friday, February 20, 2009, 4:07 PM Hello, Did the type Pointer exist in Flex/ActionScript like in C. int *ptr; Thank you, Christophe,
Re: [flexcoders] Re: Flex server language
Although I prefer open source software, it's true that most of the time it's harder to use an open source version that a paid for equivalent. Coldfusion is easier to setup than PHP, Photoshop or Word are more user friendly than Gimp or OpenOffice and so on. Open source software is free but you're kind of expected to make more efforts to use it - i.e. read the doc, search Google. Once you are used to it though, it's just as good as the paid equivalents. -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com --- On Fri, 2/20/09, Jeffry Houser j...@farcryfly.com wrote: From: Jeffry Houser j...@farcryfly.com Subject: Re: [flexcoders] Re: Flex server language To: flexcoders@yahoogroups.com Date: Friday, February 20, 2009, 4:29 PM It's easy to get things done / setup if you already know what you're doing. But, lets compare apples to apples here. It seems logical to me that someone wanting to install CF would start at Adobe.com , and from there could easily find and download the installers. I chose, Products ColdFusion, and download Free Trial. Login and I can either download the developer edition or the trial edition; with various options for language and/or OS. The CF install process is relatively painless across operating systems and across web servers. I have no doubt Adobe (Macromedia / Allaire) has devoted time to making that easy over the years. I doubt the download / install can be done in 10 minutes, but it is a relatively painless process. On the other hand, if I go to PHP.com (oops, I mean PHP.net ) I click the download link in the nav bar it gives me 6 options for Windows Binaries, I have 6 options of 5.2.8 for Windows. I have no idea which one is the I need; but none of them are labeled WAMP installer. What would make me, as a PHP newbie, go looking for an installer from a 3rd party? What if I don't want to install Apache or MySQL? Amy wrote: --- In flexcod...@yahoogro ups.com, Jeffry Houser j...@... wrote: I prefer CF because it is what I know. Since it comes from Adobe it's integration w/ Flex is top notch. After 2 days of trying, I gave up trying to get PHP to work on my dev machine; so I'm amused by the claim it can be setup w/ minimal fuss. I wonder how 10 minutes to find and install WAMP stacks up against the time to order Coldfusion, get it, and install it...? -- Jeffry Houser, Technical Entrepreneur Adobe Community Expert: http://tinyurl. com/684b5h http://www.twitter. com/reboog711 | Phone: 203-379-0773 -- Easy to use Interface Components for Flex Developers http://www.flextras .com?c=104 -- http://www.theflexs how.com http://www.jeffryho user.com -- Part of the DotComIt Brain Trust
Re: [flexcoders] Reading an UTF-8 document
Can't you just skip the first three characters and read from there? Otherwise, you could try removing the BOM before loading the stream (maybe by reading it first as a ByteArray?). I think there's some ActionScript code on this page to do that: http://www.xs4all.nl/~mechiel/projects/bomstrip/ -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com --- On Wed, 2/18/09, Andrew roly...@gmail.com wrote: From: Andrew roly...@gmail.com Subject: [flexcoders] Reading an UTF-8 document To: flexcoders@yahoogroups.com Date: Wednesday, February 18, 2009, 10:19 PM Please forgive me if the is a post about this already but i can't seem to find it. I am creating an AIR app to convert characters into their HTML entity, hex and dec value and I have just come across an issue. I am reading in xml files which contain the data, these files are saved in a UTF-8 format. When I open it using a Filestream it stops after the first 3 characters ÿþ. I know that these characters are the start of a unicode document, but I can't figure out why it is stopping reading the file there. Any help would be greatly appreciated.
Re: [flexcoders] Re: Drawing graphics on an image
You can't draw directly on an mx:Image component. As suggested below, you need to add a Sprite on top of the image and draw on that sprite. The best way would probably be to inherit from mx:Image and do the drawing in updateDisplayList(). For example: ?xml version=1.0 encoding=utf-8? mx:Image xmlns:mx=http://www.adobe.com/2006/mxml; mx:Script ![CDATA[ private var yourSprite:Sprite; override protected function createChildren():void { super.createChildren(); if (!yourSprite) yourSprite = new Sprite(); } override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { super.updateDisplayList(unscaledWidth, unscaledHeight); // Do the drawing on yourSprite.graphics here addChild(yourSprite); } ]] /mx:Script /mx:Image Also, if you need to clear the image, just set Image.source to null. -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com --- On Thu, 2/19/09, christophe_jacquelin christophe_jacque...@yahoo.fr wrote: From: christophe_jacquelin christophe_jacque...@yahoo.fr Subject: [flexcoders] Re: Drawing graphics on an image To: flexcoders@yahoogroups.com Date: Thursday, February 19, 2009, 4:53 PM It is OK for drawing the lines but when I draw a new line I would like to erase the preceeding lines that are on the image. I clear the sprite but it is not working. Thank you for your help. Christophe, --- In flexcod...@yahoogro ups.com, jer_ela g...@... wrote: The graphics object for the image or the container it is in, is below the content so it is hidden behind the image. Stick a display object such as a sprite on top or it and draw on its graphics object. --- In flexcod...@yahoogro ups.com, christophe_ jacquelin christophe_ jacquelin@ wrote: Hello, I want to draw graphics (graphics.lineto) on an existing image, but the lines does not appear. Is it possible to make graphics on an image ? Thank you, Christophe,
Re: [flexcoders] Read XML files
Parsing XML is built into AS3, see for example: http://www.kirupa.com/developer/flashcs3/using_xml_as3_pg1.htm To load an XML file, see URLLoader and URLRequest. For example: var loader = new URLLoader(); loader.load(new URLRequest(http://example.com/xml.xml;)); loader.addEventListener(complete, xmlLoaded); function xmlLoaded(event) { var xmlString = event.currentTarget.data; // and parse the XML here } -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com --- On Thu, 2/19/09, christophe_jacquelin christophe_jacque...@yahoo.fr wrote: From: christophe_jacquelin christophe_jacque...@yahoo.fr Subject: [flexcoders] Read XML files To: flexcoders@yahoogroups.com Date: Thursday, February 19, 2009, 5:04 PM Hello, Which instructions to use to read/write XML files ? Thank you, Christophe,
Re: [flexcoders] Country List
Here: http://www.google.com/search?q=country+list -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com --- On Wed, 2/18/09, christophe_jacquelin christophe_jacque...@yahoo.fr wrote: From: christophe_jacquelin christophe_jacque...@yahoo.fr Subject: [flexcoders] Country List To: flexcoders@yahoogroups.com Date: Wednesday, February 18, 2009, 8:56 AM Hello, I want to make a combo with the list of country. Where can I find such a list ? Thank you, Christophe,
Re: [flexcoders] Send a confirmation Email
This would open the user's email client, and I don't think he would want the user to send the confirmation email to himself. I think that the right way would be to use a server side script that would take the username as a parameter, build the email and send it. You can do that quite easily in PHP: http://email.about.com/cs/phpemailtips/qt/et031202.htm Then in Flex, just use URLLoader to call the PHP script. -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com --- On Wed, 2/18/09, Simon Bailey si...@newtriks.com wrote: From: Simon Bailey si...@newtriks.com Subject: Re: [flexcoders] Send a confirmation Email To: flexcoders@yahoogroups.com Date: Wednesday, February 18, 2009, 10:02 AM A quick and easy way to do this would be to use URLRequest as below: navigateToURL( new URLRequest( mailto:simon@ newtriks. com?subject= Registration Complete ), _blank ); Simon [ Website ] newtriks.com [ Blog ] nutrixinteractive. com/blog/ On 18 Feb 2009, at 08:57, christophe_jacqueli n wrote: Hello, How to send a confirmation Email in the flex program when the user get register ? Thank you, Christophe,
Re: [flexcoders] Re: is it possible to track visitors / the page an swf is embedded on
Application.application.url will give you the url of the *swf file*, not the url of the document within which the app is embedded. For that, the only way is to use Javascript and ExternalInterface. I think the syntax is: var docURL = ExternalInterface.call(location.href); or it might be document.location.href - not sure which one is right. -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com --- On Wed, 2/18/09, kuntamayu kuntam...@yahoo.com wrote: From: kuntamayu kuntam...@yahoo.com Subject: [flexcoders] Re: is it possible to track visitors / the page an swf is embedded on To: flexcoders@yahoogroups.com Date: Wednesday, February 18, 2009, 12:31 PM Try to track Application. application. url This may help you. :) --- In flexcod...@yahoogro ups.com, Tracy Spratt tspr...@... wrote: Look into the BrowserManager, perhaps it will help. Tracy Spratt Lariat Services Flex development bandwidth available _ _ __ From: flexcod...@yahoogro ups.com [mailto:flexcod...@yahoogro ups.com] On Behalf Of uclamerrick Sent: Wednesday, February 18, 2009 12:24 AM To: flexcod...@yahoogro ups.com Subject: [flexcoders] is it possible to track visitors / the page an swf is embedded on Lets say I run a video site like youtube, how can I capture the url of the page where my swf object is embedded. For example someone takes the embed code from http://youtube. com/videoid123 http://youtube. com/videoid123 and places it onto the page at http://myblog. wordpress. com/this_ video_rocks http://myblog. wordpress. com/this_ video_rocks I know how to use HTTPService to report this information back to my server and store it in the database, but I don't know how to use Flex 3 / Actionscript 3 to determine the URL of the page that embeds an swf. In the example above I would want to capture: http://myblog. wordpress. com/this_ video_rocks http://myblog. wordpress. com/this_ video_rocks Thanks.
Re: [flexcoders] Time stamping a user Logout
You could make the app ping the server every 5 minutes. Then if the server doesn't receive the ping, assume that the user closed the browser and log him out. Another simpler solution would be to put a timeout on the session. -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com --- On Wed, 2/18/09, grg_blls grg_b...@yahoo.com wrote: From: grg_blls grg_b...@yahoo.com Subject: [flexcoders] Time stamping a user Logout To: flexcoders@yahoogroups.com Date: Wednesday, February 18, 2009, 1:18 PM Hi all, I have concluded a sample Flex application where a user logs in (or registers) in the application. I use the Tomcat servlet container plus BlazeDS RPC component and Hibernate persistence to connect to MySQL database. A new user first registers by filling the Registration form. The database is updated for First Creation Timestamp, along with user's UserName and Password. A returning user fills a (similar) Login form. The database is updated for Login Timestamp. When the user does a normal Logout, the database is updated with Logout Timestamp. On User's Logout the User_Loged session time is summed in UserTotalLoged time. My problem is that I need dispatch/listen (?) an event in an abrupt case, like the user instead of doing a normal logout simply closes the browser, or the client/server connection is just lost. Then I have to update the database that the user status is Logout. I hope this description is clear enough for some indications/ help. Thank you all George
Re: [flexcoders] How to copy each property of object A to B ?
Have a look at mx.utils.ObjectUtil.copy() -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com --- On Fri, 8/22/08, piotrchruscielewski [EMAIL PROTECTED] wrote: From: piotrchruscielewski [EMAIL PROTECTED] Subject: [flexcoders] How to copy each property of object A to B ? To: flexcoders@yahoogroups.com Date: Friday, August 22, 2008, 8:03 AM Hi I`ve got one small question, that I still can`t resolve. suppose we have class Person , and variables: var p1:Person; p1.name = 'John'; not we have some other reference to this object (for.ex. from other part of program) var p2:Person = p1; If I`ll now make p1.name = 'Steve' of course p2.name will also be Steve - that`s clear. But now we receive object p3:Person and we wan`t to 'copy' it on p1 object ( so that p1 will be the same as p3). If we will make p1 = p3 ; it will of course create reference and p2 object, and all other references to p1 will remain unchanged. The only way to change p1 DATA not REFERENCE is to do: p1.name = p3.name So now p2.name will be a new one The question is - how can we copy each property VALUE of one object to the other. If Person have a lot of properties - we need to write each property. Maybe we could make some loop like for each attribute in Person p1.['attribute' ] = p3.['attribute' ] But it`s still not elegant Is there any way to do: memcpy(p3,p1) ? Regards Piotr Chruscielewski
Re: [flexcoders] Flex is time consuming
Open the Task Manager while your are making changes and check if one of the processes is taking too much CPU. Now and then, I have one of the svchost.exe processes taking 99% CPU each time I press a key in Flex. Once I kill the process everything goes back to normal. -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com --- On Mon, 8/18/08, litesh_b321 [EMAIL PROTECTED] wrote: From: litesh_b321 [EMAIL PROTECTED] Subject: [flexcoders] Flex is time consuming To: flexcoders@yahoogroups.com Date: Monday, August 18, 2008, 1:30 PM Hi gyus i have around 16000 line of code which is already broke up in two mxml file and five class file still what ever i want to change in my application flex is taking time why so it is happening i turn off my auto refresh option ,auto built option Plz Help me out ThanX
Re: [flexcoders] Resize from left to right
I usually do it by first moving the component and then applying the new width and height to it. I don't know if Flex has any built in way to do that. var newWidth = 200; var newHeight = 200; button.x = button.x + button.width - newWidth; button.y = button.y + button.height - newHeight; button.width = newWidth; button.height = newHeight; -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com --- On Thu, 8/14/08, Rico Leuthold [EMAIL PROTECTED] wrote: From: Rico Leuthold [EMAIL PROTECTED] Subject: [flexcoders] Resize from left to right To: flexcoders@yahoogroups.com Date: Thursday, August 14, 2008, 8:47 AM Hi, I was pretty sure to find the answer in the archive - but nope ... couldn't find it. Is there an easy way to have the resize of a component going from left to right ? Thank's _rico
Re: [flexcoders] Mouseevents and nested components
Hi, you need to stop the event propagation so that it doesn't reach the canvas. You do that in your button event handler: private function traceButton( evt:MouseEvent) :void { evt.stopPropagation(); trace(trace button + evt.target + / + evt.currentTarget) ; } -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com --- On Thu, 8/14/08, Bart Ronsyn [EMAIL PROTECTED] wrote: From: Bart Ronsyn [EMAIL PROTECTED] Subject: [flexcoders] Mouseevents and nested components To: flexcoders@yahoogroups.com Date: Thursday, August 14, 2008, 2:16 PM Hi, A simple question : I have a simple Flex application, which has a canvas and a button nested within this canvas. Both, the canvas and the button have an event handler bound to the click event. When I click the button, both the event handlers of the button and the canvas are called... I expected only the event handler bound to button to be called, as this is the deepest nested node.. The Adobe documentation says the following about MouseEvents : When nested nodes are involved, mouse events target the deepest possible nested node that is visible in the display list. This node is called the target node. http://livedocs. adobe.com/ flex/201/ langref/flash/ events/MouseEven t.html How can I accomplish only the event handler of the button to be called ? Thanks for your help ! Bart Below, a simple test application : ?xml version=1.0 encoding=utf- 8? mx:Application xmlns:mx=http://www. adobe.com/ 2006/mxml layout=absolute mx:Script ![CDATA[ private function traceButton( evt:MouseEvent) :void { trace(trace button + evt.target + / + evt.currentTarget) ; } private function traceCanvas( evt:MouseEvent) :void { trace(trace canvas + evt.target + / + evt.currentTarget) ; } ]] /mx:Script mx:Canvas backgroundColor= #FF x=136 y=196 width=200 height=200 click=traceCanvas( event) mx:Button x=67 y=46 label=Button click=traceButton( event) / /mx:Canvas /mx:Application
RE: [flexcoders] Displaying custom items in ComboBox
The exact order of events is described in Creating and extending Flex components of the help file. However, in general you shouldn't expect the update handlers to be called in any particular order, since a subclass could force a call to updateDisplayList() or measure() without your objects being ready. So basically you should always check if an object exists before trying to access it. Also, if I'm not mistaken, createChildren() might be called more than once during the life time of a component (I think that's when it's removed from the stage and added back), so you also need to check that lineHolder is not null before creating it. -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com --- On Thu, 8/14/08, Regert, Michael [EMAIL PROTECTED] wrote: From: Regert, Michael [EMAIL PROTECTED] Subject: RE: [flexcoders] Displaying custom items in ComboBox To: flexcoders@yahoogroups.com Date: Thursday, August 14, 2008, 2:49 PM I’ve implemented it almost the same way your blog sample did, tweaking only a bit to add a canvas to the holder rather than a icon class. I’ve overridden the functions createChildren, measure, and updateDisplayList just as you have. I’m a C/C++ developer new to Adobe Flex and am trying to grasp everything. I guess I’m not fully understanding the call stack on this and the order of methods it calls to render the dropdown. Is there a good place to learn this? I had to put a check in place inside of updateDisplayList to check for null because the function was being call initially, even before the combobox was rendered. I figure I’m just missing the whole picture which is why I’m not understanding where the selected label is being set. Thanks. package { // Custom Combo Box import flash.display. DisplayObject; import mx.containers. Canvas; import mx.controls. ComboBox; import mx.core.IFlexDispla yObject; import mx.core.UIComponent ; public class LineComboBox extends ComboBox { // constructor public function LineComboBox( ) { super(); } // Private attribute to hold the line canvas private var lineHolder:UICompon ent; override protected function createChildren( ):void { super.createChildren( ); lineHolder = new UIComponent( ); addChild(lineHolder ); } override protected function measure():void { super.measure(); if (iterator iterator.current) { // MyLineClass holds a canvas with the line drawn on it var lt:MyLineClass = iterator.current as MyLineClass; var line:IFlexDisplayOb ject = lt.getDisplayObject () as Canvas; while (lineHolder. numChildren 0) { lineHolder.removeCh ildAt(0); } lineHolder.addChild (DisplayObject( line)); measuredWidth += line.measuredWidth; measuredHeight = Math.max(measuredHe ight, line.measuredHeight + borderMetrics. top + borderMetrics. bottom); } } override protected function updateDisplayList( unscaledWidth: Number, unscaledHeight: Number):void { super.updateDisplayList( unscaledWidth, unscaledHeight) ; if (selectedItem) { var lt:MyLineClass = selectedItem as MyLineClass; var line:IFlexDisplayOb ject = lt.getDisplayObject () as Canvas; while (lineHolder. numChildren 0) { lineHolder.removeCh ildAt(0); } lineHolder.addChild (DisplayObject( line)); measuredWidth += line.measuredWidth; measuredHeight = Math.max(measuredHe ight, line.measuredHeight + borderMetrics. top + borderMetrics. bottom); } } } } Michael J. Regert From: [EMAIL PROTECTED] ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of Alex Harui Sent: Wednesday, August 13, 2008 7:20 PM To: [EMAIL PROTECTED] ups.com Subject: RE: [flexcoders] Displaying custom items in ComboBox Not sure how you’ve got it coded now, but you can either hide the textInput or maybe override selectedLabel From: [EMAIL PROTECTED] ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of Regert, Michael Sent: Wednesday, August 13, 2008 2:29 PM To: [EMAIL PROTECTED] ups.com Subject: RE
Re: [flexcoders] Re: Loop through all visual components
Not sure but I think you need to make your login variable (whather that is) bindable, so that, when it changes, the showName label is notified: [Bindable] private var login:String; // just guessing the declaration. The important part is the [Bindable] tag -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com --- On Wed, 8/13/08, itdanny2002 [EMAIL PROTECTED] wrote: From: itdanny2002 [EMAIL PROTECTED] Subject: [flexcoders] Re: Loop through all visual components To: flexcoders@yahoogroups.com Date: Wednesday, August 13, 2008, 10:58 AM Still not success. I gave an example. My user enter something e.g. login name and then program display the full name. private function DoChecking(S: String):String { ... if (TryOnce) then { return Already Tried; } else { return First Time; } } mx:Label id=ShowName text={DoChecking( login)} /mx:Label First time is ok but when another button is clicked and change the variable TryOnce. The label 'ShowName' cannot be refreshed eventhough I use ShowName.validatedi splaylist( ). I also tried validatenow( )but not successAny help ? --- In [EMAIL PROTECTED] ups.com, Laurent Cozic pogopixels@ ... wrote: Somebody ask a similar question on this list recently. You can loop through all the components in your app by using the numChildren property and getChildAt method: function checkAllButtons( container) { ?for (var i = 0; i container.numChildr en; i++) { ??var c = container.getChildA t(i); ??if (c is Container) { ???checkAllButtons( c); ??} else { ???if (c is Button) { // Do your changes here ???} ??} ? } Then start the process by passing the application as a parameter: checkAllButtons( Application. application) ; -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels. com --- On Tue, 8/12/08, itdanny2002 Chow.Danny@ ... wrote: From: itdanny2002 Chow.Danny@ ... Subject: [flexcoders] Loop through all visual components To: [EMAIL PROTECTED] ups.com Date: Tuesday, August 12, 2008, 9:19 AM I have created a custom button and used it throughoutly in my FLEX application. How can I change it dynamically by looping through all components ? Is there any like children stuff and then use ValidateDisplayLis t to make it refresh ? Actually, it likes changing the skin dynamically. But I need to check the content of button before modification. Having example is great. Thanks in advance.
Re: [flexcoders] Loop through all visual components
Somebody ask a similar question on this list recently. You can loop through all the components in your app by using the numChildren property and getChildAt method: function checkAllButtons(container) { for (var i = 0; i container.numChildren; i++) { var c = container.getChildAt(i); if (c is Container) { checkAllButtons(c); } else { if (c is Button) { // Do your changes here } } } Then start the process by passing the application as a parameter: checkAllButtons(Application.application); -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com --- On Tue, 8/12/08, itdanny2002 [EMAIL PROTECTED] wrote: From: itdanny2002 [EMAIL PROTECTED] Subject: [flexcoders] Loop through all visual components To: flexcoders@yahoogroups.com Date: Tuesday, August 12, 2008, 9:19 AM I have created a custom button and used it throughoutly in my FLEX application. How can I change it dynamically by looping through all components ? Is there any like children stuff and then use ValidateDisplayLis t to make it refresh ? Actually, it likes changing the skin dynamically. But I need to check the content of button before modification. Having example is great. Thanks in advance.
Re: [flexcoders] Class file in flex
You can't include a class within a class, you can only include plain ActionScript files. So to fix your issue, you simply need to remove the package and class statements from your actionscript file. You should probably also remove the import Inculdes.ClassTesting;. Also it might compile, it won't make any sense once you convert the AS file. -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com --- On Tue, 8/12/08, litesh_b321 [EMAIL PROTECTED] wrote: From: litesh_b321 [EMAIL PROTECTED] Subject: [flexcoders] Class file in flex To: flexcoders@yahoogroups.com Date: Tuesday, August 12, 2008, 10:59 AM hi guys, I am trying action script class in flex 3.0 I have action script class in Inculdes\ClassTest ing.as directory which is situated inside src directory. See code below : ?xml version=1.0 encoding=utf- 8? mx:Application xmlns:mx=http://www.adobe. com/2006/ mxml layout=absolute mx:Script ![CDATA[ import Inculdes.ClassTesti ng; import mx.messaging. AbstractConsumer ; include Inculdes/ClassTest ing.as; public function ansT():void { ans.text = tester( frst.text,scnd. text); } ]] /mx:Script mx:Button x=52 y=192 label=Button id=b1 click=ansT( ) borderColor= #10DD10 height=26 width=69/ mx:Text x=52 y=77 text=12 width=293 id=frst visible=true / mx:Text x=52 y=103 text=23 width=293 id=scnd visible=true / mx:Text x=52 y=155 text=34 width=293 id=ans visible=true / /mx:Application Error I am facing Severity and DescriptionPathResourceLocation Creation Time Id Packages cannot be nested. [Generated code (use -keep to save): Path: C:\Documents and Settings\pacific\ My Documents\Flex Builder 3\test\src\Inculdes \ClassTesting. as, Line: 2, Column: 1] test Unknown 1218537300687 70656 Please help me out ThanX
Re: [flexcoders] Re: Is It Just Me?
Right, it does have a text box, with the color in Hex notation, so you'd assume that there'd be a real easy way, in ActionScript, to pass a hex value to it, but there isn't. I find this perplexing. The way Flex displays the data or let you interact with it doesn't necessarily match the way it is stored internally. I think it's true of any framework including .NET and Java. -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com --- On Tue, 8/12/08, Dale Cook [EMAIL PROTECTED] wrote: From: Dale Cook [EMAIL PROTECTED] Subject: [flexcoders] Re: Is It Just Me? To: flexcoders@yahoogroups.com Date: Tuesday, August 12, 2008, 1:09 AM Right, it does have a text box, with the color in Hex notation, so you'd assume that there'd be a real easy way, in ActionScript, to pass a hex value to it, but there isn't. I find this perplexing. --- In [EMAIL PROTECTED] ups.com, Josh McDonald [EMAIL PROTECTED] wrote: Well the first case wouldn't help mapping from a text-field, and the post was more about I can't figure our how to parse a number than how should I work with colours? StyleManager. getColorName is an awful, *awful* name for that API if it converts from hex colours to uints :) But I'd still just use parseInt. Wait, doesn't the colour picker *have* a textbox you can copy/paste a hex code to and from? -Josh On Tue, Aug 12, 2008 at 10:33 AM, Maciek Sakrejda [EMAIL PROTECTED] ..wrote: Well, in this particular case, you could do // just use uint directly fontColor.selectedC olor = 0xd3d3d3; // or use StyleManager fontColor.selectedC olor = StyleManager. getColorName( #D3D3D3 ); Admittedly, getColorName( ) is rather poorly named, and StyleManager is not the most obvious place to look (and the looks-like-it- should-be- the-right- thing ColorUtil class is not very helpful). Every framework has some unfortunate design decisions; Flex is really quite good once you get the hang of it. -- Maciek Sakrejda Truviso, Inc. http://www.truviso. com -Original Message- From: Dale Cook [EMAIL PROTECTED] .. Reply-To: [EMAIL PROTECTED] ups.com To: [EMAIL PROTECTED] ups.com Subject: [flexcoders] Is It Just Me? Date: Mon, 11 Aug 2008 23:59:55 - OK, so I'm new to Flex but I have a lot of experience with other development platforms and languages(.NET, RoR, Javascript, etc.). I've read a few books and I've just been doing some fairly simple stuff to get my feet wet but already I'm starting to get a little fustrated with things that should be really easy. Perhaps I'm just missing something. For example, I have a colorpicker object and I want to set the selected color programmatically depending on which textinput field a user is in. So I suspected that I could do something like //the name of the color picker is fontColor fontColor.selectedC olor = #D3D3D3 and everything would be good - but that doesn't appear to be the case. It looks like I have to convert the hex into a uint. OK, that seems like a lot more work than it should be but OK, I'll just use the DecimalToHex function of the int class... oh, wait there isn't one. There isn't a conversion anywhere that I can find to do this without writting even more code. Is it just be or does this seem like a lot of work to do something that most other modern languages handle without any additional coding, or an I completely missing something? Dale - - -- -- Flexcoders Mailing List FAQ: http://groups. yahoo.com/ group/flexcoders /files/flexcoder sFAQ.txt Search Archives: http://www.mail- archive.com/ flexcoders% 40yahoogroups. comYahoo! Groups Links -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
Re: [flexcoders] SSL Https communication between swf and data service / life cycle is failed
Check the outgoing HTTP calls using Live HTTP headers for Firefox. You probably have a redirection from https to http at some point. I remember having had a similar issue and it had to be fixed server side (can't remember the fix though). -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com --- On Mon, 8/11/08, loveewind [EMAIL PROTECTED] wrote: From: loveewind [EMAIL PROTECTED] Subject: [flexcoders] SSL Https communication between swf and data service / life cycle is failed To: flexcoders@yahoogroups.com Date: Monday, August 11, 2008, 9:26 AM below is the source code of swf: mx:RemoteObject id=authenticationR emoteService destination= authentication- remoteobject showBusyCursor= true result=result( event ); fault=fault( event ); /mx:RemoteObject public function getUserData( ):void{ authenticationRemot eService. getUserData( ); } public function result(data: Object):void{ . } public function fault(info:Object) :void{ mx.controls. Alert.show( info); } when I open https://localhost: 9444/life- flex/Login. swf and click the event to call getUserData( ) method, fault method throws the following exception: [INFO]: [RPC Fault faultString= Send failed faultCode=Client. Error.MessageSen d faultDetail= Channel. Connect.Failed error NetConnection. Call.BadVersion: : url: 'http://localhost: 9444/life- flex/messagebroker/ amf'] at mx.rpc::AbstractInv oker/http://www.adobe. com/2006/ flex/mx/internal ::fa ultHandler() [E:\dev\flex_ 201_borneo\ sdk\frameworks\ mx\rpc\AbstractI nvoker.as: 195] at mx.rpc::Responder/ fault() [E:\dev\flex_ 201_borneo\ sdk\frameworks\ mx\rpc\Responder .as:56] at mx.rpc::AsyncReques t/fault() [E:\dev\flex_ 201_borneo\ sdk\frameworks\ mx\rpc\AsyncRequ est.as:110] at mx.messaging: :ChannelSet/ faultPendingSend s() [E:\dev\flex_ 201_borneo\ sdk\frameworks\ mx\messaging\ ChannelSet. as:1113 ] at mx.messaging: :ChannelSet/ channelFaultHand ler() [E:\dev\flex_ 201_borneo\ sdk\frameworks\ mx\messaging\ ChannelSet. as:851] at flash.events: :EventDispatcher /dispatchEventFu nction() at flash.events: :EventDispatcher /dispatchEvent( ) at mx.messaging: :Channel/ connectFailed( ) [E:\dev\flex_ 201_borneo\ sdk\frameworks\ mx\messaging\ Channel.as: 928] at mx.messaging. channels: :PollingChannel/ connectFailed( ) [E:\dev\flex_ 201_borneo\ sdk\frameworks\ mx\messaging\ channels\ PollingCh annel.as:255] at mx.messaging. channels: :AMFChannel/ statusHandler( ) [E:\dev\flex_ 201_borneo\ sdk\frameworks\ mx\messaging\ channels\ AMFChanne l.as:346] Even though I visit application with https link , SWF still use http protocol to call AMF gateway. Who has any experience on this issue? Thanks.
Re: [flexcoders] How to pass value to ComboBox selectedItem?
You need to go through the dataProvider to change the value of the selected item. For example: comboBox.dataProvider.setItemAt(newItem, comboBox.selectedIndex); -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com --- On Mon, 8/11/08, Joshua Jackson [EMAIL PROTECTED] wrote: From: Joshua Jackson [EMAIL PROTECTED] Subject: [flexcoders] How to pass value to ComboBox selectedItem? To: flexcoders@yahoogroups.com Date: Monday, August 11, 2008, 10:41 AM Dear all, I haven't succeed passing object value to ComboBox selectedItem, how do I do this in Flex? In HTML I pass a record id to the option value. Best regards, -- Setting a new landmark. Blog: http://joshuajava. wordpress. com/ Twitter: http://twitter. com/thejavafreak
Re: [flexcoders] Checking swfs for malicious code!
I don't think you need to worry about security for loaded contents. The Flash player does that very well already and there's probably no way a Flash file could do anything malicious. -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com --- On Thu, 8/7/08, superbokbok [EMAIL PROTECTED] wrote: From: superbokbok [EMAIL PROTECTED] Subject: [flexcoders] Checking swfs for malicious code! To: flexcoders@yahoogroups.com Date: Thursday, August 7, 2008, 8:45 AM Don't know if this is the right place for this, but thought I'd throw out the question before I dive headlong into building something that isn't do-able. Basically, I'm building a video player that would allow flash authors to create their own video/photo/ game and upload to a server. My app would then take this and use it within the Main video player as they please. The concern my client has is that the swf's that are uploaded(AS3) may contain malicious code that might affect other users/websites etc... The main video players is built in Flex while the uploaded vids are done in Flash. Is there any way, other than decompiling swfs and checking the code, to determine if the code is in fact malicious from a swf? cheers erick
Re: [flexcoders] Returning value inside a nested functions event?
By definition an event handler shouldn't return a value, since no object can actually retrieve this value. You'll need to use some other way - perhaps you could save the result in a private variable inside you class, or have the event handler call another method. It depends on what you are trying to do. -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com - Original Message From: Berkay Unal [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Wednesday, August 6, 2008 3:25:53 PM Subject: [flexcoders] Returning value inside a nested functions event? Hi Coders I want to return a value from a handler function that is nested inside a function. The scenario is to check the duplicate Does anybody know how to achieve it? public function checkDuplicate( email:String) :Boolean { var checkStmt:SQLStatem ent = new SQLStatement( ); checkStmt.sqlConnec tion = conn; varsql:String = select * from people where email = '[EMAIL PROTECTED]' ; checkStmt.text = sql; checkStmt.addEventL istener(SQLEvent .RESULT, function(e:SQLEvent) :Boolean { var result:SQLResult = checkStmt.getResult (); Alert.show(result. data[0][name]) returntrue; }); //checkStmt. addEventListener (SQLErrorEvent. ERROR, errorDBHandler) ; checkStmt.execute( ); } -- Berkay UNAL [EMAIL PROTECTED] com
[flexcoders] Turning off SWF messages
Each time a SWF file is loaded, Flash display a message in the console window such as: [SWF] /myfile.swf - 6,303 bytes after decompression This clutters the window for no real usefulness, especially when many files are loaded at the same time. Is it possible to turn this feature off and, if so, how? -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com
Re: [SPAM]Re: [flexcoders] Delay before text is updated
Try savingMessage.validateNow() - it should force an update of the text area. -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com - Original Message From: Paul Steven [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Tuesday, August 5, 2008 9:33:56 AM Subject: RE: [SPAM]Re: [flexcoders] Delay before text is updated Thanks for the replies. My method basically creates a fairly large string and then writes this string to disk as an xml file. So are you saying, if my function takes say 10 seconds to complete, there will be no ENTER_FRAME dispatched during this time? If so then is there any function I can call to force an update to the screen – something like updateScreen( ) ? Thanks Paul From:[EMAIL PROTECTED] ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of Josh McDonald Sent: 05 August 2008 08:56 To: [EMAIL PROTECTED] ups.com Subject: [SPAM]Re: [flexcoders] Delay before text is updated What does your method do? Most changes made to most components (such as changing the text property) won't be reflected on-screen until the next ENTER_FRAME is dispatched by the player due to the way Flex works internally. If your method is simply some gigantic or slow loop, you won't see anything until it's done- and you should probably split it apart and schedule it in pieces :) -Josh On Tue, Aug 5, 2008 at 5:43 PM, Paul Steven paul_steven@ btinternet. com wrote: Probably something really basic, but I am having trouble with delays updating some text on screen. Basically I want to display a message on screen to tell the user to wait whilst a save operation takes place and after the save operation change the text message back to blank. However I am not seeing this update. Here is the code savingMessage. text = Saving. Please wait...; _dataManager. createStudentDat aXMLFile( ); savingMessage. text = ; Please note the createStudentDataXM LFile function takes about 10 seconds to complete so in theory the Saving. Please wait... message should appear for this time. If I put an alert in before the calling of the createStudentDataXM LFile function, then the text updates correctly. I have also experienced similar problems trying to get a busy cursor to appear using the cursor manager and a call such as CursorManager. setBusyCursor( ); Again, the problem here is the cursor is not updating as soon as I call the function. Anyone any ideas why these things are not updating on screen immediately? Thanks Paul p.s I am using Flex Builder and packaging in Zinc 2.5 -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] com
Re: [flexcoders] Re: modifying a function at runtime
I wouldn't recommend it, but you can do it using a dynamic class: package { public dynamic class YourClass { // Define the function this way: this.yourFunction = function() { return abcd; } } } // Then to change the function: var test = new YourClass() trace(test.yourFunction()); // abcd test.yourFunction = function() { return 1234 } trace(test.yourFunction()); // 1234 -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com - Original Message From: arieljake [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Tuesday, August 5, 2008 11:18:53 AM Subject: [flexcoders] Re: modifying a function at runtime ehem...was a little sleepy when I wrote that. I meant... Is it possible to modify the method of a class at runtime? The only way I can think of is to encapsulate the function into a Function property that gets called by a wrapper class method.
Re: [flexcoders] TextArea - Limit the amount of text
You could do it by listening to the textInput event. When it's triggered, check if the text height is above a certain limit (for example the TextArea height - font height): if it is, cancel the event. The code below should work: textArea.addEventListener(TextEvent.TEXT_INPUT, textArea_textInput); protected function textArea_textInput(event:TextEvent) { if (textArea.textHeight textArea.height - textArea.getStyle(fontSize)) { event.preventDefault(); } } -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com - Original Message From: tchredeemed [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Tuesday, August 5, 2008 2:27:55 PM Subject: [flexcoders] TextArea - Limit the amount of text I am creating a web-to-print Greeting Card Editor. I need to limit the amount of text someone can put in the editable field (obviously cannot print more than the printable area). I cant just do maxChars, because it can fit variable amount depending on the amount of i's and w's used, etc! any help is appreciated.
Re: [flexcoders] Re: TextArea - Limit the amount of text
I haven't checked but I guess that the TextEvent.text property is empty if you are deleting text. If that's the case, then don't cancel the event. -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com - Original Message From: tchredeemed [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Tuesday, August 5, 2008 2:57:32 PM Subject: [flexcoders] Re: TextArea - Limit the amount of text Ok, that is definitely a step in the right direction. 1 problem: After they hit that max, it doesn't allow them to go back and change old text that they already edited, because the textHeight has been reached, so it prevents them from changing (essentially setting enabled=false) . Any ideas? --- In [EMAIL PROTECTED] ups.com, Laurent Cozic pogopixels@ ... wrote: You could do it by listening to the textInput event. When it's triggered, check if the text height is above a certain limit (for example the TextArea height - font height): if it is, cancel the event. The code below should work: textArea.addEventLi stener(TextEvent .TEXT_INPUT, textArea_textInput) ; protected function textArea_textInput( event:TextEvent) { if (textArea.textHeigh t textArea.height - textArea.getStyle( fontSize )) { event.preventDefaul t(); } } -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels. com - Original Message From: tchredeemed [EMAIL PROTECTED] To: [EMAIL PROTECTED] ups.com Sent: Tuesday, August 5, 2008 2:27:55 PM Subject: [flexcoders] TextArea - Limit the amount of text I am creating a web-to-print Greeting Card Editor. I need to limit the amount of text someone can put in the editable field (obviously cannot print more than the printable area). I cant just do maxChars, because it can fit variable amount depending on the amount of i's and w's used, etc! any help is appreciated.
Re: [flexcoders] Re: TextArea - Limit the amount of text
Yes that's right, that wouldn't work in that case. Then one solution would be to save the text property when you know it's below the limit (for example in the TextInput event), then in the CHANGE event, check the text height again. If it's above the limit, restore the previous text property. You might also want to save and restore the caret position as well (see selectionStartIndex and selectionEndIndex) -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com - Original Message From: tchredeemed [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Tuesday, August 5, 2008 3:07:37 PM Subject: [flexcoders] Re: TextArea - Limit the amount of text no no, thats not the issue the issue is this a b c is a certain textHeight, whether the cursor is on the a or the c, so if they hit that textHeight, then no matter whree they put the cursor, the textHeight is at the limit, so i prevent the default. if I delete the c, the textHeight is no longer at its limit, so I can edit anywhere I want. make sense? --- In [EMAIL PROTECTED] ups.com, Laurent Cozic pogopixels@ ... wrote: I haven't checked but I guess that the TextEvent.text property is empty if you are deleting text. If that's the case, then don't cancel the event. -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels. com - Original Message From: tchredeemed [EMAIL PROTECTED] To: [EMAIL PROTECTED] ups.com Sent: Tuesday, August 5, 2008 2:57:32 PM Subject: [flexcoders] Re: TextArea - Limit the amount of text Ok, that is definitely a step in the right direction. 1 problem: After they hit that max, it doesn't allow them to go back and change old text that they already edited, because the textHeight has been reached, so it prevents them from changing (essentially setting enabled=false) . Any ideas? --- In [EMAIL PROTECTED] ups.com, Laurent Cozic pogopixels@ ... wrote: You could do it by listening to the textInput event. When it's triggered, check if the text height is above a certain limit (for example the TextArea height - font height): if it is, cancel the event. The code below should work: textArea.addEventLi stener(TextEvent .TEXT_INPUT, textArea_textInput) ; protected function textArea_textInput( event:TextEvent) { if (textArea.textHeigh t textArea.height - textArea.getStyle( fontSize )) { event.preventDefaul t(); } } -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels. com - Original Message From: tchredeemed apthorp@ To: [EMAIL PROTECTED] ups.com Sent: Tuesday, August 5, 2008 2:27:55 PM Subject: [flexcoders] TextArea - Limit the amount of text I am creating a web-to-print Greeting Card Editor. I need to limit the amount of text someone can put in the editable field (obviously cannot print more than the printable area). I cant just do maxChars, because it can fit variable amount depending on the amount of i's and w's used, etc! any help is appreciated.
Re: [flexcoders] Re: How to show the Hand Cursor on the Close Button?
Add the mx_internal declarations at the top of your class: import mx.core.mx_internal; use namespace mx_internal; -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com - Original Message From: flexawesome [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Tuesday, August 5, 2008 3:33:56 PM Subject: [flexcoders] Re: How to show the Hand Cursor on the Close Button? The button is at the TOP/LEFT corner in the TitleWindow. it shows the error msg below... any suggestions? 1120: Access of undefined property mx_internal. --- In [EMAIL PROTECTED] ups.com, Claudiu Ursica the_braniak@ ... wrote: var btn:Button = this.mx_internal: :closeButton; btn.useHandCursor = true; However the mx:internal might change in the future so this is not bullet proof. --- In [EMAIL PROTECTED] ups.com, flexawesome flexawesome@ wrote: Hey there, In the titlewindow component, I set showCloseButton = true; Do you know how can I show the Hand Cursor on the Close button? Thanks
Re: [flexcoders] SWFObject URL
This would only return the SWF file URL, not the URL of the page within which it is embedded. To do that, you'll have to use javascript and the ExternalInterface class: ExternalInterface.call(document.location); -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com - Original Message From: Tom Chiverton [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Tuesday, August 5, 2008 4:08:11 PM Subject: Re: [flexcoders] SWFObject URL On Tuesday 05 Aug 2008, flexaustin wrote: Is it possible to obtain the URL of the page the swf is embedded in from within the Flex object. Application.application.url -- Tom Chiverton This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
Re: [flexcoders] Fading out text
Hi, You need to use an embedded font in order for the fade effect to work. Simply create a new style for your text, then tick the Embed this font check box in the style properties. -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com - Original Message From: cesarerocchi [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Friday, August 1, 2008 11:36:35 AM Subject: [flexcoders] Fading out text Hi, I have a canvas containing text. When I fadeout the canvas, via mxml fade effect, the canvas fades out but the text does not. How can I fade out the canvas and the text together? Cheers, -c.
Re: [flexcoders] Re: Fading out text
Actually it doesn't really matter what the defautl font is or if it's installed on the user's system or not. If you want to change the alpha, rotation or, in general, use any effect on a text component, you have to embed the font. This is actually a limitation of the Flash Player, not Flex, so there's not much we can do about it. If I'm not mistaken, this limitation will be gone in Flash 10 though. -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com - Original Message From: cesarerocchi [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Friday, August 1, 2008 3:50:42 PM Subject: [flexcoders] Re: Fading out text You need to use an embedded font in order for the fade effect to work. Simply create a new style for your text, then tick the Embed this font check box in the style properties. Thanks for the quick reply. A follow up question. What if I am ok with the default font (I work in Adobe Air) and I didn't embed any font in my application? Isn't that font, the default one, already embedded? If not, what's the name of the default font? Thanks, -c.
Re: [flexcoders] Re: problem adding images to UIComponents using AS3
I didn't read the other replies, but in general I think it's not a good idea to add a Flex component to a non-Flex object. You might be able to get it to work by simulating the framework workflow - for example, by manually calling all the invalidateXX methods, however it's not a very clean approach. In this case, a better way would be to directly create an instance of your embedded object and add it to the display list. I think the syntax would be: var image:BitmapAsset = new _moveGroupImage() as BitmapAsset ; this.addChild(image); -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com - Original Message From: Merrill, Jason [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Friday, August 1, 2008 4:57:36 PM Subject: [flexcoders] Re: problem adding images to UIComponents using AS3 OK, let me back up here. First, thanks to those who responded. So I thought by isolating my problem with an example (heck, I'm not even using Canvas) it would shed light on why this bug is occuring, but it isn't unfortunately, I'm more or less confusing the real problem with y'all. Sorry. So maybe what I thought was the problem was instead something else. Here is my actual project code, and a description of the setup. The problem is, the image is not getting attached to the sprite, even though the sprite is showing up in the display list just fine (the graphics draw from code - but the image doesn't show). I know the path to the image is right, I can use the same embed and new Image() code elsewhere in my app to make the image appear. Here is the code and the setup in the application: package com.venice.view. network.grouping Tool { import flash.display. Sprite; import mx.controls. Image; public class GroupHandle extends Sprite { public var id:int; public const FILL_COLOR:uint = 0xff; public const FILL_ALPHA:Number = .5; public const STROKE_COLOR: uint = 0x00; public const STROKE_THICKNESS: Number = 1; public const STROKE_ALPHA: Number = 1.0; public const SIZE:Number = 10; [Embed(source = /media/icons/ control_repeat_ blue.png)] [Bindable] private var _moveGroupImage: Class; public function GroupHandle( ):void { //this works: graphics.clear( ); graphics.lineStyle( STROKE_THICKNESS , STROKE_COLOR, STROKE_ALPHA) ; graphics.beginFill( FILL_COLOR, FILL_ALPHA); graphics.drawRect( -(SIZE/2) , -(SIZE/2), SIZE/2, SIZE/2); graphics.endFill( ); //this doesn't: var icon:Image = new Image(); icon.source = _moveGroupImage; addChild(icon) ; } } } This class, GroupHandle. as, which extends Sprite, is added in the display list in my application as follows: Application(main MXML) network(Panel based MXML component) groupsLayerUI (a UIComponent, necessary because it's added to a Panel container) groupingTool(.as class that extends Sprite) groupHandle(.as class that extends Sprite) The groupsLayerUI UIComponent seems to be fine holding other content, and even in the groupHandle, it renders drawn graphics just fine. Just not the image. Even if I size the UIComponent, it doesn't work. It's not making any sense to me why this image doesn't appear in this sprite, even though it will appear in other places in my app, and even though other graphics in the sprite appear fine. I thought maybe it had something to do with also drawing on the same sprite, but that's not it either, I removed that code and it still fails to load the embedded image. Can someone figure out what could be wrong? Thanks. Jason Merrill Bank of America Enterprise Technology Global Risk LLD Instructional Technology Media Join the Bank of America Flash Platform Developer Community Are you a Bank of America associate interested in innovative learning ideas and technologies? Check out our internal GTO Innovative Learning Blog subscribe.
Re: [flexcoders] Re: problem adding images to UIComponents using AS3
Hi, Or do you mean Image is a Flex component and not good to add to a custom sprite? Yes that's what I meant. By non-Flex I meant an object that is not part of the mx.* package, i.e. not part of the Flex Framework. A Sprite is a native Flash object and doesn't know how to display or size a Flex object. -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com - Original Message From: Jason [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Friday, August 1, 2008 6:49:50 PM Subject: [flexcoders] Re: problem adding images to UIComponents using AS3 Thanks, I'll try that, but what is the non-Flex object you're referring to? My Sprite classes? If so, it's the other way around, I'm adding them to a Flex container. If you mean the custom MXML components, then no, I'm adding them to a Flex component, not the other way around. Or do you mean Image is a Flex component and not good to add to a custom sprite? If so, that's an odd limitation, but sounds faesible since this bug isn't making any sense to me anyway.
[flexcoders] Re: Passing flash variables to an embedded SWF
Yes it has to be embedded. Well, I ended up embedding 5 different swf files with the FlashVars hardcoded into the swf. Good enough for what I needed, but that would be nice to have some proper way to pass variable to an embedded swf. Laurent --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: Yeah, are you committed to embedding the swf? This is easy with SWFLoader and run-time loading. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alex Harui Sent: Wednesday, July 30, 2008 4:18 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Passing flash variables to an embedded SWF Not sure you can do that. You'll have to implement some communication between the two swfs. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Laurent Sent: Wednesday, July 30, 2008 6:10 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Passing flash variables to an embedded SWF I'm embedding a swf file in an AS class and I would need to pass to this file some FlashVars, however I'm not sure how to do it or if it's possible at all. So far I tried this approach, but I get a compiler error: [Embed(source=MyFile.swf?myFlashVar=abcd)] protected var MyClass:Class; This gives me this error: MyFile.swf?myFlashVar=abcd does not have a recognized extension Is there any way to do what I'm trying to do? Thanks, Laurent
[flexcoders] Re: My Music / Registry
I don't think there's a way to directly get a reference to the My Music path in AIR. You can get it using documentsDirectory though, but the code will be different on XP and Vista: var directory:File = File.documentsDirectory; if (Capabilities.os == Windows XP) { directory = directory.resolvePath(My Music); // On XP } else { directory = directory.resolvePath(Music); // On Vista (and Mac?) } Laurent --- In flexcoders@yahoogroups.com, itdanny2002 [EMAIL PROTECTED] wrote: I know that Windows keep the default path of My Music in Registry Key. How can I get it in FLEX or AIR ?
[flexcoders] Re: Creating advanced components
Well you don't *have* to override these methods as Panel already implement them (and so does UIComponent). It depends on what you are trying to do. If you need to create new objects within the extended panel, then you'll want to override createChildren(), if you want to update these children, then override updateDisplayList(), etc. In all cases, always make sure you call the method of the parent class using super.methodName() in order not to break the default behavior of the component. Laurent --- In flexcoders@yahoogroups.com, flexawesome [EMAIL PROTECTED] wrote: Hey there, I was reading the articles regarding the components http://livedocs.adobe.com/flex/3/html/help.html? content=ascomponents_advanced_2.html I knew that by extending the UIComponent, I need to overriding the protected UIComponent methods ( createChildren(), commitProperties(), etc. ) My question was if I extend the Panel class, shall I still need to override these mehods? Personally, I think I need to overide them, but I wanna conform this first @v@ public class AlertBox extends Panel { . } thank you
Re: [flexcoders] Re: Sandbox violation running from Builder. How did I get this and how do I fix it?
Did you try putting your assets directory inside src? I think that should work fine. -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com - Original Message From: jamalwally [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, July 31, 2008 4:09:47 PM Subject: [flexcoders] Re: Sandbox violation running from Builder. How did I get this and how do I fix it? I also get a security sandbox violation error on a flex project after checking out from SVN. I have a flex project that compiles and runs fine on the original development computer. I then check in my source code to an SVN repository. When a fellow developer checks the project out from SVN and tries to compile on their system, they encounter the security sandbox violation error. My flex application never tries to access a remote file. The security sandbox violation occurs while trying to access a local XML file in the project directory (source code in src/, swf in bin-debug/ and xml file in assets/ --- all three are sister directories) . If anyone has figured out the solution to this puzzle, please post! Best wishes, -- j --- In [EMAIL PROTECTED] ups.com, Josh McDonald [EMAIL PROTECTED] wrote: It was *something* funky caused by svn checkout. First I check out via builder to my workspace (file location as well as create project) and I got the problem. I checked out to a directory completely separate from my workspace via another SVN client, and then copied the tree to the builder workspace directory and created a new project in Builder, still didn't work. Finally I created yet another project, quit flex, copied the /src directory from my checkout, deleted all dotfiles (svn and whatever else) with a find | grep | xargs rm and re-started flex, and now it works (but it's not checked out, just effectively exported). The workspace isn't listed in Flash Player's trusted locations through the advanced settings UI, so it'd be really nice to know how the player determines what is and isn't a builder swf, so I can take whatever's causing the damned problem out of SVN (or put it back in if it's missing something) - and also let other devs on the list and in my office know what to look out for :) -Josh On Fri, Jun 6, 2008 at 12:51 PM, Bjorn Schultheiss bjorn.mailinglists@ ... wrote: Are you sure its not a security settings related issue.. www.macromedia. com/support/ documentation/ en/flashplayer/ help/settings_ manager04. html --- In [EMAIL PROTECTED] ups.com flexcoders% 40yahoogroups. com, Rick Winscot rick.winscot@ wrote: Also. where is the project 'physically' located? I would strongly recommend making sure that the project is inside your workspace. Are there any compiler options like -use-network= false present? Rick Winscot From: [EMAIL PROTECTED] ups.com flexcoders% 40yahoogroups. com [mailto: [EMAIL PROTECTED] ups.com flexcoders% 40yahoogroups. com] On Behalf Of Tracy Spratt Sent: Thursday, June 05, 2008 9:03 PM To: [EMAIL PROTECTED] ups.com flexcoders% 40yahoogroups. com Subject: RE: [flexcoders] Sandbox violation running from Builder. How did I get this and how do I fix it? Very strange. There was a similar thread a couple days ago and we did not find a solution, as far as I know. Did you create the new project by don't New Project and then copying in the files, or did you import the other project? (the first, I know, but maybe try the second?) Maybe try removing the application from the project's application list and then re-adding it? Tracy _ From: [EMAIL PROTECTED] ups.com flexcoders% 40yahoogroups. com [mailto: [EMAIL PROTECTED] ups.com flexcoders% 40yahoogroups. com] On Behalf Of Josh McDonald Sent: Thursday, June 05, 2008 8:42 PM To: [EMAIL PROTECTED] ups.com flexcoders% 40yahoogroups. com Subject: [flexcoders] Sandbox violation running from Builder. How did I get this and how do I fix it? I've checked out a project into the same directory as all my other projects, and now I'm getting a security sandbox violation trying to load a local file even when running from Flex. What could cause this? And how do I get it back to behaving the way it should for all builder projects? -J -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: josh@ -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
Re: [flexcoders] Chart: pass info about series1 to series2 lineSegmentRenderer callback?
Normally, the way to pass parameters to the item renderer is through its data property. So just make sure that your data provider contains whatever information you need to set the item renderer position. -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com - Original Message From: chigwell23 [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, July 31, 2008 4:33:54 PM Subject: [flexcoders] Chart: pass info about series1 to series2 lineSegmentRenderer callback? First question is whether I can pass actual parameters to a callback in the first place? This is what I need to do: mx:ColumnSeries id=salesSeries yField=sales /mx:ColumnSeries mx:LineSeries id=percSeries yField=percent lineSegmentRenderer =PercentLineRen derer(orig callback params, new callback params) /mx:LineSeries Conventionally of course the lineSegmentRenderer gets no params as a callback. But in this instance I need to manipulate the position of the percent line series lines through the renderer based on sales series data so that the lines are positioned exactly over the columns of the sales series. I have code in the renderer that positions the lines, but different underlying data for the column series (2 side by side cols for each data point), changes the width and horizontal position of the columns and then the percent line fragments above no longer line up. If I could get the sales series info to the percent series renderer I think I stand a chance of coding interacting series A big thank you in advance, Mic.
Re: [flexcoders] NaN and Infinity showing in output - How to modify?
How about: sNaN(mynumber) ? 0 : -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com - Original Message From: Blair Cox [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, July 31, 2008 5:19:46 PM Subject: Re: [flexcoders] NaN and Infinity showing in output - How to modify? Just one more question. The zero works for me, but I’m sure I’ll be asked to make it blank. Any hints as to how this could be accomplished? Coming from the Flash side of things, all I would be looking to do is change the alpha value of the label to zero if the value was 0. isNaN(mynumber) ? 0 : -- Blair Cox http://www.luminult ra.com From: Sid Maskit [EMAIL PROTECTED] com Reply-To: [EMAIL PROTECTED] ups.com Date: Thu, 31 Jul 2008 07:51:38 -0700 (PDT) To: [EMAIL PROTECTED] ups.com Subject: Re: [flexcoders] NaN and Infinity showing in output - How to modify? If the format function is a custom function you have written, you could just have it check whether you like the result it is about to return, and if not, return something else. If that is not the case, I believe that you should be able to put tests into your binding statement. You could test for NaN with something like this: mx:Label text={(myNumber is NaN) ? 0 : PrepForDispl ay.format( myNumber) }/ I'm not sure about infinity, but I assume that you can test for this by looking for the greatest possible value of the number. Assuming that you have set up the variable maxValue to contain that value, you should be able to do something like this: mx:Label text={(myNumber maxValue) ? 0 : PrepForDispl ay.format( myNumber) }/ If you put the two together, it would look something like this: mx:Label text={(myNumber is NaN) ? 0 : (myNumber maxValue) ? 0 : PrepForDispl ay.format( myNumber) }/ Sid Maskit Partner CraftySpace Better Websites for a Better World http://www.CraftySp ace.com blog: http://smaskit. blogspot. com/
[flexcoders] Passing flash variables to an embedded SWF
I'm embedding a swf file in an AS class and I would need to pass to this file some FlashVars, however I'm not sure how to do it or if it's possible at all. So far I tried this approach, but I get a compiler error: [Embed(source=MyFile.swf?myFlashVar=abcd)] protected var MyClass:Class; This gives me this error: MyFile.swf?myFlashVar=abcd does not have a recognized extension Is there any way to do what I'm trying to do? Thanks, Laurent
[flexcoders] Re: disable all controls on stage
The best way would probably be to set Application.application.enabled = false; since it should also disable the children components of the app. If it doesn't work, you can loop through all the components using a recursive function. For example: function recursiveDisable(component) { for (var i = 0; i component.numChildren; i++) { recursiveDisable(component.getChildAt(i)); } component.enabled = false; } recursiveDisable(Application.application); --- In flexcoders@yahoogroups.com, Claudio M. E. Bastos Iorio [EMAIL PROTECTED] wrote: I'm trying to access all controls in stage, to disable them (error occurred in app - disable all controls). I'd like to have access to some kind of collection to iterate trough, something like: Foreach (var mycontrol:Control in CollectionofObjects){ Mycontrol.enabled = false; } Any idea? Claudio M. E. Bastos Iorio http://www.blumer.com.ar/ http://www.blumer.com.ar
[flexcoders] Re: How do you identify a component created in a repeater????
Within which context? If you need to know which component has triggered an event, you can use event.currentTarget, as in: yourRepeatedComponent click=clickHandler(event) / Then in a script block: function clickHandler(event) { var yourComponenet = event.currentTarget; // From then you can also get this.parent.getChildAt(n) // to get the other components }
[flexcoders] How to deal with icons in a custom button skin ?
Hi, i've started working in Flex 2 last month. I am unable to achieve something I consider simple even after googling a lot and reading my 3 books (as3 cookbook, flex2 training and as3 design patts.). I want to code a button skin which will display a highlight OVER the button icon and text. I want my updateDisplayList to do the following : - draw the button background (drawRoundRect) - draw the icon - draw the text - draw the highlight (another drawRoundRect) - draw a shadow (RectangularDropShadow) After looking at Button.as, I'm afraid that the component is not flexible enough for this. Thanks for your help. Laurent.
RE: [flexcoders] How to deal with icons in a custom button skin ?
Here's what I ended up with, can someone tell me if it's the right way to do it ? public class MyButton extends Button { private var highlight:UIComponent; public function MyButton():void { super(); highlight = new UIComponent(); addChild(highlight); } override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { super.updateDisplayList(unscaledWidth, unscaledHeight); setChildIndex(highlight, numChildren - 1); var cornerRadius:Number = getStyle(cornerRadius); highlight.graphics.clear(); highlight.graphics.beginGradientFill(linear, [ 0xFF, 0xFF ], [0, 0.40], null, verticalGradientMatrix(1, 1, unscaledWidth - 2, (unscaledHeight - 2) / 2)); GraphicsUtil.drawRoundRectComplex(highlight.graphics,1,1,unscaledWidth-2,(un scaledHeight-2)/2,cornerRadius-1,cornerRadius-1,0,0); highlight.graphics.endFill(); } } _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Laurent Vitalis Sent: 18 janvier 2007 13:47 To: flexcoders@yahoogroups.com Subject: [flexcoders] How to deal with icons in a custom button skin ? Hi, i've started working in Flex 2 last month. I am unable to achieve something I consider simple even after googling a lot and reading my 3 books (as3 cookbook, flex2 training and as3 design patts.). I want to code a button skin which will display a highlight OVER the button icon and text. I want my updateDisplayList to do the following : - draw the button background (drawRoundRect) - draw the icon - draw the text - draw the highlight (another drawRoundRect) - draw a shadow (RectangularDropShadow) After looking at Button.as, I'm afraid that the component is not flexible enough for this. Thanks for your help. Laurent. __ NOD32 1988 (20070118) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com
[flexcoders] Re: Marker ID #### not found
I've got the same problem. It seems to be a bug with FlexBuilder when you change the Flex applications of your project properties. You have to edit the file .actionScriptProperties located in your project root folder. There is the following section: applications application path=MyApplication.mxml/ ... /applications Maybe there is an entry application path=... corresponding to an old setting. Correct it. Then close project and re-open it. Laurent. --- In flexcoders@yahoogroups.com, George Georgiou [EMAIL PROTECTED] wrote: Hi there, I am kind of new to Flex (but not to ColdFusion). I have been playing around with Flex 2 during the last days and so far I find it very future-promissing platform, worth investing some time on it. I have a small problem which I have no clue what's wrong. As soon as I try to execute my mxml application I (sometimes) get this error marker id #(some id)# not found. Am I doing something wrong? thanks a lot!! George
[flexcoders] Re: Problem with RemoteObject Java
Hello, Did you specify a correct 'context-root' when compiling your Flex web application. The value for this compiler parameter must be the same as the context-root where you deploy your webapp on your application server. From the project properties window, got to 'Flex compiler' properties, add to 'Additional compiler arguments' the parameter: -context-root /myContextRoot Regards, Laurent. --- In flexcoders@yahoogroups.com, jonathan_merey [EMAIL PROTECTED] wrote: Hi, I have an application with flex 2.0, flex data services and java and I want to access methods of my JAVA classes. So I use the remoteObject. Here is the code : Test.java package beans; public class Test { public Test() { System.out.println(-= Test start =-); } public String doTest() { return -= This is a test =-; } } remoting-config.xml ?xml version=1.0 encoding=UTF-8? service id=remoting-service class=flex.messaging.services.RemotingService messageTypes=flex.messaging.messages.RemotingMessage adapters adapter-definition id=java-object class=flex.messaging.services.remoting.adapters.JavaAdapter default=true/ /adapters default-channels channel ref=my-amf/ /default-channels destination id=test properties sourcebeans.Test/source scopeapplication/scope /properties /destination /service index.mxml ?xml version=1.0? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; initialize=applicationInit() layout=absolute backgroundGradientColors=[#ff, #808080] viewSourceURL=srcview/index.html creationComplete=doTest() mx:Script ![CDATA[ import mx.controls.Alert; import mx.rpc.events.FaultEvent; import mx.collections.ArrayCollection; import flash.events.MouseEvent; import mx.rpc.AsyncToken; import mx.data.*; import mx.managers.*; [Bindable] private function doTest():void { test.doTest(); } ]] /mx:Script mx:RemoteObject id=test destination=test mx:method name=createTest/ /mx:RemoteObject When I launch the server -= Test start =- is printed on tomcat so the remoteObject is good initialized but after there is an error due to the method createTest. Here is the final message when i launch the application : [RPC Fault faultString=Send failed faultCode=Client.Error.MessageSend faultDetail=Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed] at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faul\ tHandler() at mx.rpc::Responder/fault() at mx.rpc::AsyncRequest/fault() at mx.messaging::ChannelSet/::faultPendingSends() at mx.messaging::ChannelSet/channelFaultHandler() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEven\ tFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.messaging::Channel/mx.messaging:Channel::connectFailed() at mx.messaging.channels::PollingChannel/mx.messaging.channels:PollingChann\ el::connectFailed() at mx.messaging.channels::AMFChannel/mx.messaging.channels:AMFChannel::stat\ usHandler() Please help me. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] New user
Hello i'm new on flex. I made a learning week on Flex 1.5. I've got a project to build for the new 6 months and i've got a first question in order to start, it's do i choose the 1.5 version or wait the new Flex 2.0? What are your ideas ? Laurent Yahoo! Groups Sponsor ~-- AIDS in India: A lurking bomb. Click and help stop AIDS now. http://us.click.yahoo.com/9QUssC/lzNLAA/TtwFAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] New user
Hello i'm new on flex. I made a learning week on Flex 1.5. I've got a project to build for the new 6 months and i've got a first question in order to start, it's do i choose the 1.5 version or wait the new Flex 2.0? What are your ideas ? Laurent Yahoo! Groups Sponsor ~-- Most low income households are not online. Help bridge the digital divide today! http://us.click.yahoo.com/I258zB/QnQLAA/TtwFAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] FileIO.browse() fails when called with filters
Are we the only ones with this problem ? What platform are you running on ? I'm on Windows XP SP2 Benoit Hediard a écrit : Yes I've also encountered this problem. Impossible to use the fileIO.browse() with filters. When filters are passed, the browse window doesn't appear anymore. Benoit Hediard PS: Anyway, now we won't have to use the fileIO hack in Flex2 + Flash Player8.5... ;) -Message d'origine- De : flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] De la part de Laurent Cornelis Envoyé : vendredi 21 octobre 2005 15:10 À : flexcoders@yahoogroups.com Objet : [flexcoders] FileIO.browse() fails when called with filters I have a problem with the FileIO.browse(filters) method. If I just try fileIO.browse() without argument, the file chooser is displayed and it works fine. If I try fileIO.browse([{description: Images, extension: *.jpg;*.gif;*.png}, {description: Flash Movies, extension: *.swf}, {description: Documents, extension: *.doc;*.pdf}]); or var filters:Array = new Array(); filters.push({description:Image files ( .jpg, .gif, .png), extension:*.jpg;*.gif;*.png, macType:JPEG;jp2_;GIFF}); filters.push({description:Flash Movies, extension:*.swf, macType:SWFL}); fileIO.browse(filters); the file chooser is not opened and browse returns false ... Anyone have the same issue ? Do you know what can cause it ? Yahoo! Groups Sponsor ~-- Fair play? Video games influencing politics. Click and talk back! http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links Yahoo! Groups Sponsor ~-- Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Flash Player 8 and the trace() function
Hi, I've installed Flash Player 8 to use the file upload feature in Flex 1.5 but there is a problem : The Flash Player 8 don't have the debugging enabled and then the trace() function don't work anymore. Do you know how I can workaround it ? Regards, Laurent Cornélis Yahoo! Groups Sponsor ~-- Most low income households are not online. Help bridge the digital divide today! http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] FileIO.browse() fails when called with filters
I have a problem with the FileIO.browse(filters) method. If I just try fileIO.browse() without argument, the file chooser is displayed and it works fine. If I try fileIO.browse([{description: Images, extension: *.jpg;*.gif;*.png}, {description: Flash Movies, extension: *.swf}, {description: Documents, extension: *.doc;*.pdf}]); or var filters:Array = new Array(); filters.push({description:Image files ( .jpg, .gif, .png), extension:*.jpg;*.gif;*.png, macType:JPEG;jp2_;GIFF}); filters.push({description:Flash Movies, extension:*.swf, macType:SWFL}); fileIO.browse(filters); the file chooser is not opened and browse returns false ... Anyone have the same issue ? Do you know what can cause it ? Yahoo! Groups Sponsor ~-- Fair play? Video games influencing politics. Click and talk back! http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Birthday Calendar
Hi, I am creating a birthday calendar for myself. Can you please click on the link below and enter your birthday for me. Don't worry it is quick, and you don't have to enter your year of birth:-). http://www.birthdayalarm.com/bd2/52519274a403399060b751876759c674106418d1386 Thanks, Laurent Yahoo! Groups Sponsor ~-- Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] calendar/schedule tool one day view
Has someone already wanted to do the same, a calendar, starting from the iCal (Mac) ? Laurent begin:vcard fn:Laurent Bois n:Bois;Laurent email;internet:[EMAIL PROTECTED] version:2.1 end:vcard
[flexcoders] Flex and Central
Hi everybody, Some weeks ago i began to work with Flex. Today, i have a mockup, done with Flex : several files (.mxml files for the application components, several .as files, several .xml files for data, some images files). .mxml .as files are in teh same folder. Resources files : .xml images are in subfolders. I'm trying to add this application in Central. I've installed Central and Flex integration Libraries. I've modified my Application .mxml file (including imports from mx.central.Shell, the initApp() function including the mx.central.Central.initApplication call, the function onActivate, etc...) I add a product.xml, the installer.swf file and icons in my application folder. Then i tried to install it : I get an error message in Central when installing telling me some of the files could not be downloaded. Please report to the server IP My application entry point file is : AAA.mxml i've set src value for my application to AAA.mxml.swf There are some guidelines in a file coming with the Flex SDK for Central Are there more detailed resources on how to develop Flex applications to be deployed in Central. Thanks for your help Regards Laurent -- 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 Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] How far can be customized a tooltip
Hello,I'd like to create a kind of customized tooltip including :- A kind of panel header , including the title, with a color 'A'- A kind of body, with a color 'B'Header body being separated by an horizontal line. The tootip i would like to draw is hereInitially, i thought tooltip was well adapted for this: it seems the tooltip elementcan include only some text (with codes for carriage return, tabulation, etc..), its behavior can be changed with CSS ( text font-color-size-family... , background, border styles).Perhaps is it possible to extends the tooltip component to do this: in my case i should define a tooltip 'layout' including header body areas, accepting title and body text, and possibility to customize header and body backgrounds.Another way i thought of was to show on mouse over a styled Panel including already header (title) and the body part.What could be the best strategy to do this: tooltip or panel? Thanks for your help Laurent -- 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 Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] UI internationalization
Hello, Newbie question (I began using Flex 2 weeks ago) Initially i'm a Java developer, focused this last 3 years in J2EE application using MVC frameworks (Struts, Spring, etc...) I'm experienced, before 98 with C/S applications,. My question is about the best way to apply values to prompts, titles, ... in an internationalized Flex UI. If we exclude the use of JSP (including the MXML source using Flex Taglib) in which we can get in Java all key/values from a MessageResources file, and set the Label values with Java scriptlets inside the Flex component tags. Doing this has an impact i suppose , for the first load , for each language ( compilation ). Options i thought of : Having a generic Flex UI : when the client access it, UI is loading , then a first request is sent to the server to get all the necessary informations to configure the UI (including translated values for the prompts, titles,... in the user's preferred language for example) : in this case, when setting values to titles or labels , should this be done only by ActionScripting, or could we apply data-binding (that could help to reduce the volume of code simplify maintenance) Could we develop a single UI, using tokens as label, title,.. values (@@mylabel@@ for example). Then, with the help of Ant (or Maven) , the generic mxml source , and properties files (one per language), generate one mxml file per language ( precompile and deploy as is). Choosing language in a HTML page (homepage) to be able to re-route the user to the 'translated' corresponding SWF file. Thanks for your advice. Laurent NOTA: we should support Hebrew, Chinese, French, English, German, Dutch languages. Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ begin:vcard fn:Laurent Bois n:Bois;Laurent email;internet:[EMAIL PROTECTED] version:2.1 end:vcard
[flexcoders] Register a ChangeEvent listener on a static property
Hello, I have a question: is there a way to register a changeEvent listener on a static property ? For example : class ModelLocator { [ChangeEvent(userChanged)] public static var user : User; } class AnotherClass { public function AnotherClass() { ModelLocator.user.addEventListener(userChanged, this); } ... } But here, I have this error : There is no method with the name 'addEventListener'. Regards, Laurent Cornelis Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] prevent Double click
If you use Cairngorm, use a ViewHelper to change the button state. This way you can change the state from anywhere. Regards, Laurent Cornélis [EMAIL PROTECTED] a écrit : thanks Gordon, but i'm using our framework for receive data (ServiceLocator etc) and our function are called in other piece of code in our project, and the id or name of button are not the same, and i think to put in our delgate all id button it's not a good idea, (in our case) Devis Gordon Smith ha scritto: Disable the button in your click handler when you call your RemoteObject method. Re-enable it when your result handler is called. - Gordon -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 29, 2005 11:53 PM To: Flex Coders Subject: [flexcoders] prevent Double click Hi, have some suggestion from prevent double click on the button? for example my button throw some functions on back-end, i wish to disable button until the function are end. It's possible? Devis Yahoo! Groups Links Yahoo! Groups Links Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Custom security for RemoteObjects
Hi, What are you using to protect your services ? I want that the first time a user access one of the service (RemoteObjects in my case), he will be redirected to a custom login form. This form will send authentication data to a class that will validate these informations against our database. I don't know how to do that : - Basic authentication cannot be used because of the custom form and the custom authenticator - Custom authentication can maybe be used. As I understand, for the custom form this is OK, but the authenticator validate against the server authentication mechanism (e.g. the tomcat-users.xml for Tomcat) and not my database. I saw some things about LoginCommand java interface but it is not clear. - Use a totaly custom authentication mechanism with a server generated token returned to the client on login. After that, for each call the client send the token and the server revalidate it. Have someone already implemented something similar ? Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] RemoteObject : Convert Java Exception to ActionScript Fault
Thanks ! Where can we find the documentation for the Java part of Flex ? I searched about Exception on Macromedia and Google and didn't find this ... Last thing, now I'm able to set the code, detail and faultstring but I can't find a way to set the type. If it is not possible, it's not catastrophic but it should be nice to be able to set it ;-) Peter Farland a écrit : The AMF Gateway uses a RuntimeException called flashgateway.GatewayException that has these properties. A thin façade could be built to map your exception type to the gateway exception type. -Original Message- From: Laurent Cornelis [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 23, 2005 9:39 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] RemoteObject : Convert Java Exception to ActionScript Fault Hi, I wonder how Java exceptions are mapped to ActionScript faults. I created a subclass of exception in Java that has the following properties : - message (from superclass Exception) - detail - type (I set the classname) - faultcode - description When I throws this exception during a remote object call, the event.fault has the following properties set : - detail = - faultcode = Server.Processing - faultstring = test - type = It means, only the faultstring is correct. The other properties are ignored, and the faultcode is not the one I set. Is there a way to specify other properties than faultstring in a ActionScript fault object ? Yahoo! Groups Links Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Cairngorm : commands to execute at startup
I have a command that I want to be executed at startup. So in my cairngorm:CairngormApplication tag I set the initialize attribute : initialize=loadCatalog() My loadCatalog function is defined like this : public function loadCatalog() : Void { alert(TEST); EventBroadcaster.getInstance().broadcastEvent( loadCatalog, null ); } I also set a button that execute this same function : mx:Button click=loadCatalog() label=test/ When the application starts up, the alert inside the loadCatalog() function is displayed but the loadCatalog command is not executed. If I click on the button, the alert is displayed and the loadCatalog command is executed. I have the impression that when initialize() calls loadCatalog(), the event system is not completely ready ... Is it possible to execute a command at startup ? How should I do that ? Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Cairngorm : commands to execute at startup
I was sure to have tested with creationComplete() ... but apparently not because it works like a charm ;-) Thanks a lot ! Next time, I'll check twice before posting :-p Steven Webster a crit : try using creationComplete rather than initalize for your loadCatalog() method call.. Timing is everything ;) Steven -Original Message- From: Laurent Cornelis [mailto:[EMAIL PROTECTED] Sent: 21 March 2005 14:29 To: flexcoders@yahoogroups.com Subject: [flexcoders] Cairngorm : commands to execute at startup I have a command that I want to be executed at startup. So in my cairngorm:CairngormApplication tag I set the initialize attribute : initialize=loadCatalog() My loadCatalog function is defined like this : public function loadCatalog() : Void { alert(TEST); EventBroadcaster.getInstance().broadcastEvent( loadCatalog, null ); } I also set a button that execute this same function : mx:Button click=loadCatalog() label=test/ When the application starts up, the alert inside the loadCatalog() function is displayed but the loadCatalog command is not executed. If I click on the button, the alert is displayed and the loadCatalog command is executed. I have the impression that when initialize() calls loadCatalog(), the event system is not completely ready ... Is it possible to execute a command at startup ? How should I do that ? Yahoo! Groups Links -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.7.4 - Release Date: 18/03/2005 Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/