RE: [flexcoders] How can I place custom components into custom components?
>From the top of my head (not tested and most likely not working): import mx.containers.Canvas; import mc.controls.Label; class A extends Canvas { private var _label:Label; public function Canvas() { }; public function createChildren():Void { super.createChildren(); _label = Label(createChild(Label)); }; }; Then in mxml u can do: [local:A] [local:B /] [/local:A] >If I make a component in ActionScript, how can I later integrate it with MXML? Nothing special :) >How can I make a component with an MXML container as a GUI and some data simultaneously in ActionScript? I don't understand your question completely, but I think u just want to extend some container class and code away. Greetz Erik -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ch_flex Sent: dinsdag 5 juli 2005 17:06 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] How can I place custom components into custom components? If I make a component in ActionScript, how can I later integrate it with MXML? For example, if I describe a component in "A.as" - what should I do to enable such a construction in "main.mxml" in my example: [local:A /] How can I make a component with an MXML container as a GUI and some data simultaneously in ActionScript? Thanks, Dima. -- 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] How can I place custom components into custom components?
The only way (as far as I know) is to create a.mxml in Actionscript, make it an Actionscript component. Greetz Erik -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dimkapimkakolbasa Sent: maandag 4 juli 2005 16:11 To: flexcoders@yahoogroups.com Subject: [flexcoders] How can I place custom components into custom components? The problem is: I want to create a component A in the file a.mxml and a component B in a file b.mxml, and to use them both in the file main.mxml like here (I've replaced triangle brackets by square ones!): main.mxml = [mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"; xmlns:local="*"] [local:A] [local:B /] [/local:A] [mx:Application] a.mxml === [mx:Canvas xmlns:mx="http://www.macromedia.com/2003/mxml"; xmlns:local="*"] [mx:Label ... /] [/mx:Canvas] b.mxml [mx:Canvas xmlns:mx="http://www.macromedia.com/2003/mxml"; xmlns:local="*"] [mx:Image ... /] [/mx:Canvas] this example produces such an error: 1 Error found. Error main.mxml: The component B may not be used as a child of A because the A is a container with internal children. If I understand it all correctly, then if I want to use such a construction [local:A] [local:B /] [/local:A] then I should leave component A description in a.mxml empty, otherwise it's not allowed to insert component B into it. Why is it so and how can I solve this problem? Thanks! Dima, [EMAIL PROTECTED] -- 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] Problem using removeNode()
Title: Message Even shorter: for (var locNode:XMLNode=aNode.firstChild; locNode != null;){ if (locNode.nodeType == 1 && locNode.nodeName=="location"){ var exclude:Boolean = false; if (some condition here){ exclude = true; } } var nextNode = loclNode.nextSibling; if(exclude==true){ locNode.removeNode(); } localNode = nextNode;} Greetz Erik From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dogra, DamanSent: donderdag 30 juni 2005 17:51To: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Problem using removeNode() It surely would I mentioned I was having a coder's block :) I had to modify the code a little . The "locNode=locNode.nextSibling" in the for(.) statement made it jump two nodes instead of one . So here's what I did...took off that line from the for () statement and added an else block (highlighted). Thanks lot for your help, Erik. for (var locNode:XMLNode=aNode.firstChild; locNode != null;){ if (locNode.nodeType == 1 && locNode.nodeName=="location"){ var exclude:Boolean = false; if (some condition here){ exclude = true; } } if(exclude==true){ var nextNode = loclNode.nextSibling; locNode.removeNode(); localNode = nextNode; }else{ locNode = locNode.nextSibling; }} -Daman -Original Message-From: Erik Westra [mailto:[EMAIL PROTECTED] Sent: Thursday, June 30, 2005 11:31 AMTo: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Problem using removeNode() Wouldnt this work: for (var locNode:XMLNode=aNode.firstChild; locNode != null; locNode=locNode.nextSibling){ if (locNode.nodeType == 1 && locNode.nodeName=="location"){ var exclude:Boolean = false; if (some condition here){ exclude = true; } } if(exclude==true){ var nextNode = loclNode.nextSibling; loclNode.removeNode(); localNode = nextNode; } } Another thing u could do i create an array with nodes to be removed, and remove them after u found out wich ones needed to be removed. Greetz Erik From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dogra, DamanSent: donderdag 30 juni 2005 16:39To: flexcoders@yahoogroups.comSubject: [flexcoders] Problem using removeNode() Hi All, I am facing a Coder's block here and would appreciate help . This is kind of long and I apologize for the same . Using actionscript I am looping some nodes (called "location") in a XML document and based on some condition would like to remove a few "location" nodes from the XML . Here's my initial code for (var locNode:XMLNode=aNode.firstChild; locNode != null; locNode=locNode.nextSibling){ if (locNode.nodeType == 1 && locNode.nodeName=="location"){ var exclude:Boolean = false; if (some condition here){ exclude = true; } } if(exclude==true){ loclNode.removeNode(); } } The above code does not work, because after removing the first "location" node, the loop is never executed again as loop condition locNode != null is not fullfilled (because the locNode being evaluated just got deleted). I tried to solve this by having another pointer (called delNode) moving along with locNode and using delNode to remove nodes , while keep moving locNode on to next sibling . The problem I now face is that after delNode deletes a node, I am not able to have it catch up with locNode . Here's the code for (var locNode:XMLNode=aNode.firstChild; locNode != null;){ if (locNode.nodeType == 1 && locNode.nodeName=="location"){ var exclude:Boolean = false; if (some condition here){ exclude = true; } } if(exclude==true){ locNode=delNode.nextSibling; delNode.removeNode(); //would like some kind of statement here to have delNode catch up with locNode }else{ locNode=locNode.nextSibling; delNode=delNode.ne
RE: [flexcoders] Problem using removeNode()
Title: Problem using removeNode() Wouldnt this work: for (var locNode:XMLNode=aNode.firstChild; locNode != null; locNode=locNode.nextSibling){ if (locNode.nodeType == 1 && locNode.nodeName=="location"){ var exclude:Boolean = false; if (some condition here){ exclude = true; } } if(exclude==true){ var nextNode = loclNode.nextSibling; loclNode.removeNode(); localNode = nextNode; } } Another thing u could do i create an array with nodes to be removed, and remove them after u found out wich ones needed to be removed. Greetz Erik From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dogra, DamanSent: donderdag 30 juni 2005 16:39To: flexcoders@yahoogroups.comSubject: [flexcoders] Problem using removeNode() Hi All, I am facing a Coder's block here and would appreciate help . This is kind of long and I apologize for the same . Using actionscript I am looping some nodes (called "location") in a XML document and based on some condition would like to remove a few "location" nodes from the XML . Here's my initial code for (var locNode:XMLNode=aNode.firstChild; locNode != null; locNode=locNode.nextSibling){ if (locNode.nodeType == 1 && locNode.nodeName=="location"){ var exclude:Boolean = false; if (some condition here){ exclude = true; } } if(exclude==true){ loclNode.removeNode(); } } The above code does not work, because after removing the first "location" node, the loop is never executed again as loop condition locNode != null is not fullfilled (because the locNode being evaluated just got deleted). I tried to solve this by having another pointer (called delNode) moving along with locNode and using delNode to remove nodes , while keep moving locNode on to next sibling . The problem I now face is that after delNode deletes a node, I am not able to have it catch up with locNode . Here's the code for (var locNode:XMLNode=aNode.firstChild; locNode != null;){ if (locNode.nodeType == 1 && locNode.nodeName=="location"){ var exclude:Boolean = false; if (some condition here){ exclude = true; } } if(exclude==true){ locNode=delNode.nextSibling; delNode.removeNode(); //would like some kind of statement here to have delNode catch up with locNode }else{ locNode=locNode.nextSibling; delNode=delNode.nextSibling; } } Would appreciate any suggestions / modifications. Thanks -Daman --Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [flexcoders] Flex, Remoting and more
Sorry for this late reaction. I've done some tests with ColdFusion 7 and their new event gateways. I modified an existing Java socket server to be an event gateway type. This enabled me to be able to push data from ColdFusion to all connected Flash clients. In Flash I used XMLSocket. I don't know what kind of server side software u are using, but the combination of a socketserver and some server side logic can do the trick. The cutback of this is that messages can only be send as string. Offcourse u can send xml for complex data, but then u still have problems with numbers and booleans. Its however fairly easy to create a serializer / deserializer to send complex data as string and still keep certain types. I hope this information helps u in your quest. Greetz Erik -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alberto Albericio Salvador Sent: maandag 27 juni 2005 12:57 To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex, Remoting and more Hi all, I've been reading about "connecting" flex client applications using Flash Communication Server(FCS) and shared objects. Thats seems to cover the needs for developing chat-like applications... Now, imagine I have an external "Notification server" (yukon notification server, or whatever) And I want FCS to listen *persistently* to this server. With FCS and Remoting I know how to POLL a database "1 time or every 10 seconds" and format that answer to feed the FCS but HOW can I create a persistent link to a notification server,socket server or similar, get the data this server is pushing, format this data and pass it to the FCS? So basically, I want to know how to replace POLLING with PERSISTENT LISTENING. Example application: A Flex application that shows the queue of a call center. When a new call arrives, it is shown in every client running the application. And it is the call center notification server that tells the FCS it has received the new call and NOT the FCS that polls the queue of the notification server to see if there is any new call pending. Thank you mates! -- Alberto Albericio Salvador Aura S.A. Seguros Departamento Informática -- 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] globalisation in flex..
I dint follow the whole thread, but i noticed "includes" are used. So if u need the locale thingies in more then one mxml the locale thingies will be included in all of the files, wich is offcourse not efficient. I would say a class would be more approprate, maybe something like this: class fly.language.LanguageManager { static private var _currentLanguage_str:String; static public function init(init_obj:Object):Void { _currentLanguage_str = init_obj.language; }; static public function getLanguage():String { return _currentLanguage_str; }; static public function getText(type_str:String):String { return (_global.fly.language[_currentLanguage_str][type_str]); };}; Then u have locale files like this: class fly.language.English { static public var name:String = "Name"; static public var adress:String = "Adress"; static public var phoneNumber:String = "Phonenumber"; static public var send:String = "Send"; }; class fly.language.Dutch { static public var name:String = "Naam"; static public var adress:String = "Adres"; static public var phoneNumber:String = "Telefoonnummer"; static public var send:String = "Verzenden"; }; Then in your application u would have this: http://www.macromedia.com/2003/mxml" initialize="start()"> This makes sure that your language translations are included only once in your application. And reachable in every class via the LanguageManager. Greetz Erik From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matt ChotinSent: dinsdag 28 juni 2005 7:30To: flexcoders@yahoogroups.comSubject: RE: [flexcoders] globalisation in flex.. Search the docs for the whitelist, its mentioned in plenty of places. As for your buttons: Matt From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of nithya karthikSent: Monday, June 27, 2005 10:27 PMTo: flexcoders@yahoogroups.comSubject: RE: [flexcoders] globalisation in flex.. hi Matt, I tried the approach 3 but i get an error which says "Http service fault" you are not allowed to access the url http://localhost:8088/flex/globalisatio/en_US.xml via this proxy. This URL is not in the proxy's whitelist. what does it mean? and I tried the approach 2. the code is : http://www.macromedia.com/2003/mxml"> {en_US} here say i have 2 buttons , one for english and other for french. how should i make it work? please send me the code for this.. thanks, nithya -- 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.
RE: [flexcoders] PNG not supported in cellRenderer?
The Flash player is small in size, and that's not without a reason. Macromedia made a choice to support only one format of each type of media to be loaded dynamicly: Video: - .flv Audio: - .mp3 Image: - .jpg (non-progressive) And with that it also supports: - .swf If they would have add any other formats the filesize of the player would increase, and with all technoligy we have available today (think server-side converters) there are no limitations these formats bring. Greetz Erik -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of a1 Sent: vrijdag 24 juni 2005 7:16 To: flexcoders@yahoogroups.com Subject: [flexcoders] PNG not supported in cellRenderer? Maybe I have missed something obvious, but it appears that only jpg and swf are available with a cellRenderer. In particular I am using a TileList with a dataprovider that makes the images dynamic, and i'm using a cellRenderer like they use in the flexstore example code. My jpg's and swf's show up perfectly but everything else shows up blank. Does anyone have any ideas? Thanks -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> 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] Trademark Symbol
Just do it the simple way :) Copy the sign from a webpage, or somewhere else and paste it into the string u use as title. Greetz Erik -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Malcolm Sent: donderdag 23 juni 2005 7:48 To: flexcoders@yahoogroups.com Subject: [flexcoders] Trademark Symbol Hi yo all, I am new to the Flex crusade (cf over sql background), so here goes with my first question. How do I get the proper trademark (TM) symbol in Flex? For example: Using anything like: OR Doesn't work, and besides this is this not the world of html anymore :-) The closest I have come is using escape (unicode) characters. For example: But \u00ae is the registered trademark (R) symbol not (TM). I realize that the TM symbol is not part of the ISO 8859-1 character set supported by the flash player. Is there anyway to get the trademark symbol in flash? IE Unicode characters higher than 256. Many thanks in advance, Malcolm -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Using custom classes in RSL
I understand what u mean. As im also from the Flash side. A lot of things I want are based on what the Flash player can do, but Flex limitates u in the use of the Flex player. Especially with creating and dynamicly loading pre-compiled class libraries. It may not limit u but there is (as far as I could find) little documentation on the real possibilities and commandline switches of compc and mxmlc. The solution u have seems kind of a way around if u just want to get an swf compiled. Its good u found out an approach of doing it. I'll wait till u share your script. Thnx a lot for the effort. Greetz Erik -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Darron J. Schall Sent: dinsdag 31 mei 2005 17:15 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Using custom classes in RSL Erik Westra wrote: >Whooohooo! nice :) > >And ehh is there a way to create the swf with either compc or mxmlc? Or >should I use mtasc if I want to compile this class via the commandline? > > I have an ant build file I'll be blogging this week (probably tomorrow). It uses the compc.jar for the .sws to make the .swc, then extracts library.swf from it and renames it accordingly. Then it creates the .swf from the .mxml files using mxmlc.jar. Then it moves everything from my local computer over to the dev. web server. I *hate* the idea of Flex running on the server, and I think that's why it took me so long to start using it. In my opinion, there's no reason a .swf needs to be compiled for every request, .swf is not server-side technology, and Flash has always been client side After using Flex this weekend though I realized how much faster I can build applications with it now, and the components are much better than those in Flash. As a Flash dev, I feel kind of dissed.. but by not having the server running at all, not even locally on localhost, I feel a little bit redeemed. -d 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] Using custom classes in RSL
Whooohooo! nice :) And ehh is there a way to create the swf with either compc or mxmlc? Or should I use mtasc if I want to compile this class via the commandline? Greetz Erik -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Darron J. Schall Sent: dinsdag 31 mei 2005 16:53 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Using custom classes in RSL Erik Westra wrote: >class fly.language.English >{ > //button labels > static public var okLabel:String = "OK"; > //=== Language.sws === //=== Test.mxml === http://www.macromedia.com/2003/mxml"; rsl="Language.sws"> There is no "class" tag for defining a library, rather you need to use component which is a little mislead. The above has been tested and works. -d 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] Columns of data-grid and not in right order if dataprovider is set dynamically
The only way to specify an exact order of columns is to specify the columns before u set the dataprovider. Greetz Erik -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ashish Abrol Sent: dinsdag 31 mei 2005 13:40 To: flexcoders@yahoogroups.com Subject: [flexcoders] Columns of data-grid and not in right order if dataprovider is set dynamically HI friends, I have a very weird problem. When I say - dataGrid.dataProvider=myModel.b at run-time although it works fine but it changes the order in which I mention the atttribute names in my model i.e. my xml file (xyz.xml). For e.g. suppose the xyz.xml is like this The columns that the datagrid will not be in the order attribute1,attribute2,attribute3... I would appreciate if anyone can fix my problem or tell me any workaroud for this because I am making a function to set the dataprovider for datagrid at run-time and the ordering of columns is essential. Regards Ashish Abrol 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] Using custom classes in RSL
Dear list, I have a class wich is generated by ColdFusion. This class looks like this: class fly.language.English { //button labels static public var okLabel:String = "OK"; static public var cancelLabel:String = "Cancel"; static public var loginLabel:String = "Login"; //labels static public var username:String = "Username"; static public var password:String = "Password"; }; I want to precompile this class into an swf. Then use it as a Runtime Shared Library(?): i want these classes to be available before my application starts (initializing phase). The class above is the small version of what it will be eventually, since all text in my application will be in this class (think form labels, button labels, system messages, etc). This information will not change too often thats why i want it to be available in a separate swf so it can be cached on the users hard drive. Does any1 have a suggestion how to create an swf of this class and make it available to my application? Greetz Erik 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] Questions on Containers, and their "drag-ability"
I would create an mxml component wich extends TitleWindow, like this: http://www.macromedia.com/2003/mxml"; closeButton="true" click="deletePopUp()"> And the call it in your application like this: http://www.macromedia.com/2003/mxml"; xmlns="*" pageTitle="Things" width="690" height="484" initialize="start()" > Greetz Erik -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike Anderson Sent: maandag 30 mei 2005 20:16 To: flexcoders@yahoogroups.com Subject: [flexcoders] Questions on Containers, and their "drag-ability" Hello All, Of course, all containers have their specific uses, and depending on the preferences of the developer, a container that works well for one developer, may not be the preference for another developer. I can see this confusing some beginner developers, that may be confused as to which container is the most appropriate, for the present task at hand. Most containers bundled with Flex Builder (along with their given names) are obvious in their use, but some others, not so much... In fact, I would love some items added to the FAQ down the road, talking specifically about containers, and some of their "interesting" and "novel" uses they may have, that typical developers have not yet thought up. No matter which container I choose however, it would be nice to have them be able to be dragged across the desktop space. Just like the Alert box - which is automatically dragable. In my application, I OFTEN pop up detail screens, based on the current selections one layer below. The user can leave that detail window open as long as they choose, or they can close it. BUT, it's important that they can drag it around, so they can work in other areas of the application. With all this said, is there anything I should keep in mind, when selecting the proper containers (which will act like popup windows with title bars), etc.? In Flash MX, you would have to lay an invisible button over a custom made movie-clip, then add startDrag() and stopDrag() code, in order to drag a window around on the desktop. What is the proper method, of giving any type of window (or container for that matter), the ability to be dragged around? Thanks in advance for your insights, Mike 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] Validating XML
All that is possible in Flex is based on the Flash Players capabilities. Validation with XSD is not implemented in the player and thus not possible in Flex. The flash player only has most basic features available, as u know its only possible to dynamicly load one type of image, sound and movie. This is don't in order to keep the player itself small. I guess the same reason has made that XSD didn't make it into the player. Greetz Erik -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of JesterXL Sent: dinsdag 24 mei 2005 17:51 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Validating XML My perception of Castor and the reason to use it is based on the ability to validate your data/value objects in Java, thus ensuring that if your data is valid, and another system has problems using it, it is the other system and not the base Java code. Furthermore, the use of XSD's for data objects allows the proliferation of many standard value objects to be used across a myriad of applications with the ability of those applciations to validate the data they are sending, thus ensuring ease of communication across disparate systems. With the above 2 said, that is my guess as to why someone would expect Flex to validate the XML via the XSD before sending; that way you can ensure the data you are sending back to Java is valid ... in form, not in contents. So, if the number is 0-0-0-0-0 instead of 000-000-, that is a data input validation error, but at least the data is well formed. Does that make sense? I'm not saying I agree with using an XSD vs. just straight RemoteObject and mapping both server-side and client side value object classes to match as close as possible, and through testing you are ensured that the data works since you mirrored the Java class client side in a value object, but your thoughts do help me understand the "why" someone would want to do it; I'm trying to build up a decent inference here. 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] how to use the setInterval() in flex actionscript ?
The documentation seems not correct here: setInterval(objectName:Object, methodName:Function, interval:Number [, param1:Object, param2, ..., paramN]) : Number I thought methodName should be of type string when using an object as 1th parameter. Greetz Erik -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of loveewind Sent: woensdag 25 mei 2005 13:52 To: flexcoders@yahoogroups.com Subject: [flexcoders] how to use the setInterval() in flex actionscript ? the code run normally in swf, ActionScript: function checkOut() { TextToCheck = spellCheck_txt.text; url_string = "javascript:SpellCheck();"; getURL(url_string, ""); checkOut_interval = setInterval(function () { if (spellResult != undefined) { spellCheck_txt.text = spellResult; clearInterval(checkOut_interval); } // end if }, 100); } and how to use setInterval() in flex actionscript as referred in flex actionscript reference: setInterval(functionName:Function, interval:Number [, param1:Object, param2, ..., paramN]) : Number setInterval(objectName:Object, methodName:Function, interval:Number [, param1:Object, param2, ..., paramN]) : Number Parameters functionName A function name or a reference to an anonymous function. interval The time in milliseconds between calls to the functionName or methodName parameter. param1, param2, ..., paramN Optional parameters passed to the functionName or methodName parameter. objectName An object containing the method methodName. You must include this parameter when using setInterval() in an block in Flex applications. thanks 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] Register a ChangeEvent listener on a static property
Another way is just to use object.watch on the property: ModelLocator.watch("user", _changeFunction); Greetz Erik -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alistair McLeod Sent: woensdag 25 mei 2005 14:37 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Register a ChangeEvent listener on a static property Hi Lauren, I think you're getting things mixed up. Your code should be something like this (incomplete and untested): class ModelLocator { static function initialize() : Boolean { EventDispatcher.initialize( ModelLocator.prototype ); return true; } static var mixIn : Boolean = ModelLocator.initialize(); private static var _user : User; [ChangeEvent("userChanged")] public static function get user() : User { return _user; } public static function set user( user : User ) : Void { _user = user; } } class AnotherClass { public function AnotherClass() { ModelLocator.addEventListener( "userChanged", this ); } ... } Theres quite a lot going on in there, search the archives for the static initialization (you can alternatively just use EventDispatcher.initialize in a constructor), or read this article about mixins: http://www.macromedia.com/support/documentation/en/flex/1/mixin/index.ht ml You should probably also use the Delegate class in your addEventListener. Cheers, Ali 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] is there any way to get rid of the settings tab in the context menu
Nope, no way. Greetz Erik -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of send2martin Sent: woensdag 25 mei 2005 15:05 To: flexcoders@yahoogroups.com Subject: [flexcoders] is there any way to get rid of the settings tab in the context menu 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] Compiling a set of classes
Well i have been stumbling over using RSL the last few days. Using compc, etc. What i tried was creating an SWC wich contains all classes needed by the framework (called TAP). I compiled them using the following sws file in combination with compc: empty.swc is a swc file containing all components used by an empty flex application, created from a class like this: class empty { var a = mx.core.Application; }; The part 'rsl="empty.swc"' is used so it wont compile the classes allrdy available in the flex generated swf into the library. As commandline arguments i gave compc the namespace TAP and a manifest.xml: This resulted in a SWC with all TAP classes compiled into a swf together with some flex classes the TAP framework uses and are not by default in the flex generated swf. In order to use the RSL in the flex application i used the following sws: http://pc021:8300/_TAP/Library.swf"> This however made the application hang on a full loader saying "Initializing". So far what i have done. I'll explain again what i want: I want to make a set of classes available in memory at runtime. These classes (AS and MXML) should be compiled into an swf. This swf containing these classes should not contain the classes wich are allrdy in the flex generated swf. I can then in my application load this swf, and as soon as this swf is loaded the classes in the swf are available since they reside in the global scope. This way i can use my framework in any flex application. With flash i would do that just by creating a fla. Put in the appropreate classes (only referencing them so the compiler knows i will use them). And then export, resulting in an swf with a library of classes. For the classes i dont want in there i create intrinsic class descriptions. I cant do this with flex since some of my classes are mxml files, containing visual components. Maybe u have an idea on how to solve this. Greetz Erik From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matt ChotinSent: maandag 23 mei 2005 4:19To: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Compiling a set of classes Would an RSL be appropriate in this case? From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Erik WestraSent: Friday, May 20, 2005 9:24 AMTo: flexcoders@yahoogroups.comSubject: [flexcoders] Compiling a set of classes We are planning a large application. This application uses a frameworkwe developed. Different developers will be creating components wich willfunction only within this framework. In order to let developers work ontheir own module while not bothering others in their testing. We want tobe able to load different libraries at runtime.The ways to do this are allrdy completed.The problem here is how to compile an as file like this:class commonDialogs{ public function commonDialogs() { fly.TAP.commonDialogs.Alert; fly.TAP.commonDialogs.Login; fly.TAP.commonDialogs.Waiting; fly.TAP.commonDialogs.Preloader; fly.TAP.commonDialogs.Prompt; };};fly.TAP.commonDialogs.Login for example extends LoginVisual, wich is anmxml file laying out the visual parts of this window extendingtitlewindow.I want to compile these classes into a swf. However I don't want toinclude the basic flex classes (think of UIObject, TitleWindow,Container, etc.). Does any1 know a way of compiling classes whiledefining wich classes to leave out?I hope my problem is clear, if not, just say so :)Greetz Erik 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 the Yahoo! Terms of Service.
RE: [flexcoders] Applications forgetting variables
The difference between these two approaches is scope. In your first example u create a variable on the instance of the class u are working in. This variable exists as long as that instance has a reference somewhere in the application. In the second example u create a variable inside a function definition. This means that at the }, the end of the function this variable is destroyed. Greetz Erik From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]Sent: woensdag 25 mei 2005 4:41To: flexcoders@yahoogroups.comSubject: [flexcoders] Applications forgetting variables I can not help but feel I have ran in to more problems than neccessary because my flex applicaitons forget variables. I mean I know from a code standpoint I am doing the right thing when I write my code but I think it forgets variables and I think this is causing me more stress than need be. What I want to know is how does someone go about making sure it does not forget variables I mean is this a way to do it: If I have a function and a variable that looks like this say: public var age:Number public function compute(){ age = 23 } but lets say that for some odd reason when you get to the compute function it keeps forgetting the age variable will this solve it to write the function like this: public function compute(){ var age:Number age = 23 } If there is any other suggestions let me know 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 the Yahoo! Terms of Service.
[flexcoders] Compiling a set of classes
We are planning a large application. This application uses a framework we developed. Different developers will be creating components wich will function only within this framework. In order to let developers work on their own module while not bothering others in their testing. We want to be able to load different libraries at runtime. The ways to do this are allrdy completed. The problem here is how to compile an as file like this: class commonDialogs { public function commonDialogs() { fly.TAP.commonDialogs.Alert; fly.TAP.commonDialogs.Login; fly.TAP.commonDialogs.Waiting; fly.TAP.commonDialogs.Preloader; fly.TAP.commonDialogs.Prompt; }; }; fly.TAP.commonDialogs.Login for example extends LoginVisual, wich is an mxml file laying out the visual parts of this window extending titlewindow. I want to compile these classes into a swf. However I don't want to include the basic flex classes (think of UIObject, TitleWindow, Container, etc.). Does any1 know a way of compiling classes while defining wich classes to leave out? I hope my problem is clear, if not, just say so :) Greetz Erik 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] mxmlc and JVM
Thnx, just what I needed :) -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Manish Jethani Sent: vrijdag 20 mei 2005 14:19 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] mxmlc and JVM On 5/20/05, Erik Westra <[EMAIL PROTECTED]> wrote: > When I run mxmlc it sais: Error: could not find a JVM. I think you need to set the java.home in your $FLEX_INSTALL/bin/jvm.config file. 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] mxmlc and JVM
When I run mxmlc it sais: Error: could not find a JVM. How can I solve this? 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] Development of components with AS
Thnx for replying all. It really helped me a step further. >I searched Google for "_measuredPreferredWidth" and unfortunately found only a single page of results. :( >http://www.google.com/search?q=_measuredPreferredWidth >http://search.yahoo.com/search?p=_measuredPreferredWidth > >Anyway, here's a nice article about how to create components: >http://www.macromedia.com/support/documentation/en/flex/1_5/createcompo nents/ According to the article: these properties, but you can override them in the measure() method: _measuredMinWidth _measuredMaxWidth _measuredMinHeight _measuredMaxHeight _measuredPreferredWidth _measuredPreferredHeight The properties define limits for when the object is resized. These measured properties are used for layout in containers if your component doesn't explicitly set a preferredWidth or preferredHeight attribute. I think this information is missing the part where they explain what function these properties have exactly. >Then when the container is getting initialized, it looks at the >object descriptors and created its children using createChild() > >You can see how the descriptors are set up by setting the following >option in flex-config.xml > > > > true > >Then you can open the MyMXMLFile-generated.as file to see the translated >AS code. Look for "Descriptor" in that file to get an idea. Yeah I have seen these pieces of code. I was however wondering how I this information was processed internally so I could create my own version for that. In some cases its preferable to create these childs not directly into the component but into a holder. For the developer using your component it should look like the children of the component itself. >There may be many, but if they are not in the ASDoc then one has >to assume they were not meant for public use. Well these undocumented function are used in components themselves. So they are public and part of the framework, else the should not be used in components. I agree with u that they are not public for developers wich use the components, but if u are creating components within the V2 framework, these methods are perfectly good to use. In order to make good V2 components we need to know about these methods. >> These classes are not included in the FlexForFlash.zip file while they >> can be valuable to the development of good UI components. Does any1 >> know why? > >No idea. :-/ Thnx to the tip of one of u, I have managed to get the source of these classes, wich I can use to gain more knowledge of the V2 framework and be able to create more solid components. >When you resize a child in the box, its parent's "layout" needs >to be redone, so Flex remembers this and calls the parent's layoutChildren() >on the next frame. In the layoutChildren() of the Box container, it >calculates the sizes of its children and lays them out accordindly. > >This happens for any Container, not just Box. U say "Flex remembers this", but how is it done? Via an event? I mean how does the parent container know one of its children is resized? Is it automaticly registering itself as listerer for the size event? >> 6. >> >> In the documentation of the V2 architecture I miss the overview. I see >> a lot of examples of parts of the framework, but I don't see a list of >> goals connected to the theory of its implementation. It seems in the >> general documentation everything is ordered by feature and in >> component creation documentation all simple features are included and >> minimaly explained (think init, createChildren, measure, etc.). >> >> Im missing a structured view of how the framework is tied together. >> From concepts all the way down to parts of implementation code in components. > >Have you read this book? >http://www.amazon.com/exec/obidos/tg/detail/-/0321255666/qid=1116262210 /sr=8-2/ref=pd_csp_2/002-2276896-9552008 >I haven't, but I hear it's great. Some of the chapters are now becoming available online too. >http://www.macromedia.com/devnet/flex/articles/component_reuse.html I have that book on my table yes, but this book doesn't go in on the creating of Actionscript components, or how the V2 framework internally works. Thnx again for your reply. Greetz Erik 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] Development of components with AS
Title: Message This is a great help (the trick with fdb). In order to make it somehow more workable i run fdb.exe like this: fdb.exe http://adres >fdb.log Then when fdb is running i type: list package.Class:1 3 This will put the whole class in the fdb.log file. In order to get feedback from the commands u can run this java application in a sepperate window: import java.io.*;public class LogReader { public static void main(String args[]) { if (args.length <1) { System.out.println("Usage LogReader "); return; } BufferedReader d=null; try { d= new BufferedReader(new InputStreamReader(new FileInputStream(args[0])) ); while (true) { String s=d.readLine(); if (s!=null) { System.out.println(s); } else { //give up system and ignore Exceptions try { Thread.sleep(500); }catch(Exception e){}} } }catch(Exception e) { e.printStackTrace(); } finally { try { d.close(); } catch(Exception e) { e.printStackTrace(); } } }} Greetz Erik From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Simon FifieldSent: dinsdag 17 mei 2005 9:29To: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Development of components with AS Hi Gordon, Thanks for the reply. I had a look at that but I kept on getting an error "Expected line number; got 1,". It seems that although you should be able to specify a start and end location ("1, 500" for example) this does not work! Looks like its back to listing 10 lines at a time. I have increased my buffer size now though so that I can list the whole thing, then copy paste into an editor. Does anyone know of a better way of doing this? Regards, Simon 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 the Yahoo! Terms of Service.
[flexcoders] Development of components with AS
Hello, some questions :) 1: _measuredWidth _measuredHeight _measuredPreferredWidth _measuredPreferredHeight __width __height etc. Is there anywhere a list of these kind of properties that can be used with the development of a custom component in actionscript. I would be interested in knowing wich properties are available and what effect they have in the framework. 2: The above piece of xml creates a child on the MyCustomComponent. Im wondering what code is used to determine wich childs must be created. If u extend container, either the container createChildren function or the View container function takes care of this creation. But how does it work? 3: In (for instance) the accordion class the visibility of childs is explicitly set with setVisible(false, true). This is not documented, but an importend part of the framework. Im wondering how many of these (for component development) usefull functions there exists. 4: mx.effects.EffectManager mx.core.UIObjectDescriptor mx.container.Box; mx.container.VBox; mx.container.HBox; These classes are not included in the FlexForFlash.zip file while they can be valuable to the development of good UI components. Does any1 know why? 5. Does any1 know how a Box determines the size of its children? I mean when u resize a child within a box, the positions of the other childs (and sometimes their sizes) are recalculated. How does this process exactly work. 6. In the documentation of the V2 architecture I miss the overview. I see a lot of examples of parts of the framework, but I don't see a list of goals connected to the theory of its implementation. It seems in the general documentation everything is ordered by feature and in component creation documentation all simple features are included and minimaly explained (think init, createChildren, measure, etc.). Im missing a structured view of how the framework is tied together. From concepts all the way down to parts of implementation code in components. For your information I have the following documents (I may have missed some importend ones): The Version 2 Component Architecture - An Overview http://www.ultrashock.com/tutorials/_sourcefiles/v2a.pdf.zip Flex Components Basics - Part1: Coding an Analog Clock http://www.macromedia.com/devnet/flex/articles/creating_comp_print.html Developing Flex Components and Themes in Flash Authoring http://download.macromedia.com/pub/documentation/en/flex/15/flex_compone nts_themes.pdf Stepping into the New Macromedia Flash MX 2004 Component Structure http://www.macromedia.com/devnet/mx/flash/articles/v2component_migration _print.html Building the FooterNav Component http://www.macromedia.com/devnet/mx/flash/articles/footer_component_prin t.html Building and Testing Components in Macromedia Flash MX 2004 http://www.macromedia.com/devnet/mx/flash/articles/buildtest_comp_print. html Exploring Version 2 of the Macromedia Flash MX 2004 Component Architecture http://www.macromedia.com/devnet/mx/flash/articles/component_architectur e_print.html Creating Components with Flash MX 2004 http://www.person13.com/articles/components/creatingcomponents.html Developing Components in Flash 2004 http://www.ultrashock.com/ff.htm?http://www.ultrashock.com/tutorials/fla shmx2004/components.php Greetz Erik 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] Default Text Color?
We are coding in AS right? var num = 734012;trace(num.toString(16)); Greetz Erik From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of michael keirnanSent: donderdag 12 mei 2005 19:20To: flexcoders@yahoogroups.comSubject: Re: [flexcoders] Default Text Color? Matt Chotin wrote: Yep. I just use the calculator in Windows in scientific mode to help me out for stuff like this Jugh, why go through all that trouble?perl -e 'printf("%x\n", "734012")';) 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 the Yahoo! Terms of Service.
RE: [flexcoders] Trigger flex from Java listener
Title: Trigger flex from Java listener Agreed, a socketserver in java is very easy to build (or download). From that socketserver u can push information to your client. Greetz Erik From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Peter FarlandSent: woensdag 11 mei 2005 15:11To: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Trigger flex from Java listener Have you looked at Flash's XMLSocket class? http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary860.html From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jeroen De VosSent: Wednesday, May 11, 2005 7:55 AMTo: flexcoders@yahoogroups.comSubject: [flexcoders] Trigger flex from Java listener Hi all, I need to trigger actions in Flex based on values received by a Java listener. So, the listener sees a certain value and needs to send a message to Flex telling it to do something. Is there any way that I can do this? I thought using LocalConnection, but there is no Java equivalent for this ActionScript function. Thanks, Jeroen. Jeroen De Vos Gemeentelijk Havenbedrijf Antwerpen C/ICT - AMARIS Deze e-mail en alle gekoppelde bestanden zijn officiele documenten van het Gemeentelijk Havenbedrijf Antwerpen en kunnen vertrouwelijke of persoonlijke informatie bevatten. Gelieve de afzender onmiddellijk via e-mail of telefonisch te verwittigen als u deze e-mail per vergissing heeft ontvangen en verwijder vervolgens de e-mail zonder deze te lezen, te reproduceren, te verspreiden of te ontsluiten naar derden. Het Gemeentelijk Havenbedrijf Antwerpen is op geen enkele manier verantwoordelijk voor fouten of onnauwkeurigheden in de inhoud van deze e-mail. Het Gemeentelijk Havenbedrijf Antwerpen kan niet aansprakelijk gesteld worden voor directe of indirecte schade, verlies of ongemak veroorzaakt als gevolg van een onnauwkeurigheid of fout in deze e-mail. English Translation: This e-mail and all attached files are official documents of Antwerp Port Authority and may contain confidential or personal information. If you have received this e-mail in error, you are asked to inform the sender by e-mail or telephone immediately, and to remove it from your system without reading or reproducing it or passing it on to other parties. Antwerp Port Authority is in no way responsible for any errors or inaccuracies in the contents of this e-mail, nor can it be held liable for any direct or indirect loss, damage or inconvenience arising from any such errors or inaccuracies. [GHA#Disclaimer] 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 the Yahoo! Terms of Service.
RE: [flexcoders] Help i don't know
It's a common floating point problem. U can solve it by multiplying both values with 100 and then ehh / (don't know what the word is) the resulting value by 100. var x = ((Number("40") * 100) - (39.90 * 100)) / 100; trace(x); Greetz Erik -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matt Chotin Sent: woensdag 4 mei 2005 7:55 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Help i don't know Should Number(tx_inc.text) be parseFloat(tx_inc.text) instead? -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, May 03, 2005 9:33 AM To: Flex Coders Subject: [flexcoders] Help i don't know Hi, if you can see my code, please, "Resto()" function it's very simple. If in my tx_inc.text put 40EUR, and in my ShoppingCart(mx.core.Application.application.shopping).total put 39.90EUR return me 0.10001??? I have trace my var the value for tx_inc.text and for total it's correct, but my resto var is crazy? what's i wrong? http://www.macromedia.com/2003/mxml"; height="20%" width="100%" visible="true" xmlns="*"> 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/
RE: [flexcoders] iteration::two AdvancedTabNavigator problem
There might be another flex-config.xml file in this directory: \WEB-INF\cfform Im using CF7 and thats where the settings used by the flex-bootstrap shizzle are located. Greetz Erik From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rick SchmittySent: dinsdag 3 mei 2005 16:47To: flexcoders@yahoogroups.comSubject: Re: [flexcoders] iteration::two AdvancedTabNavigator problem Thanks for the reply Ali, and yes, your component works fine in a .mxml page. I have CFMX installed under IIS6 and then integrated Flex under CF following these tech notes:http://www.macromedia.com/support/documentation/en/flex/1/flexforcf.htmlhttp://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=96611248http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_19344That leaves me with a shared context rootC:\CFusionMX\wwwroot\WEB-INF\flex\flex-config.xmlC:\CFusionMX\wwwroot\WEB-INF\flex\user_classesC:\webs\dev\test.cfm (this is the cfimport with your SWC which cant find the class path)C:\webs\dev\test.mxml (this is just the mxml code from the cfm page and works)Perhaps this is a question for the ColdFusion team then regarding the flex-bootstrap as I don't see any other flex-config.xml files?Thanks On 5/3/05, Alistair McLeod <[EMAIL PROTECTED]> wrote: Hi Rick, I've never used it in a ColdFusion environment, but theres no reason why it shouldn't work. Did you get it to work OK in the standalone JRun environment? Is the flex classpath in flex-confi.xml ok - ie. does it still include user_classes. Can you give us more info on the setup you have - it might give us a clue. Has anyone used a SWC in the same enviroment as Rick is using here? Cheers, Ali -- Alistair McLeodDevelopment Director iteration::two[EMAIL PROTECTED] Office: +44 (0)131 338 6108 This e-mail and any associated attachments transmitted with it may contain confidential information and must not be copied, or disclosed, or used by anyone other than the intended recipient(s). If you are not the intended recipient(s) please destroy this e-mail, and any copies of it, immediately. Please also note that while software systems have been used to try to ensure that this e-mail has been swept for viruses, iteration::two do not accept responsibility for any damage or loss caused in respect of any viruses transmitted by the e-mail. Please ensure your own checks are carried out before any attachments are opened. From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Rick SchmittySent: 02 May 2005 15:25To: flexcoders@yahoogroups.comSubject: [flexcoders] iterationtwo AdvancedTabNavigator problem Hi all!I'm trying out the AdvancedTabNavigator and ran into some problems when using Cold FusionI have AdvancedComponentSet-0_1.swc in my user_classes directory. But when I use Ben Forta's method described here: http://www.forta.com/blog/index.cfm?mode=e&entry=1038I get the following error:Error /test.cfm:5Don't know how to parse element "com.iterationtwo.containers.*:AdvancedTabNavigator". It is not a known type or a property of mx.core.Application.Here is the code for test.cfmFlex Embedded in ColdFusion http://www.macromedia.com/2003/mxml" xmlns:iterationtwo="com.iterationtwo.containers.*"> This works fine in in a pure .mxml page in the same directory in my test.mxml example file:http://www.macromedia.com/2003/mxml" xmlns:iterationtwo="com.iterationtwo.containers.*"> Any help appreciated, thanks! 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 the Yahoo! Terms of Service. 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 the Yahoo! Terms of Service.
RE: [flexcoders] dispatchEvent in AS class?
Hmm, I think u are missing the point that this class is a singleton and thus only instantiated once. The constructor is private and the instance can only be retrieved via the getInstance method: static public function getInstance():SocketManager { if (!_instance) { _instance = new SocketManager(); }; return _instance; } This method checks if the instance is created. If it is it simply returns the instance, making sure only instance of this class exists. If im missing something here, please point me to it :) Greetz Erik -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of JesterXL Sent: dinsdag 3 mei 2005 16:43 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] dispatchEvent in AS class? Doing this: EventDispatcher.initialize(this); Puts the addEventListener, removeEventListener, and dispatchEvent functions as well as the arrays to hold the events on each instance of the class. Additionally, that method is run each time a class instance is instatiated, doing the redudant re-initializing again. The reason I mentioned do it this way: static var mixIt = EventDispatcher.initalize(SocketManager.prototype); Is because by being static, it is only initialized once, not per each class instantiation, and secondly, the methods are added to the class once, thus using significantly less RAM. So, it is necessarey if you want a more efficient class. - Original Message - From: "Erik Westra" <[EMAIL PROTECTED]> To: Sent: Tuesday, May 03, 2005 7:18 AM Subject: RE: [flexcoders] dispatchEvent in AS class? >static var mixIt = EventDispatcher.initalize(SocketManager.prototype); That is at all not nescessary 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] dispatchEvent in AS class?
>static var mixIt = EventDispatcher.initalize(SocketManager.prototype); That is at all not nescessary I rewrote a part of your code, wich is pasted below, here the code to test: http://www.macromedia.com/2003/mxml"; xmlns="*" pageTitle="Things" width="690" height="484" initialize="start()" > And here the class: import mx.utils.Delegate; import mx.events.*; class SocketManager { static private var _instance:SocketManager; private var _socket:XMLSocket; private var _isSocketConnected_bool:Boolean = false; public var addEventListener:Function; public var removeEventListener:Function; private var dispatchEvent:Function; private function SocketManager() { _socket = new XMLSocket(); _socket.onConnect = Delegate.create(this, _handleConnect); _socket.onClose = Delegate.create(this, _handleClose); _socket.onXML = Delegate.create(this, _handleIncoming); EventDispatcher.initialize(this); }; static public function getInstance():SocketManager { if (!_instance) { _instance = new SocketManager(); }; return _instance; } public function connect(url_str, port_num) { //for the test: dispatchEvent({type: "onConnectTest"}); if(!isSocketConnected) { if (!_socket.connect(url_str, port_num)) { throw new Error("SocketManager: socket connection attempt failed early"); }; } else { throw new Error("SocketManager: connect method called while connected"); }; }; public function get isSocketConnected():Boolean { return _isSocketConnected_bool; }; public function set isSocketConnected(isSocketConnected_bool:Boolean):Void { //read only }; private function _handleConnect(success_bool:Boolean) { if(success_bool) { trace("SocketManager: Socket connection attempt succeeded"); _isSocketConnected_bool = true; dispatchEvent({type:"onSocketOpen"}); }; }; private function _handleClose () { trace("SocketManager: server closed connection"); _isSocketConnected_bool = false; dispatchEvent({type:"onSocketClose"}); }; private function _handleIncoming(messageObj) { // display the received xml data in the output window trace(">>" + messageObj.toString() + "<<"); }; }; Greetz Erik -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of JesterXL Sent: zaterdag 30 april 2005 0:48 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] dispatchEvent in AS class? Add this as a static member: static var mixIt = EventDispatcher.initalize(SocketManager.prototype); - Original Message - From: "Sean McKibben" <[EMAIL PROTECTED]> To: Sent: Friday, April 29, 2005 5:49 PM Subject: [flexcoders] dispatchEvent in AS class? I'm trying to wrap an XMLSocket object in a singleton class to manage my (single) XMLSocket connection, but I can't seem to get it to throw any events. Is it that I need to put it into my .mxml file as a component or something? Right now it is just an actionScript class. I was wanting to stick to the cairngorm framework's delegate model, but my SocketManager actually initiates commands from the server it is connected to (the whole point of my XMLSocket) so this class will need to dispatch a bunch events, preferably using the addEventListener+dispatchEvent model. Whenever the socket connection succeeds, I get my "SocketManager: Socket connection attempt succeeded" trace statement, then I get a warning which says "Warning: dispatchEvent is not a function" which leads me to believe that the EventDispatcher voodoo I'm doing in my constructor isn't working. Is it possible to send events like this? Any help is appreciated. Thanks, Sean McKibben 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: [Fwd: Re: [flexcoders] Tips on Custom component]
Joe, Jester and Ali, thnx for your replies. These were the kind of ideas I was after. Joe, thank u a lot for the roadmap. I will look into it soon. I know it will be a lot of work, but it has to be done :) I have created some componentent in Flash, but the biggest problem is the (so it seems) complexity of the V2 framework (along with the fact that I allways resisted to use it). >If I were you, I'd read up on the various Flash component integration articles. This is the only one I found, any suggestions are welcome. http://mxdu.v4.breezecentral.com/p27914483/ >I guess I should have mentioned that what I consider >the hard part here is creating the kind of animation >effects that are shown in the SWF that you posted. Yeah, animations are allways hard... Though they are very importend for the user experience :) >http://www.macromedia.com/support/documentation/en/flex/1_5/createcompo nents/index.html Thnx for this link. This used the same kind of example as I noticed in the pdf 'Designing Flex Componenents and Themes in Flash Authoring'. I will check for additional information though. >To create such a component, with all the features you're after, >I'd say that you're undertaking a fairly complicated component >development task, with effort measured in days, if not weeks, and >I've not seen a great deal evidence that completely new components >of such complexity have been created, outwith of Macromedia. I agree, but we are basing our core product on Flex wich is a modulair CMS. Im doing the research & development part to check how we can do it all. I need to gather as much knowledge of Flex as possible so we eventually will be able to build everything our designers and creative minds can come up with. The best way to learn is to do it. And allthough it may take some time, it will be of value for my company :) Greetz and Thank you, Erik -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Joe Berkovitz Sent: vrijdag 29 april 2005 21:53 To: flexcoders@yahoogroups.com Subject: [Fwd: Re: [flexcoders] Tips on Custom component] Erik, one more thing: I guess I should have mentioned that what I consider the hard part here is creating the kind of animation effects that are shown in the SWF that you posted. If all you want is to just have the appropriate components appearing and disappearing in a VBox with no animation or tweening, it's much simpler and JesterXL's suggestion applies -- it's pretty straightforward Flex component stuff. . .. . ...j 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] KeyDown Event returns incorrect ascii values
U could also try and see if Key.getCode does return the right value. Greetz Erik From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matt ChotinSent: vrijdag 29 april 2005 6:15To: flexcoders@yahoogroups.comSubject: RE: [flexcoders] KeyDown Event returns incorrect ascii values Can you try setting System.useCodepage = true and see if that changes which values you get? 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 the Yahoo! Terms of Service.
RE: [flexcoders] Newbie: Flash vs. Flex, CPUs, Lazslo
>An example would be Remoting, any here who have used Flash >Remoting in IDE form know its more tedious to implement then >FLEX. I don't have this problem, but that may be because we internally use our own remoting components. On all other point I agree with u. We chose flex for another importend reason: the component framework. Allthough I personally don't like the V2 components, macromedia uses them in Flex and will continue to develop them. They are with a large team wich is capable of managing such a component library. We could develop components ourself wich would be half the size and more optimized, but the developing takes a lot of time and getting them completely bugfree would not be doable. Greetz erik -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Scott Barnes Sent: vrijdag 29 april 2005 3:00 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Newbie: Flash vs. Flex, CPUs, Lazslo On 4/29/05, Jim Schneider <[EMAIL PROTECTED]> wrote: > 1. Could someone explain (or point me to a doc/faq) that tells me why > I would choose Flex over Flash. What can Flex do that Flash can't? > Even if it's more difficult in Flash, perhaps it's worth it given the cost of Flex. I'll take a stab at this one. As a Flash IDE developer for many a year, I've found that its really a bottle neck and a slow process at times. Flash IDE takes a lot of discipline and understanding of the concept of flash itself and you better be armed before taking on a large project. When developing in large projects you tend to be a one man show, as to share resources or code amongst other developers takes a lot of communication and patience. That alone improves why FLEX is a valid purchase. As for what can FLEX do FLASH can't? not much technically as FLEX is really an alternative approach to the end goal. It does bring a lot more to the table then FLASH IDE in terms of Rapid Development. An example would be Remoting, any here who have used Flash Remoting in IDE form know its more tedious to implement then FLEX. Its examples like this that change your perspective on FLASH vs FLEX. On top of that, FLEX handles a lot of your tasks for you, things like initialization modals, busy cursors, history management etc are all automated tasks within FLEX. In terms of costs, i've seen soo many projects take months to do what could be done in FLEX in half the time. These are also run by some very competent FLASH developers who have years of experience and know the language/tool off by heart. Its just cumbersome, slow and at times very tedious. That being said, you do a lot more control visually / debugging wise in FLASH IDE then you currently at present have in FLEX. On top of that your portability is much more open then at present with FLEX. Implementing Runtime Shared Libraries in FLASH IDE is awful and painful, just ask JessterXL all about that one, he's mastered it but he went through a learning curve and pain to get to that point. I like wise, i think i've got it mastered but found it took a lot of imagination and research. In FLEX? bah its next to easy as implementing a Tree component. In FLASH MX 2004 Pro, implementing even a Tree component (databinding aside) isn't a simple task and requires some extra work then compared to FLEX. Cost wise, you'll blow more money using FLASH IDE then you will via FLEX for a large application. If you are building a small RIA app that isn't as large and doesn't require a team of developers to work on, then yes FLASH MX 2004 Pro is the suitable resource. > 2. Speaking of cost, I read on MM's site that they recommend a typical > deployment of a Flex app have 6 - 8 CPUs. Is this true in practice? If > I have an app that has 50 users (would grow to perhaps 10K users) who > don't hit the system very hard, what are CPU requirements? Are there > any performance benchmarks that I can use as a guideline for what I > would need initially and at what point I would need to upgrade. As a > small company, we can probably chew off $12K, $70K is another story > (unless I misunderstand the licensing). Not sure on server-side, i've oftend wondered that my self and while i've read various optimization techniques and resources i'm still skeptical of its use in terms of high volume. That being said, we could easily use a DUAL CPU setup here at work for a FLEX application (approx 300-500 end users hitting it daily) and provided there is enough ram thrown at it, it should hold up fine. If need be i'd look into clustering the servers or throwing more RAM at it. I've FLEX Server tends to have ok automated garbage collection and simply apply the same server-side rules as i do with a CFMX server. > 3. Has anyone had any real-world experience/lessons-learned with > Laszlo and any comparisons with Flex? I've gone down the path of using Laszlo as a prototype concept, comparing it to FLEX? In many ways the XML flavour Laszlo brings to the table is more s
RE: [flexcoders] Asfunction not working inside htmlText
The problem here is that asfunction (at least the function asfunction is calling) is called on the parent movieclip where the textfield resides. So in this case your call will end up in your text component. If u change asfunction:hello_you to asfunction:_parent.hello_you the example should work. Greetz Erik -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt Sent: donderdag 28 april 2005 18:31 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Asfunction not working inside htmlText I just now needed this myself, and sure enough, it doesn't work. Is this an known bug? Has anyone discovered a workaround? Tracy -Original Message- From: Greg Fuller [mailto:[EMAIL PROTECTED] Sent: Friday, February 25, 2005 5:20 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Asfunction not working inside htmlText Hi everyone, I'm having trouble getting "asfunction" to work inside htmlText. This post in the MM flex newgroup suggests that asfunction may have been broken with the release of 1.5: http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid= 346&threadid=929079&highlight_key=y&keyword1=asfunction Here's a super simplified version of what I'm trying to do: --- http://www.macromedia.com/2003/mxml"; xmlns="*"> function hello_you(you:String) { alert("hello " + you); } 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] Tips on Custom component
With this email attached an swf. This swf was created by our designer. When u click the second item a pane opens. Its my job to make this into a component. However this component must be V2 compatable and should be usable like the accordian pane, via tags. Does any1 have a clue where to find the right information I need to create a V2 component wich has the functionalities the attached representation has. The component has: - an variable amount of children - a variable space between different items - an mxml component (like TabNavigator and Accordion) as child per item The component must be fully stylable and skinnable. Does any1 have some hints on how to start? Your help is greatly appreciated. Greetz Erik 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/ menuExample.swf Description: menuExample.swf
[flexcoders] Tips on Custom component
With this email attached an swf. This swf was created by our designer. When u click the second item a pane opens. Its my job to make this into a component. However this component must be V2 compatable and should be usable like the accordian pane, via tags. Does any1 have a clue where to find the right information I need to create a V2 component wich has the functionalities the attached representation has. The component has: - an variable amount of children - a variable space between different items - an mxml component (like TabNavigator and Accordion) as child per item The component must be fully stylable and skinnable. Does any1 have some hints on how to start? Your help is greatly appreciated. Greetz Erik 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/ menuExample.swf Description: menuExample.swf
RE: [flexcoders] EventDispatcher Question.
Hmm, this set me thinking about what was the original question: 1. Remove an obj as listener for all events its registered for with the dispatching object. A method to do this: obj.removeListener("click", obj1); obj.removeListener("change", obj1); obj.removeListener("something", obj1); like this: obj.removeAllEvents(obj1); 2. Remove all listeners from a dispatching object. A method to do this: obj.removeListener("click", obj1); obj.removeListener("click", obj2); obj.removeListener("click", obj3); obj.removeListener("change", obj1); obj.removeListener("change", obj2); obj.removeListener("something", obj1); like this: obj.removeAllListeners(); Greetz Erik -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alex Uhlmann Sent: dinsdag 26 april 2005 12:46 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] EventDispatcher Question. >Just curious as to whether or not others have built/extended the EventDispatcher solution and what they found worked?. you, could use GDispatcher that offers this functionality. http://www.gskinner.com/blog/archives/2003/09/code_gdispatche.html The version shipped with AnimationPackage works with Flex. Note, GDispatcher API is not compatible to the W3C standard as mx.events.EventDispatcher is. Best, Alex -- Alex Uhlmann Software Engineer iteration::two Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Re: createClassObject
Manish Jethani [EMAIL PROTECTED] said: >Try avoiding the call to getNextHighestDepth() by maintaining >your own counter. I want to know why I should avoid using getNextHighestDepth(). This is partially awnsered by: JesterXL [EMAIL PROTECTED] >getNextHighestDepth is, from experience, overrwritten from the >Flash implementation, and handles depth management in ActionScript >rather than letting the player do it; this allows depth to work in >the framework. The problem is, this slows getNextHighestDepth >considerably since it's now written in ActionScript instead of native C. Is this true? And if its actionscript, my guess is the performance of this mechanism cant be an issue. I imagine the functionality works something like this: var _highestDepth_num = 0; function attachMovie(linkageID_str, newName_str, depth_num) { _highestDepth_num = _highestDepth_num < depth_num ? depth_num : _highestDepth_num; originalAttachMovie(linkageID_str, newName_str, depth_num); }; function createEmptyMovieClip(newName_str, depth_num) { _highestDepth_num = _highestDepth_num < depth_num ? depth_num : _highestDepth_num; originalCreateEmptyMovieClip(newName_str, depth_num); }; //etc, u get the point function getNextHighestDepth() { return (_highestDepth_num + 1) }; How can this be a performance hit? Greetz Erik -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of JesterXL Sent: maandag 25 april 2005 15:48 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: createClassObject If you are just controlling visibility, use setVisible(false/true) instead of creating the objects each time; that should be significantly more efficient. Secondly, yeah, z order is a good concept. Basically, each element in Flash is drawn on a depth. Higher depths are where things are drawn closer to you, and lower depths are where things are drawn farther away, and below those are higher depths. Only 1 element can occupy a given depth at any given time, and if something is created in an occupied depth, it destroys whatever object is there, and then creates itself. getNextHighestDepth is, from experience, overrwritten from the Flash implementation, and handles depth management in ActionScript rather than letting the player do it; this allows depth to work in the framework. The problem is, this slows getNextHighestDepth considerably since it's now written in ActionScript instead of native C. Therefore, set a private var depth:Number up top in your class, set it to -1 in your init function, and then do: createClassObject(Control, "name", ++depth); That way, it'll auto-increment. ...you don't have to do with any of this if you extend mx.core.View instead of UIComponent for your cell renderers. - Original Message - From: "viraf_bankwalla" <[EMAIL PROTECTED]> To: Sent: Monday, April 25, 2005 9:37 AM Subject: [flexcoders] Re: createClassObject I have two images and three labels in each cell. Their visibility is controlled by the data and user display criteria - thus I specify a name for them. I noticed that if I did not specify getNextHighestDepth() it appeared that each time createClassObject was called the prior object was destroyed and the new one created. Could someone please provide me an explanation on what getNextHighestDepth does. My understanding was that this was the z- order, thus could I just set all the children to be at the same z- order ? If not, is a simple one up counter sufficent ? Thanks. --- In flexcoders@yahoogroups.com, Gordon Smith <[EMAIL PROTECTED]> wrote: > If only a single Image named "imgE" is being created per cell, then you > don't have to specify a unique name -- only children of a single parent have > to have unique names. However, there is generally no good reason to ever > specify a name in createClassObject. If you pass undefined for the second > argument, Flex will generate a unique name for you. > > - Gordon > > -Original Message- > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] > Sent: Sunday, April 24, 2005 11:26 AM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Re: createClassObject > > > > > --- In flexcoders@yahoogroups.com, "viraf_bankwalla" > <[EMAIL PROTECTED]> wrote: > > > imgE = createClassObject(Image,"imgE", getNextHighestDepth()); > > Try avoiding the call to getNextHighestDepth() by maintaining your own > counter. > > Also, I think the second argument to createClassObject() needs to be > unique. > > > > > > > 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/
RE: [flexcoders] Flash Player/Flex Feature
As far as I know this 'bug' can only come up if u have more than 32 k of code in a certain class. So in each class u can have 32k of code, this is a lot of code per class. If u have more code in your class, there is something wrong, this will result in having pain in your finger from scrolling and wont help with the development speed as u will be searching for code most of the time. I worked with flash for quite some time and never encountered this error. I would love to see an example where u receive this error, im curious as to how such a class would look like. Greetz Erik -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Michael Laudrup Sent: maandag 25 april 2005 21:13 To: flexcoders@yahoogroups.com Subject: [flexcoders] Flash Player/Flex Feature The 32k error is really annoying and I consider it more a Flash Player/Flex bug than a feature In fact it's quite difficult for me to understand how the garbage collector works and how the mxml pages are translated in AS2 classes Is there any documentation in regards with those issues Jumping to another topic, I've looked over the Flex System requirements and look what I found... Intel Pentium processor or higher 256 MB RAM (512 MB recommended) 400 MB available disk space Microsoft Windows 2000 Server, XP Professional, or 2003 Server Isn't this a little bit misleading? I have 1 Gb RAM and after deploy/re-deploy the application 2-3 times, JRun almost crawls on his knees and finally get the blessing... "Out of Memory"... Thanks, Michael 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] EventDispatcher Question.
Well the problem here is that u don't know what kind of event are registered and dispatched. Lets say u have a custom class wich has a method with the name 'doAllThingsPossible' and also has a method with the name 'click'. This class is registered as an event listener for the event 'click', how can u know (dynamicly) to what events a certain object is listening? In order to do 'removeAllEvents(obj)' the dispatcher needs to keep record of all objects that registered to an event. To do that u would need to modify the 'addEventListener' function, and add a property to the dispatcher class so u are able to save the objects that are registered as listener, that would be something like this: var _listeners_obj = new Object(); function addEventListener(event_str, obj) { var _listeners_array = _listeners_obj[event_str]; if (!_listeners_array.length) { _listeners_array = _listeners_obj[event_str] = new Array(); }; _listeners_array.push(obj); return originalAddEventListener(event_str, obj); }; Now u have an object wich has a key for each event that is listened to, containing an array with all objects that are listening to that event. In order to remove all events on a certain object u need to do a loop on all events, like this" function removeAllEvents(obj) { for (var i in _listeners_obj) { var currentEvent_array = _listeners_obj[i]; var l = currentEvent_array.length; while(l--) { if (currentEvent_array[l] == obj) { removeEventListener(i, obj); }; }; }; }; As u can see this is not very effective. The more listeners u have to a certain object, the more overhead u will have. I recommend u keep track of the registered events inside your listening object, or perhaps even write a class that will function as a default listener. This class would then contain a function removeAllEvents wich will unregister the events where needed. Greetz Erik -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Scott Barnes Sent: dinsdag 26 april 2005 8:33 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] EventDispatcher Question. Sorry, I can locate the listener and can individually unsubscribe events for that listener, was kind of looking for a forloop style situation where it can simply iterate over all events a particular object has in its subscription and simply remove them. 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] string to xml -> datagrid
Then it would be var xml:XML = new XML(); xml.ignoreWhite = true; xml.parseXML(str); Greetz Erik -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt Sent: donderdag 21 april 2005 18:34 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] string to xml -> datagrid It is "better" to use the createXML() utility function because it tells the parser to ignore whitespace. If you have carriage returns in your xml string and do not tell the compiler to ignore whitespace, the xml will not work well with the tree control. Tracy -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Erik Westra Sent: Wednesday, April 20, 2005 7:51 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] string to xml -> datagrid To create XML from a string u can just do this: var xml:XML = new XML(str); Then u can use an xmlToObject coverter to convert the xml object to an object wich consists of arrays and objects. I believe there is a macromedia utility available for this. Greetz Erik -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of core_elements Sent: woensdag 20 april 2005 13:41 To: flexcoders@yahoogroups.com Subject: [flexcoders] string to xml -> datagrid Hi I don't know if this is possible. I have an soap-function that returns a string. The content of the string: 12 Of course this is just a string. Is it possible to convert the string to an xml object and then bind that object to a datagrid? I did found this : var xmlStr:String; xmlStr=ticketsService.getTickets.result; var xml:XML; xml=mx.utils.XMLUtil.createXML(xmlStr); but I don't know if this is the right way ... 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 Menubar component
I attached two images: menuBarTextBelow.jpg (the text describing the button is underneath the icon) menuBarTextSide.jpg (the text describing the button is next to the icon) I need to make a dynamic component, the text and icons change runtime. When the horizontal size is getting too small to fit all items the texts of the buttons should be places underneath the icons. Another thing is that these icons have a different state. Does any1 have a clue how i create sux a component? Any hints or tips, or small working examples would be greatly appreciated. Greetz Erik 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] Having trouble using createTextField
This could be a depth and naming problem. U should use mc.getNextHighestDepth() to determine the depth. And u also need to make sure the instance name if unique for this component. Other thing is that createTextField doesn't accept an init object. The colow does what u want: http://www.macromedia.com/2003/mxml"; xmlns="*" pageTitle="Dingen" width="690" height="484"> Greetz Erik -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of carmhuntress Sent: donderdag 21 april 2005 7:14 To: flexcoders@yahoogroups.com Subject: [flexcoders] Having trouble using createTextField I am trying to create a textfield when you click inside a canvas at the x and y coordinates and it continues not to work. My understanding is that the canvas extends movieclip so I could add a textfield to it. It would help to possibly get a better understanding of how this all works. Here is my code: http://www.macromedia.com/2003/mxml";> I also cannot define properties when the app starts for instance canvasText.mytext.border can not be defined in the function. I modified this slightly and it work well in flash. Please help. Thanks. 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/
RE: [flexcoders] Re: setting conditional "enabled" with AS
Well in theory u could create a function witch lets u bind properties yourself, the problem here is that if u want to bind properties dynamicly u need to know what properties of what objects are bound. >From the top of my head this will look something like: private function _propChanged(prop_str:String, oldVal, newVal, data_obj) { data_obj.receivingObj[data_obj.receivingProp] = newVal; return newVal; }; public function bindProperty(receivingProp_str, receiving_obj, sendingProp_str, sending_obj) { sending_obj.watch(sendingProp_str, _propChanged, {receivingProp: receivingProp_str, receivingObj: receiving_obj}); }; Greetz Erik -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Joe Berkovitz Sent: woensdag 20 april 2005 16:06 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: setting conditional "enabled" with AS What Darron says is all true: watch() is more general despite its limitations, which one can work around. One must pick one's poison in this case... Anyway, I think this discussion provides one more data point for MM suggesting that AS access to the data binding facility could be helpful. Darron J. Schall wrote: > Joe Berkovitz wrote: >>I don't recommend using watch() as Darron suggested, because you can >>only have one user of watch() per watched object property. It's better >>to do what MXML bindings do and listen for change events. > > The problem is you can only get change events in certain situations. If > I have a variable x and I want to know when it changes, I can't say > x.addEventListener("modelChanged") because it doesn't exist in any data > provider. Not all changes to variables generate change events, which is > why we use watch. Watch is the way to catch changes to any variable. 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/
RE: [flexcoders] string to xml -> datagrid
To create XML from a string u can just do this: var xml:XML = new XML(str); Then u can use an xmlToObject coverter to convert the xml object to an object wich consists of arrays and objects. I believe there is a macromedia utility available for this. Greetz Erik -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of core_elements Sent: woensdag 20 april 2005 13:41 To: flexcoders@yahoogroups.com Subject: [flexcoders] string to xml -> datagrid Hi I don't know if this is possible. I have an soap-function that returns a string. The content of the string: 12 Of course this is just a string. Is it possible to convert the string to an xml object and then bind that object to a datagrid? I did found this : var xmlStr:String; xmlStr=ticketsService.getTickets.result; var xml:XML; xml=mx.utils.XMLUtil.createXML(xmlStr); but I don't know if this is the right way ... 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/
RE: [flexcoders] How to populate tree control from web service re sult (server side java objects)
I think that the problem u describe comes from the fast that (as far as i know) a tree can have a dataProvider wich is a XML object. The tree dataprovider is used to provider an API to modify the xml more easy. In order to use a combination of arrays and objects to fill your tree u need to use a function wich uses the dataProvider API for u. From the top of my head i wrote the code below. Im not sure if its bugfree, but u should get the idea. Maybe macromedia has a better solution than the one i wrote below. Its also possible to comvert your object to xml 1th but in that case the tree component will have to iterate over data structure again to do what the function below does. I hope this helps :) public function fillTree(node, dataProvider_array, folderKey_str, nodeKey_str, folderName_str, nodeName_str) { for (var i = 0; i < dataProvider_array.length; i++) { var currentItem_obj:Object = dataProvider_array[i]; var nodeName_str:String = currentItem_obj[nodeName_str]; if (nodeName_str) { //its a node, not a folder node.addTreeNode(nodeName_str, currentItem_obj); } else { //its a folder nodeName_str = currentItem_obj[folderName_str]; var newNode:XMLNode = node.addTreeNode(nodeName_str, currentItem_obj); fillTree(newNode, currentItem_obj[folderKey_str], folderKey_str, nodeKey_str, folderName_str, nodeName_str); fillTree(newNode, currentItem_obj[nodeKey_str], folderKey_str, nodeKey_str, folderName_str, nodeName_str); }; }; }; fillTree(myTree.dataProvider, myInfo_array, "childFolders", "systemFiles", "folderName", "fileName"); Greetz Erik From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Shlomi CohenSent: woensdag 20 april 2005 10:49To: 'flexcoders@yahoogroups.com'Subject: RE: [flexcoders] How to populate tree control from web service re sult (server side java objects) Hi Manish and Matt Its not simple as you describe . even the documentation does have a bug , i've tried the code from below and the output is [object],[object]. http://livedocs.macromedia.com/flex/15/flex_docs_en/0226.htm let me remind you that my objects are jave objects that come from the server in SOAP and i have no idea what flex does with them , and believe me i tried and read all your documentation . Manish your example is good for Tree that was built on XML and not from objects , cause in my case you would have get [object Object],1,[object Object] my Java objects are very simple they like this class SystemFile { String fileName ; String fileGuid ; } class SystemFolder{ String folderName; SystemFolder[] childFolders; SystemFile[] systemFiles; } trying to get to item.folderName didn't work also not item.fileName. i didn't find any way to access my original object members besides backing object , what is wrong here ? thanks Shlomi From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matt ChotinSent: Wednesday, April 20, 2005 00:54To: flexcoders@yahoogroups.comSubject: RE: [flexcoders] How to populate tree control from web service re sult (server side java objects) Also check out the TreeDataProvider API. You should always use the methods specified in that API when working with either XML or Objects in a Tree or Menu. That way you don't have to worry about backingObject which is an implementation detail purposely not documented. Matt From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] Sent: Tuesday, April 19, 2005 1:10 PMTo: flexcoders@yahoogroups.comSubject: Re: [flexcoders] How to populate tree control from web service re sult (server side java objects) On 4/19/05, Shlomi Cohen <[EMAIL PROTECTED]> wrote:> if i have a function that get a node like this > > function myLabelFunc(item):String {> > var type=typeof item; // always return {Object} > return item._???> }> > how do i know which properties the variable 'item' has ? If you're writing a labelFunction for a tree, you're expected to knowthe format of the item so you can construct the label string out ofthe data within the item. For example, I have an item with properties'name' and 'phone' (number), and I want the label to be a combinationof both: function makeLabel(item):String { return item.name + ": " + item.phone; }makeLabel() is called for every node in the tree.-- [EMAIL PROTECTED]http://manish.revise.org/__This email has been scanned by the MessageLabs Email Security System.For more information please visit http://www.messagelabs.com/email _
RE: [flexcoders] Re: NuSoap / Flex error
The problem is fixed and for the acrchives: The sollution is to add the domain to the unnamed whitelist of web-service-proxy in flex-config.xml. Greetz Erik -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of core_elements Sent: dinsdag 19 april 2005 9:43 To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: NuSoap / Flex error hmm when I load this MXML, I first get the error Could not load the WSDL 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] Simple arithmetic - resolved
> Question - shouldn't this have thrown an error, since I was casting the > non-number variable as a number in the parameter statement, as > varX:Number? Flash is not checking types runtime, only compile time. And compile time everything is programmed right >trace(!isNaN(NaN)); NaN is kind of its own type and is usually the result of an equation with a string or some other non-numeric type. Greetz Erik -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of JesterXL Sent: maandag 18 april 2005 21:53 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Simple arithmetic - resolved A number is not a number? wtf, lol! trace(!isNaN(NaN)); // false ...crud, that means it is... but how can a number that's not a number be a number? I'm confused now... 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] MXMXL Editor
Well what I now did is creating a project in the folder where I have my central classes. And when I start a new project I add that project to the current projects workspace. Works like a charm :) Greetz Erik -Original Message- From: Abdul Qabiz [mailto:[EMAIL PROTECTED] Sent: donderdag 14 april 2005 15:32 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] MXMXL Editor You can probably check at Primalscript support forums, they might be knowing something... -abdul 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] any ideas about flex client side caching?
>I'm a little paranoid about asking users wierd questions Then make the question understandable :) U can regulate the size that will be asked for at the user. So before u put data in the SO, u can put up a message with something like: when u press this button a screen will appear wich ask u to grant this application some harddisk space. This space is needed for this application to work propertly. Then when the button is pressed u do some code like this: myLocalSharedObject.flush([minimumDiskSpace:Number]) : Boolean Greetz Erik From: Matthew Shirey [mailto:[EMAIL PROTECTED] Sent: donderdag 14 april 2005 17:30To: flexcoders@yahoogroups.comSubject: Re: [flexcoders] any ideas about flex client side caching? Just be careful about how much you store in the SharedObject. By default the client is set to accept up to 100k A 'Huge' dataset might exceed that. If you exceed that about I think the client then asks the user if more space can be allocated. I've just started using a SharedObject; I'm a little paranoid about asking users wierd questions, so I'm trying to keep it fairly limited.-- Matthew 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 the Yahoo! Terms of Service.
RE: [flexcoders] MXMXL Editor
Well I want to be able to use 'primalsence' (codehinting) that primalscript offers on the classes I use on different projects. Greetz Erik -Original Message- From: Abdul Qabiz [mailto:[EMAIL PROTECTED] Sent: donderdag 14 april 2005 15:02 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] MXMXL Editor Why would you want to set classpath in PrimalScript? Are you compiling code from Primal script using JSFL? In that case, your classpath needs to be set for individual .fla file or globally in your Flash IDE. -abdul -Original Message----- From: Erik Westra [mailto:[EMAIL PROTECTED] Sent: Thursday, April 14, 2005 6:17 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] MXMXL Editor A question about primascript. I have all my classes in a central location. In Flash MX 2004 I set a classpath. How can I set a classPath with primalscript? Greetz Erik -Original Message- From: Rich Tretola [mailto:[EMAIL PROTECTED] Sent: donderdag 14 april 2005 14:24 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] MXMXL Editor Primalscript, love it. Rich 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/
RE: [flexcoders] MXMXL Editor
A question about primascript. I have all my classes in a central location. In Flash MX 2004 I set a classpath. How can I set a classPath with primalscript? Greetz Erik -Original Message- From: Rich Tretola [mailto:[EMAIL PROTECTED] Sent: donderdag 14 april 2005 14:24 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] MXMXL Editor Primalscript, love it. Rich 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] SharedObject across Applications
It is also possible to share SharedObjects between applications running on a different domain, check this link for more information: http://www.thoughtsabout.net/blog/archives/03.html Greetz Erik From: peter blazejewicz [mailto:[EMAIL PROTECTED] Sent: donderdag 14 april 2005 0:51To: flexcoders@yahoogroups.comSubject: Re: [flexcoders] SharedObject across Applications Hello everyone,I'm not sure if that will work with Flex application but to avoid such collision names in standalone desktop application I've used names following package pattern:eg:var soName:String = "com.company.cookieName"; var so:SharedObject = SharedObject.getLocal(soName, "/");there is a subset of characters which are not allowed in SO name but dots are allowed:)hth,regards,PeterPeter BlazejewiczJesterXL wrote: As long as your apps are both deployed on "cow.com", then just add a "/" to the 2nd parameter of your get, and it'll put the .sol at the top level of the domain. Currently, it's scoped to a folder name same as your app path. The 2nd parameter creates it's own folderpath/namespace. Maknig a "/" puts it at the top. however, watch for out collisions of data since your both sharing. You don't have to worry about file handles or anything, but you know why checkin/checkout systems were invented in the first place... 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 the Yahoo! Terms of Service.
RE: [flexcoders] ActionScript Components
Title: Message Nope, same error. Im sure its a namespace problem. And yes, u can use "" (nothing) as a namespace. Usually i use the whole package path as namespace: <com.package:panel xmlns:mx="http://www.macromedia.com/2003/mxml" xmlns:com.package="com.package.*">com.package:panel> Greetz Erik From: JesterXL [mailto:[EMAIL PROTECTED] Sent: donderdag 7 april 2005 17:16To: flexcoders@yahoogroups.comSubject: Re: [flexcoders] ActionScript Components That doesn't look like the correct way to do a namespace; I'm still learning the freedom of syntax, so bare with me. It appears your colliding your namespace with the mx one. Instead, make your own; where you have xmlns="erik.extend" I changed it to xmlns:ew="erik.extend". Try that. http://www.macromedia.com/2003/mxml" xmlns:ew="erik.extend.*"> - Original Message - From: Erik Westra To: flexcoders@yahoogroups.com Sent: Thursday, April 07, 2005 11:03 AM Subject: RE: [flexcoders] ActionScript Components Well, flex is whining about subclassing mxml components wich have children with other mxml components containing children: The component mx.controls.Button may not be used as a child of erik.extend.panel because the erik.extend.panel is a container with internal children. [panel.mxml] http://www.macromedia.com/2003/mxml"> [panelSub.mxml] http://www.macromedia.com/2003/mxml" xmlns="erik.extend.*"> Greetz Erik From: JesterXL [mailto:[EMAIL PROTECTED] Sent: donderdag 7 april 2005 16:48To: flexcoders@yahoogroups.comSubject: Re: [flexcoders] ActionScript Components Can you be more specific? I don't have any problems sub-classes my MXML components. - Original Message - From: Erik Westra To: flexcoders@yahoogroups.com Sent: Thursday, April 07, 2005 5:42 AM Subject: RE: [flexcoders] ActionScript Components A good reason to make pure actionscript components is that they can be subclassed. When u create an mxml component, u cant extends a custom mxml component wich has children. Greetz Erik From: Gordon Smith [mailto:[EMAIL PROTECTED] Sent: donderdag 7 april 2005 9:04To: 'flexcoders@yahoogroups.com'Subject: RE: [flexcoders] ActionScript Components It is essentially a matter of preference. There are no performance differences that I know of. I generally recommend creating components in MXML because it makes several things easier, such as creating internal subcomponents, laying them out, and assigning event handlers to them. For example, if I was creating a LoginPanel, I would certainly do it in MXML. Can you explain what is "a bit messy" about MXML components? - Gordon 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 the Yahoo! Terms of Service.
RE: [flexcoders] flex and javascript
The problem here is that file uploading is only possible with a html formfield of the type file. That is the reason that javascript communication is so importend. Via javascript u can create a 'file' formfield and press the browse button, this is usually the way ppl fake file uploads in flash. The problem is, that this does not work in all browsers, not all browsers make it possible to press the 'browse' button. So the only real solution could come from new functionality in the flash player. Greetz Erik -Original Message- From: Duccio Del Ministro [mailto:[EMAIL PROTECTED] Sent: donderdag 7 april 2005 16:16 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] flex and javascript I know there have been many requests regarding flex file uploader. I hope to see soon this feature and if it's not a problem, i have some question about what you have in mind: will this new feature support multiple file upload? will it have support for image preview? When are you planning to release it? Sorry for all that questions but file uploading is really important for the application i'm working on. Thanks Duccio 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] ActionScript Components
Title: Message Well, flex is whining about subclassing mxml components wich have children with other mxml components containing children: The component mx.controls.Button may not be used as a child of erik.extend.panel because the erik.extend.panel is a container with internal children. [panel.mxml] http://www.macromedia.com/2003/mxml"> [panelSub.mxml] http://www.macromedia.com/2003/mxml" xmlns="erik.extend.*"> Greetz Erik From: JesterXL [mailto:[EMAIL PROTECTED] Sent: donderdag 7 april 2005 16:48To: flexcoders@yahoogroups.comSubject: Re: [flexcoders] ActionScript Components Can you be more specific? I don't have any problems sub-classes my MXML components. - Original Message - From: Erik Westra To: flexcoders@yahoogroups.com Sent: Thursday, April 07, 2005 5:42 AM Subject: RE: [flexcoders] ActionScript Components A good reason to make pure actionscript components is that they can be subclassed. When u create an mxml component, u cant extends a custom mxml component wich has children. Greetz Erik From: Gordon Smith [mailto:[EMAIL PROTECTED] Sent: donderdag 7 april 2005 9:04To: 'flexcoders@yahoogroups.com'Subject: RE: [flexcoders] ActionScript Components It is essentially a matter of preference. There are no performance differences that I know of. I generally recommend creating components in MXML because it makes several things easier, such as creating internal subcomponents, laying them out, and assigning event handlers to them. For example, if I was creating a LoginPanel, I would certainly do it in MXML. Can you explain what is "a bit messy" about MXML components? - Gordon 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 the Yahoo! Terms of Service.
RE: [flexcoders] Associative Arrays / "Hashes"
So if I understand it correctly u have a series of events. If u would convert this xml to and object u would have something like this: event[0].month = "04"; event[0].day = "14"; event[0].short = "heckey"; event[0].description = "bla"; Now u want to get access to all events on a certain day in a certain month like this myObject["04"]["14"][0].short = "hockey"; myObject["04"]["14"][0].description = "bla"; In order to be able to do that u need to convert your initial data, u can do that like this: /* input: events_array [0] month day short description [1] ... output: object [month_str] [day_str] [0] short description [1] ... [day_str] ... [month_str] ... */ public function convertData(events_array:Array):Object { var obj:Object = new Object(); var length_num:Number = events_array.length; while (length_num--) { var currentEvent_obj:Object = events_array[length_num]; var month_str:String = currentEvent_obj.month; var day_str:String = currentEvent_obj.day; var month_obj:Object = obj[month_str]; if (!month_obj) { month_obj = myObject_obj[month_str] = new Object(); }; var day_array:Array = month_obj[day_str]; if (!day_array) { day_array = month_obj[day_str] = new Array(); }; day_array.push({short: currentEvent_obj.short, description: currentEvent_obj.description}); }; return obj; }; Greetz Erik -Original Message- From: heybluez [mailto:[EMAIL PROTECTED] Sent: donderdag 7 april 2005 14:52 To: flexcoders@yahoogroups.com Subject: [flexcoders] Associative Arrays / "Hashes" I am trying to see if I can get an array to be more like a hash... what i mean is say I have the following: 04 14 hockey blah 04 14 reading blah 04 14 baseball blah I want to loop through that and produce something like this... myObject[][]=Array(of Objects for that day); so I could just do a myObject[][] and get back an array of objects of those events. First, does this make sense and two how would I do this in AS? Thanks, Michael 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/
RE: [flexcoders] ActionScript Components
Title: Message A good reason to make pure actionscript components is that they can be subclassed. When u create an mxml component, u cant extends a custom mxml component wich has children. Greetz Erik From: Gordon Smith [mailto:[EMAIL PROTECTED] Sent: donderdag 7 april 2005 9:04To: 'flexcoders@yahoogroups.com'Subject: RE: [flexcoders] ActionScript Components It is essentially a matter of preference. There are no performance differences that I know of. I generally recommend creating components in MXML because it makes several things easier, such as creating internal subcomponents, laying them out, and assigning event handlers to them. For example, if I was creating a LoginPanel, I would certainly do it in MXML. Can you explain what is "a bit messy" about MXML components? - Gordon 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 the Yahoo! Terms of Service.
RE: [flexcoders] Re: createChild dynamically via DB arguments..
Im sure we can lay out allot of possibilities, but that's not what u want. There are two possible reasons for the fact that u would like to instantiate a class runtime (via createChild): 1. U want your main application to be as light as possible. 2. U don't know (at compile time) which class will represent the child. My guess is that number 2 is the one u are after. To achieve that goal take the following steps. A. Place the following code inside your initialize function in your main application: Components; B. Create (in the same dir as the main application) a 'Components.as' file, this file contains the following code: class Components { public function Components() { //put all possible children inhere com.myProject.MyClass; }; }; The above two steps make sure the possible childs are included in the flex application (they are compiled in the resulting swf). C. Create a function in your application that looks like this: public function getClassRef(classPath_str:String):Object { var classRef_obj:Object = _global; var class_array:Array = classPath_str.split("."); for (var i = 0; i < class_array.length; i++) { classRef_obj = classRef_obj[class_array[i]]; }; return classRef_obj; }; D. In the initialize function u can create a child like this: baseContainer.createChild(getClassRef("com.myProject.MyClass")); I hope this helps :) Greetz Erik -Original Message- From: Scott Barnes [mailto:[EMAIL PROTECTED] Sent: woensdag 6 april 2005 13:55 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: createChild dynamically via DB arguments.. Heres a test for yas: Inside a new FLEX app directory (ie start fresh), create a dir, then inside that dir, create another and another (go as deep as ya want), then finally create a mxml file. Then create an simple class file, and instantiate it via initialize() on mx.Application, then inside this class, do the same as you did (make as many nested ones as you want if need be) then at some point, simply do this mx.core.Application.application.baseContainer.createChild(blah[arg1][arg 2] etc..) Then explain if you can / want to, how the hell that works. As I must be dumber then originally thought as i can't seem to connect the dots on how the hell that works? hell i'm struggling to even explain it (also i put another sequence of the above inside the unknown-loaded-at-runtime-class and they came up aswell heh). imho its as if at compile time, the entire app is packaged together, and seperated into whats FLASH code and whats other, if other do i embed it inside the swf and all that... i''ll pop the hood a later day (if i can figure it out) but *shrug* my level of FLEX expertises ends here hehehe. _level0["com"] or _global["com"] etc won't work. As well as findClass(); On a side note/question. I am also unsure if (hell i have no idea to test) whether or not if you have assets embedded inside the mxml files in question (even declared as RSL) will they request a new asset per instantiation... Any input / help is most welcomed heh. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Re: createChild dynamically via DB arguments..
The framework we now use in flex was different than the one we used with Flash on one crucial point. With the Flash version every class (or actually module, a set of classes) was loaded in at runtime and had its own swf, wich contained only one line of code: package.ClassName; When u needed a class, the swf was loaded in and as soon as it finished loading the class would be available. The problem with flex is that u also use mxml classes, wich is something the Flash Compiler cannot compile. U might want to investigate this approach using the flex compiler and create swf's of all classes. It wouldn't be to hard to write a piece of software that loops recursively through a given directory compiling classes. A problem here might be classes referencing another class, resulting in an swf with more than just one class. Hope this helps your thinking.. Greetz Erik -Original Message- From: Dirk Eismann [mailto:[EMAIL PROTECTED] Sent: woensdag 6 april 2005 12:06 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: createChild dynamically via DB arguments.. sorry, should read in general: the compiler includes a class into the resulting SWF if there's at least *one* reference to it. instead of > in general: the compiler includes all classes into the resulting SWF > if there's at least *one* reference to it. > There's no class loader as in Java. Dirk. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Re: createChild dynamically via DB arguments..
Agreed, We use a similair system to create instances from strings at runtime. In our main class we have this line of code: Components; The class components look like this: class Components { public function Components() { package.Component1; package.Component2; }; }; This way, we are able to instantiate the classes inside Components.as at runtime via a string. Eventually Components.as will be generated by ColdFusion before the Flex application is loaded. Greetz Erik -Original Message- From: Dirk Eismann [mailto:[EMAIL PROTECTED] Sent: woensdag 6 april 2005 11:04 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: createChild dynamically via DB arguments.. Hi Abdul, > I think, mx.utils.ClassUtil.findClass("") would only work when class > definition is present in app... yeah, that's right. I think Scott's code snippet implies that he has the classes compiled into the SWF file - otherwise it wouldn't work for him :) > > say you have a situation like this > > > > var x = com["str1"]["str2"]["str3"]; > > > > container.createChild(x); > > > > that works ok. Dirk. 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/
RE: [flexcoders] Silly question
This subject has been discussed many times (either here or on FlashCoders). The main problem lies in the fact that the class must be compiled into the swf. There are several ways to do this. One is to have a swf for each class with only one line of code on the root, to make sure the class is compiled: myPackage.myClass; Then u can load the swf into your main movie and have the class instantiated. Another option is to have a list with possible classes in a class file: class Components { public function Components() { myPackage.MyClass; myPackage.MyOtherClass; }; }; To call the class dynamicly u can use code like this: function getInstance(class_str:String):Object { var classRef:Object = _global; var classPath_array:Array = class_str.split("."); for (var i = 0; i < classPath_array.length; i++) { classRef = classRef[classPath_array]; }; return new classRef(); }; var instance = getInstance("myPackage.MyClass"); Greetz Erik -Original Message- From: Robert Stuttaford [mailto:[EMAIL PROTECTED] Sent: vrijdag 25 maart 2005 12:53 To: flexcoders@yahoogroups.com Subject: [flexcoders] Silly question Probably not specifically Flex related. Can I do what the following is accomplishing, using Actionscript 2, with out statically mapping it out? switch ( className ) { // base case "ClassA": return new ClassA(); break; case "ClassB": return new ClassB(); break; } I'd love to be able to var x = new [ className ](); But obviously the compiler doesn't like that. I'm looking to have classes instantiated based on nodenames from XML, but without the convertor actually having any knowledge of what classes need to be instantiated. Any ideas? :) Robert 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/
RE: [flexcoders] Image caching
Well, my guess is that this has nothing to do with cache, but the fact that the flex components delete and create the movieclips again and then load the image. If it is cached or not, it takes some time before the image can appear. I don't know exactly how these components are constructed or if there are settings for this 'paging' feature... Greetz Erik -Original Message- From: pioplacz [mailto:[EMAIL PROTECTED] Sent: vrijdag 25 maart 2005 11:55 To: flexcoders@yahoogroups.com Subject: [flexcoders] Image caching Have a question i made a movie library based on the exampel flex store... and i have aroun 150 images loading everytime i want to found a movie... is it possible to make the images stor in cache to make a faster browsing. it loads fast cause it's local but i can only feat aroun 20 images in a box and have to scroll to see the rest and the it have to loads images... and there a no images in about 2 seconds. that's why i want to make them cache is it possible? 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] Custom Control Components
I feel u there, I myself want to create components that are fully functional, skinnable and fit right into the V2 architecture. I havent been able to put my head around it yet. I think i found the the same PDF u are talking about (Developing Flex Components and Themes in Flash Authoring) wich i hope gives enough detail. A problem in this matter is that the flow of components (UIObject and UIComponent with their helper classes) is very complex and not easy to understand. And besides that, i couldnt find a document that describes the flow very good (it may be in the PDF though). I understand that this is a complex problem for macromedia as well, as they are familiar with this architecture. Maybe we could provide them with a list of questions regarding the building of components. Questions like: - How can i make a custom component skinnable? -- And how does the skinning of components work internally? - Say i want to build a 'wizard' (next, previous) component, how would u do it? - I want to make a component with buttons from wich the states are dynamicly loaded images combined with a label. The placement of the label is dependend of the available size of the component. In wich 'hook' would i place the check function. And how would i build a button component with different states? As u can see these are more practical based questions of problems i ran into. Im guessing that more of us developers are having these kind of questions. Greetz Erik From: Simon Fifield [mailto:[EMAIL PROTECTED] Sent: donderdag 24 maart 2005 14:59To: [EMAIL PROTECTED] ComSubject: [flexcoders] Custom Control Components Is it just me, or are custom control (actionscript) components really really difficult to get your head around? I am struggling with just about every aspect of creating custom controls, from deciding what to extend, through sizing/layout, right down to event handling. I have created some custom controls but they have never turned out to be what I really wanted. There is a real lack of documentation about this subject. I've read the Flex Components PDF, and I've read the relevant parts of Developing Flex Apps, but none of these really covers creating components in actionscript from scratch through to more advanced components at reasonable steps. Some of the more basic examples that are given require you to draw a circle in Flash first - I don't want to (and I know I shouldn't) have to use Flash to create a basic custom component. I would like a more in-depth discussion of what the various sizes are - _measuredXXX, preferredXXX, defaultXXX properties etc A clearer explanation of the instantiation and display order/process. Perhaps a breakdown of some existing components that have both been built from scratch and has extended other components. Anyone else finding this topic hard going like me? Kind Regards, Simon Fifield Yahoo! Groups Sponsor ADVERTISEMENT 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 the Yahoo! Terms of Service.
RE: [flexcoders] Flex book chapter 20
> var sviluppo:CTabellaSviluppoVO = (CTabellaSviluppoVO) result; In this line u mixed java syntax with AS2. To cast a variable to a certain type format your code like this: var sviluppo:CTabellaSviluppoVO = CTabellaSviluppoVO(result); This works with all custom types and with most build in Flash type. There are however some build in classes that have an other effect: var sviluppo:Array = Array(result); The above line of code will return an array with one element wich contains result while u would think that it would just cast result to the array type. This is because in older versions of Flash the global function Array was used to create an array. Greetz Erik -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: donderdag 24 maart 2005 11:32 To: Flex Coders Subject: [flexcoders] Flex book chapter 20 Hi, i'm trying to use the examples in chapter 20 of flex book, all work fine, but in my delegate class i have put this public function onResult( result ) : Void { var sviluppo:CTabellaSviluppoVO = (CTabellaSviluppoVO) result; mx.core.Application.application.vosviluppo = sviluppo; } i have also debug and flex pass this function ok. but if i use in my mxml file this import vo.as400.*; import com.pdm.control.*; public var controller:PdmController; public var vosviluppo:CTabellaSviluppoVO; function Test(){ controller=new PdmController(); EventBroadcaster.getInstance().broadcastEvent("fetchSviluppo",vopf[0]); } the dataGrid don't display nothing but in the mx.core.Application.application.vosviluppo there are datas. Can you help me please. Devis Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Re: internal representation of an array
1. for..in loops walk through the object or array with a stack based order, so u can never know for sure if it's the exact reverse order unless u added the elements to the array yourself one after another and didn't modify the array. 2. Why would u populate your array like this? If u want only to have these elements u should create an object with those keys. U will lose the array functionality, but I doubt those functions are usefull with an array like this. Greetz Erik -Original Message- From: Eric Raymond [mailto:[EMAIL PROTECTED] Sent: donderdag 24 maart 2005 1:59 To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: internal representation of an array --- In flexcoders@yahoogroups.com, Gordon Smith <[EMAIL PROTECTED]> wrote: > The Flash player implements both Array and Object as hashtables. In Two somewhat related questions: 1) How does the implementation work with "for in" loops? Is there any natural order in which the propery names are returned? Does this vary from an Array to an Object? 2) Is there an "efficient" way to walk a sparsely populated array in order? That is if a[2], a[100] and a[2000] are the only elements of an array, is there a way to visit the three nodes in order without testing all the "empty" elements between the sparse nodes. for (var i:Number=2; i < a.length; i++) { if (a[i] != undefined) ... } If the array elements were created in order of the increasing index, would that help? That is, walking the sparse elements in creation order would suffice in this case. 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] ScrollPane
Yeah, I just found that out... I feel stupid, hehe... Thnx though. Greetz Erik -Original Message- From: Dirk Eismann [mailto:[EMAIL PROTECTED] Sent: woensdag 23 maart 2005 12:50 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] ScrollPane No need for a ScrollPane as all components that subclass mx.core.View support scrolling (e.g. VBox) Dirk. 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] ScrollPane
I noticed that there is no ScrollPane component in flex. What can i use as alternative? Greetz Erik 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] Hooks in custom components
Thnx, that list is perfect :) Greetz Erik -Original Message- From: Dirk Eismann [mailto:[EMAIL PROTECTED] Sent: woensdag 23 maart 2005 11:41 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Hooks in custom components Try this PDF http://download.macromedia.com/pub/documentation/en/flex/15/flex_compone nts_themes.pdf it's titled "Developing Flex Components and Themes in Flash Authoring" but it also gives a good overview about the instantiation process etc. According to the PDF the following methods are invoked during instantiation: Class constructor constructObject2() init() createChildren() measure() layoutChildren() draw() Dirk. > -Original Message- > From: Erik Westra [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 23, 2005 11:30 AM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Hooks in custom components > > > > Does any1 have a list of wich hooks i can use in custom component and > when they are called? > > With hooks i mean functions like init and createChildren. > > > Greez Erik > > > > 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] Hooks in custom components
Does any1 have a list of wich hooks i can use in custom component and when they are called? With hooks i mean functions like init and createChildren. Greez Erik 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] Flex Remoting has UPPERCASE results
The article is correct, there is however one exception. When u send an object (struct) to flash remoting and then just send it back, all keys are converted to lowercase. I could not find a decent sollution to this problem... Greetz Erik >You can preserve the case from the CFMX side. See my post at: >http://www.darronschall.com/weblog/archives/000124.cfm 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] internal representation of an array
Yeah that was likely to cause the problem. U could create a static class to hold the array. And then reference the array in your separate classes that way they are all working with the same array. Greetz Erik -Original Message- From: Krzysztof Szlapinski [mailto:[EMAIL PROTECTED] Sent: dinsdag 22 maart 2005 0:59 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] internal representation of an array the problem with memory was my programming mistake I included this array in every external component in my application (I have around 50 components) by mistake so I assume that with creation of every component the same array was created but in different memory space am I right? btw is there something like include_once from PHP in Action Script? I wonder if including the same piece od code (function) twice makes the final application with doubled code? krzysiek > > How much ram would be recommended? > > -- Matthew > > > On Mon, 21 Mar 2005 14:54:37 -0800, Gordon Smith > <[EMAIL PROTECTED]> > wrote: >> That's a tiny amount of RAM for a Flex server. >> >> - Gordon 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/
Create ViewStack children via Actionscript
Does any1 know how i do that? Greetz Erik
RE: [flexcoders] Re: Flow Control in Flex
U mean something like this? Greetz Erik -Original Message- From: Steven Webster [mailto:[EMAIL PROTECTED] Sent: vrijdag 18 maart 2005 16:14 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: Flow Control in Flex What can't you achieve with a viewstack and buttons ? Steven zipXAdOXQU0eX.zip Description: wizard.zip
RE: [flexcoders] more on popup
U can find more information about the LocalConnection object in the Flash MX 2004 livedocs on the macromedia website :) Greetz Erik -Original Message- From: Doodi, Hari - BLS CTR [mailto:[EMAIL PROTECTED] Sent: vrijdag 18 maart 2005 15:20 To: 'flexcoders@yahoogroups.com' Subject: RE: [flexcoders] more on popup Hi Abdul, Thank you very much for your consideration. The example you send me was a great example. Where can I find documentation about LocalConnection object? Also if you don't mind can you send me a code about following. In the example you send , mainapp is invoking popupapp and popupapp setting a value in mainapp. What I want to do is - mainapp should pass an argument(image file name) to popupapp so that popupapp opens with passed image. When ever user selects another reportcode (either from comboBox or textinput or selecting a row from datagrid) then that value should be passed to popupapp and refresh the popupapp with the corresponding image file passed as an argument. Popupapp should have a loder to load image or a direct image controller ? Which container has drag enabled attribute?? Thanks! Hari
RE: [flexcoders] Re: Deploying Flex Applications
About point 2. Flash cookies (lets call them Shared Objects (SO)) are saved as a .sol (.SharedObjectLocal) file on the computer. At my comp its in the folowing folder: C:\Documents and Settings\erik\Application Data\Macromedia\Flash Player U could look it up on your own computer to see wich sites deployed a SO. Furthermore, the SO's are saved in a folder with the name of the domain (for example macromedia.com). I don't see why it would not be persistent with SSL or load balancers. Greetz Erik -Original Message- From: viraf_bankwalla [mailto:[EMAIL PROTECTED] Sent: vrijdag 18 maart 2005 14:59 To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Deploying Flex Applications Thanks for the response. 1. How do I verify that caching is enabled ? 2. When I refer to cookies, I am refering to HTTP cookies. My understanding from the read on the cookie subject is that Flex has its own cookies. When going through load balancers / SSL proxies, cookies play an important role, and I wanted to verify that Flex (or Flash I should say) would honor the cookies. - viraf
RE: [flexcoders] Dynamicly calling a webservice
Two more questions: 1. With the approach u see below, where do I get my result? ws.oneMethod(param1, param2); 2. In the classfile definition of Service I see this constructor: public function Service(rootURL:String, wsdlURL:String, logger:mx.services.Log, proxyURL:String, parent:Object, endpointReplacementURI:String, serviceName:String, portName:String, pathAppend:String, useProxy:Boolean); rootURL, what do I fill in here? I guess the rest is not needed... Any idea's? Greetz Erik -Original Message- Hi, actually, you don't have to declare all operations within the WebService tag - you can invoke a method directly on the stub: ws.oneMethod(param1, param2); or ws["anotherMethod"](param1, param2); or even ws.thirdMethod.apply(null, arrayOfArguments); Does this help?
RE: [flexcoders] BIRTHDAY: THE FATHER OF DATA BINDING
Gratz :)
[flexcoders] Create ViewStack children via Actionscript
Does any1 know how i do that? Greetz Erik 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] more on popup
U can find more information about the LocalConnection object in the Flash MX 2004 livedocs on the macromedia website :) Greetz Erik -Original Message- From: Doodi, Hari - BLS CTR [mailto:[EMAIL PROTECTED] Sent: vrijdag 18 maart 2005 15:20 To: 'flexcoders@yahoogroups.com' Subject: RE: [flexcoders] more on popup Hi Abdul, Thank you very much for your consideration. The example you send me was a great example. Where can I find documentation about LocalConnection object? Also if you don't mind can you send me a code about following. In the example you send , mainapp is invoking popupapp and popupapp setting a value in mainapp. What I want to do is - mainapp should pass an argument(image file name) to popupapp so that popupapp opens with passed image. When ever user selects another reportcode (either from comboBox or textinput or selecting a row from datagrid) then that value should be passed to popupapp and refresh the popupapp with the corresponding image file passed as an argument. Popupapp should have a loder to load image or a direct image controller ? Which container has drag enabled attribute?? Thanks! Hari Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Re: Deploying Flex Applications
About point 2. Flash cookies (lets call them Shared Objects (SO)) are saved as a .sol (.SharedObjectLocal) file on the computer. At my comp its in the folowing folder: C:\Documents and Settings\erik\Application Data\Macromedia\Flash Player U could look it up on your own computer to see wich sites deployed a SO. Furthermore, the SO's are saved in a folder with the name of the domain (for example macromedia.com). I don't see why it would not be persistent with SSL or load balancers. Greetz Erik -Original Message- From: viraf_bankwalla [mailto:[EMAIL PROTECTED] Sent: vrijdag 18 maart 2005 14:59 To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Deploying Flex Applications Thanks for the response. 1. How do I verify that caching is enabled ? 2. When I refer to cookies, I am refering to HTTP cookies. My understanding from the read on the cookie subject is that Flex has its own cookies. When going through load balancers / SSL proxies, cookies play an important role, and I wanted to verify that Flex (or Flash I should say) would honor the cookies. - viraf 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] Dynamicly calling a webservice
Two more questions: 1. With the approach u see below, where do I get my result? ws.oneMethod(param1, param2); 2. In the classfile definition of Service I see this constructor: public function Service(rootURL:String, wsdlURL:String, logger:mx.services.Log, proxyURL:String, parent:Object, endpointReplacementURI:String, serviceName:String, portName:String, pathAppend:String, useProxy:Boolean); rootURL, what do I fill in here? I guess the rest is not needed... Any idea's? Greetz Erik -Original Message- Hi, actually, you don't have to declare all operations within the WebService tag - you can invoke a method directly on the stub: ws.oneMethod(param1, param2); or ws["anotherMethod"](param1, param2); or even ws.thirdMethod.apply(null, arrayOfArguments); Does this help? 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] BIRTHDAY: THE FATHER OF DATA BINDING
Gratz :) Yahoo! Groups Sponsor ADVERTISEMENT 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 the Yahoo! Terms of Service.
RE: [flexcoders] Dynamicly calling a webservice
Great :) And is it also possible to instantiate the webservice class with actionscript? I guess it will be something like this right: import mx.servicetags.WebService; var ws = new WebService(); ws.wsdl = "http://api.google.com/GoogleSearch.wsdl";; (is this documented somewhere?) Greetz Erik -Original Message- From: Dirk Eismann [mailto:[EMAIL PROTECTED] Sent: woensdag 16 maart 2005 12:16 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Dynamicly calling a webservice Hi, actually, you don't have to declare all operations within the WebService tag - you can invoke a method directly on the stub: ws.oneMethod(param1, param2); or ws["anotherMethod"](param1, param2); or even ws.thirdMethod.apply(null, arrayOfArguments); Does this help? Dirk. > -Original Message- > From: Erik Westra [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 16, 2005 12:07 PM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Dynamicly calling a webservice > > > > I know u can call a webservice like this: > > http://api.google.com.GoogleSearch.wsdl";> > > > > > > > > > > But i cant find anything on calling an operation from a webservice > dynamicly. I want to have class that registers itself with our > framework and then makes the call when it recieves an event. This way > we are able to debug shizzle. > > But how do i create the request object via actionscript? > Or is there a way to instantiate the webservice class via > actionscript? > > > Greetz Erik > > > > Yahoo! Groups Links > > > > > > > > Yahoo! Groups Links
Dynamicly calling a webservice
I know u can call a webservice like this: http://api.google.com.GoogleSearch.wsdl";> But i cant find anything on calling an operation from a webservice dynamicly. I want to have class that registers itself with our framework and then makes the call when it recieves an event. This way we are able to debug shizzle. But how do i create the request object via actionscript? Or is there a way to instantiate the webservice class via actionscript? Greetz Erik
RE: [flexcoders] Handling Complex Data With Remote Object and Coldfusion CFC
Well u can send all kinds of datatypes through RemoteObject to your CFC: Flash - ColdFusion == Object - Struct Array - Array Boolean - Boolean Number - Number String - String ColdFusion - Flash == Struct - Array (with named keys) Array - Array Boolean - String Number - Number (with CF7 u need to put Val() around the number, else its returned as String) String - String Greetz Erik -Original Message- From: reachmohanraj [mailto:[EMAIL PROTECTED] Sent: dinsdag 15 maart 2005 22:17 To: flexcoders@yahoogroups.com Subject: [flexcoders] Handling Complex Data With Remote Object and Coldfusion CFC Hi, My Environment -- Coldfusion 6.1 Flex 1.5 I would like to pass a complex object (Name,Title,Phone Number) as a parameter to my CFC function. I should be able to process this complex data in CFC and have to insert multiple rows into the table. How can I pass such complex data through my Remote Object call? Can someone post a simple example? Thanks, Mohanraj Yahoo! Groups Links
RE: [flexcoders] How do you convert a string to a number
U could do thefolowing things: var str = "10"; var num = Number(str); or var str = "10"; var num = parseInt(str); //wich also works like this var str = "10abc"; var num = parseInt(str); //10 Greetz Erik From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: woensdag 9 maart 2005 15:58To: flexcoders@yahoogroups.comSubject: [flexcoders] How do you convert a string to a number I am just curious because I am trying to do this in Flex
RE: [flexcoders] call popup with string
To instantiate classes via a string I do the folowing: I have a class Popups.as: class Popups { public function Popups() { package.className1; package.className2; package.className3; }; }; The above class makes sure the classes are included in the swf. Then when I need to access it I can do things like: var classString = "package.className3"; var classRef = _global; var class_array = classString.split("."); for (var i = 0; i < class_array.length; i++) { classRef = classRef[class_array[i]]; }; Then u can use classRef to do whatever u want. Greetz Erik -Original Message- From: Manish Jethani [mailto:[EMAIL PROTECTED] Sent: woensdag 9 maart 2005 13:05 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] call popup with string On Wed, 9 Mar 2005 08:29:44 -0300, Fernando Lobos <[EMAIL PROTECTED]> wrote: > yes, i know but , who can instantiate a class via string from variable? Actually that's what UIObject does internally. It does attachMovie() on the class's symbolName. So, yes, it's possible to create an object from a string identifying the class. Using the class reference seems to be the preferred way in Flex. If all you have is strings, you can create a mapping from the strings to their corresponding class references and look up the mapping every time you need a reference. Maybe there's a better Flash Way (TM) that I'm not aware of (some sibling of Object.registerClass() ). Manish Yahoo! Groups Links
RE: [flexcoders] Theory and Practice: Mixing AS2.0 in MXML
Here's a small example :) Greetz Erik _ From: Robert Brueckmann [mailto:[EMAIL PROTECTED] Sent: donderdag 3 maart 2005 17:14 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Theory and Practice: Mixing AS2.0 in MXML Erik...if at all possible, could you give an example, like attach a sample MXML file and the accompanying AS file you created that extends that MXML file? Just want to get a feel for this...and how you reference things and what have you. Thanks! Robert L. Brueckmann Web Developer Merlin Securities, LLC 595 Madison Avenue New York, NY 10022 p: 212.822.4821 f: 212.822.4820 _ From: Erik Westra [mailto:[EMAIL PROTECTED] Sent: Thursday, March 03, 2005 10:30 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Theory and Practice: Mixing AS2.0 in MXML That was my initial approach too, but eventualy it was easier to track bugs and 'mis-references' since i extended the component i was accessing. Now i get an error when i try to reference a textfield that isnt there. Another thing that is a pro for this kind of approach, is that the mxml file doesnt have to know wich method to call in the helper class. Greetz Erik _ From: Dimitrios Gianninas [mailto:[EMAIL PROTECTED] Sent: donderdag 3 maart 2005 16:22 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Theory and Practice: Mixing AS2.0 in MXML I tend to put such code in the corresponding ViewHelper class, so every view (MXML file) has a corresponding ViewHelper class. See sample below: Inboxes.mxml ... ... ... Jimmy Gianninas Software Developer - Optimal Payments Inc. _ This message contains information from Merlin Securities, LLC, or from one of its affiliates, that may be confidential and privileged. If you are not an intended recipient, please refrain from any disclosure, copying, distribution or use of this information and note that such actions are prohibited. If you have received this transmission in error, please notify the sender immediately by telephone or by replying to this transmission. Merlin Securities, LLC is a registered broker-dealer. Services offered through Merlin Securities, LLC are not insured by the FDIC or any other Federal Government Agency, are not deposits of or guaranteed by Merlin Securities, LLC and may lose value. Nothing in this communication shall constitute a solicitation or recommendation to buy or sell a particular security. Yahoo! Groups Sponsor ADVERTISEMENT click here <http://us.ard.yahoo.com/SIG=129a9hgd3/M=298184.6018725.7038619.3001176/ D=groups/S=1705007207:HM/EXP=1109952906/A=2593423/R=0/SIG=11el9gslf/*htt p://www.netflix.com/Default?mqso=60190075> <http://us.adserver.yahoo.com/l?M=298184.6018725.7038619.3001176/D=group s/S=:HM/A=2593423/rand=145597728> _ 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] <mailto:[EMAIL PROTECTED]> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> . --_=_NextPart_002_01C520A0.D78E4373 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable http://www.exclaimer.co.uk"; xmlns:msxsl = "urn:schemas-microsoft-com:xslt" xmlns:exc = "http://www.exclaimer.co.uk/rtf";> @font-face { font-family: Wingdings; } @font-face { font-family: Tahoma; } @font-face { font-family: Verdana; } @font-face { font-family: Franklin Gothic Book; } @font-face { font-family: Century Gothic; } @page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; } P.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman" } LI.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman" } DIV.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman" } A:link { COLOR: blue; TEXT-DECORATION: underline } SPAN.MsoHyperlink { COLOR: blue; TEXT-DECORATION: underline } A:visited { COLOR: blue; TEXT-DECORATION: underline } SPAN.MsoHyperlinkFollowed { COLOR: blue; TEXT-DECORATION: underline } P { FONT-SIZE: 12pt; MARGIN-LEFT: 0in; MARGIN-RIGHT: 0in; FONT-FAMILY: "Times New Roman"; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto } TT { FONT-FAMILY: "Courier New" } SPAN.EmailStyle19 { COLOR: navy; FONT-FAMILY: Arial; mso-style-type: personal } SPAN.EmailStyle21 { COLOR: navy; FONT-FAMILY: Arial; mso-style-type: personal-reply } DIV.Section1 { page: Section1 } OL { MARGIN-BOTTOM: 0in } UL { MARGIN-BOTTOM: 0in } Here's a small example :) Greetz Erik From: Robert Brueckmann [mailto:[EMAIL PROTECTED] Sent: donderdag 3 maart 2005 17:14To: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Theory and Practice: Mixing AS2.0 in
RE: [flexcoders] fscommand and flex
Why don't u try to use getURL? U can use it like this: getURL("javascript:functionName('arg1', 'arg2')"); Internally fscommand is converted to something like: getURL("fscommand:functionName..."), I don't know exactly, but there was a thread about it on flexcoders a month or so ago. Greetz Erik -Original Message- From: jeff tapper [mailto:[EMAIL PROTECTED] Sent: donderdag 3 maart 2005 16:21 To: flexcoders@yahoogroups.com Subject: [flexcoders] fscommand and flex Hey folks, im trying to call fscommand from flex, but without much luck, i was wondering if anyone can help me. Heres a simple POC of what im trying: Test.jsp <%@ taglib uri="FlexTagLib" prefix="mm" %> function myMovie_doFSCommand(arg1,arg2){ alert("fscommand called"); alert("arg1" + arg1); alert("arg2" + arg2); } TestApp.mxml http://www.macromedia.com/2003/mxml";> function doClick(){ fscommand("arg1","arg2"); } Needless to say, the javascript alerts are never showing. i suspect im missing something basic, but even back in my heydays of flash, i rarely if ever used fscommand. can someone point me in the right direction? thanks. jeff Yahoo! Groups Links
RE: [flexcoders] Theory and Practice: Mixing AS2.0 in MXML
That was my initial approach too, but eventualy it was easier to track bugs and 'mis-references' since i extended the component i was accessing. Now i get an error when i try to reference a textfield that isnt there. Another thing that is a pro for this kind of approach, is that the mxml file doesnt have to know wich method to call in the helper class. Greetz Erik From: Dimitrios Gianninas [mailto:[EMAIL PROTECTED] Sent: donderdag3 maart 2005 16:22To: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Theory and Practice: Mixing AS2.0 in MXML I tend to put such code in the corresponding ViewHelper class, so every view (MXML file) has a corresponding ViewHelper class. See sample below: Inboxes.mxml ... ... vScrollPolicy="auto" change="inboxesHelper.doLoadInbox(inboxList.selectedItem.id)" /> ... Jimmy Gianninas Software Developer - Optimal Payments Inc.
RE: [flexcoders] Theory and Practice: Mixing AS2.0 in MXML
Yeah, the mxml thing is a bit weird. Especially the way u extend using mxml vs extending with AS classes, it just seems the other way around... In AS u say MyClass extends SomeOtherClass, while in mxml u extend a class by putting that class as a root tag. Coming from Flash this confused me very much :) Greetz Erik From: Robert Brueckmann [mailto:[EMAIL PROTECTED] Sent: donderdag 3 maart 2005 15:49To: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Theory and Practice: Mixing AS2.0 in MXML “I see,” said the blind man…thanks Erik! This whole technology, even after a few monthsof working with it, is still something so completely new to what I’m used to andI guess I was having trouble seeing the MXML file as an AS class in and of itself…thanks for the concise yet extremely helpful answer! I get it now. J Robert L. Brueckmann Web Developer Merlin Securities, LLC 595 Madison Avenue New York, NY 10022 p: 212.822.4821f: 212.822.4820
RE: [flexcoders] Theory and Practice: Mixing AS2.0 in MXML
What i do is extending the mxml class with an AS class. Then instead of using the mxml i use the AS subclass. If the class is empty, things just work like they did before. But inside the AS class u have the usual callBacks (createChildren, init, etc) and a constructor. Via code u can add listeners to the UI components and manage everything from within the AS class. Greetz Erik From: Robert Brueckmann [mailto:[EMAIL PROTECTED] Sent: donderdag 3 maart 2005 15:14To: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Theory and Practice: Mixing AS2.0 in MXML Can I ask how you manage an MXML without any ActionScript at all? How in a file that has components with click or change listeners would you not have any supporting ActionScript code…I mean just about every single one of my MXML fileshas initialize or creationComplete listeners in the parent container tag with dozens of other components that are dependent on dataproviders changing and user interactions like clicking or dragging and dropping and I can’t beginto imagine how I could extract every bit of ActionScript from my MXML files into individual ActionScript classes…maybe I’m not grasping the Cairgorm designarchitecture fully…I thought I had a pretty good grasp on it but to hear that you’re writing MXML files with no ActionScript in them whatsoever kind of baffles me…can you give me an example? Thanks for bearing with me! ;)
Creating components with style support
I have dived in the different documents available on creating V2 components. But i couldnt find one that handles the fact that your custom component needs to be skinnable and styleable, does any1 know of such a document? Greetz Erik
RE: [flexcoders] Theory and Practice: Mixing AS2.0 in MXML
Personaly I don't like putting code into mxml's too, for me they are just the visual part of the application. I also don't like the idea of having a class somewhere far away from my form wich is called on a (for example) submit button event and then accesses the formfields to check their values. What I do is naming the mxml (class) file like this: classNameVisual.mxml and subclass that file with an .as file called className.as. This way I can instantiate the form as className and have a local reference to the formfields inside my .as file. There I do actions that apply to the form only and use events to communicate with the rest of the application. This approach results in two files vor each view (form, mxml, whaever). The only consern of the .as file is the mxml file. And they are easy to find. Greetz Erik -Original Message- From: Aral Balkan [mailto:[EMAIL PROTECTED] Sent: donderdag 3 maart 2005 11:10 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Theory and Practice: Mixing AS2.0 in MXML Hi Steven, > I'd also like to pick up the idea of > "no code in MXML" as a "best theory" rather than a "best practice". Since we have been able to successfully apply this to Flex applications, I would have to disagree with this assessment. > when we were building RIA with > Flash, that it was essential not to scatter ActionScript code around > the actual Flash movie itself. So ... we would advocate that code was > not scattered around the timeline, that there was a single layer in > the timeline, with a single frame, where a single file "includes.as" > was included in the application, This is definitely one, valid way of doing things -- however the #include method of loading code into Flash projects is the old-school way we were forced to use in the days of AS1. With AS2 and the ability to link classes to movie clips, this method is no longer necessary. It makes sense to keep all code in external classes and link them to your movie clips (forms) when necessary. The code Application form, then, becomes a natural entry point into your application. Natural in the Flash-way of doing things. Does this method of working translate to Flex? Of course -- Flex *is* Flash :) The most striking difference between Flash and Flex (apart form Flex actually having *useful* components that work) is the way you layout your forms: Using MXML instead of an FLA. The fact that Flex is a server product is irrelevant (and completely unnecessary -- it *should* ideally be a client-side tool that outputs SWFs.) In Flex, instead of linking your form classes to an ArpForm or an mx.screens.Form, you link them to mx.containers.Form or mx.core.Application. Migrating an application from Flash to Flex thus becomes simply modifying your forms to handle any component API differences between Flash and Flex and reconstructing your form layouts using MXML (the reverse is also true for migrating a Flex application to Flash.) Any code you have in your FLAs or MXMLs just makes you less flexible and for what? A potential few seconds saved when you are initially writing the code. It has been my experience that actually writing code takes the least amount of time in a project -- debugging, maintaining and scaling an application all take far more time and that's what we must try to reduce. It all comes down to one thing: I like simplicity. The less rules there are the less I have to think. If I know that there's no code in my MXML or FLAs, I don't waste one second of my time searching through them. I know where everything is the moment I look at a new ARP project, even if I've never seen that particular project before. For me, this is more important than saving a few seconds during initial development by adding code to my FLA or MXMLs. > Inevitably, some code might find it's way into a component in the > Flash Symbol library; but if this ever were the case, then it would be > code that BELONGED on that component, and was typically responsible in > some way for the view logic associated with that component - so some > degree of encapsulation was achieved. But code in the FLA rather than > in external ActionScript 2.0 was a bad code smell. This was inevitable with the V1 components but not so with the V2 architecture. > Let's now move to Flex. > Let me first state the obvious; I would not advocate placing business > logic (or lots of it) within blocks in Flex, if it can be > extracted into an external ActionScript 2.0 class. I would *never* > use the Include functionality in Flex to pull in blocks of script, and > where possible, I would always encourage that external classes, > imports, and object creation is used. Agreed. > Maintainability and Scalability > If we have AS2.0 code in our MXML, does it make our code harder to > maintain ? Not necessarily -- if the code is directly related to that > MXML file, it may be the case that encapsulation would encourage the > code to belong as a method on the MXML file.
RE: [flexcoders] Question about making an array of buttons
This works: http://www.macromedia.com/2003/mxml"; > var letterids=["A","B","C","D","E","F","G","H"]; Greetz Erik -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: dinsdag 1 maart 2005 17:22 To: flexcoders@yahoogroups.com Subject: [flexcoders] Question about making an array of buttons I am trying to make an array of buttons that has an array of strings on it and I was wondering why this code does not work? http://www.macromedia.com/2003/mxml"; > var letterids=["A","B","C","D","E","F","G","H"]; all I get when I run the code is 8 empty buttons whereas I want to make an array of strings appear on the buttons from either the letterids array or the eachoftheids array. I just want to know if an array of buttons with an array of strings on each of them is possible? Yahoo! Groups Links
RE: [flexcoders] Re: Flex Trial Edition - Setting up JRun as Windows Service?
The key in this is to merge both web.xml files. Say u deployed ColdFusion first. In the cFusion directory there is a WEB-INF directory. U can open the .war file with winrar or some other expander and extract its content. Then u need to add all info in the flex web.xml to the web.xml wich was created by coldFusion. All other files should just be copied and probably do not overlap. Greetz Erik -Original Message- From: Jeff Chastain [mailto:[EMAIL PROTECTED] Sent: dinsdag 1 maart 2005 3:39 To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Flex Trial Edition - Setting up JRun as Windows Service? I have been messing with this some today and I am having troubles deploying the flex.war and samples.war on JRun next to ColdFusion. Is there any documentation on how to do this? Also, by doing this, how can I call both CFM files and MXML files on the IIS localhost without having to go to different port numbers? Thanks -- Jeff
NetShop phonebuying application
Hey list, Does any1 know if the source is available on this example application? http://www.macromedia.com/devnet/flex/example_apps/netshop/moreinfo.html Im particulairy interested in the way they did the cellsize-depends-on-amount-of-item thing. More information is show as there are less products on display. How did they do this? Greetz Erik
RE: [flexcoders] Binding attributes in Flex
>I don’t think having the MXML generated all the time is a great idea. There is no problem here. Flex and ColdFusion both cache files. If u disable caching of ColdFusion files, the files that are generated by flex are still cached. There is another flex-config.xml file created for the use of the jsp tag library. Its located in the cfform directory (with ColdFusion 7 that is). Greetz Erik From: Matt Chotin [mailto:[EMAIL PROTECTED] Sent: vrijdag 25 februari 2005 7:28To: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Binding attributes in Flex Unfortunately you cannot bind into styles in Flex 1.5. This is because styles are set using the setStyle method and binding requires the set to be done using the = operator. We’ll hopefully address this in the next version. I don’t think having the MXML generated all the time is a great idea, but if may be if you have a limited # of variations of inputs you could use the JSP tag library to generate a limited number of versions that could then be cached and delivered appropriately. The JSP tag library does work in CF. Matt From: deptquote [mailto:[EMAIL PROTECTED] Sent: Thursday, February 24, 2005 7:08 PMTo: flexcoders@yahoogroups.comSubject: [flexcoders] Binding attributes in Flex Is there a way to bind a value of the attributesThose one are not working: listener="chiffre" maxValue="{allo.enveloppe.valeur}"/> This one is working: Our idea is to bind all data (labels,TextInputs, etc) to a XML file containing all the information (validation, style, etc) about those data.or would it preferable to use ColdFusion to generate MXML files on the fly for such task?Thanks