Re: [flexcoders] Login / Password Form
I made something like that where I use Flex to develop my UI and store the login info in XML file on the server. To read and write data to that xml file I use server side language PHP though amfPHP , Encryption can be done using action script library as3crypto but in my project we use JavaScript and PHp for encrytping these credentials on the wire (through the network). Hope that might help you Anuj On Thu, Feb 5, 2009 at 12:17 PM, Alan K ultr...@gmail.com wrote: No, you can use a PHP file, for example, to hold and check against. Hello, I am searching a code source exemple for a classical login / password form in a flex application. Did I need absolutely a database to store Passwords ? Thank you, Christophe,
Re: [flexcoders] Guidance Needed about the organization of flex project and MXML Componenets
Hi Haykel Thanks for the info, This might help to get started for the reorganization Anuj On Fri, Jan 23, 2009 at 11:35 PM, Haykel BEN JEMIA hayke...@gmail.comwrote: ViewStacks, like most containers, uses deferred instantiation (if the creationPolicy property is set to 'auto', which is the default), which means it only creates the descendants of a child when it's selected the first time. So for startup optimization, I think it's ok to use ViewStacks. Now you could probably use modules to further reduce swf size, but this would also mean that the user will have to wait longer when a page is selected until the module is downloaded. But it's ok if the modules are small. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Fri, Jan 23, 2009 at 7:43 PM, anuj181 anuj...@gmail.com wrote: Hi Flex Coders, I have been taken over one project started by some other programmer, The project asks user to login and after user logs in , different custom MXML Components are loaded. Thats the bigger picture what the project needs to do. The way this project was organized that the developer created the login component , and other custom MXML Component and put them in different canvases and then put login in one ViewStack and the other MXML Componenets in another stack, By default on the load of the application, ViewStack with login Canvas is set to true and if user enter right password then the visibility of other stack having different custom components are set to true and login was set to false. The ToggleButtonBar was used whose data provider is second view stack having 3 other custom MXML component, and depending upon the button of the toggle bar selected the components are being loaded. All the viewstacks with the canvases are being loaded on the main app on the load of the application. I am not sure thats the right way.* In ideal world I like whenever user loads the page, only the login page will be loaded and once the correct credentials are entered, only the default MXML Component will be added with the ToggleButtonBar's default selection, I have to reorganize the structure of the project, I was thinking of adding and removing child depending upon the tab changed,* Is there any better way to organize this project, Ideally I like to refresh the page while loading different MXML components on the tab selection so that we might get the component totally in synchronization with the server, Anyone has nice and better way of organizing Project without setting the visibility true and false and also fulfilling my requirement. Any Help and guidance will be appreciated Thanks Anuj
Re: [flexcoders] Need some Help in implementing Log out functionality
Hi Paul If thats the best we can do then I have already created the delay, i was thinking may be there is better way for achieving this. Thanks for your help Anuj On Thu, Jan 15, 2009 at 4:22 PM, Paul Andrews p...@ipauland.com wrote: When the user clicks logout, tell him that he is logged out, do any clearing up and after a short delay (so he can read the message), reload the application. - Original Message - From: anuj181 anuj...@gmail.com anuj181%40gmail.com To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Sent: Thursday, January 15, 2009 11:46 PM Subject: [flexcoders] Need some Help in implementing Log out functionality Hi I have implemented Log Out functionality in my App, All I did is that as soon as user clicks Log Out button, the code is going to reload the whole App which will automatically take the user to the login screen as login is the first screen in my flex App. Now My probelm is that I need some feedback to give to the user that he has been logged out. I am successfully in taking user to the login page but somehow could not figure out how will I show the feedback, The idea i came up is may be add string to the URL if user logs out and if the URL string matches the added string should display a label in the main login page showing You have successfully logged out, but my following code is not working. Is there any better way to do this or please let me know where things are being screwed up, For the time being I just put dummy alerts but they will be replaced with the actual Labels. All i need is the first time user logs in should just display the login screen but if user logs out he should be directed to the same login screen but with added label You have succesfully logged out Thanks Anuj //Logging Out of the App mx:Image id=_imgLogOut height={ImgHt} width={ImgWidth} x=941 y=96 click=_logOut(event); private function _logOut(event:MouseEvent):void { var selfLoad:URLRequest=new URLRequest(Application.application.url+?logout=true); navigateToURL(selfLoad,_self); } private function initApp():void { //Checkign if the User logged out and Displaying the message and relaoding the App var _DefaulturlString:String=Application.application.url; var _loggedOutURLString:String=_DefaulturlString+?logout=true; if(Application.application.navigateToURL(_loggedOutURLString)) { Alert.show(Logged Out); } else { Alert.show(First Time); } -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
Re: [flexcoders] Need some Help in implementing Log out functionality
Okay I Like it to reload the app but the main login screen of the app should have the label which is going to say that you have been logged out, that as what I was trying to achieve but Now what i did is the moment user clicks log out , I start the timer and pop up message logging out and after delay of 3 second user will be directed to the main login page, Ideally I like if user hits logout , after delay he will be taken to login page (which means reloading the whole App) but the login page should be able to provide the info that user is successfully logged out, I hope I made sense but if not please let me know Thanks Anuj On Thu, Jan 15, 2009 at 5:29 PM, Paul Andrews p...@ipauland.com wrote: - Original Message - *From:* anuj sharma anuj...@gmail.com *To:* flexcoders@yahoogroups.com *Sent:* Friday, January 16, 2009 1:30 AM *Subject:* Re: [flexcoders] Need some Help in implementing Log out functionality Hi Paul If thats the best we can do then I have already created the delay, i was thinking may be there is better way for achieving this. In which way would you want it to be better? Thanks for your help Anuj On Thu, Jan 15, 2009 at 4:22 PM, Paul Andrews p...@ipauland.com wrote: When the user clicks logout, tell him that he is logged out, do any clearing up and after a short delay (so he can read the message), reload the application. - Original Message - From: anuj181 anuj...@gmail.com anuj181%40gmail.com To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Sent: Thursday, January 15, 2009 11:46 PM Subject: [flexcoders] Need some Help in implementing Log out functionality Hi I have implemented Log Out functionality in my App, All I did is that as soon as user clicks Log Out button, the code is going to reload the whole App which will automatically take the user to the login screen as login is the first screen in my flex App. Now My probelm is that I need some feedback to give to the user that he has been logged out. I am successfully in taking user to the login page but somehow could not figure out how will I show the feedback, The idea i came up is may be add string to the URL if user logs out and if the URL string matches the added string should display a label in the main login page showing You have successfully logged out, but my following code is not working. Is there any better way to do this or please let me know where things are being screwed up, For the time being I just put dummy alerts but they will be replaced with the actual Labels. All i need is the first time user logs in should just display the login screen but if user logs out he should be directed to the same login screen but with added label You have succesfully logged out Thanks Anuj //Logging Out of the App mx:Image id=_imgLogOut height={ImgHt} width={ImgWidth} x=941 y=96 click=_logOut(event); private function _logOut(event:MouseEvent):void { var selfLoad:URLRequest=new URLRequest(Application.application.url+?logout=true); navigateToURL(selfLoad,_self); } private function initApp():void { //Checkign if the User logged out and Displaying the message and relaoding the App var _DefaulturlString:String=Application.application.url; var _loggedOutURLString:String=_DefaulturlString+?logout=true; if(Application.application.navigateToURL(_loggedOutURLString)) { Alert.show(Logged Out); } else { Alert.show(First Time); } -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
Re: [flexcoders] Need some Help in implementing Log out functionality
I 120% agree with you Paul , but our User Interaction folks want more and more feedback for user which is little pain to implement with my deadline, So I guess I will end up challenging that feedback thing, but thanks for ur help Anuj On Thu, Jan 15, 2009 at 6:04 PM, Paul Andrews p...@ipauland.com wrote: I think that displaying a login page is a pretty good clue that the user is logged out. - Original Message - *From:* anuj sharma anuj...@gmail.com *To:* flexcoders@yahoogroups.com *Sent:* Friday, January 16, 2009 1:37 AM *Subject:* Re: [flexcoders] Need some Help in implementing Log out functionality Okay I Like it to reload the app but the main login screen of the app should have the label which is going to say that you have been logged out, that as what I was trying to achieve but Now what i did is the moment user clicks log out , I start the timer and pop up message logging out and after delay of 3 second user will be directed to the main login page, Ideally I like if user hits logout , after delay he will be taken to login page (which means reloading the whole App) but the login page should be able to provide the info that user is successfully logged out, I hope I made sense but if not please let me know Thanks Anuj On Thu, Jan 15, 2009 at 5:29 PM, Paul Andrews p...@ipauland.com wrote: - Original Message - *From:* anuj sharma anuj...@gmail.com *To:* flexcoders@yahoogroups.com *Sent:* Friday, January 16, 2009 1:30 AM *Subject:* Re: [flexcoders] Need some Help in implementing Log out functionality Hi Paul If thats the best we can do then I have already created the delay, i was thinking may be there is better way for achieving this. In which way would you want it to be better? Thanks for your help Anuj On Thu, Jan 15, 2009 at 4:22 PM, Paul Andrews p...@ipauland.com wrote: When the user clicks logout, tell him that he is logged out, do any clearing up and after a short delay (so he can read the message), reload the application. - Original Message - From: anuj181 anuj...@gmail.com anuj181%40gmail.com To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Sent: Thursday, January 15, 2009 11:46 PM Subject: [flexcoders] Need some Help in implementing Log out functionality Hi I have implemented Log Out functionality in my App, All I did is that as soon as user clicks Log Out button, the code is going to reload the whole App which will automatically take the user to the login screen as login is the first screen in my flex App. Now My probelm is that I need some feedback to give to the user that he has been logged out. I am successfully in taking user to the login page but somehow could not figure out how will I show the feedback, The idea i came up is may be add string to the URL if user logs out and if the URL string matches the added string should display a label in the main login page showing You have successfully logged out, but my following code is not working. Is there any better way to do this or please let me know where things are being screwed up, For the time being I just put dummy alerts but they will be replaced with the actual Labels. All i need is the first time user logs in should just display the login screen but if user logs out he should be directed to the same login screen but with added label You have succesfully logged out Thanks Anuj //Logging Out of the App mx:Image id=_imgLogOut height={ImgHt} width={ImgWidth} x=941 y=96 click=_logOut(event); private function _logOut(event:MouseEvent):void { var selfLoad:URLRequest=new URLRequest(Application.application.url+?logout=true); navigateToURL(selfLoad,_self); } private function initApp():void { //Checkign if the User logged out and Displaying the message and relaoding the App var _DefaulturlString:String=Application.application.url; var _loggedOutURLString:String=_DefaulturlString+?logout=true; if(Application.application.navigateToURL(_loggedOutURLString)) { Alert.show(Logged Out); } else { Alert.show(First Time); } -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
Re: [flexcoders] Generating Random key
Awesome guys your guidance help me in achieving this withing 30 minutes, it is working now Thanks for your help again Anuj On Mon, Jan 5, 2009 at 2:19 PM, anuj181 anuj...@gmail.com wrote: Hi I need to work on a piece of code in which whenever user clicks on the button , the code should generate random 12 character key having all caps and no vowels in the format of XXX-XXX-XXX-XXX. Can anybody guide me in this direction. Is there any built in function for that or do I have to use my own logic for random generation in this specific case. Any help will be appreciated. Thanks Anuj
Re: [flexcoders] Generating Random key
Hi Brendan makes sense to put the code :-), With the format I was looking for following code works perfectly for me, I am not sure thats the right way of coding but this is working for my purpose. I am pretty sure there can be far far better way for this Anuj /**CODE**/ mx:Script ![CDATA[ import mx.messaging.channels.StreamingAMFChannel; import mx.controls.Alert; [Bindable] public var track:String; private function init():void { btn_genkey.addEventListener(MouseEvent.CLICK,key); } public function key(event:MouseEvent):void { var newLength:uint = 12; var userAlphabet:String = BCDFGHJKLMNPQRSTVWXYZ; var alphabet:Array=userAlphabet.split(); var alphabetLength:int = alphabet.length; var randomLetters:String = ; var _keyfirstpart:String; var _keysecondpart:String; var _keythirdpart:String; var _keyforthpart:String; var _concatenatedString:String; for (var i:uint = 0; i newLength; i++) { randomLetters += alphabet[int(Math.floor(Math.random() * alphabetLength))]; } _keyfirstpart=randomLetters.slice(0,3); _keysecondpart=randomLetters.slice(3,6); _keythirdpart=randomLetters.slice(6,9); _keyforthpart=randomLetters.slice(9,12); _concatenatedString=_keyfirstpart+-+_keysecondpart+-+_keythirdpart+-+_keyforthpart; text_ii.text=_concatenatedString; } ]] /mx:Script mx:TextInput id=text_ii x=645 y=270 width=224/ mx:Button id=btn_genkey x=513 y=270 label=Generate key width=124 / On Mon, Jan 5, 2009 at 5:39 PM, Brendan Meutzner bmeutz...@gmail.comwrote: So what did you end up putting together? Should post the code here for the next guy... Brendan On Mon, Jan 5, 2009 at 5:41 PM, anuj sharma anuj...@gmail.com wrote: Awesome guys your guidance help me in achieving this withing 30 minutes, it is working now Thanks for your help again Anuj On Mon, Jan 5, 2009 at 2:19 PM, anuj181 anuj...@gmail.com wrote: Hi I need to work on a piece of code in which whenever user clicks on the button , the code should generate random 12 character key having all caps and no vowels in the format of XXX-XXX-XXX-XXX. Can anybody guide me in this direction. Is there any built in function for that or do I have to use my own logic for random generation in this specific case. Any help will be appreciated. Thanks Anuj -- Brendan Meutzner http://www.meutzner.com/blog/
Re: [flexcoders] How would I Overwrite contents of External XML File
Hi Brendon We are working on the encryption part but do you think it is not possible to overwrite stuff on server with Flex. If thats the case i have used amfPHP for tarnsferring data to server, then do you think amfPHP is the only option i left with I guess right. Any other guidance will be apprecited too , Also if you have better links/info about encryption of password on the server that will be helpful too Thanks Anuj On Mon, Dec 15, 2008 at 4:52 PM, Wildbore, Brendon b.j.wildb...@massey.ac.nz wrote: Im not 100% sure, but I don't believe flex can write to the server directly. You will most likely have to employ a server side http service to achieve this. Also if you are going to be storing sensitive info in an xml file, you should encrypt the passwords and security answers -- *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *anuj181 *Sent:* Tuesday, 16 December 2008 1:37 p.m. *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] How would I Overwrite contents of External XML File Hi All I am working on change password option for the user, I am reading password content from external XML Files and then depending upon the added value I need to overwrite the external XML's files passsword entry. I am using following code for changing it but it is not working, My XML file is in the external folder but withtin the same project and this is one of the component which i am calling on click of some button. I need to overwrite data in Login.xml which is stored in Private folder as the separate folder in my project, Reading from thh xml file is no problem but writing back is an issue, Does anyone know where I am screwing things up? Many Many Thanks for your help Anuj //My XML ?xml version=1.0 encoding=utf-8? Users user id1/id userNameasasasd/userName passwordasasd123/password securityQuestionTest Security Question/securityQuestion answerSecurityQuestion/answerSecurityQuestion /user /Users /CODE***/ mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; creationComplete=init(); horizontalScrollPolicy=off verticalScrollPolicy=off public function init():void { var getPassword:URLRequest=new URLRequest(Private/Login.xml); passwordLoader = new URLLoader(); try { passwordLoader.load(getPassword); } catch (error:SecurityError) { trace(SecurityError has occurred while loading password); } passwordLoader.addEventListener(Event.COMPLETE,getAlreadySetPassword); } //ChangePassword public function changePassword(evt:MouseEvent):void { if((txt_Enter_Password.text==)||(txt_ReEnter_Password.text==)|| (txt_Security_Question.text==)||(txt_Security_Answer.text==)) { Alert.show(Please Check the values entered. They cannot be null); } else if(txt_Enter_Password.text!=txt_ReEnter_Password.text) { Alert.show(Passwords do not match); } else { externalXMLPassword.user.password=txt_Enter_Password.text; externalXMLPassword.user.securityQuestion=txt_Security_Question.text; externalXMLPassword.user.answerSecurityQuestion=txt_Security_Answer.text; } } mx:Button x=630 y=402 label=Save click=changePassword(event);/
Re: [flexcoders] How would I Overwrite contents of External XML File
HI Brendon Sounds good to me, And my teamate is working on the encryption part, he thinks that encryption of the password needs to be done through Javascript and if thats the case I need to see how my Flex code needs to talk to JavaScript, i guess using exteralInterface might help me, So do you think JavaScript is good option for taking care of encryption (on the wire) for the password or we should try some other technology. I am doubtful that if Flex can take care of encryption of the password. Any feedback regardign how to encrypt migh help too, Thanks Brendon for your help Anuj On Mon, Dec 15, 2008 at 5:22 PM, Wildbore, Brendon b.j.wildb...@massey.ac.nz wrote: Hi Anuj, All the investigation I have done points to it not being possible in flex (non-air flex). So amfPHP is a logical option for you, especially if you have already had experience with it. Cheers Brendon -- *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *anuj sharma *Sent:* Tuesday, 16 December 2008 2:01 p.m. *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] How would I Overwrite contents of External XML File Hi Brendon We are working on the encryption part but do you think it is not possible to overwrite stuff on server with Flex. If thats the case i have used amfPHP for tarnsferring data to server, then do you think amfPHP is the only option i left with I guess right. Any other guidance will be apprecited too , Also if you have better links/info about encryption of password on the server that will be helpful too Thanks Anuj On Mon, Dec 15, 2008 at 4:52 PM, Wildbore, Brendon b.j.wildb...@massey.ac.nz wrote: Im not 100% sure, but I don't believe flex can write to the server directly. You will most likely have to employ a server side http service to achieve this. Also if you are going to be storing sensitive info in an xml file, you should encrypt the passwords and security answers -- *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *anuj181 *Sent:* Tuesday, 16 December 2008 1:37 p.m. *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] How would I Overwrite contents of External XML File Hi All I am working on change password option for the user, I am reading password content from external XML Files and then depending upon the added value I need to overwrite the external XML's files passsword entry. I am using following code for changing it but it is not working, My XML file is in the external folder but withtin the same project and this is one of the component which i am calling on click of some button. I need to overwrite data in Login.xml which is stored in Private folder as the separate folder in my project, Reading from thh xml file is no problem but writing back is an issue, Does anyone know where I am screwing things up? Many Many Thanks for your help Anuj //My XML ?xml version=1.0 encoding=utf-8? Users user id1/id userNameasasasd/userName passwordasasd123/password securityQuestionTest Security Question/securityQuestion answerSecurityQuestion/answerSecurityQuestion /user /Users /CODE***/ mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; creationComplete=init(); horizontalScrollPolicy=off verticalScrollPolicy=off public function init():void { var getPassword:URLRequest=new URLRequest(Private/Login.xml); passwordLoader = new URLLoader(); try { passwordLoader.load(getPassword); } catch (error:SecurityError) { trace(SecurityError has occurred while loading password); } passwordLoader.addEventListener(Event.COMPLETE,getAlreadySetPassword); } //ChangePassword public function changePassword(evt:MouseEvent):void { if((txt_Enter_Password.text==)||(txt_ReEnter_Password.text==)|| (txt_Security_Question.text==)||(txt_Security_Answer.text==)) { Alert.show(Please Check the values entered. They cannot be null); } else if(txt_Enter_Password.text!=txt_ReEnter_Password.text) { Alert.show(Passwords do not match); } else { externalXMLPassword.user.password=txt_Enter_Password.text; externalXMLPassword.user.securityQuestion=txt_Security_Question.text; externalXMLPassword.user.answerSecurityQuestion=txt_Security_Answer.text; } } mx:Button x=630 y=402 label=Save click=changePassword(event);/
Re: [flexcoders] Filtering the List Entries depending upon the text entered in text Input box
Hi Alex Sorry to get back so late, we had release for couple of days, With you suggestion I made it working which means it is filtering but now it is showing the complete XML list , Is there any way I can only show the attribute with the friendly-name.Like suggested, i put everything in XMListCollection instead of ArrayCollection which makes it enabel to loop throught the whoel list but that fixing raises the display issue.I am doing something wrong here which screwed labelfunction assignfriendlyname for the list.Please let me know how would we fix that. Many Many thanks for your help. Anuj /*Revised Code*/ //XML File devices device id=uuid: ac14231535625133346546 attributes attribute name=Flex/ attribute name=monitormonitoring/attribute attribute name=version2.0/attribute attribute name=locationlocation/attribute attribute name=friendly-nameCamera1/attribute attribute name=typeAIR/attribute /attributes schedules/ /device /devices /**CODE*/ //This is REST CALL mx:HTTPService id=devicesXML method=GET resultFormat=e4x result=devicesXMLHandler(event) showBusyCursor=true /mx:HTTPService //THis makes call to server devicesXML.url=http://+IP+/config/devices;; [Bindable] private var filteredDevices:XMLListCollection; //Thid function is called when values are retreived private function devicesXMLHandler(event:ResultEvent):void { devicesList = event.result.device; //Changed filteredDevices=new XMLListCollection(devicesList); //Checks every device for each (var devicesInPool:* in devicesList) { var deviceName:String = devicesinpo...@id; //var label:string=devicesinpo...@id; devicesInList.push(deviceName); nvrsInPoolList.dataProvider = filteredDevices; filteredDevices.filterFunction=processFilter } //This function calls for assigning label for the entries in the List box named nvsInPoolList private function assignFriendlyName(item:Object):String { //Checks every device for each (var devicesID:* in devicesList) { var deviceName:String = devices...@id; //Checks if the current deviceID matches the current item, if so it will search its attributes if(deviceName == item.toString()) { var devicesText:XMLList = devicesID.child(attributes).child(attribute); //Checks every attribute tag for each device for each (var attributesFriendlyName:* in devicesText) { //Checks if the attribute name is friendly-name if(attributesfriendlyna...@name == 'friendly-name') { var friendlynameText:String = attributesFriendlyName.toString(); return friendlynameText; } } } } return item.toString(); } //Filtering Data in the Device List private function processFilter(item:Object):Boolean { return String(item).toUpperCase().indexOf(filterText.toUpperCase()) = 0; } //Tracking the typed Camera Name private function doChange():void { if(txtSearch.text!=null) { this.filterText=txtSearch.text; this.filteredDevices.refresh(); } } mx:List id=nvrsInPoolList allowMultipleSelection=true dragMoveEnabled=true dragEnabled=true dropEnabled=true labelFunction=assignFriendlyName y=105 x=17 height=462 width=294/ mx:TextInput id=txtSearch x=17 y=75 change=doChange()/ On Tue, Dec 9, 2008 at 8:28 PM, Alex Harui aha...@adobe.com wrote: I'd try using XMLListCollection instead of ArrayCollection *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *anuj sharma *Sent:* Tuesday, December 09, 2008 5:05 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Filtering the List Entries depending upon the text entered in text Input box Sorry Guys I posted another mail in the group. I thought it was working but it is not going through each node, it is just comparing with the id of the first node of my XML , Below is the code , I apologize for jumping to the conclusion that it is working as initially it seems like. I am doing somethign wrong which makes my code not to loop through each and every node but just matching it with the id of the first node of my XML, Please help me guys to resolve this problem //XML File devices device id=uuid: ac14231535625133346546 attributes attribute name=Flex/ attribute name=monitormonitoring/attribute attribute name=version2.0/attribute attribute name=locationlocation/attribute attribute name=friendly-nameCamera1/attribute attribute name=typeAIR/attribute /attributes schedules/ /device /devices /**CODE*/ //This is REST CALL mx:HTTPService id=devicesXML method=GET resultFormat=e4x result=devicesXMLHandler(event) showBusyCursor=true /mx:HTTPService //THis makes call to server devicesXML.url=http://+IP+/config/devices;; //Thid function is called when values are retreived private function devicesXMLHandler(event:ResultEvent):void { devicesList = event.result.device; //Checks every device for each (var devicesInPool:* in devicesList) { var deviceName:String = devicesinpo...@id; //var label:string=devicesinpo...@id
Re: [flexcoders] Getting NULL Object Reference while deleting last element of the list
Hi Marco I fixed it in the first loop i need to get rid of -1 to finish the loop correctly, its been fixed now Thanks for your help Anuj On Fri, Dec 12, 2008 at 4:02 AM, Marco Catunda marco.catu...@gmail.comwrote: Anuj, I think there is something wrong with this structure. Why make it into for loop? The _addToAssociatedDevicesArr is received the same value for(var i:*=0;i_addDevicesLen-1;i++) { _addToAssociatedDevicesArr=nvrsInPoolList.selectedItems; } The last loop has the same problem. The index variable t is never used. Why it is in for loop? for(var t:*=0;t_addToAssociatedDevicesArr.length;t++) { if(nvrsInPoolList!=null) { IList(nvrsInPoolList.dataProvider).removeItemAt(nvrsInPoolList.selectedIndex); } } About the problem you complain I think one of this variable is null value: camerasInPoolList arrAddToPool arrRemoveFromPool -- Marco Catunda On Thu, Dec 11, 2008 at 7:33 PM, anuj181 anuj...@gmail.comanuj181%40gmail.com wrote: Hi Guys I am trying to implement the delete entries of the list box. The code works fine till the last entry, when i am trying to delete the last item after selection it is throwing error TypeError: Error #1009: Cannot access a property or method of a null object reference. I have seen this error so many times but I am not sure how will i fix this in the following code. Please help me in fixing this error Thanks Anuj /*CODE*/ mx:Button x=322 y=237 label=Add id=_addButton click=addToAssociatedDevices(event)/ private function addToAssociatedDevices(evt:MouseEvent):void { var _addDevicesLen:int=devicesInList.length; var _addToAssociatedDevicesArr:Array; for(var i:*=0;i_addDevicesLen-1;i++) { _addToAssociatedDevicesArr=nvrsInPoolList.selectedItems; } if((_addToAssociatedDevicesArr is Array)(_addToAssociatedDevicesArr!=null)) { var removeIndex:int = 0; for each (var addItemVal:* in _addToAssociatedDevicesArr) { if(addItemVal!=null) { IList(camerasInPoolList.dataProvider).addItem(addItemVal as Object); //Adds a device to the Add To Camera Pool list arrAddToPool.push(addItemVal); //Removes a device from the Remove From Pool list removeIndex = arrRemoveFromPool.indexOf(addItemVal); if(removeIndex -1) { arrRemoveFromPool.splice(removeIndex,1); } } } } for(var t:*=0;t_addToAssociatedDevicesArr.length;t++) { if(nvrsInPoolList!=null) { IList(nvrsInPoolList.dataProvider).removeItemAt(nvrsInPoolList.selectedIndex); } } }
Re: [flexcoders] Filtering working partially, Looping through just the first node of XML.Pls Help
Sorry forgot to add text box code mx:TextInput id=txtSearch x=17 y=75 change=doChange()/ doChange is called the moment user starts entering text in the text input Thanks for all of your time Anuj On Tue, Dec 9, 2008 at 4:10 PM, anuj181 [EMAIL PROTECTED] wrote: Hi All Guys This is regarding the problem I had few days back. I made filtering of the List partially working for my app after taking some help from this group, but I realize a bug in my program. I am making rest calls to load data in form of XML in List. I need to apply filter on this list. Depending upon the text entered in the text box , the list should filter. Now my problem is that the filter is working if user types the id of my XML node, however I want my code to go through all the XML file and checks if the entered text matches the attribute named friendly name and will filter depending upon the friendly name. Please help me out, Below is the code and I would appreciate if someone gives me right direction to make it completely working, Please let me know also if the code is not documented correctly to make it more sense Thanks Anuj //XML File devices device id=uuid:ac14231535625133346546 attributes attribute name=Flex/ attribute name=monitormonitoring/attribute attribute name=version2.0/attribute attribute name=locationlocation/attribute attribute name=friendly-nameCamera1/attribute attribute name=typeAIR/attribute /attributes schedules/ /device /devices /**CODE*/ //This is REST CALL mx:HTTPService id=devicesXML method=GET resultFormat=e4x result=devicesXMLHandler(event) showBusyCursor=true /mx:HTTPService //THis makes call to server devicesXML.url=http://+IP+/config/devices;; //Thid function is called when values are retreived private function devicesXMLHandler(event:ResultEvent):void { devicesList = event.result.device; //Checks every device for each (var devicesInPool:* in devicesList) { var deviceName:String = [EMAIL PROTECTED]; //var label:[EMAIL PROTECTED]; devicesInList.push(deviceName); filteredDevices=new ArrayCollection(devicesInList); nvrsInPoolList.dataProvider = filteredDevices; filteredDevices.filterFunction=processFilter; } //This function calls for assigning label for the entries in the List box named nvsInPoolList private function assignFriendlyName(item:Object):String { //Checks every device for each (var devicesID:* in devicesList) { var deviceName:String = [EMAIL PROTECTED]; //Checks if the current deviceID matches the current item, if so it will search its attributes if(deviceName == item.toString()) { var devicesText:XMLList = devicesID.child(attributes).child(attribute); //Checks every attribute tag for each device for each (var attributesFriendlyName:* in devicesText) { //Checks if the attribute name is friendly-name if([EMAIL PROTECTED] == 'friendly-name') { var friendlynameText:String = attributesFriendlyName.toString(); return friendlynameText; } } } } return item.toString(); } //Filtering Data in the Device List private function processFilter(item:Object):Boolean { return String(item).toUpperCase().indexOf(filterText.toUpperCase()) = 0; } //Tracking the typed Camera Name private function doChange():void { if(txtSearch.text!=null) { this.filterText=txtSearch.text; this.filteredDevices.refresh(); } } mx:List id=nvrsInPoolList allowMultipleSelection=true dragMoveEnabled=true dragEnabled=true dropEnabled=true y=105 x=17 height=462 width=294/
Re: [flexcoders] Filtering the List Entries depending upon the text entered in text Input box
Sorry Guys I posted another mail in the group. I thought it was working but it is not going through each node, it is just comparing with the id of the first node of my XML , Below is the code , I apologize for jumping to the conclusion that it is working as initially it seems like. I am doing somethign wrong which makes my code not to loop through each and every node but just matching it with the id of the first node of my XML, Please help me guys to resolve this problem //XML File devices device id=uuid: ac14231535625133346546 attributes attribute name=Flex/ attribute name=monitormonitoring/attribute attribute name=version2.0/attribute attribute name=locationlocation/attribute attribute name=friendly-nameCamera1/attribute attribute name=typeAIR/attribute /attributes schedules/ /device /devices /**CODE*/ //This is REST CALL mx:HTTPService id=devicesXML method=GET resultFormat=e4x result=devicesXMLHandler(event) showBusyCursor=true /mx:HTTPService //THis makes call to server devicesXML.url=http://+IP+/config/devices;; //Thid function is called when values are retreived private function devicesXMLHandler(event:ResultEvent):void { devicesList = event.result.device; //Checks every device for each (var devicesInPool:* in devicesList) { var deviceName:String = [EMAIL PROTECTED]; //var label:[EMAIL PROTECTED]; devicesInList.push(deviceName); filteredDevices=new ArrayCollection(devicesInList); nvrsInPoolList.dataProvider = filteredDevices; filteredDevices.filterFunction=processFilter; } //This function calls for assigning label for the entries in the List box named nvsInPoolList private function assignFriendlyName(item:Object):String { //Checks every device for each (var devicesID:* in devicesList) { var deviceName:String = [EMAIL PROTECTED]; //Checks if the current deviceID matches the current item, if so it will search its attributes if(deviceName == item.toString()) { var devicesText:XMLList = devicesID.child(attributes).child(attribute); //Checks every attribute tag for each device for each (var attributesFriendlyName:* in devicesText) { //Checks if the attribute name is friendly-name if([EMAIL PROTECTED] == 'friendly-name') { var friendlynameText:String = attributesFriendlyName.toString(); return friendlynameText; } } } } return item.toString(); } //Filtering Data in the Device List private function processFilter(item:Object):Boolean { return String(item).toUpperCase().indexOf(filterText.toUpperCase()) = 0; } //Tracking the typed Camera Name private function doChange():void { if(txtSearch.text!=null) { this.filterText=txtSearch.text; this.filteredDevices.refresh(); } } mx:List id=nvrsInPoolList allowMultipleSelection=true dragMoveEnabled=true dragEnabled=true dropEnabled=true y=105 x=17 height=462 width=294/ mx:TextInput id=txtSearch x=17 y=75 change=doChange()/ On Wed, Dec 3, 2008 at 5:31 PM, anuj181 [EMAIL PROTECTED] wrote: Hi All This is somehow regarding the question I have asked few weeks back. Unfortunately I have to stop this task at that time and now need to work on that. My need is that I have some entries in the List as an arrayCollection and there is text input box and I like to have list to filter the data as soon as user starts typing text. I have attached the so far developed code. I need as soon as user types On, the list below should only show first entry which is 'One-Device'. I attached the code but it is not working as I want. This is going to be just my dummy working prototype and once this module has been made working then i am going to merge this module into my Main Project. Also if anyone has any better idea about how to figure this thing out that will be great and instead of arrayColection if we can achieve the same function laity that would be helpful too. Thanks a lot Anuj /**CODE/ ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute initialize=init() width=100% height=100% horizontalScrollPolicy=off mx:Script ![CDATA[ import mx.managers.PopUpManager; import mx.effects.DefaultTileListEffect; import mx.rpc.events.ResultEvent; import mx.controls.Alert; import mx.collections.ArrayCollection; import mx.effects.easing.Elastic; [Bindable] public var ac:ArrayCollection = new ArrayCollection([One-Device,Two-Device,Three-Device,Four-Device,Five-Device,Six-Device]); [Bindable] public var filterText:String = ''; private function doChange():void { this.filterText = txtSearch.text; this.ac.refresh(); } private function init():void { ac.filterFunction = processFilter; } private function processFilter(item:Object):Boolean { var result:Boolean=false; if(!DevicesList.labelField.length || DevicesList.labelField.toUpperCase().indexOf(this.filterText.toUpperCase())=0) result=true; return result; } private function seeLabel(evt:Event):void { var
Re: [flexcoders] Fwd: Filtering the List Entries depending upon the text entered in text Input box
Hi Josh Thanks a lot, That works perfectly for my arrayCollection. Now I already have a project in which the data provider for my List is Array and I need the same filter functionality for the Array. can we do this filter for Array too or do i have to change the code of my project and instead of array I need to store complete data in ArrayCollection instead of Array and then made that filter working. It's just lot of work to change the existing workign code with my harsh deadline. Please let me know which is the best way. Again I highly appreciate your help Anuj On Wed, Dec 3, 2008 at 7:25 PM, Josh McDonald [EMAIL PROTECTED] wrote: private function processFilter(item:Object):Boolean { return String(item).toUpperCase().indexOf(filterText.toUpperCase()) = 0; } -Josh -- Therefore, send not to know For whom the bell tolls. It tolls for thee. Like the cut of my jib? Check out my Flex blog! :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] :: http://flex.joshmcdonald.info/ :: http://twitter.com/sophistifunk
Re: [flexcoders] Fwd: Filtering the List Entries depending upon the text entered in text Input box
I would be able to successfully implement the same code with Array instead of ArrayCollection but there is no method name array.refresh, However there is method named ArrayCollection.refresh which is responsible for refreshing my list. How do I refresh my array?Does anybody know equivalent method to refresh array in the list? Below is the code except in the processfilter I need to refresh array. Thanks for your help Anuj /***CODE*/ mx:Script ![CDATA[ import mx.managers.PopUpManager; import mx.effects.DefaultTileListEffect; import mx.rpc.events.ResultEvent; import mx.controls.Alert; import mx.collections.ArrayCollection; import mx.effects.easing.Elastic; [Bindable] public var ac:ArrayCollection = new ArrayCollection([One-Device,Two-Device,Three-Device,Four-Device,Five-Device,Six-Device]); [Bindable] public var arr:Array=[One,Second,Third]; [Bindable] public var filterText:String = ''; private function doChange():void { this.filterText = txtSearch.text; //this.ac.refresh(); } private function init():void { arr.filter(processFilter); } private function processFilter(item:Object,index:int, array:Array):Boolean { return String(item).toUpperCase().indexOf(filterText.toUpperCase()) = 0; } private function seeLabel(evt:Event):void { var alrt:Alert=Alert.show(evt.currentTarget.toString()); } ]] /mx:Script mx:List x=74 y=228 width=229 height=238 dataProvider={arr} id=DevicesList/mx:List mx:TextInput x=74 y=198 id=txtSearch change=doChange()/ On Thu, Dec 4, 2008 at 11:05 AM, anuj sharma [EMAIL PROTECTED] wrote: Hi Josh Thanks a lot, That works perfectly for my arrayCollection. Now I already have a project in which the data provider for my List is Array and I need the same filter functionality for the Array. can we do this filter for Array too or do i have to change the code of my project and instead of array I need to store complete data in ArrayCollection instead of Array and then made that filter working. It's just lot of work to change the existing workign code with my harsh deadline. Please let me know which is the best way. Again I highly appreciate your help Anuj On Wed, Dec 3, 2008 at 7:25 PM, Josh McDonald [EMAIL PROTECTED] wrote: private function processFilter(item:Object):Boolean { return String(item).toUpperCase().indexOf(filterText.toUpperCase()) = 0; } -Josh -- Therefore, send not to know For whom the bell tolls. It tolls for thee. Like the cut of my jib? Check out my Flex blog! :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] :: http://flex.joshmcdonald.info/ :: http://twitter.com/sophistifunk
Re: [flexcoders] Fwd: Filtering the List Entries depending upon the text entered in text Input box
Not with the above code Anuj On Thu, Dec 4, 2008 at 12:21 PM, Tracy Spratt [EMAIL PROTECTED] wrote: Array is not bindable. Do you not get a warning? Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *anuj sharma *Sent:* Thursday, December 04, 2008 2:44 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Fwd: Filtering the List Entries depending upon the text entered in text Input box I would be able to successfully implement the same code with Array instead of ArrayCollection but there is no method name array.refresh, However there is method named ArrayCollection.refresh which is responsible for refreshing my list. How do I refresh my array?Does anybody know equivalent method to refresh array in the list? Below is the code except in the processfilter I need to refresh array. Thanks for your help Anuj /***CODE*/ mx:Script ![CDATA[ import mx.managers.PopUpManager; import mx.effects.DefaultTileListEffect; import mx.rpc.events.ResultEvent; import mx.controls.Alert; import mx.collections.ArrayCollection; import mx.effects.easing.Elastic; [Bindable] public var ac:ArrayCollection = new ArrayCollection([One-Device,Two-Device,Three-Device,Four-Device,Five-Device,Six-Device]); [Bindable] public var arr:Array=[One,Second,Third]; [Bindable] public var filterText:String = ''; private function doChange():void { this.filterText = txtSearch.text; //this.ac.refresh(); } private function init():void { arr.filter(processFilter); } private function processFilter(item:Object,index:int, array:Array):Boolean { return String(item).toUpperCase().indexOf(filterText.toUpperCase()) = 0; } private function seeLabel(evt:Event):void { var alrt:Alert=Alert.show(evt.currentTarget.toString()); } ]] /mx:Script mx:List x=74 y=228 width=229 height=238 dataProvider={arr} id=DevicesList/mx:List mx:TextInput x=74 y=198 id=txtSearch change=doChange()/ On Thu, Dec 4, 2008 at 11:05 AM, anuj sharma [EMAIL PROTECTED] wrote: Hi Josh Thanks a lot, That works perfectly for my arrayCollection. Now I already have a project in which the data provider for my List is Array and I need the same filter functionality for the Array. can we do this filter for Array too or do i have to change the code of my project and instead of array I need to store complete data in ArrayCollection instead of Array and then made that filter working. It's just lot of work to change the existing workign code with my harsh deadline. Please let me know which is the best way. Again I highly appreciate your help Anuj On Wed, Dec 3, 2008 at 7:25 PM, Josh McDonald [EMAIL PROTECTED] wrote: private function processFilter(item:Object):Boolean { return String(item).toUpperCase().indexOf(filterText.toUpperCase()) = 0; } -Josh -- Therefore, send not to know For whom the bell tolls. It tolls for thee. Like the cut of my jib? Check out my Flex blog! :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] :: http://flex.joshmcdonald.info/ :: http://twitter.com/sophistifunk
Re: [flexcoders] Fwd: Filtering the List Entries depending upon the text entered in text Input box
Awesome , Cool I followed that and after little tweaks, it is working for me. Josh, David, Tracy and Alex , Thanks a lot for your help guys. I appreciate that Anuj On Thu, Dec 4, 2008 at 3:07 PM, Josh McDonald [EMAIL PROTECTED] wrote: Never bind to array, and also when you call array.filter() it will make a duplicate Array, things you change there won't get changed in your source (depending on references etc). You don't need to totally change your code, just create a new ArrayCollection using your existing array as the source. Whenever you add or delete items using the ArrayCollection, it will update the Array for you, and when you set a filter on ArrayCollection it only updates when it needs to, it's pretty smart. Then you just bind to the ArrayCollection instead of the Array for the dataProvider of your List or DataGrid or whatever. -Josh On Fri, Dec 5, 2008 at 6:42 AM, anuj sharma [EMAIL PROTECTED] wrote: Not with the above code Anuj On Thu, Dec 4, 2008 at 12:21 PM, Tracy Spratt [EMAIL PROTECTED]wrote: Array is not bindable. Do you not get a warning? Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *anuj sharma *Sent:* Thursday, December 04, 2008 2:44 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Fwd: Filtering the List Entries depending upon the text entered in text Input box I would be able to successfully implement the same code with Array instead of ArrayCollection but there is no method name array.refresh, However there is method named ArrayCollection.refresh which is responsible for refreshing my list. How do I refresh my array?Does anybody know equivalent method to refresh array in the list? Below is the code except in the processfilter I need to refresh array. Thanks for your help Anuj /***CODE*/ mx:Script ![CDATA[ import mx.managers.PopUpManager; import mx.effects.DefaultTileListEffect; import mx.rpc.events.ResultEvent; import mx.controls.Alert; import mx.collections.ArrayCollection; import mx.effects.easing.Elastic; [Bindable] public var ac:ArrayCollection = new ArrayCollection([One-Device,Two-Device,Three-Device,Four-Device,Five-Device,Six-Device]); [Bindable] public var arr:Array=[One,Second,Third]; [Bindable] public var filterText:String = ''; private function doChange():void { this.filterText = txtSearch.text; //this.ac.refresh(); } private function init():void { arr.filter(processFilter); } private function processFilter(item:Object,index:int, array:Array):Boolean { return String(item).toUpperCase().indexOf(filterText.toUpperCase()) = 0; } private function seeLabel(evt:Event):void { var alrt:Alert=Alert.show(evt.currentTarget.toString()); } ]] /mx:Script mx:List x=74 y=228 width=229 height=238 dataProvider={arr} id=DevicesList/mx:List mx:TextInput x=74 y=198 id=txtSearch change=doChange()/ On Thu, Dec 4, 2008 at 11:05 AM, anuj sharma [EMAIL PROTECTED] wrote: Hi Josh Thanks a lot, That works perfectly for my arrayCollection. Now I already have a project in which the data provider for my List is Array and I need the same filter functionality for the Array. can we do this filter for Array too or do i have to change the code of my project and instead of array I need to store complete data in ArrayCollection instead of Array and then made that filter working. It's just lot of work to change the existing workign code with my harsh deadline. Please let me know which is the best way. Again I highly appreciate your help Anuj On Wed, Dec 3, 2008 at 7:25 PM, Josh McDonald [EMAIL PROTECTED] wrote: private function processFilter(item:Object):Boolean { return String(item).toUpperCase().indexOf(filterText.toUpperCase()) = 0; } -Josh -- Therefore, send not to know For whom the bell tolls. It tolls for thee. Like the cut of my jib? Check out my Flex blog! :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] :: http://flex.joshmcdonald.info/ :: http://twitter.com/sophistifunk -- Therefore, send not to know For whom the bell tolls. It tolls for thee. Like the cut of my jib? Check out my Flex blog! :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] :: http://flex.joshmcdonald.info/ :: http://twitter.com/sophistifunk
Re: [flexcoders] Is there any Name -Value Pair concept for Arrays?
Hi Tracy Finally I would be able to retrieve labels but sorry I used labelFunction because for some reason labelfield is breaking other programmer's code: I have no idea why. So Below is my code. But Now I am doing some logical error. I am getting all the values in an array but it gives all the entries in all the whole list. For example if there are 10 values named friendly name I need the list to show Value 1 Value 2 Value 3 . . . . Value10 as 10 entries in the list but with my code it is showing Value1,Value2Value10 10times in 10 rows with 10 entries in each row 10 times . I guess I am messing up in the logic. Can you please help me to fix this problem. Thanks alot for all your help Anuj /*CODE*/ public var arrPoolNameText:Array=new Array(); private function assignFriendlyName(item:Object):String { var devicesTextFN:XMLList = devicesCollection.child(attributes).child(attribute); for each (var attributesInFriendlyPool:* in devicesTextFN) { //Checks if the attribute name is pool if([EMAIL PROTECTED] == 'friendly-name') { var poolnameText:String = attributesInFriendlyPool.toString(); arrPoolNameText.push(poolnameText); } } return arrPoolNameText.toString(); } mx:List id=nvrsInPoolList labelFunction=assignFriendlyName horizontalScrollPolicy=on allowMultipleSelection=true dragMoveEnabled=true dragEnabled=true dropEnabled=true y=105 x=17 height=462 width=294/ On Mon, Dec 1, 2008 at 6:36 PM, Tracy Spratt [EMAIL PROTECTED] wrote: Skip the Array entirely. Use the devicesCollection directly as the dataProvider: nvrsInPoolList.dataProvider = devicesCollection; Then do: mx:List id=nvrsInPoolList labelField=[EMAIL PROTECTED] …/ labelField tells List what to display. Then nvrsInPoolList.selectedItem will contain the *entire xml node* and you can access any value from it, Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *anuj sharma *Sent:* Monday, December 01, 2008 4:27 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Is there any Name -Value Pair concept for Arrays? Hi Tracy Yes I have attached code to tell you exactly how I am doing this. I am assigning an Array to my dataProvider and my array consists of XML Nodes. I hope I answer all of your questions. I am putting array of XML Nodes as dataProviders in List. I hope the code below will help you. Please let me know how to solve the problem of displaying different entities as labels and values in the List. Thanks for all your help Anuj //MXML Code mx:HTTPService id=devicesXML method=GET resultFormat=e4x result=devicesXMLHandler(event) showBusyCursor=true /mx:HTTPService mx:List id=nvrsInPoolList allowMultipleSelection=true dragMoveEnabled=true dragEnabled=true dropEnabled=true y=105 x=17 height=462 width=294/ //Action Script Code [Bindable] private var devicesInList:Array=new Array(); [Bindable] private var devicesList:XMLList; [Bindable] private var poolsList:XMLList; [Bindable] private var devicesCollection:XMLListCollection; public function init() { devicesXML.url=http://121.0.30.6:8182/config/devices;; devicesXML.useProxy=false; } private function devicesXMLHandler(event:ResultEvent):void { devicesList = event.result.device; devicesCollection = new XMLListCollection(devicesList); //Checks every device for each (var devicesInPool:* in devicesList) { var deviceName:String = [EMAIL PROTECTED]; var label:[EMAIL PROTECTED]; devicesInList.push(deviceName); } nvrsInPoolList.dataProvider = devicesInList; } On Mon, Dec 1, 2008 at 1:24 PM, Tracy Spratt [EMAIL PROTECTED] wrote: dataProviders do not display anything. But whatever your display component, there is a way to specify which property on the item you want to display. You say your dataProvider is an array. Are you sure? How are you sure? Are you using the work array in its purely technical sense, or in a more generic sense, that includes associative array and arrayCollection? If it is an Array, what is it an array of? (dynamic objects, scalar values, xml nodes?) What is your resultFormat? Have you inspected your data in the result handler function? Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *anuj181 *Sent:* Monday, December 01, 2008 2:48 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Is there any Name -Value Pair concept for Arrays
Re: [flexcoders] Is there any Name -Value Pair concept for Arrays?
Alright Tracy Sorry for the confusion and the ambiguity, I fixed it. Actually I was looping through it and testing the condition without checking the match but now this function below is working. It is showing me the attributes I was looking for now. Thanks for your help and again. Anuj /*CODE*/ private function assignFriendlyName(item:Object):String { //Checks every device for each (var devicesID:* in devicesList) { var deviceName:String = [EMAIL PROTECTED]; //Checks if the current deviceID matches the current item, if so it will search its attributes if(deviceName == item.toString()) { var devicesText:XMLList = devicesID.child(attributes).child(attribute); //Checks every attribute tag for each device for each (var attributesFriendlyName:* in devicesText) { //Checks if the attribute name is friendly-name if([EMAIL PROTECTED] == 'friendly-name') { var friendlynameText:String = attributesFriendlyName.toString(); return friendlynameText; } } } } return item.toString(); } On Tue, Dec 2, 2008 at 4:15 PM, Tracy Spratt [EMAIL PROTECTED] wrote: I do not understand what you are trying to do, but… In your labelfunction logic, you are not using any values from the passed in row item. That does not make any sense. The purpose of a labelFunction is to use the row item properties to build a string to display. Look at that logic again. Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *anuj sharma *Sent:* Tuesday, December 02, 2008 6:02 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Is there any Name -Value Pair concept for Arrays? Hi Tracy Finally I would be able to retrieve labels but sorry I used labelFunction because for some reason labelfield is breaking other programmer's code: I have no idea why. So Below is my code. But Now I am doing some logical error. I am getting all the values in an array but it gives all the entries in all the whole list. For example if there are 10 values named friendly name I need the list to show Value 1 Value 2 Value 3 . . . . Value10 as 10 entries in the list but with my code it is showing Value1,Value2Value10 10times in 10 rows with 10 entries in each row 10 times . I guess I am messing up in the logic. Can you please help me to fix this problem. Thanks alot for all your help Anuj /*CODE*/ public var arrPoolNameText:Array=new Array(); private function assignFriendlyName(item:Object):String { var devicesTextFN:XMLList = devicesCollection.child(attributes).child(attribute); for each (var attributesInFriendlyPool:* in devicesTextFN) { //Checks if the attribute name is pool if([EMAIL PROTECTED] == 'friendly-name') { var poolnameText:String = attributesInFriendlyPool.toString(); arrPoolNameText.push(poolnameText); } } return arrPoolNameText.toString(); } mx:List id=nvrsInPoolList labelFunction=assignFriendlyName horizontalScrollPolicy=on allowMultipleSelection=true dragMoveEnabled=true dragEnabled=true dropEnabled=true y=105 x=17 height=462 width=294/ On Mon, Dec 1, 2008 at 6:36 PM, Tracy Spratt [EMAIL PROTECTED] wrote: Skip the Array entirely. Use the devicesCollection directly as the dataProvider: nvrsInPoolList.dataProvider = devicesCollection; Then do: mx:List id=nvrsInPoolList labelField=[EMAIL PROTECTED] …/ labelField tells List what to display. Then nvrsInPoolList.selectedItem will contain the *entire xml node* and you can access any value from it, Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *anuj sharma *Sent:* Monday, December 01, 2008 4:27 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Is there any Name -Value Pair concept for Arrays? Hi Tracy Yes I have attached code to tell you exactly how I am doing this. I am assigning an Array to my dataProvider and my array consists of XML Nodes. I hope I answer all of your questions. I am putting array of XML Nodes as dataProviders in List. I hope the code below will help you. Please let me know how to solve the problem of displaying different entities as labels and values in the List. Thanks
Re: [flexcoders] Is there any Name -Value Pair concept for Arrays?
Hi Tracy Yes I have attached code to tell you exactly how I am doing this. I am assigning an Array to my dataProvider and my array consists of XML Nodes. I hope I answer all of your questions. I am putting array of XML Nodes as dataProviders in List. I hope the code below will help you. Please let me know how to solve the problem of displaying different entities as labels and values in the List. Thanks for all your help Anuj //MXML Code mx:HTTPService id=devicesXML method=GET resultFormat=e4x result=devicesXMLHandler(event) showBusyCursor=true /mx:HTTPService mx:List id=nvrsInPoolList allowMultipleSelection=true dragMoveEnabled=true dragEnabled=true dropEnabled=true y=105 x=17 height=462 width=294/ //Action Script Code [Bindable] private var devicesInList:Array=new Array(); [Bindable] private var devicesList:XMLList; [Bindable] private var poolsList:XMLList; [Bindable] private var devicesCollection:XMLListCollection; public function init() { devicesXML.url=http://121.0.30.6:8182/config/devices;; devicesXML.useProxy=false; } private function devicesXMLHandler(event:ResultEvent):void { devicesList = event.result.device; devicesCollection = new XMLListCollection(devicesList); //Checks every device for each (var devicesInPool:* in devicesList) { var deviceName:String = [EMAIL PROTECTED]; var label:[EMAIL PROTECTED]; devicesInList.push(deviceName); } nvrsInPoolList.dataProvider = devicesInList; } On Mon, Dec 1, 2008 at 1:24 PM, Tracy Spratt [EMAIL PROTECTED] wrote: dataProviders do not display anything. But whatever your display component, there is a way to specify which property on the item you want to display. You say your dataProvider is an array. Are you sure? How are you sure? Are you using the work array in its purely technical sense, or in a more generic sense, that includes associative array and arrayCollection? If it is an Array, what is it an array of? (dynamic objects, scalar values, xml nodes?) What is your resultFormat? Have you inspected your data in the result handler function? Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *anuj181 *Sent:* Monday, December 01, 2008 2:48 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Is there any Name -Value Pair concept for Arrays? Hi All I am retrieving some data using HTTP from PostGres database. I would be successfully able to put all the entries in UDN's in the list box (using REST Calls). Now my requirement is that I need to display an attribute name Friendly name which is already in the database as the label (VISUAL entry ) in the list but when user performs different operations like drag and drop, I need the complete string in form XML to be send. So to make long story short I need to display friendly name as list entries but behind the curtain that label have exact complete value coming from the Database. Now is there any way that I can tell my data provider (which is an Array in my case) that to display just the specific attribute for the database and while doing operation send the whole value. Any links, examples and help will be appreciated. Thanks Anuj
Re: [flexcoders] How to send data as XML (data is loaded through HTTP in List Box)
Hi Tracy I agree, I just fixed this problem 5 minutes ago. Actually problem was I stores everything in XML List but I was passing an array containing label as the data Provider which was just for the visual perspective, so for sending data I need to grab the XML List's nodes associated with the particular entry of the array and i did that. So Now my problem is solved. I apologize for the inconvenience. Sometimes it happened with me that the moment I put the post on the list , and within little time i just figured out. Please do not mind that. Thanks a lot for your help. Anuj On Tue, Nov 25, 2008 at 2:09 PM, Tracy Spratt [EMAIL PROTECTED] wrote: …it is dropping just the label…. I doubt that that is correct. Why do you think it is so? What is the dataProvider type for both lists? The built-in d/d functionality expects the same types in source and target and copies or moves entire items. The second list is expecting the same type of item as the first. We need more code/detail. Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *anuj181 *Sent:* Tuesday, November 25, 2008 4:44 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] How to send data as XML (data is loaded through HTTP in List Box) Hi All I use HTTP service to load data in List Box. I pasted code below, Now I need to allow drag and drop operation which I am successfully able to do that. However once items are dropped in second list , I need to wrap up the data as XML and send it to server , I guess i will use 'POST' method for that. Now root of my problem is when I am dragging and dropping items from one list to another, it is dropping just the label of the entries in form of string(XML List) but not the full XML node. From visual perspective it looks fine but what I need is to send data as an XML simply as simply sending the string would not process the necessary update to the database. Can anybody help me in getting hold of data in my list as XML but not as simple strings. Any help will be appreciated. Thanks Anuj /***My Code/ mx:HTTPService id=devicesXML method=GET resultFormat=e4x result=devicesXMLHandler(event) showBusyCursor=true /mx:HTTPService private function devicesXMLHandler(event:ResultEvent):void { devicesList = event.result.device; devicesCollection = new XMLListCollection(devicesList); nvrsInPoolList.dataProvider = devicesInList; } mx:List id=nvrsInPoolList change=selectionChangehandler(event) allowMultipleSelection=true dragMoveEnabled=true dragEnabled=true dropEnabled=true y=105 x=17 height=462 width=294/
Re: [flexcoders] How to Add and Remove items from one list to another on click of button
Hi Guys Problem Solved. If anyone needed that code here it is on click of button call this function Thanks private function addToAssociatedDevices(evt:MouseEvent):void { var _addDevicesLen:int=devicesInList.length; var _addToAssociatedDevicesArr:Array; for(var i:*=0;i_addDevicesLen-1;i++) { _addToAssociatedDevicesArr=nvrsInPoolList.selectedItems; } if((_addToAssociatedDevicesArr is Array)(_addToAssociatedDevicesArr!=null)) { for each (var addItemVal:* in _addToAssociatedDevicesArr) { IList(camerasInPoolList.dataProvider).addItem(addItemVal as Object); } } for(var t:*=0;t_addToAssociatedDevicesArr.length;t++) { IList(nvrsInPoolList.dataProvider).removeItemAt(nvrsInPoolList.selectedIndex); } } On Mon, Nov 24, 2008 at 11:41 AM, anuj181 [EMAIL PROTECTED] wrote: Hi All I am trying to move multiple items from one list to another on click of Add button. Please correct me if I am wrong. I have data provider for both these lists as an array and I was thinking that for adding I need to put the selected items in another array and need to add that array items in first list and delete those items from the second list. Does anyone know how would i achieve that functionality and is this the right approach, My data provider is dynamic and I used HTTP service to constantly update my database. Can anyone help me in moving selected items from one list to another on click of button. Any links, examples and help will be appreciated Many Many Thanks in advance. Anuj
Re: [flexcoders] FlexBuilder compiler errors on CSS
Hi Tom I used external CSS as follows Application { background-color:#92959E; backgroundAlpha:2; borderThickness:0; } and it is working fine in my case. However if I modify my external CSS using Dreamwaever it does not sho the property backgroundAlpha though. Anuj On Mon, Nov 24, 2008 at 3:33 PM, Tom McNeer [EMAIL PROTECTED] wrote: Hi, When using an external CSS file in my Flex apps, I receive compiler errors from attributes that are not valid for normal browser CSS ('property backgroundAlpha doesn't exist'), either because the attributes don't exist in HTML (fillAlphas) or because they are written in Actionscript style (fontSize rather than font-size). Has anyone else seen this, or know why it might be happening? These errors don't occur if the CSS are within the Style tag in the main application file. They occur during the build, and I get the usual alert about errors in the project, asking if I want to continue to launch the application. -- Thanks, Tom Tom McNeer MediumCool http://www.mediumcool.com 1735 Johnson Road NE Atlanta, GA 30306 404.589.0560
Re: [flexcoders] Getting IP address of the local machine
Hi Tom SOrry for the misleading subject, I need server's address and I got through PHP, Thanks Anuj On Thu, Nov 20, 2008 at 3:05 AM, Tom Chiverton [EMAIL PROTECTED] wrote: On Wednesday 19 Nov 2008, anuj181 wrote: Hi Is it possible to get the IP Address of the serveron which you Flex App is running. No, Flex runs on the client, not the server. What exactly are you trying to do ? -- Tom Chiverton Helping to synergistically revolutionize user-centric eigth-generation market-growth This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
Re: [flexcoders] How to SelectAll entries in List
Hi Alex and Josh Thanks for your help. Worked perfectly for me. I was just little lazy to look for some in-built property like selectALL in Flex for that, but your logic works perfect for me. Thanks again guys Anuj On Thu, Nov 20, 2008 at 2:55 PM, Josh McDonald [EMAIL PROTECTED] wrote: Code: var all : Array; if (myList.dataProvider is Array) { all = myList.dataProvider.concat(); } else { all = []; for (var o : * in myList.dataProvider) { all.push(o); } } myList.selectedItems = all; Note that you might want to use myList.dataProvider.source() if it's a collection of some sort, but that could backfire when sorts or filters are applied. It might not, I haven't checked through the source or tested it, but it might. YMMV, etc :) -Josh On Fri, Nov 21, 2008 at 8:32 AM, anuj181 [EMAIL PROTECTED] wrote: Hi Guys In the list allowMultipleSelection allows me to select multiple entries of the list box. How would i implement the 'Select All' functionality, I need all the entries of the list to be selected if I click on the button. Pls let me know Thanks in advance Anuj -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links -- Therefore, send not to know For whom the bell tolls. It tolls for thee. Like the cut of my jib? Check out my Flex blog! :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] :: http://flex.joshmcdonald.info/ :: http://twitter.com/sophistifunk
Re: [flexcoders] Re: Does Smart Serach like 'You tube' does possible in Flex ?
Alright if that's the case, I will give it a shot. Thanks a lot guys for your help Anuj On Tue, Nov 18, 2008 at 6:25 PM, Guy Morton [EMAIL PROTECTED] wrote: It's covered by the BSD license, which is pretty generous... On 19/11/2008, at 1:03 PM, anuj sharma wrote: No Worries Charlie, That's really helpful. I imported SWC in my library and it is doing what it is supposed to do. I hope there are no licensing issue with using SWC files within my project andif i have all my data in the Dataprovider do you think this should be good to go for the search. And i am assuming after minor tweaks it can talk to external XML File and work within LAN. Please let me know. Many Many Thanks for your help. Anuj On Tue, Nov 18, 2008 at 5:39 PM, zwigby [EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, zwigby [EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, anuj181 anuj181@ wrote: Hi Guys If you go to You tube and when you start typing stuff then you get suggestions for the related text you types. I have requirement something like this. I pulled the data in my list box and we have to make it search able like if user starts typing in the text box say 'Adobe..', the list containing the original data starts getting filtered with the entries starting with name 'Adobe' . if the user does not enter anything in the text box, he/she will receive the original list with the complete data. My question to you genius guys is that is it possible in Flex 3.0/AS 3.0 or should i go through some other language. I read somewhere that it can be done using AJAX but I like to achieve this functionality using Flex. Please let me know if this is doable , any help/links will also be appreciated. Thanks Anuj Not sure if this is exactly what you are looking for but the autocomplete manager component in the yahoo library is pretty good at this behavior. http://developer.yahoo.com/flash/astra-flash/ Charlie Actually you probably want the flex components http://developer.yahoo.com/flash/astra-flex/. My apologies. Charlie
Re: [flexcoders] Getting IP address of the local machine
Okay if thats the case do you have the code which is doing something like that. I know little bit Flex but I ma fairly new to PHP. Thanks a lot Anuj On Wed, Nov 19, 2008 at 3:06 PM, Mark Easton [EMAIL PROTECTED] wrote: I dont know about flex itself, but flex can call php and get the ip address from that. -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *anuj181 *Sent:* Thursday, November 20, 2008 11:41 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Getting IP address of the local machine Hi Is it possible to get the IP Address of the serveron which you Flex App is running. My requirement is that I need to get the IP address of the server . Please let me know if Flex supports getting the IP address of the server machine, I know we can do that with PHP but i am just wondering if its possible with Flex exclusively. Thanks in advance Anuj No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.175 / Virus Database: 270.9.6/1797 - Release Date: 11/19/2008 8:58 AM
Re: [flexcoders] Re: Getting IP address of the local machine
Alright guys Fixed the problem return $_SERVER['SERVER_NAME']; in PHP and use AMFPHP to use it in Flex Thanks Anuj On Wed, Nov 19, 2008 at 4:18 PM, Dmitri Girski [EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Mark Easton [EMAIL PROTECTED] wrote: I dont know about flex itself, but flex can call php and get the ip address from that. PHP/Server can't always return the machine's IP. If machine is behind the NAT/proxy, proxy address will be returned. Cheers, Dmitri.
Re: [flexcoders] Re: Does Smart Serach like 'You tube' does possible in Flex ?
Hi Charlie Thanks for the link, it is good to know about that but unfortunately my company would not allow me to talk to yahoo services. If i can get hold of the complete code of how this service is generating this search, that would be great help to me. Also to make things little more clear, I need that the list will be updated as user starts type, so basically there is already list having entries and when user starts typing, the list should getting filtered. Hope I am clear, please let me know if you have more guidance in that direction. Thanks Anuj On Tue, Nov 18, 2008 at 5:21 PM, zwigby [EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, anuj181 [EMAIL PROTECTED] wrote: Hi Guys If you go to You tube and when you start typing stuff then you get suggestions for the related text you types. I have requirement something like this. I pulled the data in my list box and we have to make it search able like if user starts typing in the text box say 'Adobe..', the list containing the original data starts getting filtered with the entries starting with name 'Adobe' . if the user does not enter anything in the text box, he/she will receive the original list with the complete data. My question to you genius guys is that is it possible in Flex 3.0/AS 3.0 or should i go through some other language. I read somewhere that it can be done using AJAX but I like to achieve this functionality using Flex. Please let me know if this is doable , any help/links will also be appreciated. Thanks Anuj Not sure if this is exactly what you are looking for but the autocomplete manager component in the yahoo library is pretty good at this behavior. http://developer.yahoo.com/flash/astra-flash/ Charlie
Re: [flexcoders] Re: Does Smart Serach like 'You tube' does possible in Flex ?
Also forgot to mention, there can be chance that my app will be used when the user cannot have access to internet (but can have access to intranet). Thanks Anuj On Tue, Nov 18, 2008 at 5:41 PM, anuj sharma [EMAIL PROTECTED] wrote: Hi Charlie Thanks for the link, it is good to know about that but unfortunately my company would not allow me to talk to yahoo services. If i can get hold of the complete code of how this service is generating this search, that would be great help to me. Also to make things little more clear, I need that the list will be updated as user starts type, so basically there is already list having entries and when user starts typing, the list should getting filtered. Hope I am clear, please let me know if you have more guidance in that direction. Thanks Anuj On Tue, Nov 18, 2008 at 5:21 PM, zwigby [EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, anuj181 [EMAIL PROTECTED] wrote: Hi Guys If you go to You tube and when you start typing stuff then you get suggestions for the related text you types. I have requirement something like this. I pulled the data in my list box and we have to make it search able like if user starts typing in the text box say 'Adobe..', the list containing the original data starts getting filtered with the entries starting with name 'Adobe' . if the user does not enter anything in the text box, he/she will receive the original list with the complete data. My question to you genius guys is that is it possible in Flex 3.0/AS 3.0 or should i go through some other language. I read somewhere that it can be done using AJAX but I like to achieve this functionality using Flex. Please let me know if this is doable , any help/links will also be appreciated. Thanks Anuj Not sure if this is exactly what you are looking for but the autocomplete manager component in the yahoo library is pretty good at this behavior. http://developer.yahoo.com/flash/astra-flash/ Charlie
Re: [flexcoders] Re: Does Smart Serach like 'You tube' does possible in Flex ?
No Worries Charlie, That's really helpful. I imported SWC in my library and it is doing what it is supposed to do. I hope there are no licensing issue with using SWC files within my project andif i have all my data in the Dataprovider do you think this should be good to go for the search. And i am assuming after minor tweaks it can talk to external XML File and work within LAN. Please let me know. Many Many Thanks for your help. Anuj On Tue, Nov 18, 2008 at 5:39 PM, zwigby [EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, zwigby [EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, anuj181 anuj181@ wrote: Hi Guys If you go to You tube and when you start typing stuff then you get suggestions for the related text you types. I have requirement something like this. I pulled the data in my list box and we have to make it search able like if user starts typing in the text box say 'Adobe..', the list containing the original data starts getting filtered with the entries starting with name 'Adobe' . if the user does not enter anything in the text box, he/she will receive the original list with the complete data. My question to you genius guys is that is it possible in Flex 3.0/AS 3.0 or should i go through some other language. I read somewhere that it can be done using AJAX but I like to achieve this functionality using Flex. Please let me know if this is doable , any help/links will also be appreciated. Thanks Anuj Not sure if this is exactly what you are looking for but the autocomplete manager component in the yahoo library is pretty good at this behavior. http://developer.yahoo.com/flash/astra-flash/ Charlie Actually you probably want the flex components http://developer.yahoo.com/flash/astra-flex/. My apologies. Charlie
Re: [flexcoders] Security Sandbox Violation message
When I got this error in my app I set Security.allowDomain(*); I am not sure that's the right way of doing stuff but that did take care of my run time error and make my app up and running. Thxs Anuj On Sun, Nov 16, 2008 at 9:57 PM, brucewhealton [EMAIL PROTECTED]wrote: Hello all, Anyone have any ideas as to why I would get this message: Security Sandbox Violation? I googled it and came up with a listing where it said that if I was seeing it in Firefox browser to try it in IE browser. I did that and did not get the message when using IE. Note, this only happens when debugging an application. The thing is that what I was reading suggested that the problem could be that I don't have the plug-in for the Flash Player debugger version. However, I do have that version of Flash Player for Firefox. Any other ideas as to why it might show up when debugging an application locally? thanks, Bruce
Re: [flexcoders] Re: Setting cursor to particular text box on the application load
Thanks Jim It is surprising that Flex does not provide that i built functionality. Anyways I will try to implement JavaScript way. Anuj On Wed, Nov 12, 2008 at 7:42 AM, jim.abbott45 [EMAIL PROTECTED]wrote: In order for this to work, your application _as a whole_ needs to do two things. One of them is (in Flex) to use the setFocus() method to specify where (in the Flex applications) focus should go. From your posting it appears that you have already done this. The other thing is that the _entire Flex application itself_ needs to first get focus. This is not done in Flex, it needs to be done in the 'HTML Wrapper' page which loads the Flex application. Please locate your Flex project's index.template.html file and open it for editing. Then add JavaScript code which will cause the Flex application to receive focus when the HTML page is loaded. The simplest way to do this is to add an inline event handler to the page's BODY element. For example, if the HTML Wrapper page is being viewed in the IE v7 Web browser, then the following code should work: body scroll=no onLoad=window.document.${application}.focus(); Please note that the behavior might be slightly different in other browsers (i.e., FireFox, Safari, etc.) and you may have to tweak the JavaScript code to achieve a robust solution. Regards, Jim --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, anuj181 [EMAIL PROTECTED] wrote: Hi Is it possible to set the cursor to the text input while your app loads. I am using setFocus to particular text input but it is just setting the focus to my text box but not the cursor. Is it possible to set the cursor to the text box on the app load. Thanks Anuj
Re: [flexcoders] Gettign data from the list and putting into an array
Thanks a lot tracy, That worked I appreciate ur help. Anuj On Wed, Nov 12, 2008 at 2:57 PM, Tracy Spratt [EMAIL PROTECTED] wrote: Depending on the dataProvider, it might be as simple as: var aList2:array = dataProvider.source; //to put the data into an array and dataProvider.removeall(); to empty the list. Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *anuj181 *Sent:* Wednesday, November 12, 2008 5:22 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Gettign data from the list and putting into an array Hi Guys I am moving data from one list(A) to another(B) using drag-drop manager. The data is showing fine in both the lists, it is basically moving the selected entries form one list to another. Now my requirement is as soon as user clicks on a 'Add Button' , my code should put all the entries in list B in an array. Basically i want to retrieve the contents of List B (which were dragged from List A) and put them in an array. Also is there any way to empty the filled list too. I like if user hits 'Cancel' button the List B should be empty. Please let me know if you have any idea about the solution of above problems. Thanks Anuj
Re: [flexcoders] drag and drop from Tree to List
Hi I am not sure I get that but in general if you drag and drop from lets' say 'A' to B' ,I have used to drag and drop both ways from one list to another and I did is as follows A.dragMoveEnabled=true; A.dragEnabled=true; A.dropEnabled=true; B.dragMoveEnabled=true; B.dragEnabled=true; B.dropEnabled=true; Thats worked in my case , i was moving entries though. Hope that helps Anuj On Mon, Nov 10, 2008 at 11:14 AM, graysonpierce [EMAIL PROTECTED]wrote: I have a tree and a list that I'd like to use drag and drop on to do the following: 1. Do reordering in the list (ie move the items around) 2. Drag items from the tree to the list in order to copy items The problem I'm experiencing is that when I turn on dropEnabled=true on the list the reordering of the list works fine however it stops allowing the tree to drop items on the list even if I explicitly set a drag enter function list this public function onDragEnter( event:DragEvent ) : void { DragManager.acceptDragDrop(List(event.currentTarget)); }
Re: [flexcoders] Casting Problem Dragging from one list and Dropping into another
That's interesting because I am using the same code for both the lists, for both the lists I am enabling dragmove enabled property true. In short they all have the same property defined, so technically they should work but that's my surprise that they work one way and i cannot drop back. I have no idea Tracy. Please let me know if you have any. Also if it helps should should i change my approach of drag and drop because as far as i know you can do drag and drop multiple ways, either directly defining source and destination or using all function drag enter , drag exit and drag complete. Pls let me know if you have any altenative. Thanks Anuj On Fri, Nov 7, 2008 at 10:20 AM, Tracy Spratt [EMAIL PROTECTED] wrote: Why is it failing? Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *anuj sharma *Sent:* Thursday, November 06, 2008 8:38 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Casting Problem Dragging from one list and Dropping into another Alright Guys I fixed this casting problem, I need to put everythig in XML instead of Arrray, it is dropping fields from one list to other now, but now i came up with another problem which is that I need to move fields from list 1 to list 2, However it is allowing me to move from list one to 2nd but not from 2nd to first. The way i enable move is with the dragMoveEnabled property true. Below is the code for the both the list. Please let me know how would i enable move back from the second list to the first one. Thanks again for your help. Anuj //First list var _selectedCameras:List=new List(); _selectedCameras.dragMoveEnabled=true; _selectedCameras.dragEnabled=true; _selectedCameras.dropEnabled=true; //Second List var _selectCameras:List=new List(); _selectedCameras.dragMoveEnabled=true; _selectedCameras.dragEnabled=true; _selectCameras.dropEnabled=true; _selectCameras.labelField=@id; On Thu, Nov 6, 2008 at 4:42 PM, anuj181 [EMAIL PROTECTED] wrote: Hi Guys I am trying to drag contents of one list and drop it into the second List. I am having issues that first list has values from XML List Collection and only i need is the 'id' attribute of the XML and I am successful in getting XML List in 1st list. I am using HTTP Service. Now my problem is that when i am trying to drag and drop the fields from first list it puts filed in the second list with [object,object]. I am using array to grab values from 1st list. I have attached the code. Anyone has any idea where I am messing things. To me it looks like casting problems. Please let me know how would I fix this issue as I only need the same field from one list to other. Thanks a lot for you help guys Anuj /*My Code*/ //First List [Bindable] public var _selectedCameras:List=new List(); _selectedCameras.dragEnabled=true; _selectedCameras.dataProvider=devicesCollection; _selectedCameras.labelField=@id; //Second List var _selectCameras:List=new List(); _selectCameras.dragEnabled=true; _selectCameras.dropEnabled=true; _selectCameras.dataProvider=new ArrayCollection(); _selectCameras.labelField=@id; _selectCameras.dataProvider=new ArrayCollection(); _selectCameras.labelField=@id;_selectCameras.addEventListener(DragEvent.DRAG_DROP,onListDragDrop); //Result of the From the data base private function devicesXMLHandler(event:ResultEvent):void { devicesList = event.result.device; devicesCollection = new XMLListCollection(devicesList); } !--Calling deviceXML Handler-- mx:HTTPService id=devicesXML method=GET resultFormat=e4x url=http://10.80.3.56:8182/config/devices; result=devicesXMLHandler(event) showBusyCursor=true/ //Calling Function for Drop Manager private function onListDragDrop(event:DragEvent):void { if(event.dragSource.hasFormat(items)) { event.preventDefault(); event.currentTarget.hideDropFeedback(event); var dropTarget:List=List(event.currentTarget); var itemArray:Array=event.dragSource.dataForFormat(items) as Array; var alrt:Alert=Alert.show(itemArray.toString()); //Copy the new Dragged data into a new Object var tempItem:Object={label:itemArray[0].label,data:itemArray[0].data}; //Get the drop location in the destination if(dropTarget !=null) { var dropLoc:int=dropTarget.calculateDropIndex(event); } if((tempItem!=null) (dropTarget!=null)) { //Add the new object to the drop target IList(dropTarget.dataProvider).addItemAt(tempItem,dropLoc); } } }
Re: [flexcoders] Casting Problem Dragging from one list and Dropping into another
Hey Guys How smart I am , I have given the same name to the both source and destination . So i figured that out and its working . Sorry for the stupid question and thanks fro ur help Anuj On Fri, Nov 7, 2008 at 10:32 AM, anuj sharma [EMAIL PROTECTED] wrote: That's interesting because I am using the same code for both the lists, for both the lists I am enabling dragmove enabled property true. In short they all have the same property defined, so technically they should work but that's my surprise that they work one way and i cannot drop back. I have no idea Tracy. Please let me know if you have any. Also if it helps should should i change my approach of drag and drop because as far as i know you can do drag and drop multiple ways, either directly defining source and destination or using all function drag enter , drag exit and drag complete. Pls let me know if you have any altenative. Thanks Anuj On Fri, Nov 7, 2008 at 10:20 AM, Tracy Spratt [EMAIL PROTECTED]wrote: Why is it failing? Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *anuj sharma *Sent:* Thursday, November 06, 2008 8:38 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Casting Problem Dragging from one list and Dropping into another Alright Guys I fixed this casting problem, I need to put everythig in XML instead of Arrray, it is dropping fields from one list to other now, but now i came up with another problem which is that I need to move fields from list 1 to list 2, However it is allowing me to move from list one to 2nd but not from 2nd to first. The way i enable move is with the dragMoveEnabled property true. Below is the code for the both the list. Please let me know how would i enable move back from the second list to the first one. Thanks again for your help. Anuj //First list var _selectedCameras:List=new List(); _selectedCameras.dragMoveEnabled=true; _selectedCameras.dragEnabled=true; _selectedCameras.dropEnabled=true; //Second List var _selectCameras:List=new List(); _selectedCameras.dragMoveEnabled=true; _selectedCameras.dragEnabled=true; _selectCameras.dropEnabled=true; _selectCameras.labelField=@id; On Thu, Nov 6, 2008 at 4:42 PM, anuj181 [EMAIL PROTECTED] wrote: Hi Guys I am trying to drag contents of one list and drop it into the second List. I am having issues that first list has values from XML List Collection and only i need is the 'id' attribute of the XML and I am successful in getting XML List in 1st list. I am using HTTP Service. Now my problem is that when i am trying to drag and drop the fields from first list it puts filed in the second list with [object,object]. I am using array to grab values from 1st list. I have attached the code. Anyone has any idea where I am messing things. To me it looks like casting problems. Please let me know how would I fix this issue as I only need the same field from one list to other. Thanks a lot for you help guys Anuj /*My Code*/ //First List [Bindable] public var _selectedCameras:List=new List(); _selectedCameras.dragEnabled=true; _selectedCameras.dataProvider=devicesCollection; _selectedCameras.labelField=@id; //Second List var _selectCameras:List=new List(); _selectCameras.dragEnabled=true; _selectCameras.dropEnabled=true; _selectCameras.dataProvider=new ArrayCollection(); _selectCameras.labelField=@id; _selectCameras.dataProvider=new ArrayCollection(); _selectCameras.labelField=@id;_selectCameras.addEventListener(DragEvent.DRAG_DROP,onListDragDrop); //Result of the From the data base private function devicesXMLHandler(event:ResultEvent):void { devicesList = event.result.device; devicesCollection = new XMLListCollection(devicesList); } !--Calling deviceXML Handler-- mx:HTTPService id=devicesXML method=GET resultFormat=e4x url=http://10.80.3.56:8182/config/devices; result=devicesXMLHandler(event) showBusyCursor=true/ //Calling Function for Drop Manager private function onListDragDrop(event:DragEvent):void { if(event.dragSource.hasFormat(items)) { event.preventDefault(); event.currentTarget.hideDropFeedback(event); var dropTarget:List=List(event.currentTarget); var itemArray:Array=event.dragSource.dataForFormat(items) as Array; var alrt:Alert=Alert.show(itemArray.toString()); //Copy the new Dragged data into a new Object var tempItem:Object={label:itemArray[0].label,data:itemArray[0].data}; //Get the drop location in the destination if(dropTarget !=null) { var dropLoc:int=dropTarget.calculateDropIndex(event); } if((tempItem!=null) (dropTarget!=null)) { //Add the new object to the drop target IList(dropTarget.dataProvider).addItemAt(tempItem,dropLoc); } } }
Re: [flexcoders] Casting Problem Dragging from one list and Dropping into another
Alright Guys I fixed this casting problem, I need to put everythig in XML instead of Arrray, it is dropping fields from one list to other now, but now i came up with another problem which is that I need to move fields from list 1 to list 2, However it is allowing me to move from list one to 2nd but not from 2nd to first. The way i enable move is with the dragMoveEnabled property true. Below is the code for the both the list. Please let me know how would i enable move back from the second list to the first one. Thanks again for your help. Anuj //First list var _selectedCameras:List=new List(); _selectedCameras.dragMoveEnabled=true; _selectedCameras.dragEnabled=true; _selectedCameras.dropEnabled=true; //Second List var _selectCameras:List=new List(); _selectedCameras.dragMoveEnabled=true; _selectedCameras.dragEnabled=true; _selectCameras.dropEnabled=true; _selectCameras.labelField=@id; On Thu, Nov 6, 2008 at 4:42 PM, anuj181 [EMAIL PROTECTED] wrote: Hi Guys I am trying to drag contents of one list and drop it into the second List. I am having issues that first list has values from XML List Collection and only i need is the 'id' attribute of the XML and I am successful in getting XML List in 1st list. I am using HTTP Service. Now my problem is that when i am trying to drag and drop the fields from first list it puts filed in the second list with [object,object]. I am using array to grab values from 1st list. I have attached the code. Anyone has any idea where I am messing things. To me it looks like casting problems. Please let me know how would I fix this issue as I only need the same field from one list to other. Thanks a lot for you help guys Anuj /*My Code*/ //First List [Bindable] public var _selectedCameras:List=new List(); _selectedCameras.dragEnabled=true; _selectedCameras.dataProvider=devicesCollection; _selectedCameras.labelField=@id; //Second List var _selectCameras:List=new List(); _selectCameras.dragEnabled=true; _selectCameras.dropEnabled=true; _selectCameras.dataProvider=new ArrayCollection(); _selectCameras.labelField=@id; _selectCameras.dataProvider=new ArrayCollection(); _selectCameras.labelField=@id;_selectCameras.addEventListener(DragEvent.DRAG_DROP,onListDragDrop); //Result of the From the data base private function devicesXMLHandler(event:ResultEvent):void { devicesList = event.result.device; devicesCollection = new XMLListCollection(devicesList); } !--Calling deviceXML Handler-- mx:HTTPService id=devicesXML method=GET resultFormat=e4x url=http://10.80.3.56:8182/config/devices; result=devicesXMLHandler(event) showBusyCursor=true/ //Calling Function for Drop Manager private function onListDragDrop(event:DragEvent):void { if(event.dragSource.hasFormat(items)) { event.preventDefault(); event.currentTarget.hideDropFeedback(event); var dropTarget:List=List(event.currentTarget); var itemArray:Array=event.dragSource.dataForFormat(items) as Array; var alrt:Alert=Alert.show(itemArray.toString()); //Copy the new Dragged data into a new Object var tempItem:Object={label:itemArray[0].label,data:itemArray[0].data}; //Get the drop location in the destination if(dropTarget !=null) { var dropLoc:int=dropTarget.calculateDropIndex(event); } if((tempItem!=null) (dropTarget!=null)) { //Add the new object to the drop target IList(dropTarget.dataProvider).addItemAt(tempItem,dropLoc); } } }
Re: [flexcoders] Basic Tab Question
Hi Josh I guess you found that for me. Awesome , i hope i would be able to style that and embed any image on that. Thanks a lot for your help Josh. I appreciate that. Anuj On Tue, Oct 28, 2008 at 5:59 PM, Josh McDonald [EMAIL PROTECTED] wrote: Erm, that would be vertical :D On Wed, Oct 29, 2008 at 10:59 AM, Josh McDonald [EMAIL PROTECTED] wrote: Try a ToggleButtonBar using direction=horizontal On Wed, Oct 29, 2008 at 10:19 AM, anuj sharma [EMAIL PROTECTED] wrote: Hi Josh Thanks for the reply I check Accordion. I think that's not exacty what i am looking for. Acordion is like collapsible menus having different components in it but I am looking for the tabs (which were on the left navigation pane) upon click of which the contents affiliated to that specific tab will be displayed on the right. Please let me know if there is any inbuilt compoent in the flex that will take care of that. Thanks a lot for your help Anuj On Tue, Oct 28, 2008 at 5:10 PM, Josh McDonald [EMAIL PROTECTED] wrote: You should check out the Accordion control. -Josh On Wed, Oct 29, 2008 at 10:03 AM, anuj181 [EMAIL PROTECTED] wrote: Hi I have seen Tab-navigator in Flex 3.0. I have basic question. Is it possible to to stack tabs vertically rather than horizontally . I have a requirement in which I have to make something like horizontal tabs but they have to be stacked vertically and then I need to embed image in those vertical tabs. Please let me know how would i do that Thanks a lot guys Anuj -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links -- Therefore, send not to know For whom the bell tolls. It tolls for thee. Like the cut of my jib? Check out my Flex blog! :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] :: http://flex.joshmcdonald.info/ -- Therefore, send not to know For whom the bell tolls. It tolls for thee. Like the cut of my jib? Check out my Flex blog! :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] :: http://flex.joshmcdonald.info/ -- Therefore, send not to know For whom the bell tolls. It tolls for thee. Like the cut of my jib? Check out my Flex blog! :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] :: http://flex.joshmcdonald.info/
Re: [flexcoders] Basic Tab Question
Hi Josh Thanks for the reply I check Accordion. I think that's not exacty what i am looking for. Acordion is like collapsible menus having different components in it but I am looking for the tabs (which were on the left navigation pane) upon click of which the contents affiliated to that specific tab will be displayed on the right. Please let me know if there is any inbuilt compoent in the flex that will take care of that. Thanks a lot for your help Anuj On Tue, Oct 28, 2008 at 5:10 PM, Josh McDonald [EMAIL PROTECTED] wrote: You should check out the Accordion control. -Josh On Wed, Oct 29, 2008 at 10:03 AM, anuj181 [EMAIL PROTECTED] wrote: Hi I have seen Tab-navigator in Flex 3.0. I have basic question. Is it possible to to stack tabs vertically rather than horizontally . I have a requirement in which I have to make something like horizontal tabs but they have to be stacked vertically and then I need to embed image in those vertical tabs. Please let me know how would i do that Thanks a lot guys Anuj -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links -- Therefore, send not to know For whom the bell tolls. It tolls for thee. Like the cut of my jib? Check out my Flex blog! :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] :: http://flex.joshmcdonald.info/
Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help
Hi Mark I looked at the official website of Light stream , it seems that that's what we need. Now my question to you is if I am using this for my company do i have to pay something or is it totally going to be free. Are there any licensing issues involved with that. Please let me know Thanks Anuj On Tue, Oct 21, 2008 at 7:26 PM, markgoldin_2000 [EMAIL PROTECTED]wrote: I have been working on a data pushing solution using Lightstreamer push server. Works with Flex via Ajax bridge. True real time data updates. Take a look at LS push server web site. They have examples for Flex. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, john fisher [EMAIL PROTECTED] wrote: I am working on a similar problem... I don't use PostGres, but there may be some sort of export to XML function. *If* that can fire on changes ( or you set up the inserts/updates that way), then you have something that an httpservice can acquire directly. But somebody still has to ask the file if it changed... unless You use a socket connection to stuff an event into the dataprovider. Theres some examples in the adobe docs. or you poll, but don't refresh the whole html page, just the data in the swf, and only when it changes. My users cant tell the difference between polling and the socket connection in the two demos I made. I'm just a newbie, so if there is another way, I'd sure like to hear about it. John Paul Andrews wrote: Isn't this simply a problem that multiple calls are required to poll the database for change? I think the OP really needs a push type service. There's no way to know that the database table has changed without polling the database..
Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help
Hi Tracy Thanks for the link. Now in the link i couldn't find the specific example using timer for constant calling for HTTP service. Can you please tell me where exactly the example is located. Your help will be appreciated. Thanks Anuj On Wed, Oct 22, 2008 at 10:15 AM, Tracy Spratt [EMAIL PROTECTED]wrote: Yes, polling using Timer will work fine. I even have an example on www.cflex.net, but it is pretty simple to do. Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *anuj sharma *Sent:* Wednesday, October 22, 2008 12:02 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help Hi Guys Thanks for your different approaches to solve this problem.I will try all of them and see which one will suit my management, but i really appreciate that. I have one solution which recently struck me , please let me know if this is the right one. Can I use the Timer class to create a timer instance which will periodically call HTTP and check which entries are in database and update the dataProvider with the recent entries. Do you guys think this is going to work. i am going to explore all the solutions recommended by you guys and see which is most convenient and efficient to implement with my deadline. Please let me know if Timer thing is going to work for database. Again Appreciate your help Anuj On Tue, Oct 21, 2008 at 7:26 PM, markgoldin_2000 [EMAIL PROTECTED] wrote: I have been working on a data pushing solution using Lightstreamer push server. Works with Flex via Ajax bridge. True real time data updates. Take a look at LS push server web site. They have examples for Flex. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, john fisher [EMAIL PROTECTED] wrote: I am working on a similar problem... I don't use PostGres, but there may be some sort of export to XML function. *If* that can fire on changes ( or you set up the inserts/updates that way), then you have something that an httpservice can acquire directly. But somebody still has to ask the file if it changed... unless You use a socket connection to stuff an event into the dataprovider. Theres some examples in the adobe docs. or you poll, but don't refresh the whole html page, just the data in the swf, and only when it changes. My users cant tell the difference between polling and the socket connection in the two demos I made. I'm just a newbie, so if there is another way, I'd sure like to hear about it. John Paul Andrews wrote: Isn't this simply a problem that multiple calls are required to poll the database for change? I think the OP really needs a push type service. There's no way to know that the database table has changed without polling the database..
Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help
Hi John I am not sure i get what you are trying to say. Can you be please elaborate little bit more. Thanks Anuj On Wed, Oct 22, 2008 at 10:13 AM, john fisher [EMAIL PROTECTED] wrote: @mark: thanks will check it out @anuj: this is just exactly what the adobe sample code does, except not directly to the database. anuj sharma wrote: ... Can I use the Timer class to create a timer instance which will periodically call HTTP a
Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help
Hi Tracy Thank you very much for the link. I really appreciate that. Anuj On Wed, Oct 22, 2008 at 1:05 PM, Tracy Spratt [EMAIL PROTECTED] wrote: http://www.cflex.net/showFileDetails.cfm?ObjectID=560 Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *anuj sharma *Sent:* Wednesday, October 22, 2008 2:20 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help Hi Tracy Thanks for the link. Now in the link i couldn't find the specific example using timer for constant calling for HTTP service. Can you please tell me where exactly the example is located. Your help will be appreciated. Thanks Anuj On Wed, Oct 22, 2008 at 10:15 AM, Tracy Spratt [EMAIL PROTECTED] wrote: Yes, polling using Timer will work fine. I even have an example on www.cflex.net, but it is pretty simple to do. Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *anuj sharma *Sent:* Wednesday, October 22, 2008 12:02 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help Hi Guys Thanks for your different approaches to solve this problem.I will try all of them and see which one will suit my management, but i really appreciate that. I have one solution which recently struck me , please let me know if this is the right one. Can I use the Timer class to create a timer instance which will periodically call HTTP and check which entries are in database and update the dataProvider with the recent entries. Do you guys think this is going to work. i am going to explore all the solutions recommended by you guys and see which is most convenient and efficient to implement with my deadline. Please let me know if Timer thing is going to work for database. Again Appreciate your help Anuj On Tue, Oct 21, 2008 at 7:26 PM, markgoldin_2000 [EMAIL PROTECTED] wrote: I have been working on a data pushing solution using Lightstreamer push server. Works with Flex via Ajax bridge. True real time data updates. Take a look at LS push server web site. They have examples for Flex. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, john fisher [EMAIL PROTECTED] wrote: I am working on a similar problem... I don't use PostGres, but there may be some sort of export to XML function. *If* that can fire on changes ( or you set up the inserts/updates that way), then you have something that an httpservice can acquire directly. But somebody still has to ask the file if it changed... unless You use a socket connection to stuff an event into the dataprovider. Theres some examples in the adobe docs. or you poll, but don't refresh the whole html page, just the data in the swf, and only when it changes. My users cant tell the difference between polling and the socket connection in the two demos I made. I'm just a newbie, so if there is another way, I'd sure like to hear about it. John Paul Andrews wrote: Isn't this simply a problem that multiple calls are required to poll the database for change? I think the OP really needs a push type service. There's no way to know that the database table has changed without polling the database..
Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help
Bingo Guys Thats' exactly what i need. Tracy's Timer example works perfect for me. Again thanks a lot for your help. Anuj On Wed, Oct 22, 2008 at 2:29 PM, john fisher [EMAIL PROTECTED] wrote: Anuj I meant, search through the online adobe docs for 'timer polling example' or other keywords like those. there are many many examples in the online docs at Adobe. John anuj sharma wrote: Hi John I am not sure i get what you are trying to say. Can you be please elaborate little bit more. Thanks Anuj On Wed, Oct 22, 2008 at 10:13 AM, john fisher [EMAIL PROTECTED]john%40jpfisher.net wrote: @mark: thanks will check it out @anuj: this is just exactly what the adobe sample code does, except not directly to the database. anuj sharma wrote: ... Can I use the Timer class to create a timer instance which will periodically call HTTP a
Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help
Hi Guys Thanks for your different approaches to solve this problem.I will try all of them and see which one will suit my management, but i really appreciate that. I have one solution which recently struck me , please let me know if this is the right one. Can I use the Timer class to create a timer instance which will periodically call HTTP and check which entries are in database and update the dataProvider with the recent entries. Do you guys think this is going to work. i am going to explore all the solutions recommended by you guys and see which is most convenient and efficient to implement with my deadline. Please let me know if Timer thing is going to work for database. Again Appreciate your help Anuj On Tue, Oct 21, 2008 at 7:26 PM, markgoldin_2000 [EMAIL PROTECTED]wrote: I have been working on a data pushing solution using Lightstreamer push server. Works with Flex via Ajax bridge. True real time data updates. Take a look at LS push server web site. They have examples for Flex. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, john fisher [EMAIL PROTECTED] wrote: I am working on a similar problem... I don't use PostGres, but there may be some sort of export to XML function. *If* that can fire on changes ( or you set up the inserts/updates that way), then you have something that an httpservice can acquire directly. But somebody still has to ask the file if it changed... unless You use a socket connection to stuff an event into the dataprovider. Theres some examples in the adobe docs. or you poll, but don't refresh the whole html page, just the data in the swf, and only when it changes. My users cant tell the difference between polling and the socket connection in the two demos I made. I'm just a newbie, so if there is another way, I'd sure like to hear about it. John Paul Andrews wrote: Isn't this simply a problem that multiple calls are required to poll the database for change? I think the OP really needs a push type service. There's no way to know that the database table has changed without polling the database..
Re: [flexcoders] Errror while accessing mxml component in external as file
hi all problem has been fixed.Scope of function needs to be changed. Thxs for ur help Anuj On Mon, Oct 13, 2008 at 10:38 AM, anuj181 [EMAIL PROTECTED] wrote: Hi Guys I am trying to implement the login form . The login form works fine when i use script and put all the action script in the main mxml file. But my requirements is to put all the action script in external as file and make things working. For some reason the builder does not like my login button, user name text and password text in the as file. Initially it does not recognize those components but then i user parent::loginbutton to access which solves the compile time problem, but gives type coercion error in my project as TypeError: Error #1034: Type Coercion failed: cannot convert mx.containers::[EMAIL PROTECTED] to Namespace. I like to define my login and password text input in the main mxml file and like to write the business logic in external as file. Please let me know what i am missing.If you can provide someone who has done that, that will be helpful too. Thanks a lot for your help. Anuj /*My MXML Code*/ ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; creationComplete=URLLoader_loadExample() xmlns:text=flash.text.* cornerRadius=2 xmlns:ns1=com.Pelco.login.view.* width=1200 height=768 !-- The Application class states property defines the view states. -- mx:Metadata [Event(name=fistTimeSetupEvent, type=flash.events.Event)] /mx:Metadata mx:Script source=scripts/login.as / mx:HTTPService id=ConfigXMLService url=Private/Config.xml resultFormat=e4x result=loginSettings(event) / mx:HTTPService id=UsersXMLService url=assets/Users.xml resultFormat=e4x result=loginSettings(event) / mx:states mx:State name=Recover !-- Add a TextInput control to the form. -- !-- Set properties on the Panel container and Button control. -- mx:SetProperty target={loginPanel} name=title value=Recover Password/ mx:SetProperty target={loginButton} name=label value=Recover/ !-- Remove the existing LinkButton control. -- mx:RemoveChild target={registerLink}/ !-- Add a new LinkButton control to change view state back to the login form. -- mx:AddChild relativeTo={spacer1} position=before mx:LinkButton label=Return to Login click=currentState=''/ /mx:AddChild mx:RemoveChild target={formitem1}/ mx:SetProperty target={password} name=label value=Email:/ mx:AddChild relativeTo={password} position=before mx:FormItem label=or textAlign=center horizontalCenter=true horizontalAlign=center /mx:FormItem /mx:AddChild /mx:State /mx:states mx:Panel width=1200 height=736 y=32 horizontalAlign=center verticalAlign=middle creationComplete=ConfigXMLService.send() !--mx:Label text=here:{TabBarMain.enabled} fontSize=40 x=432 y=10/ -- mx:Panel title=Login id=loginPanel horizontalScrollPolicy=off verticalScrollPolicy=off horizontalCenter=1 verticalCenter=1 mx:Form id=loginForm defaultButton={loginButton} mx:FormItem label=Username: id=username mx:TextInput id=txt_UserName/ /mx:FormItem mx:FormItem label=Password: id=password mx:TextInput id=txt_Password displayAsPassword=true/ /mx:FormItem mx:FormItem label=Domain: id=formitem1 mx:ComboBox dataProvider={domainCollection}/mx:ComboBox /mx:FormItem /mx:Form mx:ControlBar !-- Use the LinkButton control to change to the Register view state. -- mx:LinkButton label=Forgot your password? id=registerLink click=currentState='Recover';/ mx:Spacer width=100% id=spacer1/ mx:Button label=Login id=loginButton/ /mx:ControlBar /mx:Panel /mx:Panel /*MyAction Script code*/ // ActionScript file import mx.collections.XMLListCollection; import mx.controls.Alert; import mx.rpc.events.*; import mx.controls.Alert; import flash.net.URLLoader; import flash.net.URLRequest; import flash.xml.*; private var externalXML:XML; private var loader:URLLoader; public var alert:Alert = new Alert; public var alertPassword:Alert=new Alert; public var tempUserName:Array=new Array(); public var tempPassword:Array=new Array(); public function URLLoader_loadExample():void { var request:URLRequest = new URLRequest(Private/LoginAuthenticatedUsers.xml); loader = new URLLoader(); try { loader.load(request); } catch (error:SecurityError) { trace(A SecurityError has occurred.); } // loader.addEventListener(Event.COMPLETE,processXML); function processXML(e:Event):void { //Retrieving XML data and putting them in array externalXML = new XML(e.target.data); for(var i:Number=0;iexternalXML.children().length();i++) { tempUserName.push(externalXML.user.userName.text()[i]); tempPassword.push(externalXML.user.password.text()[i]); } } //Clicking Log-in button parent::loginButton.addEventListener(MouseEvent.CLICK,checkLogin); function checkLogin( event:MouseEvent):void { var chkUserName:Boolean; var chkPassWord:Boolean; //Validating User Name and Password for(var j:Number=0;jtempUserName.length;j++) {
Re: [flexcoders] Re: Access of undefined property of type URLLoader
Thanks I have fixed it On Wed, Oct 8, 2008 at 4:34 PM, Tim Hoff [EMAIL PROTECTED] wrote: No import statement? -TH --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, anuj181 [EMAIL PROTECTED] wrote: Hi I am simply trying to load external XML file but the builder is not recognizing one of my variable named urlLoader of type URLLoader. it is saying Access of undefined property urlLoader, urlRequest and completeListener. Does anyone has any idea what's going on. Thanks ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Panel title=Login id=loginPanel horizontalScrollPolicy=off verticalScrollPolicy=off horizontalCenter=1 verticalCenter=1 mx:Form id=loginForm mx:FormItem label=Username: id=username mx:TextInput/ /mx:FormItem mx:FormItem label=Password: id=password mx:TextInput/ /mx:FormItem mx:FormItem label=Domain: id=formitem1 /mx:FormItem /mx:Form mx:ControlBar !-- Use the LinkButton control to change to the Register view state. -- mx:LinkButton label=Forgot your password? id=registerLink click=currentState='Recover';/ mx:Spacer width=100% id=spacer1/ mx:Button label=Login id=loginButton/ /mx:ControlBar /mx:Panel mx:Script ![CDATA[ import flash.net.*; import flash.display.*; import flash.xml.*; import flash.events.*; private var xmlData:XML; var urlLoader:URLLoader; //Creating XML Loader var urlRequest:URLRequest=new URLRequest(LoginAuthenticatedUsers.xml); urlLoader=new URLLoader(); urlLoader.addEventListener(Event.COMPLETE,completeListener); urlLoader.load(urlRequest); private function completeListener(e:Event):void { xmlData=new XML(urlLoader.data); trace(xmlData.toString()); } ]] /mx:Script /mx:Application
Re: [flexcoders] Is it possible to increase the heigth and width of scroll bars in any container?
Awesome Gregor Great These links will be definitely helpful. Thanks a lot for your help Gregor. I really appreciate that Anuj On Thu, Sep 11, 2008 at 12:11 AM, Gregor Kiddie [EMAIL PROTECTED]wrote: In all seriousness… any scrollbar skinning has always been along the same lines as these posts. http://axel.cfwebtools.com/index.cfm/2007/3/27/Custom-Scroll-Bar-Using-CSS http://breathflex.blogspot.com/2007/03/skinning-scrollbar-in-flex.html http://www.gskinner.com/blog/archives/2008/05/designer_scroll.html The Grant Skinner one in particular is pretty useful (as Grant always is). Hope this helps somewhat. Oh, and my previous comment wasn't really directed at anyone, it was, as Tim pointed out, a dig at English speakers ability to not only mangle other peoples, but also our own language, with surprising regularity. Gk. *Gregor Kiddie* Senior Developer *INPS* Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact [EMAIL PROTECTED] -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *anuj sharma *Sent:* 10 September 2008 19:16 *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Is it possible to increase the heigth and width of scroll bars in any container? Alright guys I found sample somehow related to that. http://www.kerkness.ca/flexexamples/ScrollSkin/ScollSkin.html That can give me little bit start to do something what i am looking fro. If you guys have any better one please let me know . Thanks for ur help Anuj On Wed, Sep 10, 2008 at 10:12 AM, anuj sharma [EMAIL PROTECTED] wrote: Hi Greg Thanks for the reply. I am not sure if i get that. How would I use renderer in my case? Can you show me any example where that have user rendering in HBox' s scroll bar case. I used rendering for loading images in the HBox but to cutomize scroll er , i haven't soemthign like that LOL :-). Please send em some code or online example where they have customized the scroll bar of HBox or VBox or any container. Again i appreciate your help. Thanks Anuj
Re: [flexcoders] Is it possible to increase the heigth and width of scroll bars in any container?
Hi Greg Thanks for the reply. I am not sure if i get that. How would I use renderer in my case? Can you show me any example where that have user rendering in HBox' s scroll bar case. I used rendering for loading images in the HBox but to cutomize scroll er , i haven't soemthign like that LOL :-). Please send em some code or online example where they have customized the scroll bar of HBox or VBox or any container. Again i appreciate your help. Thanks Anuj On Wed, Sep 10, 2008 at 12:03 AM, Gregor Kiddie [EMAIL PROTECTED]wrote: I suppose we could start being really cruel to the non-native English speakers ont eh list and start talking in LOLs… i can haz item renderer? renderer.initialise() Ur doin' it wrong! Epic Fail! *Gregor Kiddie* Senior Developer *INPS* Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact [EMAIL PROTECTED] -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Tracy Spratt *Sent:* 09 September 2008 18:10 *To:* flexcoders@yahoogroups.com *Subject:* RE: [flexcoders] Is it possible to increase the heigth and width of scroll bars in any container? Yes, IIRC is If I remember correctly. We do use jargon like that a lot. IMHO, you should always ask if you don't understand it. LOL, Tracy
Re: [flexcoders] Is it possible to increase the heigth and width of scroll bars in any container?
Alright guys I found sample somehow related to that. http://www.kerkness.ca/flexexamples/ScrollSkin/ScollSkin.html That can give me little bit start to do something what i am looking fro. If you guys have any better one please let me know . Thanks for ur help Anuj On Wed, Sep 10, 2008 at 10:12 AM, anuj sharma [EMAIL PROTECTED] wrote: Hi Greg Thanks for the reply. I am not sure if i get that. How would I use renderer in my case? Can you show me any example where that have user rendering in HBox' s scroll bar case. I used rendering for loading images in the HBox but to cutomize scroll er , i haven't soemthign like that LOL :-). Please send em some code or online example where they have customized the scroll bar of HBox or VBox or any container. Again i appreciate your help. Thanks Anuj On Wed, Sep 10, 2008 at 12:03 AM, Gregor Kiddie [EMAIL PROTECTED]wrote: I suppose we could start being really cruel to the non-native English speakers ont eh list and start talking in LOLs… i can haz item renderer? renderer.initialise() Ur doin' it wrong! Epic Fail! *Gregor Kiddie* Senior Developer *INPS* Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact [EMAIL PROTECTED] -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Tracy Spratt *Sent:* 09 September 2008 18:10 *To:* flexcoders@yahoogroups.com *Subject:* RE: [flexcoders] Is it possible to increase the heigth and width of scroll bars in any container? Yes, IIRC is If I remember correctly. We do use jargon like that a lot. IMHO, you should always ask if you don't understand it. LOL, Tracy
Re: [flexcoders] Is it possible to increase the heigth and width of scroll bars in any container?
Hi Alex Thanks a lot for the reply. What exactly is IIRC? I googled it but could not find enough good resources. Do you have any article which clears the concept of IIRC. I would appreciate if you can give some more info/links. Again many many Thanks Anuj On Mon, Sep 8, 2008 at 5:17 PM, Alex Harui [EMAIL PROTECTED] wrote: IIRC, scrollbars size to their skins so make the skins bigger and the SB should be bigger, but if you want to go smaller than 16, it is a lot of work. *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *anuj181 *Sent:* Monday, September 08, 2008 3:54 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Is it possible to increase the heigth and width of scroll bars in any container? Hi Guys I have a general question. In general any scroll bar in container(either VBOX or HBOX etc)is (by default)16 pixels wide. Is it possible to change the width and height of any scroll bar for in built containers. Also for styling those scroll bars and scroll er within the container do i have to use CSS or there is any other way too.(By styling i mean if I can give my own look and feel and color to the scroll bars in containers). Reply will be appreciated. Thanks guys Anuj
Re: [flexcoders] Is it possible to increase the heigth and width of scroll bars in any container?
Hi Alex By RIIC do u mean If I Remember Correctly, if that's the case sorry for not being familiar with internet slang. So do you think if i create bigger skins and attach with the scoll bar that should be able to take care of the sizing issue of the scroll bar. Thanks for your help Anuj On Mon, Sep 8, 2008 at 11:00 PM, anuj sharma [EMAIL PROTECTED] wrote: Hi Alex Thanks a lot for the reply. What exactly is IIRC? I googled it but could not find enough good resources. Do you have any article which clears the concept of IIRC. I would appreciate if you can give some more info/links. Again many many Thanks Anuj On Mon, Sep 8, 2008 at 5:17 PM, Alex Harui [EMAIL PROTECTED] wrote: IIRC, scrollbars size to their skins so make the skins bigger and the SB should be bigger, but if you want to go smaller than 16, it is a lot of work. *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *anuj181 *Sent:* Monday, September 08, 2008 3:54 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Is it possible to increase the heigth and width of scroll bars in any container? Hi Guys I have a general question. In general any scroll bar in container(either VBOX or HBOX etc)is (by default)16 pixels wide. Is it possible to change the width and height of any scroll bar for in built containers. Also for styling those scroll bars and scroll er within the container do i have to use CSS or there is any other way too.(By styling i mean if I can give my own look and feel and color to the scroll bars in containers). Reply will be appreciated. Thanks guys Anuj
Re: [flexcoders] Is it possible to increase the heigth and width of scroll bars in any container?
:-) Yeah i will try to look for how to add skins to the flex components and if you guys have seen any better tutorial/sample code/ swf which are doing then the pls keep me posted. Hopefully i will achieve that. Thanks for your help Alex and Tracy. Anuj On Tue, Sep 9, 2008 at 10:00 AM, Alex Harui [EMAIL PROTECTED] wrote: Yes, if you want a bigger scrollbar, just try adding larger skins *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *anuj sharma *Sent:* Tuesday, September 09, 2008 9:33 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Is it possible to increase the heigth and width of scroll bars in any container? Hi Alex By RIIC do u mean If I Remember Correctly, if that's the case sorry for not being familiar with internet slang. So do you think if i create bigger skins and attach with the scoll bar that should be able to take care of the sizing issue of the scroll bar. Thanks for your help Anuj On Mon, Sep 8, 2008 at 11:00 PM, anuj sharma [EMAIL PROTECTED] wrote: Hi Alex Thanks a lot for the reply. What exactly is IIRC? I googled it but could not find enough good resources. Do you have any article which clears the concept of IIRC. I would appreciate if you can give some more info/links. Again many many Thanks Anuj On Mon, Sep 8, 2008 at 5:17 PM, Alex Harui [EMAIL PROTECTED] wrote: IIRC, scrollbars size to their skins so make the skins bigger and the SB should be bigger, but if you want to go smaller than 16, it is a lot of work. *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *anuj181 *Sent:* Monday, September 08, 2008 3:54 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Is it possible to increase the heigth and width of scroll bars in any container? Hi Guys I have a general question. In general any scroll bar in container(either VBOX or HBOX etc)is (by default)16 pixels wide. Is it possible to change the width and height of any scroll bar for in built containers. Also for styling those scroll bars and scroll er within the container do i have to use CSS or there is any other way too.(By styling i mean if I can give my own look and feel and color to the scroll bars in containers). Reply will be appreciated. Thanks guys Anuj
Re: [flexcoders] Re: Is it possible to increase the heigth and width of scroll bars in any container?
Alright guys. I have downloaded 2 dummy png files from internet (Left_arrow.PNG Right_arrow.PNG) just to test if technique works . Belw is the css code which i am calling in HScroll Bar for HBOX and attached is the image of how it is looking . The images used are very big but it is not showing its actual size for the arrows and it is shrinking the images to take the size of the arrows in the scroll bar whereas my requirement is the other way. Basically i need to create image of my own size and i need the arrows of the scroll bar to take the size of that image. This is the first time i am doing something like this. Please let me know which link i am missing to make arrows of the scroller of my custom size, look and feel. /* CSS file */ HScrollBar { downArrowUpSkin: Embed(source=assets/images/Left_arrow.PNG); upArrowUpSkin: Embed(source=assets/images/Right_arrow.PNG); } Thanks a lot guys Anuj On Tue, Sep 9, 2008 at 10:55 AM, Tim Hoff [EMAIL PROTECTED] wrote: Hey Anuj, Here's some sample CSS to get you started. You might have to play with the scale9 values; depending on the images that you create for the skins. VScrollBar { downArrowUpSkin: Embed(source=assets/images/VscrollDownArrow_up.png ); downArrowOverSkin: Embed(source= assets/images/VscrollDownArrow_over.png); downArrowDownSkin: Embed(source= assets/images/VscrollDownArrow_down.png); upArrowUpSkin: Embed(source=assets/images/VscrollUpArrow_up.png); upArrowOverSkin: Embed(source=assets/images/VscrollUpArrow_over.png ); upArrowDownSkin: Embed(source=assets/images/VscrollUpArrow_down.png); thumbDownSkin: Embed(source=assets/images/VscrollThumb_down.png, scaleGridTop=40, scaleGridBottom=200, scaleGridLeft=6,scaleGridRight= 8); thumbUpSkin: Embed(source=assets/images/VscrollThumb_up.png, scaleGridTop=40, scaleGridBottom=200, scaleGridLeft=6,scaleGridRight= 8); thumbOverSkin: Embed(source=assets/images/VscrollThumb_over.png, scaleGridTop=40, scaleGridBottom=200, scaleGridLeft=6,scaleGridRight= 8); trackSkin: Embed(source=/assets/images/track.png, scaleGridTop=40, scaleGridBottom=336, scaleGridLeft=6,scaleGridRight= 8); } -TH --- In flexcoders@yahoogroups.com, anuj sharma [EMAIL PROTECTED] wrote: :-) Yeah i will try to look for how to add skins to the flex components and if you guys have seen any better tutorial/sample code/ swf which are doing then the pls keep me posted. Hopefully i will achieve that. Thanks for your help Alex and Tracy. Anuj On Tue, Sep 9, 2008 at 10:00 AM, Alex Harui [EMAIL PROTECTED] wrote: Yes, if you want a bigger scrollbar, just try adding larger skins *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *anuj sharma *Sent:* Tuesday, September 09, 2008 9:33 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Is it possible to increase the heigth and width of scroll bars in any container? Hi Alex By RIIC do u mean If I Remember Correctly, if that's the case sorry for not being familiar with internet slang. So do you think if i create bigger skins and attach with the scoll bar that should be able to take care of the sizing issue of the scroll bar. Thanks for your help Anuj On Mon, Sep 8, 2008 at 11:00 PM, anuj sharma [EMAIL PROTECTED] wrote: Hi Alex Thanks a lot for the reply. What exactly is IIRC? I googled it but could not find enough good resources. Do you have any article which clears the concept of IIRC. I would appreciate if you can give some more info/links. Again many many Thanks Anuj On Mon, Sep 8, 2008 at 5:17 PM, Alex Harui [EMAIL PROTECTED] wrote: IIRC, scrollbars size to their skins so make the skins bigger and the SB should be bigger, but if you want to go smaller than 16, it is a lot of work. *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *anuj181 *Sent:* Monday, September 08, 2008 3:54 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Is it possible to increase the heigth and width of scroll bars in any container? Hi Guys I have a general question. In general any scroll bar in container(either VBOX or HBOX etc)is (by default)16 pixels wide. Is it possible to change the width and height of any scroll bar for in built containers. Also for styling those scroll bars and scroll er within the container do i have to use CSS or there is any other way too.(By styling i mean if I can give my own look and feel and color to the scroll bars in containers). Reply will be appreciated. Thanks guys Anuj attachment: Custom Scroller Issue.jpg
Re: [flexcoders] Re: Is it possible to increase the heigth and width of scroll bars in any container?
Forgot to mention the mxml code. Here's the code ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Style source=style.css/ mx:Script ![CDATA[ // Embed the Thumbnails [Embed(Thumbnails/pic_1.swf)] [Bindable] public var OneCent:Class; [Embed(Thumbnails/pic_2.swf)] [Bindable] public var TwoCents:Class; [Embed(Thumbnails/pic_3.swf)] [Bindable] public var FiveCents:Class; [Embed(Thumbnails/pic_4.swf)] [Bindable] public var TenCents:Class; ]] /mx:Script mx:HBox x=106 y=900 width=391 doubleClickEnabled=true height=90 horizontalScrollPolicy=on verticalScrollPolicy=off id=ThumbnailContainer autoLayout=true mx:Image id=FirstTN width=100 mouseChildren=false doubleClickEnabled=true height=85 source={OneCent} scaleContent=true/ mx:Image id=SecondTN width=100 mouseChildren=false doubleClickEnabled=true height=85 source={TwoCents} scaleContent=true/ mx:Image id=ThirdTN width=100 mouseChildren=false doubleClickEnabled=true height=88 source={FiveCents} scaleContent=true/ mx:Image id=FourthTN width=100 mouseChildren=false doubleClickEnabled=true height=87 source={TenCents} scaleContent=true/ /mx:HBox Thanks Anuj On Tue, Sep 9, 2008 at 11:33 AM, anuj sharma [EMAIL PROTECTED] wrote: Alright guys. I have downloaded 2 dummy png files from internet (Left_arrow.PNG Right_arrow.PNG) just to test if technique works . Belw is the css code which i am calling in HScroll Bar for HBOX and attached is the image of how it is looking . The images used are very big but it is not showing its actual size for the arrows and it is shrinking the images to take the size of the arrows in the scroll bar whereas my requirement is the other way. Basically i need to create image of my own size and i need the arrows of the scroll bar to take the size of that image. This is the first time i am doing something like this. Please let me know which link i am missing to make arrows of the scroller of my custom size, look and feel. /* CSS file */ HScrollBar { downArrowUpSkin: Embed(source=assets/images/Left_arrow.PNG); upArrowUpSkin: Embed(source=assets/images/Right_arrow.PNG); } Thanks a lot guys Anuj On Tue, Sep 9, 2008 at 10:55 AM, Tim Hoff [EMAIL PROTECTED] wrote: Hey Anuj, Here's some sample CSS to get you started. You might have to play with the scale9 values; depending on the images that you create for the skins. VScrollBar { downArrowUpSkin: Embed(source= assets/images/VscrollDownArrow_up.png); downArrowOverSkin: Embed(source= assets/images/VscrollDownArrow_over.png); downArrowDownSkin: Embed(source= assets/images/VscrollDownArrow_down.png); upArrowUpSkin: Embed(source=assets/images/VscrollUpArrow_up.png); upArrowOverSkin: Embed(source= assets/images/VscrollUpArrow_over.png); upArrowDownSkin: Embed(source= assets/images/VscrollUpArrow_down.png); thumbDownSkin: Embed(source=assets/images/VscrollThumb_down.png, scaleGridTop=40, scaleGridBottom=200, scaleGridLeft=6,scaleGridRight= 8); thumbUpSkin: Embed(source=assets/images/VscrollThumb_up.png, scaleGridTop=40, scaleGridBottom=200, scaleGridLeft=6,scaleGridRight= 8); thumbOverSkin: Embed(source=assets/images/VscrollThumb_over.png, scaleGridTop=40, scaleGridBottom=200, scaleGridLeft=6,scaleGridRight= 8); trackSkin: Embed(source=/assets/images/track.png, scaleGridTop=40, scaleGridBottom=336, scaleGridLeft=6,scaleGridRight= 8); } -TH --- In flexcoders@yahoogroups.com, anuj sharma [EMAIL PROTECTED] wrote: :-) Yeah i will try to look for how to add skins to the flex components and if you guys have seen any better tutorial/sample code/ swf which are doing then the pls keep me posted. Hopefully i will achieve that. Thanks for your help Alex and Tracy. Anuj On Tue, Sep 9, 2008 at 10:00 AM, Alex Harui [EMAIL PROTECTED] wrote: Yes, if you want a bigger scrollbar, just try adding larger skins *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *anuj sharma *Sent:* Tuesday, September 09, 2008 9:33 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Is it possible to increase the heigth and width of scroll bars in any container? Hi Alex By RIIC do u mean If I Remember Correctly, if that's the case sorry for not being familiar with internet slang. So do you think if i create bigger skins and attach with the scoll bar that should be able to take care of the sizing issue of the scroll bar. Thanks for your help Anuj On Mon, Sep 8, 2008 at 11:00 PM, anuj sharma [EMAIL PROTECTED] wrote
Re: [flexcoders] Re: Is it possible to increase the heigth and width of scroll bars in any container?
Hi Tim In the trackSkin as shown by your code, you are embedding some png files.Do i have to embed files too and also what's the content of that file. Deos that file have just the rectangle showing my desired width and height because when i am trying to put the simple 'width' tag within the trackSkin, Flex builder is not letting me do that. So i am not sure how should i use trackSkin for my purpose. You have send me the code which helps me but I am not sure what's the output of the code looks like (and which type of PNG files are you using). Can you please send me the snapshot/sketch of the UI being generated with the code. Sorry for being pain but its taking little time for me to understand the styling and skinning concept of the HBox. I appreciate your patience Thanks a lot Anuj On Tue, Sep 9, 2008 at 11:52 AM, Tim Hoff [EMAIL PROTECTED] wrote: Yeah IIRC, I think that you're going to have to add the track skin, with the desired width, otherwise the button images will get scaled. -TH --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, anuj sharma [EMAIL PROTECTED] wrote: Alright guys. I have downloaded 2 dummy png files from internet (Left_arrow.PNG Right_arrow.PNG) just to test if technique works . Belw is the css code which i am calling in HScroll Bar for HBOX and attached is the image of how it is looking . The images used are very big but it is not showing its actual size for the arrows and it is shrinking the images to take the size of the arrows in the scroll bar whereas my requirement is the other way. Basically i need to create image of my own size and i need the arrows of the scroll bar to take the size of that image. This is the first time i am doing something like this. Please let me know which link i am missing to make arrows of the scroller of my custom size, look and feel. /* CSS file */ HScrollBar { downArrowUpSkin: Embed(source=assets/images/Left_arrow.PNG); upArrowUpSkin: Embed(source=assets/images/Right_arrow.PNG); } Thanks a lot guys Anuj On Tue, Sep 9, 2008 at 10:55 AM, Tim Hoff [EMAIL PROTECTED] wrote: Hey Anuj, Here's some sample CSS to get you started. You might have to play with the scale9 values; depending on the images that you create for the skins. VScrollBar { downArrowUpSkin: Embed(source=assets/images/VscrollDownArrow_up.png ); downArrowOverSkin: Embed(source= assets/images/VscrollDownArrow_over.png); downArrowDownSkin: Embed(source= assets/images/VscrollDownArrow_down.png); upArrowUpSkin: Embed(source=assets/images/VscrollUpArrow_up.png); upArrowOverSkin: Embed(source=assets/images/VscrollUpArrow_over.png ); upArrowDownSkin: Embed(source=assets/images/VscrollUpArrow_down.png); thumbDownSkin: Embed(source=assets/images/VscrollThumb_down.png, scaleGridTop=40, scaleGridBottom=200, scaleGridLeft=6,scaleGridRight= 8); thumbUpSkin: Embed(source=assets/images/VscrollThumb_up.png, scaleGridTop=40, scaleGridBottom=200, scaleGridLeft=6,scaleGridRight= 8); thumbOverSkin: Embed(source=assets/images/VscrollThumb_over.png, scaleGridTop=40, scaleGridBottom=200, scaleGridLeft=6,scaleGridRight= 8); trackSkin: Embed(source=/assets/images/track.png, scaleGridTop=40, scaleGridBottom=336, scaleGridLeft=6,scaleGridRight= 8); } -TH --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, anuj sharma anuj181@ wrote: :-) Yeah i will try to look for how to add skins to the flex components and if you guys have seen any better tutorial/sample code/ swf which are doing then the pls keep me posted. Hopefully i will achieve that. Thanks for your help Alex and Tracy. Anuj On Tue, Sep 9, 2008 at 10:00 AM, Alex Harui aharui@ wrote: Yes, if you want a bigger scrollbar, just try adding larger skins *From:* flexcoders@yahoogroups.com flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] *On Behalf Of *anuj sharma *Sent:* Tuesday, September 09, 2008 9:33 AM *To:* flexcoders@yahoogroups.com flexcoders%40yahoogroups.com *Subject:* Re: [flexcoders] Is it possible to increase the heigth and width of scroll bars in any container? Hi Alex By RIIC do u mean If I Remember Correctly, if that's the case sorry for not being familiar with internet slang. So do you think if i create bigger skins and attach with the scoll bar that should be able to take care of the sizing issue of the scroll bar. Thanks for your help Anuj On Mon, Sep 8, 2008 at 11:00 PM, anuj sharma anuj181@ wrote: Hi Alex Thanks a lot for the reply. What exactly is IIRC? I googled it but could not find enough good resources. Do you have any article which clears the concept of IIRC. I would appreciate
Re: [flexcoders] Problem importing FlexLib
Thanks Sherif I made that working. Anuj On Thu, Sep 4, 2008 at 5:52 PM, Sherif Abdou [EMAIL PROTECTED] wrote: I don't think You can import it, if you want to see the code you need to create a Flex Project--(Keep Hitting Next)--Source Path--Add Folder--Point to FlexLib folder. -- Sherif Abdou http://VadexFX.com http://Sherifabdou.com - Original Message - *From:* anuj181 [EMAIL PROTECTED] *To:* flexcoders@yahoogroups.com *Sent:* Thursday, September 04, 2008 7:04 PM *Subject:* [flexcoders] Problem importing FlexLib Hi Guys I am trying to embed FlexLib in my Flex Project using following link http://code.google.com/p/flexlib/ I am trying to import downloaded file in my FLEX devlopment environment but is not letting me do that. When i imported the complete project folder. it says The folder does not contain a valid Flex Builder Project. And when i am trying to import zipped file it is giving following message Not a valid archived project. If the zip was not created via Export Flex Project, use Import General Existing Projects into Workspace. I am using Flex 3.0 for my development. I am curious to see the code of FlexLib and may need its help in my project. Any body has any idea how would i import Flexlib in Flex. Thanks in advance for your help Anuj
Re: [flexcoders] Re: Need Help and Guidance desperately
Hi Josh If you don't mind can you please help me out with the code for this thing. You mentioned you had made something like this (snapin). Can you please show me which way i have to start and which component i need to extend. If its okay with you can i take guidance form your code and try to achieve what i am looking for. Your help will be appreciated Thanks Anuj On Wed, Sep 3, 2008 at 7:37 PM, Josh McDonald [EMAIL PROTECTED] wrote: Basically it's a *really* hard thing to do, in part due to its nature, in part due to the way Flex does some things. I built something similar, but more specialised (lays out snapin components), finds the best order to use the space most efficiently, and increases the size on them so they line up horizontally. It's difficult and it took about a week. I'd say the solution is to relax some of the requirements :) -Josh On Thu, Sep 4, 2008 at 12:26 PM, Amy [EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com, Doug McCune [EMAIL PROTECTED] wrote: His layout is really difficult. Basically he wants images to be smart enough to size any which way to fit around each other. If you take a look at the word doc he attached the second mockup shows the problem. Basically he doesn't want to restrict to rows or columns, and wants items to be able to span both, which is hard to do. I honestly don't have an answer for how to do that layout. If you can change the requirement to let you use either columns or rows then you're fine. Isn't that waht Grid does? -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links -- Therefore, send not to know For whom the bell tolls. It tolls for thee. http://flex.joshmcdonald.info/ :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
Re: [flexcoders] Need Help and Guidance desperately
Hi Guys So is there anyone in the list that can help me in achieving this? This problem is burning me out now and I need a good head start to achieve this. This is my first project of this kind. Earlier i developed simple prototypes using basic event programming. I need you genius guys's guidance to get me started and need that layout for my images. If there is any custom componenet available in the market then i am ready to buy that too. It is taking me little long to figure out this layout. I have reached at the last level of this project. Sorry for being pain but please help me out in generating this layout. Any guidance and any kind of help in this direction will be highyl appreciated. Thanks in advance guys Anuj On Wed, Aug 27, 2008 at 1:51 PM, anuj sharma [EMAIL PROTECTED] wrote: Dough I forgot to mention that i am not sure if i can force the components into either rows or columns because I am allowing free flow of the image within the container too which means that the user should be able to resize the image and should be able to drag and drop the image too whereever he wants within the container. i used drag manager for that. i thought should made it clear. Thanks for your time Anuj On Wed, Aug 27, 2008 at 9:34 AM, Doug McCune [EMAIL PROTECTED] wrote: Oh wow, that's actually a really flexible layout requirement that I don't think you can achieve with any of the components out there right now (ie TileList, Tile, combination of HBox and VBox, or even FlowBox). I think you may have to lose of of the desired functionality and allow the content to be binned into distinct rows or columns more tightly. The first image in your attachement is doable in the FlowBox I believe, but the second screenshot is much harder. Notice how box C extends down into a second row, and also how box E extends across multiple columns. That use of dual column and row spanning makes it difficult. If you allow the components to be forced into either rows or columns then it will be much easier. Doug On Wed, Aug 27, 2008 at 9:05 AM, anuj sharma [EMAIL PROTECTED] wrote: Hi All Attached is the rough sketch i am about the UI i have to implement. Right now they are just empty pictures, but the user can drag them on the stage and can resize the images placed on the main screen. My requirement if user drops a new image on the screen all the other images adjust themselves to accommodate the new image. Also if user enlarge or shrink one image (like in the sketch user is trying to shrink image B), all the other images adjust themselves on the main stage . Please let em know if you have any questions. Thanks a lot for your help Anuj On Tue, Aug 26, 2008 at 4:38 PM, anuj sharma [EMAIL PROTECTED] wrote: Hi Rick I will try to sketch my requirement and send it to you soon. That might help to find what i am looking for. Thanks for your suggestion. Anuj On Mon, Aug 25, 2008 at 7:47 PM, Rick Winscot [EMAIL PROTECTED]wrote: The seconds link was to a flow layout that would set you in the right direction... The other option was the first link which uses static positioning. Really, it depends on what you want the user experience to be like. If you could sketch out the solution – we could throw some code around. Rick Winscot On 8/25/08 10:24 PM, anuj sharma [EMAIL PROTECTED] wrote: Hi Rick Thanks for the reply. Are there any recommendations about which layout component or container should i use or do i need to create my custom component for achieving this target. I am not sure which way to handle that layout. Please help me out Again Thanks a lot. Anuj On Mon, Aug 25, 2008 at 5:18 PM, anuj181 [EMAIL PROTECTED] wrote: Hi I am using HBOX container to load images letting user drag image from one HBOX and dropping them in another (2nd)HBOX. I need to calculate the real estate of the HBOX in which the image has been dropped (i-e 2nd HBOX). The reason is that because I need the dropped image to get placed in an empty space within the 2nd HBOX. Is there any way I can calculate which space is empty in the HBOX and let my objects (images) to be placed only in the empty spaces within the HBOX (not the sapce already occupied by the placed images).Once the HBOX is full then I need to code in a way that images starts shrinking(upto some level) to accommodate more images. Please help me out in figuring out this problem. Any type of help/documentation/links in this direction will be highly appreciated. Thanks Anuj
Re: [flexcoders] Need Help and Guidance desperately
Hi Alex I am not sure i understand that. Basically I am dragging images from one container which is HBOX( because i need scroller facility too) and dropping them in another container which is Tile. The user should be able to resize the dropped images as shown in the layout and the rest of the images have to adjust in terms of size as well as location to let resized image to get accommodated. I have seen some examples of FlowBox and one as shown in the following link: http://demo.quietlyscheming.com/DragTile/DragDrop.html but my problem coems becasue user should be able to resize the images in the container. As I have mentioned this is the first project of this kind for me I am not sure which way to go. Anyway coming to your question (mini-window using FlexMDI) it can be the any way as long as it is solving the purpose of my requirement. Any detail and suggestions, please let me know Thanks Anuj On Wed, Sep 3, 2008 at 2:16 PM, Alex Harui [EMAIL PROTECTED] wrote: Can everything be a mini-window using FlexMDI? *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *anuj sharma *Sent:* Wednesday, September 03, 2008 1:46 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Need Help and Guidance desperately Hi Guys So is there anyone in the list that can help me in achieving this? This problem is burning me out now and I need a good head start to achieve this. This is my first project of this kind. Earlier i developed simple prototypes using basic event programming. I need you genius guys's guidance to get me started and need that layout for my images. If there is any custom componenet available in the market then i am ready to buy that too. It is taking me little long to figure out this layout. I have reached at the last level of this project. Sorry for being pain but please help me out in generating this layout. Any guidance and any kind of help in this direction will be highyl appreciated. Thanks in advance guys Anuj On Wed, Aug 27, 2008 at 1:51 PM, anuj sharma [EMAIL PROTECTED] wrote: Dough I forgot to mention that i am not sure if i can force the components into either rows or columns because I am allowing free flow of the image within the container too which means that the user should be able to resize the image and should be able to drag and drop the image too whereever he wants within the container. i used drag manager for that. i thought should made it clear. Thanks for your time Anuj On Wed, Aug 27, 2008 at 9:34 AM, Doug McCune [EMAIL PROTECTED] wrote: Oh wow, that's actually a really flexible layout requirement that I don't think you can achieve with any of the components out there right now (ie TileList, Tile, combination of HBox and VBox, or even FlowBox). I think you may have to lose of of the desired functionality and allow the content to be binned into distinct rows or columns more tightly. The first image in your attachement is doable in the FlowBox I believe, but the second screenshot is much harder. Notice how box C extends down into a second row, and also how box E extends across multiple columns. That use of dual column and row spanning makes it difficult. If you allow the components to be forced into either rows or columns then it will be much easier. Doug On Wed, Aug 27, 2008 at 9:05 AM, anuj sharma [EMAIL PROTECTED] wrote: Hi All Attached is the rough sketch i am about the UI i have to implement. Right now they are just empty pictures, but the user can drag them on the stage and can resize the images placed on the main screen. My requirement if user drops a new image on the screen all the other images adjust themselves to accommodate the new image. Also if user enlarge or shrink one image (like in the sketch user is trying to shrink image B), all the other images adjust themselves on the main stage . Please let em know if you have any questions. Thanks a lot for your help Anuj On Tue, Aug 26, 2008 at 4:38 PM, anuj sharma [EMAIL PROTECTED] wrote: Hi Rick I will try to sketch my requirement and send it to you soon. That might help to find what i am looking for. Thanks for your suggestion. Anuj On Mon, Aug 25, 2008 at 7:47 PM, Rick Winscot [EMAIL PROTECTED] wrote: The seconds link was to a flow layout that would set you in the right direction... The other option was the first link which uses static positioning. Really, it depends on what you want the user experience to be like. If you could sketch out the solution – we could throw some code around. Rick Winscot On 8/25/08 10:24 PM, anuj sharma [EMAIL PROTECTED] wrote: Hi Rick Thanks for the reply. Are there any recommendations about which layout component or container should i use or do i need to create my custom component for achieving this target. I am not sure which way to handle that layout. Please help me out Again Thanks a lot. Anuj On Mon, Aug 25, 2008 at 5:18 PM, anuj181 [EMAIL
Re: [flexcoders] Need Help and Guidance desperately
Can I put my resizeable images in the FlowBox and upon resizing will the rest of the images be arranged of its own. I was not sure if FlowBox can take care of resizing the images.If that's the case i will try that. I will definitely keep you posted about that. Thanks Anuj On Wed, Sep 3, 2008 at 2:49 PM, Alex Harui [EMAIL PROTECTED] wrote: OK, FlexMDI, probably won't do it for you. You want some organization of the images. Why didn't FlowBox work for you? *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *anuj sharma *Sent:* Wednesday, September 03, 2008 2:31 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Need Help and Guidance desperately Hi Alex I am not sure i understand that. Basically I am dragging images from one container which is HBOX( because i need scroller facility too) and dropping them in another container which is Tile. The user should be able to resize the dropped images as shown in the layout and the rest of the images have to adjust in terms of size as well as location to let resized image to get accommodated. I have seen some examples of FlowBox and one as shown in the following link: http://demo.quietlyscheming.com/DragTile/DragDrop.html but my problem coems becasue user should be able to resize the images in the container. As I have mentioned this is the first project of this kind for me I am not sure which way to go. Anyway coming to your question (mini-window using FlexMDI) it can be the any way as long as it is solving the purpose of my requirement. Any detail and suggestions, please let me know Thanks Anuj On Wed, Sep 3, 2008 at 2:16 PM, Alex Harui [EMAIL PROTECTED] wrote: Can everything be a mini-window using FlexMDI? *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *anuj sharma *Sent:* Wednesday, September 03, 2008 1:46 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Need Help and Guidance desperately Hi Guys So is there anyone in the list that can help me in achieving this? This problem is burning me out now and I need a good head start to achieve this. This is my first project of this kind. Earlier i developed simple prototypes using basic event programming. I need you genius guys's guidance to get me started and need that layout for my images. If there is any custom componenet available in the market then i am ready to buy that too. It is taking me little long to figure out this layout. I have reached at the last level of this project. Sorry for being pain but please help me out in generating this layout. Any guidance and any kind of help in this direction will be highyl appreciated. Thanks in advance guys Anuj On Wed, Aug 27, 2008 at 1:51 PM, anuj sharma [EMAIL PROTECTED] wrote: Dough I forgot to mention that i am not sure if i can force the components into either rows or columns because I am allowing free flow of the image within the container too which means that the user should be able to resize the image and should be able to drag and drop the image too whereever he wants within the container. i used drag manager for that. i thought should made it clear. Thanks for your time Anuj On Wed, Aug 27, 2008 at 9:34 AM, Doug McCune [EMAIL PROTECTED] wrote: Oh wow, that's actually a really flexible layout requirement that I don't think you can achieve with any of the components out there right now (ie TileList, Tile, combination of HBox and VBox, or even FlowBox). I think you may have to lose of of the desired functionality and allow the content to be binned into distinct rows or columns more tightly. The first image in your attachement is doable in the FlowBox I believe, but the second screenshot is much harder. Notice how box C extends down into a second row, and also how box E extends across multiple columns. That use of dual column and row spanning makes it difficult. If you allow the components to be forced into either rows or columns then it will be much easier. Doug On Wed, Aug 27, 2008 at 9:05 AM, anuj sharma [EMAIL PROTECTED] wrote: Hi All Attached is the rough sketch i am about the UI i have to implement. Right now they are just empty pictures, but the user can drag them on the stage and can resize the images placed on the main screen. My requirement if user drops a new image on the screen all the other images adjust themselves to accommodate the new image. Also if user enlarge or shrink one image (like in the sketch user is trying to shrink image B), all the other images adjust themselves on the main stage . Please let em know if you have any questions. Thanks a lot for your help Anuj On Tue, Aug 26, 2008 at 4:38 PM, anuj sharma [EMAIL PROTECTED] wrote: Hi Rick I will try to sketch my requirement and send it to you soon. That might help to find what i am looking for. Thanks for your suggestion. Anuj On Mon, Aug 25, 2008 at 7:47 PM, Rick Winscot [EMAIL PROTECTED
Re: [flexcoders] Need Help and Guidance desperately
Doug Thanks for the reply. if you find any resources that might help me, please e-mail it to me. I would appreciate any kind of help in achieving this target Anuj On Wed, Aug 27, 2008 at 9:34 AM, Doug McCune [EMAIL PROTECTED] wrote: Oh wow, that's actually a really flexible layout requirement that I don't think you can achieve with any of the components out there right now (ie TileList, Tile, combination of HBox and VBox, or even FlowBox). I think you may have to lose of of the desired functionality and allow the content to be binned into distinct rows or columns more tightly. The first image in your attachement is doable in the FlowBox I believe, but the second screenshot is much harder. Notice how box C extends down into a second row, and also how box E extends across multiple columns. That use of dual column and row spanning makes it difficult. If you allow the components to be forced into either rows or columns then it will be much easier. Doug On Wed, Aug 27, 2008 at 9:05 AM, anuj sharma [EMAIL PROTECTED] wrote: Hi All Attached is the rough sketch i am about the UI i have to implement. Right now they are just empty pictures, but the user can drag them on the stage and can resize the images placed on the main screen. My requirement if user drops a new image on the screen all the other images adjust themselves to accommodate the new image. Also if user enlarge or shrink one image (like in the sketch user is trying to shrink image B), all the other images adjust themselves on the main stage . Please let em know if you have any questions. Thanks a lot for your help Anuj On Tue, Aug 26, 2008 at 4:38 PM, anuj sharma [EMAIL PROTECTED] wrote: Hi Rick I will try to sketch my requirement and send it to you soon. That might help to find what i am looking for. Thanks for your suggestion. Anuj On Mon, Aug 25, 2008 at 7:47 PM, Rick Winscot [EMAIL PROTECTED]wrote: The seconds link was to a flow layout that would set you in the right direction... The other option was the first link which uses static positioning. Really, it depends on what you want the user experience to be like. If you could sketch out the solution – we could throw some code around. Rick Winscot On 8/25/08 10:24 PM, anuj sharma [EMAIL PROTECTED] wrote: Hi Rick Thanks for the reply. Are there any recommendations about which layout component or container should i use or do i need to create my custom component for achieving this target. I am not sure which way to handle that layout. Please help me out Again Thanks a lot. Anuj On Mon, Aug 25, 2008 at 5:18 PM, anuj181 [EMAIL PROTECTED] wrote: Hi I am using HBOX container to load images letting user drag image from one HBOX and dropping them in another (2nd)HBOX. I need to calculate the real estate of the HBOX in which the image has been dropped (i-e 2nd HBOX). The reason is that because I need the dropped image to get placed in an empty space within the 2nd HBOX. Is there any way I can calculate which space is empty in the HBOX and let my objects (images) to be placed only in the empty spaces within the HBOX (not the sapce already occupied by the placed images).Once the HBOX is full then I need to code in a way that images starts shrinking(upto some level) to accommodate more images. Please help me out in figuring out this problem. Any type of help/documentation/links in this direction will be highly appreciated. Thanks Anuj
Re: [flexcoders] Need Help and Guidance desperately
Dough I forgot to mention that i am not sure if i can force the components into either rows or columns because I am allowing free flow of the image within the container too which means that the user should be able to resize the image and should be able to drag and drop the image too whereever he wants within the container. i used drag manager for that. i thought should made it clear. Thanks for your time Anuj On Wed, Aug 27, 2008 at 9:34 AM, Doug McCune [EMAIL PROTECTED] wrote: Oh wow, that's actually a really flexible layout requirement that I don't think you can achieve with any of the components out there right now (ie TileList, Tile, combination of HBox and VBox, or even FlowBox). I think you may have to lose of of the desired functionality and allow the content to be binned into distinct rows or columns more tightly. The first image in your attachement is doable in the FlowBox I believe, but the second screenshot is much harder. Notice how box C extends down into a second row, and also how box E extends across multiple columns. That use of dual column and row spanning makes it difficult. If you allow the components to be forced into either rows or columns then it will be much easier. Doug On Wed, Aug 27, 2008 at 9:05 AM, anuj sharma [EMAIL PROTECTED] wrote: Hi All Attached is the rough sketch i am about the UI i have to implement. Right now they are just empty pictures, but the user can drag them on the stage and can resize the images placed on the main screen. My requirement if user drops a new image on the screen all the other images adjust themselves to accommodate the new image. Also if user enlarge or shrink one image (like in the sketch user is trying to shrink image B), all the other images adjust themselves on the main stage . Please let em know if you have any questions. Thanks a lot for your help Anuj On Tue, Aug 26, 2008 at 4:38 PM, anuj sharma [EMAIL PROTECTED] wrote: Hi Rick I will try to sketch my requirement and send it to you soon. That might help to find what i am looking for. Thanks for your suggestion. Anuj On Mon, Aug 25, 2008 at 7:47 PM, Rick Winscot [EMAIL PROTECTED]wrote: The seconds link was to a flow layout that would set you in the right direction... The other option was the first link which uses static positioning. Really, it depends on what you want the user experience to be like. If you could sketch out the solution – we could throw some code around. Rick Winscot On 8/25/08 10:24 PM, anuj sharma [EMAIL PROTECTED] wrote: Hi Rick Thanks for the reply. Are there any recommendations about which layout component or container should i use or do i need to create my custom component for achieving this target. I am not sure which way to handle that layout. Please help me out Again Thanks a lot. Anuj On Mon, Aug 25, 2008 at 5:18 PM, anuj181 [EMAIL PROTECTED] wrote: Hi I am using HBOX container to load images letting user drag image from one HBOX and dropping them in another (2nd)HBOX. I need to calculate the real estate of the HBOX in which the image has been dropped (i-e 2nd HBOX). The reason is that because I need the dropped image to get placed in an empty space within the 2nd HBOX. Is there any way I can calculate which space is empty in the HBOX and let my objects (images) to be placed only in the empty spaces within the HBOX (not the sapce already occupied by the placed images).Once the HBOX is full then I need to code in a way that images starts shrinking(upto some level) to accommodate more images. Please help me out in figuring out this problem. Any type of help/documentation/links in this direction will be highly appreciated. Thanks Anuj
Re: [flexcoders] Re: Need Help and Guidance desperately
Hi All Thanks for the reply. Here are couple of things i should have mentioned earlier to you guys. I have to allow user to resize the images, that's where complexity came. For resizing of images, I am using the following container for holding the images http://www.rogue-development.com/objectHandles.html I am trying to achieve something like this http://demo.quietlyscheming.com/DragTile/DragDrop.html but letting user drag images from the bottom container (in this example's case VBOX) to the main container and also allowing then to resize the images in the main container. If i am not allowing user to resize the image in the main container, then this project is already done but the real estate occupied by the images vary with the resizing option. The user drag and drop or can also double click on the image to open in the main container. In all the cases the image should be dropped in the empty space of the main container. The main container allows the user to grab the image from any of the four corner(like the component in the first link) and resize up to some size and the rest of the images adjust accordingly to let the resized image get accommodated in the main container(something like in the second link except in that link user can't resize the image). Sorry for being so complex but that's the project's requirement. In short this project is like image gallery,the user can drag and drop or double click on images to open them in the main container . They can also resize the images in the main container and the rest of the images should move (with transition) to let resized or newly created images to get accommodated. Please let me know if that helps and I will appreciate any more help in this matter Thanks a lot. Anuj On Tue, Aug 26, 2008 at 8:11 AM, Alex Harui [EMAIL PROTECTED] wrote: Yup, there's a trade-off of how much work you'll need to do for variable sized items so if you can live with same size items, you can use TileList and write less code. -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Amy *Sent:* Tuesday, August 26, 2008 7:40 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Re: Need Help and Guidance desperately --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote: I agree, I'd use a couple of TileLists and a simple inline itemrenderer. Shouldn't be too difficult really. I think the TileList has a number of flaws that make it problematic for this type of application For instance, it only measures the first item, then cuts off (or worse) any items that are larger. For another, you can't just let the TileList size and flow the things that are being dragged into it, since it has a default number of rows and columns, and without dipping your fingers into the layout code or knowing in advance the size and number of the items, you don't know how many rows and columns to even tell the TileList to use so as not to allocate too much vertical or horizontal space (not as much of a problem for this application, but a real pain for what I've used it for). I'm planning to finish my TileList_withStyle to overcome these limitations, but I just haven't gotten around to it. But MPO is that the TileList looks great on the surface, but it doesn't _quite_ deliver on what it promises. -Amy
Re: [flexcoders] Need Help and Guidance desperately
Hi Doug How would i embed that open source (FloxBox) container in my project.I could not find the source code for that container. Please let me know Thanks Anuj On Mon, Aug 25, 2008 at 10:04 PM, Doug McCune [EMAIL PROTECTED] wrote: I think you might be asking the wrong question. You asked how to know if the area that the user dropped an item was the empty space or the space taken up by other items in the container. But then you want all the items in the container to resize to become smaller to accomodate more items in the container if the user drops too many. Why not just let the user drop items anywhere in the container and just add them to the container? Then all you have to do is create a container that scales the children to make sure that they always fit within the bounds. If you force the children to always be the same width then this should be really easy to figure out what scaling you should apply to the children. If not then you'll have to do more complex measurement. I'd suggest starting with teh flowbox container in FlexLib (flexlib.net), and if that doesn't suit your needs then either extend that or try using the Tile container. It doesn't sound like you want to use a list control (ie TileList) because you always want all the children visible, so you never want the list to scroll, and therefore you don't benefit from itemrenderers, so using a list will just complicate things unneccesarily. Doug On Mon, Aug 25, 2008 at 9:42 PM, Josh McDonald [EMAIL PROTECTED] wrote: I agree, I'd use a couple of TileLists and a simple inline itemrenderer. Shouldn't be too difficult really. -Josh On Tue, Aug 26, 2008 at 2:31 PM, Alex Harui [EMAIL PROTECTED] wrote: TileList? -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Rick Winscot *Sent:* Monday, August 25, 2008 7:47 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Need Help and Guidance desperately The seconds link was to a flow layout that would set you in the right direction... The other option was the first link which uses static positioning. Really, it depends on what you want the user experience to be like. If you could sketch out the solution – we could throw some code around. Rick Winscot On 8/25/08 10:24 PM, anuj sharma [EMAIL PROTECTED] wrote: Hi Rick Thanks for the reply. Are there any recommendations about which layout component or container should i use or do i need to create my custom component for achieving this target. I am not sure which way to handle that layout. Please help me out Again Thanks a lot. Anuj On Mon, Aug 25, 2008 at 5:18 PM, anuj181 [EMAIL PROTECTED] wrote: Hi I am using HBOX container to load images letting user drag image from one HBOX and dropping them in another (2nd)HBOX. I need to calculate the real estate of the HBOX in which the image has been dropped (i-e 2nd HBOX). The reason is that because I need the dropped image to get placed in an empty space within the 2nd HBOX. Is there any way I can calculate which space is empty in the HBOX and let my objects (images) to be placed only in the empty spaces within the HBOX (not the sapce already occupied by the placed images).Once the HBOX is full then I need to code in a way that images starts shrinking(upto some level) to accommodate more images. Please help me out in figuring out this problem. Any type of help/documentation/links in this direction will be highly appreciated. Thanks Anuj -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
Re: [flexcoders] Need Help and Guidance desperately
Hi Rick I will try to sketch my requirement and send it to you soon. That might help to find what i am looking for. Thanks for your suggestion. Anuj On Mon, Aug 25, 2008 at 7:47 PM, Rick Winscot [EMAIL PROTECTED]wrote: The seconds link was to a flow layout that would set you in the right direction... The other option was the first link which uses static positioning. Really, it depends on what you want the user experience to be like. If you could sketch out the solution – we could throw some code around. Rick Winscot On 8/25/08 10:24 PM, anuj sharma [EMAIL PROTECTED] wrote: Hi Rick Thanks for the reply. Are there any recommendations about which layout component or container should i use or do i need to create my custom component for achieving this target. I am not sure which way to handle that layout. Please help me out Again Thanks a lot. Anuj On Mon, Aug 25, 2008 at 5:18 PM, anuj181 [EMAIL PROTECTED] wrote: Hi I am using HBOX container to load images letting user drag image from one HBOX and dropping them in another (2nd)HBOX. I need to calculate the real estate of the HBOX in which the image has been dropped (i-e 2nd HBOX). The reason is that because I need the dropped image to get placed in an empty space within the 2nd HBOX. Is there any way I can calculate which space is empty in the HBOX and let my objects (images) to be placed only in the empty spaces within the HBOX (not the sapce already occupied by the placed images).Once the HBOX is full then I need to code in a way that images starts shrinking(upto some level) to accommodate more images. Please help me out in figuring out this problem. Any type of help/documentation/links in this direction will be highly appreciated. Thanks Anuj
Re: [flexcoders] Flash based flex component issue
Once thing like this happened to me and I disabled mouseChildren, I am not sure that will work here Thxs Anuj On Mon, Aug 25, 2008 at 8:30 AM, Clint Tredway [EMAIL PROTECTED] wrote: Hey all. We are working on a 'game' for kids using Flex and Flash together and have run into a random issue. We have some assets that flash made components that being referenced through a SWC. We are applying a glow filter to the objects and if the mouse movement is too quick, the components flicker. Is this an issue with the redrawing of the component due to the glow being added and then removed? Thanks -- When you choose hope, anything is possible. -Christopher Reeve
Re: [flexcoders] Need Help and Guidance desperately
Hi Rick Thanks for the reply. Are there any recommendations about which layout component or container should i use or do i need to create my custom component for achieving this target. I am not sure which way to handle that layout. Please help me out Again Thanks a lot. Anuj On Mon, Aug 25, 2008 at 5:18 PM, anuj181 [EMAIL PROTECTED] wrote: Hi I am using HBOX container to load images letting user drag image from one HBOX and dropping them in another (2nd)HBOX. I need to calculate the real estate of the HBOX in which the image has been dropped (i-e 2nd HBOX). The reason is that because I need the dropped image to get placed in an empty space within the 2nd HBOX. Is there any way I can calculate which space is empty in the HBOX and let my objects (images) to be placed only in the empty spaces within the HBOX (not the sapce already occupied by the placed images).Once the HBOX is full then I need to code in a way that images starts shrinking(upto some level) to accommodate more images. Please help me out in figuring out this problem. Any type of help/documentation/links in this direction will be highly appreciated. Thanks Anuj
Re: [flexcoders] Problems implementing tweening in FLEX
Hi TIm Alex Thanks for your help. I will look at the pop up manager Tween in Flex. Thanks Anuj On Wed, Aug 20, 2008 at 9:47 PM, Alex Harui [EMAIL PROTECTED] wrote: Look at how Tweens are used in Flex source code. ComboBox and Menu probably -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *anuj181 *Sent:* Wednesday, August 20, 2008 3:38 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Problems implementing tweening in FLEX Hi All I implemented transition with effects in Flash using the following code. My aim is as soon as user rolls over the arrow it brings up the menu.As long as the mouse remains on the menu, the menu stays else menu goes away. I am succesful in implmenting that in Flash.I used Tween and changes the y-coordinate through tweening. Now if I have to implement the same functionlaity in Flex and I am not sure how would to do that . I am trying to copy and paste same code but it is giving me errors as tweening does not working similarly in Flex as it does in Flash. It is asking me that i have to set the end time too which i am not sure how to do. Please help me out in implementing the same functionality in Flex. Thanks Anuj //Code var startValue:Number; var finishValue:Number; var duration:Number; mc_RightArrow.addEventListener(MouseEvent.ROLL_OVER,showChapterMenu); function showChapterMenu(event:MouseEvent):void { mc_ChapterMenu.visible=true; duration= 1; var myTween:Tween = new Tween(mc_ChapterMenu, y, Regular.easeOut, mc_ChapterMenu.y, mc_ChapterMenu.y-230, duration, true); } mc_ChapterMenu.addEventListener(MouseEvent.ROLL_OUT,hideChapterMenuFromChapter); function hideChapterMenuFromChapter(event:MouseEvent):void { var hideChapter:Tween = new Tween(mc_ChapterMenu, y,Regular.easeIn,mc_ChapterMenu.y,mc_ChapterMenu.y+230,duration, true); }
Re: [flexcoders] Full Screen and Scaling in FLEX. Please help
Thanks for the blog. The problem has been fixed. Appreciate ur help. On Tue, Jul 1, 2008 at 10:06 AM, Alex Harui [EMAIL PROTECTED] wrote: This might help. http://blogs.adobe.com/aharui/2008/01/flex_and_scalemodes.html -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *anuj181 *Sent:* Tuesday, July 01, 2008 8:58 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Full Screen and Scaling in FLEX. Please help Hi Flexcoders I have a question. I made an application and I like to give user the option of clicking on full screen. I implemented the following code and full screen is working fine. When user clicks on Full screen the whole application takes place of the monitor but my problem is that the application does not scale, so it looks weird. Please help me out, I need full screen scaling of my whole application. However I implemented same thing in AS 3.0 uisng Flash IDE just by using addEventListener(Event.ENTER_FRAME,setStage); function setStage(event:Event):void { stage.displayState = StageDisplayState.FULL_SCREEN; fscommand(fullscreen, true); fscommand(allowscale, true); }. But this techniques is not working in Flex. I am trying to run independent SWF file for full screen, With Browser definitely this thing is not going to work but i need full screen in SWF file. Please help Thanks Anuj //Code For Flex mx:Application width=1640 xmlns:mx=http://www.adobe.com/2006/mxml; verticalAlign=top viewSourceURL=srcview/index.html layout=absolute backgroundColor=#b7babc verticalScrollPolicy=off horizontalScrollPolicy=off height=100% applicationComplete=FS(event) xmlns:assets=assets.* enterFrame=GridCheck(event) creationComplete=init() xmlns:ns1=* xmlns:ns2=Renderers.* xmlns:myComps=* xmlns:objecthandles=com.roguedevelopment.objecthandles.* mx:Style source=resources/css/style.css/ mx:Button id=FullScreenButton x=809 y=959 label=Fullscreen click=toggleFullScreen()/ //Functions public function FS(evt:Event):void { stage.addEventListener(FullScreenEvent.FULL_SCREEN, fullScreenHandler); dispState =stage.displayState; } public function fullScreenHandler(evt:FullScreenEvent):void { dispState = stage.displayState + (fullScreen= + evt.fullScreen.toString() + ); if (evt.fullScreen) { FullScreenButton.label=Normal; } else { FullScreenButton.label=Full Screen; } } public function toggleFullScreen():void { try { switch(Application.application.stage.displayState) { case StageDisplayState.FULL_SCREEN: //If already in full screen mode, switch to normal mode. stage.displayState = StageDisplayState.NORMAL; stage.scaleMode=StageScaleMode.NO_SCALE; break; default: // If not in full screen mode, switch to full screen mode. stage.displayState = StageDisplayState.FULL_SCREEN; //Setting Scale stage.scaleMode=StageScaleMode.NO_SCALE; break; } } catch (err:SecurityError) { // ignore } } mx:Button id=FullScreenButton x=809 y=959 label=Fullscreen click=toggleFullScreen()/ /mx:Application
Re: [flexcoders] How would i layout different objects in grid form
Hi Tom Thanks for reply. I am kind of new to FLEX world. Can we put already existed videos in Grid And if we can the grid has to be dynamic depending upon the number of videos in the container. For example for 1 1x1 , for 2-4 it has to be 2x2, for 5-9 it has to be 3x3. Can you help in giving me information about how would i achieve this. Thanks a lot Anuj On Wed, Jun 11, 2008 at 6:34 AM, Tom Chiverton [EMAIL PROTECTED] wrote: On Wednesday 11 Jun 2008, anuj181 wrote: user selects that button then depending on the number of objects, the grid layout will be generated in HBOX (to arrange those objects). For Sounds like you could put your current HBox along with a Grid into a ViewStack, binding them both to the same data provider. Then change viewStack.selectedIndex from the click event of your radio button. -- Tom Chiverton This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
Re: [flexcoders] Importing SWC Files in FLEX
Hi Joseph Thanks for links. I will follow those links and hopefully Flex/Flash start making more sense to me. I appreciate your help and in future hopefully my questions will make more sense :-). Anuj On Wed, May 28, 2008 at 6:43 PM, Joseph Balderson [EMAIL PROTECTED] wrote: Typically the reason no one answers a post is because the answer is too self evident, can be arrived at with a little googling, and no one wants to see this degenerate into a newbie list. (Maybe there should be a FlexNewbies list?) Or it's not possible, which most also judge as self evident. In answer to your question... You can either use the Flex Component Kit for Flash CS3, or you simply place the Flash component on the stage, export your SWC, place it in your /lib folder, and access the relevant fl.* classes in your flex project. Peter DeHaan has a good post on using the Flex Component Kit: http://blog.flexexamples.com/2007/09/02/installing-the-flex-component-kit-for-flash-cs3/ If you're having problems getting SWC files to work at all, you should probably brush up library usage in Flex. If you're having problems using some of the SWC files that contain the core Flash classes in the application directory, they won't work, for various reasons. You have to use the Flash compiler to include what classes you need in your SWC, and then use that in Flex. You also could try some of the articles up on Adobe Dev Connection: http://www.adobe.com/devnet/flex/articles/skins_styles.html http://www.adobe.com/products/flex/features/video/glenn_ruehle/ http://www.adobe.com/devnet/flex/articles/video_flex.html http://www.adobe.com/devnet/flash/articles/flex_component_workflow_print.html I'm also writing a tutorial series on Community MX about integrating Flash and Flex together http://www.communitymx.com/abstract.cfm?cid=AEF3D, some of which you may also find useful as the series unfolds. Hope that helps. __ Joseph Balderson | http://joeflash.ca Flex Flash Platform Developer | Abobe Certified Developer Trainer Author, Professional Flex 3 (coming Winter 2008) Staff Writer, Community MX | http://communitymx.com/author.cfm?cid=4674 anuj181 wrote: Hi Does anyone know how to import SWC file created in CS3 into Flex Project. I googled it and found lot of samples but in my case whenever i gave Library path, the swc file is not showing in my project' lib directory and when i manually move swc file it shows unknown icon on the file. Does anyone has any idea what's going on. Please help me out. All i need is to create few symobls/movies in CS3 and want to use them in my Flex Project Thanks Anuj -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
Re: [flexcoders] Re: Importing SWC Files in FLEX
Hi John Danny Thanks for your help. Problem has been solved , there were some missing libraries in my Flex compiler. I uninstalled the complete package and re-installed it, and I can access SWC files using my code now. Appreciate your help Anuj On Sun, May 25, 2008 at 4:19 AM, John McCormack [EMAIL PROTECTED] wrote: Hi Anuj, //An internal build error has occurred. Right-click for more information. I had difficulty in understanding exactly what was needed to use Flash assets and had similar errors. It doesn't help when the documentation varies so much on what to do. Unfortunately the Adobe PDF's have no publishing date written inside and so you often get information from out-of-date ones. I am able to use Flash Assets but my projects are all ActionScript projects rather than Flex projects. As a result I do not have to turn the asset into a Flex component by making it an extension of the UIMovieClip class. For example, on the stage I have a red dot with a radial gradient. I make it into a symbol and it goes in the library. It has to be either a button or MovieClip. Say I call it RedDot. I can delete the one on the stage. When I publish I make sure the SWC box is ticked in the publish settings. In Flex Builder 3 I right click the project, go to build options and add the swc. If I then type var rd:, suddenly RedDot is on the list of types I select it and hit return. So I finish up with var rd:RedDot = new RedDot and I can addChild(rd) and that's it. With Flex projects the only difference is that Flex needs to give the mxml compiler access to RedDot. It does this by agreeing an interface to it - this is just a set of agreed functions/methods that both sides agree on. This is the UIMovieClip - UserInterfaceToMovieClip (probably). So in Flash my RedDot has to extend UIMovieClip. If you have already done this, right-click the symbol in the library and check the properties to see this. If not, select the symbol and go to the Commands menu in Flash and choose Convert symbol to Flex component. This has three consequences, which you can just do manually yourself: 1. The fps is set to 24. 2. The Base Class is set to mx.flash.UIMovieClip. 3. The FlexComponentBase is added to the library. Note: I have just checked and found that the library symbol must have export for actionscript ticked *before* you Convert it, otherwise it doesn't do it. Now you can either right-click the symbol and export the swc, or publish and produce the swc. I have a swf with five symbols in it and when published my swc has five symbols in which I can use in Flex. I suggest you draw the simplest graphic, turn it into a MovieClip symbol for the library. Make sure export for actionscript is set in the library symbol. Select it and Convert to a Flex Component. Check the properties for the UIMovieClip class. Publish with SWC ticked. Import it, and it should be available. You don't need to write a class to go with it since Flash produces its own cutdown class for it when ti doesn't find one. I got the above error when I followed various guidelines and tried to do something more complicated. Fingers crossed for you! John
Re: [flexcoders] Importing SWC Files in FLEX
Hi Guys I am just wondering if I am doing something wrong here. Iam a new member of this list and to the world of Flex and in the past i posted lots of requests for helping me out but i did not get any reply at all. I am also the member of Flash Coders list. I am just wondering if this list is receiving my e-mails or not. I would appreciate if someone will reply me, at least as a confirmation that Flex coders are receiving my e-mails. Thanks a lot for understanding this. i appreciate that. Anuj On Thu, May 22, 2008 at 2:53 PM, anuj181 [EMAIL PROTECTED] wrote: Hi Does anyone know how to import SWC file created in CS3 into Flex Project. I googled it and found lot of samples but in my case whenever i gave Library path, the swc file is not showing in my project' lib directory and when i manually move swc file it shows unknown icon on the file. Does anyone has any idea what's going on. Please help me out. All i need is to create few symobls/movies in CS3 and want to use them in my Flex Project Thanks Anuj
Re: [flexcoders] Re: Importing SWC Files in FLEX
Hi Danny Thanks for the reply. That's the confirmation that the list is receiving my emails :-). Danny I imported swc and I can see that component in the custom component folder and I can drag to drop in the design view. However When i compile my application that component is not visible in the browser and sometimes it gives compiler error An internal build error has occurred. Right-click for more information. I am not sure what's going on . It should be very simple to import flash shapes and components in Flex but I am new to Flex world which might be causing such naive errors. Please let me know if you find the solution. I need to look at SWC file in the Browser while executing the application. By googling , some folks recommended to check the library path and some say try to compile the application using command line. Few folks have just reinstall the whole builder too. Please let me know if you have found any missing link. Again I appreciate your help Thanks Anuj On Fri, May 23, 2008 at 12:02 PM, Danny Venier [EMAIL PROTECTED] wrote: Hi Anuj, You can try Import/FlexBuilder/Artwork and point to a swf or swc? Or….you can add a swc to your project by adding the swc to your project properties build path. (use project/properties/FlexBuild Path and open the Library path tab, then add swc.) Not sure what environment you have set up or exactly what you're doing, or trying to do, but try that, or review the docs again… --Danny