[flexcoders] Re: How to make an RPC call secure
Hi jitendra, Thank you for your reply, I'm doing form-based login and different role creation. My doubt is even if I didn't give role , The User who knows my remote methods can call these methods from his client(suppose he created a new GUI with my remote methods). How can I block it?, https also giving secure transmission not blocking to access remote method. I think more knowledge in session Id could get a solution , because if it is a Struts-J2EE transcation J2EE will check session Id. FlexContext. getFlexSession( ) is a Static method na? , How It can give sessionId for each user? These are my doubts. Regards, Razak --- In flexcoders@yahoogroups.com, jitendra jain [EMAIL PROTECTED] wrote: 1) If you see services-config.xml , following tag channel-definition id=my-secure-amf class=mx.messaging.channels.SecureAMFChannel endpoint url=https://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure; class=flex.messaging.endpoints.SecureAMFEndpoint/ properties !--HTTPS requests on some browsers do not work when pragma no-cache are set-- add-no-cache-headersfalse/add-no-cache-headers /properties /channel-definition Here the endpoints are secure as they are sent via https protocol. But if the user (client's browser ) no-cache is set, it fails. 2) Try to create different roles(Security-roles),. For this u need to read some J2EE stuff. 3)Form-Based Authentication is least secured. So we can say that upto some extent we can secure our application. But we can't challenge. Thanks, with Regards, Jitendra Jain - Original Message From: Abdul Razak PM [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Saturday, 11 October, 2008 3:04:54 PM Subject: [flexcoders] Re: How to make an RPC call secure HI Jitendra, Thanks for your kind reply, Let me to explain my question in detail . suppose I have a small banking application a)I want ensure user's login b) user can request a loan c) admin can approve loan d) admin can enter payment details etc... For this I have provided a flex GUI to login , modules to enter loan request details , approve details, payment details etc.. I gave the following remote calls and implemented with J2ee createLoanRequest searchLoanDetls approveLoanDetails changeLoanStatus insertLoanInstallme ntDetls Also I gave appropriate menus for user and admin depends on their privilege. My doubt is like this i) Suppose admin logged in the application and doing some transaction. at the same time some hacker (who understands my remote methods ) calling some remote methods. trying to change some methods. It is from a different machine. is it happen...? , commonly J2EE uses session Id to handle this case, In this case may I need to use Session(Thanks Jitendra for ur session help). ii) Have any common method to use a validator for each method call.? iii) If I'm wrong pls help me with the theoretical reason. Regards, Razak --- In [EMAIL PROTECTED] ups.com, jitendra jain jitendra_jain_ 2007@ wrote: If your question is when flex calls a java class and within the java class how do I access the associated session, then the code is below and it is in the documentation. The FlexSession class is located in the flex-messaging. jar. FlexSession session = FlexContext. getFlexSession( ); But whats the real question behind your question? what do you want to load? If you want to secure your calls then try to read J2EE Specs à Thanks, with Regards, Jitendra Jain - Original Message From: Abdul Razak PM it-razak@ . To: [EMAIL PROTECTED] ups.com Sent: Saturday, 11 October, 2008 9:34:29 AM Subject: [flexcoders] Re: How to make an RPC call secure Hi All, I'm a newbie in flex, My searches and adobe gives a of links but I need to get specified in my topic.. Those who are in handling security please give me an answer (theoretical) whether a flex GUI with J2EE as server and using remoting (rpc)for server call, a) In J2EE project we will use session Id to ensure call comes from the same user.is it necessary in flex client also? if so how we can achieve session Id in client, some example also. b) I have a login module in my application, may I need to authenticate each of my remote call from flex. Tom please don't loose my chance to get answer from others who could kindly answer to me , even it's blonder... all are not genious like but everybody uses google and adobe docs first.. Regards, Razak --- In [EMAIL PROTECTED] ups.com, Tom Chiverton tom.chiverton@ ... wrote: On Thursday 09 Oct 2008, Abdul Razak PM wrote: Please provide some links to study more about it. Is Google and Adobe's docs site broken ? Also What's the possibility of Hacking our code if we didn't make it secure? Threat
[flexcoders] Who can explain this SWFLoader issue?
Hi, When I use SWFLoader to load a SWF built by Flash CS3, the SWFLoader can not display the background color of the loaded SWF. If the SWF is built by Flex SDK framework, the SWFLoader can display the background color. Who can tell me the reason. Thanks, Zhiqiang
[flexcoders] Custom Tooltip
Hii I was looking for a custom tooltip. Is there a way that I can pass an object to a tooltip rather then a String. Say, I want to pass an Arraycollection.. Is that possible?? And if it is.. then how? Thanks. -- View this message in context: http://www.nabble.com/Custom-Tooltip-tp19953678p19953678.html Sent from the FlexCoders mailing list archive at Nabble.com.
[flexcoders] Re: Error #1063: Argument count mismatch using read/writeobject in AIR
BTW, If you guys test my example doen't show any error. But is not complete. Let me show you some code: My Class: package { [Bindable] [RemoteClass(alias='MyClass')] public class MyClass { public function MyClass(mystring:String) { } } } Save and open: private function onInit():void{ var arr:ArrayCollection = new ArrayCollection (); var obj1:MyClass = new MyClass('uno'); var obj2:MyClass = new MyClass('dos'); var obj3:MyClass = new MyClass('tres'); arr.addItem(obj1); arr.addItem(obj2); arr.addItem(obj3); var file:File = File.applicationStorageDirectory.resolvePath('test.data'); var stream:FileStream = new FileStream(); stream.open(file, FileMode.WRITE); stream.writeObject(arr); stream.close(); //Saves an AC var streamR:FileStream = new FileStream(); streamR.open(file, FileMode.READ); var arrnew:ArrayCollection = new ArrayCollection(); while(streamR.bytesAvailable){ arrnew = streamR.readObject() as ArrayCollection; //ERROR trace(arrnew); } streamR.close(); } The problem is using the [RemoteClass(alias='MyClass')] to register the class. If I dont use the tag in the class declaration, my example works ok. Any idea? Could be a bug? Do I need to specify any other parameter in the RemoteClass tag? TIA _ Claudio M. E. Bastos Iorio http://www.blumer.com.ar http://www.blumer.com.ar --- In flexcoders@yahoogroups.com, Claudio M. E. Bastos Iorio [EMAIL PROTECTED] wrote: Hi, I'm using AMF format storing and retrieving objects using write and readobject() in AIR. But I have a problem. Let's say this is my class: (simple, no params in constructor) ActionScript Code: public class MyClass { public function MyClass():void { } } Then, I create an ArrayCollection (and save the arraycollection object to the file) with instances of this class. This is working ok, I can save, open and retrieve, iterate objects in the stored arraycollection just fine. BUT, if my class have any parameter in the constructor, my code fails retrieving the arraycollection Something like this: ActionScript Code: var file:File = File.applicationDirectory.resolvePath('Data.data'); var stream:FileStream = new FileStream(); stream.open(file, FileMode.READ); var myAC:ArrayCollection = new ArrayCollection(); while(stream.bytesAvailable){ myAC = stream.readObject() as ArrayCollection;//ERROR Error #1063: Argument count mismatch } Any idea ..? TIA
[flexcoders] Custom itemRenderer for Tree
Hello, I am currently trying to work on a itemRenderer for the Flex Tree component. Only I am having some trouble with it. I would like to to hard-code the itemHeight of every item in the list. My objective is to make an itemRenderer which has a image item and a label and together with two 1px thick lines (on the top and bottom). Only the problem is that it looks clumsy somehow. The problems I am experiencing is: - The selection highlight indicator has disappeared - The vertical alignment of the text and image box is odd I am using the following code: Does anyone know how I can make this using MXML? Yours, Weyert de Boer
Re: [flexcoders] Custom itemRenderer for Tree
I am using the following code: Did you use fontColor = white; ;-) Can't see the following code. Mike On Mon, Oct 13, 2008 at 9:15 AM, Weyert de Boer [EMAIL PROTECTED] wrote: Hello, I am currently trying to work on a itemRenderer for the Flex Tree component. Only I am having some trouble with it. I would like to to hard-code the itemHeight of every item in the list. My objective is to make an itemRenderer which has a image item and a label and together with two 1px thick lines (on the top and bottom). Only the problem is that it looks clumsy somehow. The problems I am experiencing is: - The selection highlight indicator has disappeared - The vertical alignment of the text and image box is odd I am using the following code: Does anyone know how I can make this using MXML? Yours, Weyert de Boer -- Teoti Graphix, LLC http://www.teotigraphix.com Teoti Graphix Blog http://www.blog.teotigraphix.com You can find more by solving the problem then by 'asking the question'.
[flexcoders] Re: Custom itemRenderer for Tree
If you care to share the code someone might help you :-) it seems you forgot to paste it... --- In flexcoders@yahoogroups.com, Weyert de Boer [EMAIL PROTECTED] wrote: Hello, I am currently trying to work on a itemRenderer for the Flex Tree component. Only I am having some trouble with it. I would like to to hard-code the itemHeight of every item in the list. My objective is to make an itemRenderer which has a image item and a label and together with two 1px thick lines (on the top and bottom). Only the problem is that it looks clumsy somehow. The problems I am experiencing is: - The selection highlight indicator has disappeared - The vertical alignment of the text and image box is odd I am using the following code: Does anyone know how I can make this using MXML? Yours, Weyert de Boer
[flexcoders] Re: AIT application window size
There is a NativeWindow.maximize() function... --- In flexcoders@yahoogroups.com, Jim Hayes [EMAIL PROTECTED] wrote: (Probably) something along the lines of this.nativeWindow.width = Screen.mainScreen.visibleBounds.width; (and similar for height, x and y etc) There should be more reliable info than mine available in the help, under Screen, however. -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of hworke Sent: 13 October 2008 04:27 To: flexcoders@yahoogroups.com Subject: [flexcoders] AIT application window size Hi I was wondering how can I make the AIR application window full screen. I mean it is going to cover the whole monitor. I tried it with width and height 100% but it did not work. Please advice. __ This communication is from Primal Pictures Ltd., a company registered in England and Wales with registration No. 02622298 and registered office: 4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT registration No. 648874577. This e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not disclose its contents to any person. This email has been scanned for Primal Pictures by the MessageLabs Email Security System. __
[flexcoders] AIR with twitter
hello all frnds, i want to connect my AIR application with twitter API, i never used any API before, i used mx:HTTPService id=httpSerSendMessage url=http://twitter.com/direct_messages/new.format; result= resultHandlerSendMessage(event); fault=faultHandlerSendMessage(event); method=POST resultFormat=e4x mx:request user{userName}/user text{message}/text /mx:request /mx:HTTPService but it give an error [RPC Fault faultString=HTTP request error faultCode=Server.Error.Request faultDetail=Error: [IOErrorEvent type=ioError bubbles=false cancelable=false eventPhase=2 text=Error #2032: Stream Error. URL: http://twitter.com/direct_messages/new.format; errorID=2032]. URL: http://twitter.com/direct_messages/new.format;] is authentication mtd is req ? how to use authentication mthod http://twitter.com/account/verify_credentials.format , and wat to send in it ?
Re: [flexcoders] Re: Custom itemRenderer for Tree
Sorry, the code was I was using can be found below now. I am using: ?xml version=1.0 encoding=utf-8? mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; xmlns:degrafa=com.degrafa.* xmlns:paint=com.degrafa.paint.* xmlns:geometry=com.degrafa.geometry.* height=22 degrafa:Surface verticalCenter=0 horizontalCenter=0 degrafa:strokes paint:SolidStroke id=light color=#66 alpha=1 weight=1/ /degrafa:strokes !-- Creating a Geometry Group. -- degrafa:GeometryGroup geometry:HorizontalLinestroke={light} x=0 x1={this.width}/ /degrafa:GeometryGroup /degrafa:Surface mx:HBox width=100% height=100% backgroundColor=#FF paddingLeft=4 horizontalGap=4 paddingTop=0 mx:Image source=@Embed(source='assets/emptyIcon.png') / mx:Label text={data} color=#00 / /mx:HBox degrafa:Surface verticalCenter=0 horizontalCenter=0 degrafa:strokes paint:SolidStroke id=dark color=#33 alpha=1 weight=1/ /degrafa:strokes !-- Creating a Geometry Group. -- degrafa:GeometryGroup geometry:HorizontalLinestroke={dark} x=0 x1={this.width}/ /degrafa:GeometryGroup /degrafa:Surface /mx:VBox
[flexcoders] Huge impact of Class and Function on memory usage
Hi, in profiling my application, when I visualize the loitering objects, my classes have an impact of the 5% on memory usage. I think it is not much, but I see a huge impact of Class, Function, Bitmapdata, Object, String. Are these classes generating memory leaks? -- Cesare Rocchi http:/spreadingfunkyness.com
Re: [flexcoders] Custom Tooltip
Well, it all depends how you want it rendered... If you pass an array collection... For what reason and how do you want it to render? Sent from my iPhone On Oct 13, 2008, at 5:09 AM, Manu Dhanda [EMAIL PROTECTED] wrote: Hii I was looking for a custom tooltip. Is there a way that I can pass an object to a tooltip rather then a String. Say, I want to pass an Arraycollection.. Is that possible?? And if it is.. then how? Thanks. -- View this message in context: http://www.nabble.com/Custom-Tooltip-tp19953678p19953678.html Sent from the FlexCoders mailing list archive at Nabble.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] Custom Tooltip
I can always define a custom tooltip with a Panel, List or anything in it. But the real issue is, How can I pass data to it(as an Object/Collection), other then just text ??? Any idea/thoughts?? -Manu. Flex Gangsta wrote: Well, it all depends how you want it rendered... If you pass an array collection... For what reason and how do you want it to render? Sent from my iPhone On Oct 13, 2008, at 5:09 AM, Manu Dhanda [EMAIL PROTECTED] wrote: Hii I was looking for a custom tooltip. Is there a way that I can pass an object to a tooltip rather then a String. Say, I want to pass an Arraycollection.. Is that possible?? And if it is.. then how? Thanks. -- View this message in context: http://www.nabble.com/Custom-Tooltip-tp19953678p19953678.html Sent from the FlexCoders mailing list archive at Nabble.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 -- View this message in context: http://www.nabble.com/Custom-Tooltip-tp19953678p19957337.html Sent from the FlexCoders mailing list archive at Nabble.com.
Re: [flexcoders] Java-like equals() method?
Frank, There's no .equals() in actionscript unless you implement it yourself. Without hearing more about the context, it's hard to tell whether Jitendra's data binding solution would work for this specific problem (data binding would effectively set the list selection to an object that is not in the list--I'm not sure what happens there), but you might run into a need for .equals() further down the line. We did, and since all of our VOs inherit from one VO base object, we just implement .equals() in these as necessary. It seems rather horrifying that there's no .equals() at first, but you don't really need it that often... -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: frank_sommers [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Java-like equals() method? Date: Sat, 11 Oct 2008 02:54:18 - Hi, I've been searching for a good solution to implementing object equality. I'm familiar with ObjectUtil, etc., but it still makes things harder than they should be. It may be best to illustrate this with an example. Suppose I have a ComboBox with an ArrayCollection as a data provider. The ArrayCollection is populated with value objects from the server, e.g., User objects. Suppose that I have a Task class, and a Task may have an assignedToUser property, which is a User instance. When the someone selects a Task (say, in a master-detail view), I would like the ComboBox to set its selectedItem to the user for the given Task, i.e., combBox.selectedItem = myUser.assignedToUser. The problem is that no Task in the ComboBox's data provider and the User's assignedToUser property are ever equal using the == or === operators. So I would like to implement a custom equality for User, and have the ComboBox use that to set its selectedItem to the specified user. In Java, this is easily done by overriding the equals() and hashCode() methods of User. Any suggestions on how to achieve something similar in Flex would be much appreciated. Thanks, -- Frank
Re: [flexcoders] Re: Flex poster and Lynda.com free trial
Posters have arrived - a big thanks to everyone involved in their production and making them available. You've done a great job. Now I just need a bigger wall.. Paul - Original Message - From: Paul Andrews [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Tuesday, September 30, 2008 8:28 PM Subject: Re: [flexcoders] Re: Flex poster and Lynda.com free trial Thanks guys, job done! Paul - Original Message - From: Vivian Richard [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Tuesday, September 30, 2008 4:51 PM Subject: Re: [flexcoders] Re: Flex poster and Lynda.com free trial Hey Paul, Please take a look at Nathan's link. The posters do not come unless you request for it!!! You need your flex builder's serial number to request for it. Please go there and submit a request for it. By the way thanks Nathan. Regards, On Tue, Sep 30, 2008 at 8:34 AM, nathanpdaniel [EMAIL PROTECTED] wrote: Lynda.com site: http://www.lynda.com/go/flex3 Fabled Flex 3 Posters: http://www.onflex.org/ted/2007/04/want-flex-api-posters.php :D --- In flexcoders@yahoogroups.com, Paul Andrews [EMAIL PROTECTED] wrote: Hmm. I've heard talk of this fabled Flex 3 poster yet haven't seen any info about how to get one. I had thought it might happen automagically when I upgraded to Flex 3 from Flex 2 (some time ago), but it didn't. Go on give me a clue.. ;-) Paul - Original Message - From: hworke [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Tuesday, September 30, 2008 3:31 PM Subject: [flexcoders] Flex poster and Lynda.com free trial Hello every one. Did you get a free 1 month lynda.com subscription offer flier with the flex 3 and AIR posters? If so, could you please let me know the URL where I need to go to redeem this new Flex 3 buyer offer. Unfortunately I lost my flier but I wrote down the offer code. Best regards... -- 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 -- 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 -- 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] Re: How to make an RPC call secure
Yes you are right.. It is a static method and returns the Session for the current request. so you can use getId method of this class. Moreover if you think of calling the remote methods from other GUI is not possible because they are in .class files. However flex sends the remote method as a string (AMF)to the servlet(I guess) and Servlet converts those into the actual calls. This link will help you how the message is converted: http://livedocs.adobe.com/flex/201/fds2javadoc/flex/messaging/io/amf/ActionMessageInput.html Thanks, with Regards, Jitendra Jain - Original Message From: Abdul Razak PM [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Monday, 13 October, 2008 1:06:07 PM Subject: [flexcoders] Re: How to make an RPC call secure Hi jitendra, Thank you for your reply, I'm doing form-based login and different role creation. My doubt is even if I didn't give role , The User who knows my remote methods can call these methods from his client(suppose he created a new GUI with my remote methods). How can I block it?, https also giving secure transmission not blocking to access remote method. I think more knowledge in session Id could get a solution , because if it is a Struts-J2EE transcation J2EE will check session Id. FlexContext. getFlexSession( ) is a Static method na? , How It can give sessionId for each user? These are my doubts. Regards, Razak --- In [EMAIL PROTECTED] ups.com, jitendra jain jitendra_jain_ [EMAIL PROTECTED] wrote: 1) If you see services-config. xml , following tag channel-definition id=my-secure- amf class=mx.messaging .channels. SecureAMFChannel endpoint url=https:/ /{server. name}:{server. port}/{context. root}/messagebro ker/amfsecure class=flex. messaging. endpoints. SecureAMFEndpoin t/ properties !--HTTPS requests on some browsers do not work when pragma no-cache are set-- add-no-cache- headersfalse /add-no-cache- headers /properties /channel-definitio n Here the endpoints are secure as they are sent via https protocol. But if the user (client's browser ) no-cache is set, it fails. 2) Try to create different roles(Security- roles),. For this u need to read some J2EE stuff. 3)Form-Based Authentication is least secured. So we can say that upto some extent we can secure our application. But we can't challenge. Thanks, with Regards, Jitendra Jain - Original Message From: Abdul Razak PM [EMAIL PROTECTED] . To: [EMAIL PROTECTED] ups.com Sent: Saturday, 11 October, 2008 3:04:54 PM Subject: [flexcoders] Re: How to make an RPC call secure HI Jitendra, Thanks for your kind reply, Let me to explain my question in detail . suppose I have a small banking application a)I want ensure user's login b) user can request a loan c) admin can approve loan d) admin can enter payment details etc... For this I have provided a flex GUI to login , modules to enter loan request details , approve details, payment details etc.. I gave the following remote calls and implemented with J2ee createLoanRequest searchLoanDetls approveLoanDetails changeLoanStatus insertLoanInstallme ntDetls Also I gave appropriate menus for user and admin depends on their privilege. My doubt is like this i) Suppose admin logged in the application and doing some transaction. at the same time some hacker (who understands my remote methods ) calling some remote methods. trying to change some methods. It is from a different machine. is it happen...? , commonly J2EE uses session Id to handle this case, In this case may I need to use Session(Thanks Jitendra for ur session help). ii) Have any common method to use a validator for each method call.? iii) If I'm wrong pls help me with the theoretical reason. Regards, Razak --- In [EMAIL PROTECTED] ups.com, jitendra jain jitendra_jain_ 2007@ wrote: If your question is when flex calls a java class and within the java class how do I access the associated session, then the code is below and it is in the documentation. The FlexSession class is located in the flex-messaging. jar. FlexSession session = FlexContext. getFlexSession( ); But whats the real question behind your question? what do you want to load? If you want to secure your calls then try to read J2EE Specs  Thanks, with Regards, Jitendra Jain - Original Message From: Abdul Razak PM it-razak@ . To: [EMAIL PROTECTED] ups.com Sent: Saturday, 11 October, 2008 9:34:29 AM Subject: [flexcoders] Re: How to make an RPC call secure Hi All, I'm a newbie in flex, My searches and adobe gives a of links but I need to get specified in my topic.. Those who are in handling security please give me an answer (theoretical) whether a flex GUI with J2EE as server and using remoting (rpc)for server call, a) In J2EE project we will use session Id to
Re: [flexcoders] force SeriesInterpolate on BubbleSeries to preserve bubble order?
Well, it's been a while but I've finally been able to get back to this. Unfortunately, there are cases where this simply won't work. For example: [Bindable] public var d:ArrayCollection = new ArrayCollection([ new ArrayCollection([ {x:1, y:1, z:10}, {x:2, y:2, z:20}, {x:3, y:3, z:30}, ]), new ArrayCollection([ {x:1, y:1, z:20}, {x:2, y:2, z:30}, {x:3, y:3, z:10}, ]) ]); There is no way you can rearrange the second data such that it won't screw up one of the bubbles. I think I'm just going to have to get in there and hack at it to make it stop trying it's smart bubble rearranging. On Thu, Sep 25, 2008 at 2:36 AM, Cosmin Cojocar [EMAIL PROTECTED] wrote: Hello Jason, Here is a good code for what you want: ?xml version=1.0 encoding=utf-8? mx:WindowedApplication xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ import mx.collections.ArrayCollection; [Bindable] public var d:ArrayCollection = new ArrayCollection([ new ArrayCollection([ {x:1, y:1, z:10}, {x:2, y:2, z:20}, {x:3, y:3, z:30}, ]), new ArrayCollection([ {x:2, y:2, z:20}, {x:1, y:1, z:20}, {x:3, y:3, z:30}, ]) ]); [Bindable] public var i:int = 0; ]] /mx:Script mx:SeriesInterpolate id=interp / mx:BubbleChart mx:series mx:BubbleSeries id=series1 xField=x yField=y radiusField=z creationComplete=series1.dataProvider = d[0] showDataEffect={interp} mx:fills mx:SolidColor color=red/ mx:SolidColor color=green/ mx:SolidColor color=blue/ /mx:fills /mx:BubbleSeries /mx:series /mx:BubbleChart mx:HBox mx:Button label=lt; click=i--; series1.dataProvider = d[i] enabled={i != 0}/ mx:Button label= click=i++; series1.dataProvider = d[i] enabled={i != d.length - 1}/ /mx:HBox /mx:WindowedApplication Explication: Your order is sorted according to Z field and after that the colors are attributed. So when you change the z value for (1,1) element this will be second value from red ball (3,3) not (2,2) because the order is made according to z value. *I also attached a small graphic explication in order.pdf (order matters) file. *I hope that is what you want. Have a nice day. Regards, Cosmin On Tue, Sep 23, 2008 at 12:01 AM, Pan Troglodytes [EMAIL PROTECTED]wrote: Following is a simplified example of what I'm running into. Basically, BubbleSeries doesn't preserve the order of the bubbles when you switch the dataprovider. Run the following program and click the left and right buttons. ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical mx:Script ![CDATA[ import mx.collections.ArrayCollection; [Bindable] public var d:ArrayCollection = new ArrayCollection([ new ArrayCollection([ {x:1, y:1, z:10}, {x:2, y:2, z:20}, {x:3, y:3, z:30}, ]), new ArrayCollection([ {x:1, y:1, z:20}, {x:2, y:2, z:20}, {x:3, y:3, z:30}, ]) ]); [Bindable] public var i:int = 0; ]] /mx:Script mx:SeriesInterpolate id=interp / mx:BubbleChart mx:series mx:BubbleSeries id=series1 xField=x yField=y radiusField=z creationComplete=series1.dataProvider = d[0] showDataEffect={interp} mx:fills mx:SolidColor color=red/ mx:SolidColor color=green/ mx:SolidColor color=blue/ /mx:fills /mx:BubbleSeries /mx:series /mx:BubbleChart mx:HBox mx:Button label=lt; click=i--; series1.dataProvider = d[i] enabled={i != 0}/ mx:Button label= click=i++; series1.dataProvider = d[i] enabled={i != d.length - 1}/ /mx:HBox /mx:Application What happens is that the blue bubble swaps places with the green bubble and then grows to the size of the green bubble. What I want is for the blue bubble to just grow in place and have the green bubble stay put. Is there some way I'm missing to tell the chart to pay attention to the order of the data? I thought maybe it had something to do with transitionRenderData, but the documentation on it is rather ... brief. -- Jason -- Jason
Re: [flexcoders] Custom Tooltip
For what reason do you want to pass an object to it? That might clear up any confusion that I have Sent from my iPhone On Oct 13, 2008, at 8:42 AM, Manu Dhanda [EMAIL PROTECTED] wrote: I can always define a custom tooltip with a Panel, List or anything in it. But the real issue is, How can I pass data to it(as an Object/Collection), other then just text ??? Any idea/thoughts?? -Manu. Flex Gangsta wrote: Well, it all depends how you want it rendered... If you pass an array collection... For what reason and how do you want it to render? Sent from my iPhone On Oct 13, 2008, at 5:09 AM, Manu Dhanda [EMAIL PROTECTED] wrote: Hii I was looking for a custom tooltip. Is there a way that I can pass an object to a tooltip rather then a String. Say, I want to pass an Arraycollection.. Is that possible?? And if it is.. then how? Thanks. -- View this message in context: http://www.nabble.com/Custom-Tooltip-tp19953678p19953678.html Sent from the FlexCoders mailing list archive at Nabble.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 -- View this message in context: http://www.nabble.com/Custom-Tooltip-tp19953678p19957337.html Sent from the FlexCoders mailing list archive at Nabble.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
[flexcoders] open the other website
dear all, I have a question about open the other website. I only know that I can use navigateToURL(urlRequest,_blank) to open anyone I want. But the method will open the new window. I want to open the other website without open new window in my flex website. Is that can implement? What component and method should I use? thanks, dialogtmp
[flexcoders] Flex Workspace Preferences
Hi, all; Is there a way to copy preferences from one workspace to another? For example, things like my help contexts I always want to be the same across projects. But it's aggravating that each time I create a new project I have to do all this setup again. Thanks; Amy
RE: [flexcoders] AIT application window size
(Probably) something along the lines of this.nativeWindow.width = Screen.mainScreen.visibleBounds.width; (and similar for height, x and y etc) There should be more reliable info than mine available in the help, under Screen, however. -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of hworke Sent: 13 October 2008 04:27 To: flexcoders@yahoogroups.com Subject: [flexcoders] AIT application window size Hi I was wondering how can I make the AIR application window full screen. I mean it is going to cover the whole monitor. I tried it with width and height 100% but it did not work. Please advice. __ This communication is from Primal Pictures Ltd., a company registered in England and Wales with registration No. 02622298 and registered office: 4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT registration No. 648874577. This e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not disclose its contents to any person. This email has been scanned for Primal Pictures by the MessageLabs Email Security System. __
[flexcoders] SOT: Apache and Windows resources
Trying to setup some Alias paths, within Apache, exposing resources available on a Storage Area Network. These are primarily media type resources (site.com/images, site.com/media, etc.) When working with IIS, you set these up as Virtual Directories, and apply any user permissions within that directory's Properties. Access permissions are defined by a Domain Controller. So, the question is, how do you cover the same directory authorization within an Apache configuration? I've done Aliases to UNC resources in the past, but never had to worry about the DC authorization before. Anyone have an idea as to how this authorization is configured? -- Steve Cutter Blades Adobe Certified Professional Advanced Macromedia ColdFusion MX 7 Developer _ http://blog.cutterscrossing.com
[flexcoders] Error #1063: Argument count mismatch using read/writeobject in AIR
Hi, I'm using AMF format storing and retrieving objects using write and readobject() in AIR. But I have a problem. Let's say this is my class: (simple, no params in constructor) ActionScript Code: public class MyClass { public function MyClass():void { } } Then, I create an ArrayCollection (and save the arraycollection object to the file) with instances of this class. This is working ok, I can save, open and retrieve, iterate objects in the stored arraycollection just fine. BUT, if my class have any parameter in the constructor, my code fails retrieving the arraycollection Something like this: ActionScript Code: var file:File = File.applicationDirectory.resolvePath('Data.data'); var stream:FileStream = new FileStream(); stream.open(file, FileMode.READ); var myAC:ArrayCollection = new ArrayCollection(); while(stream.bytesAvailable){ myAC = stream.readObject() as ArrayCollection;//ERROR Error #1063: Argument count mismatch } Any idea ..? TIA
RE: [flexcoders] open the other website
If you want the new url to open in the current window, *replacing* the Flex app, use _self in place of _blank. If you want the new site to open *within* the flex app, it is much harder. Flex, running in the Flash Player, cannot render full html. One solution is to use an IFRAME in your wrapper that is positioned to give the illusion that it is part of the Flex app. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dialogtmp Sent: Monday, October 13, 2008 12:36 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] open the other website dear all, I have a question about open the other website. I only know that I can use navigateToURL(urlRequest,_blank) to open anyone I want. But the method will open the new window. I want to open the other website without open new window in my flex website. Is that can implement? What component and method should I use? thanks, dialogtmp
Re: [flexcoders] Custom Tooltip
ok, for an example, I have a row in the list. And for it's tooltip, I want to display various characteristics (which I have in the form of name/value pairs in a list). Does that give you an idea?? ---row1 ---row2 (ToolTip)[has a name/value list, which can be represented as a tooltip] --- ---rowN So, my concern of passing an Object to Tooltip is passing anything that can be an Object as in ArrayCollection/Array/String/int/image etc.. Thanks, Manu. Flex Gangsta wrote: For what reason do you want to pass an object to it? That might clear up any confusion that I have Sent from my iPhone On Oct 13, 2008, at 8:42 AM, Manu Dhanda [EMAIL PROTECTED] wrote: I can always define a custom tooltip with a Panel, List or anything in it. But the real issue is, How can I pass data to it(as an Object/Collection), other then just text ??? Any idea/thoughts?? -Manu. Flex Gangsta wrote: Well, it all depends how you want it rendered... If you pass an array collection... For what reason and how do you want it to render? Sent from my iPhone On Oct 13, 2008, at 5:09 AM, Manu Dhanda [EMAIL PROTECTED] wrote: Hii I was looking for a custom tooltip. Is there a way that I can pass an object to a tooltip rather then a String. Say, I want to pass an Arraycollection.. Is that possible?? And if it is.. then how? Thanks. -- View this message in context: http://www.nabble.com/Custom-Tooltip-tp19953678p19953678.html Sent from the FlexCoders mailing list archive at Nabble.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 -- View this message in context: http://www.nabble.com/Custom-Tooltip-tp19953678p19957337.html Sent from the FlexCoders mailing list archive at Nabble.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 -- View this message in context: http://www.nabble.com/Custom-Tooltip-tp19953678p19959178.html Sent from the FlexCoders mailing list archive at Nabble.com.
[flexcoders] Errror while accessing mxml component in external as file
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
[flexcoders] Troubleshooting Invalid Embed
I'd appreciate some help troubleshooting this Flexbuilder error, as I don't recall how I resolved it the last time it drove me crazy: Invalid Embed directive in stylesheet - can't resolve source 'Embed(assets/images/dollar_large.png)'.FooAppline 7 First of all there's no style sheet. Secondly the error message refers to line 7 of a resource which is not a file. Thirdly, the error disappears temporarily if I touch the library by unchecking and re-checking src in the Classes tab. FooApp is a tiny project which references a library with the following Maven-compatible layout: FooLib ..src main ..flex com ..locales en_US ..images.properties ..text.properties ja_JP ..text.properties ..resources assets ..images dollar_large.png test images.properties contains the following: dollar_large=Embed(assets/images/dollar_large.png) The main source folder is src/main/flex and the additional source folders are: src/test/flex src/main/resources src/main/locales/{locale} The additional compiler args for both FooLib and FooApp are: -locale en_US ja_JP -include-resource-bundles=images,text
[flexcoders] PopUpMenuButton.itemClick event
I've set PopUpMenuButton.openAlways = true and it looks like the PopUpMenuButton itemClick event is firing even when I click on the main button (with the first item as the selected menu item). Is there any way to get around this? Basically, what I would like is to *only* pop up the menu when the user clicks on the button (whether the main button or the expand menu arrow). I only want a click event when the user actually selects something from the menu. I tried testing currentTarget, but apparently it's the PopUpMenuButton itself whether you're clicking on the main button or the arrow. Any ideas? -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com
[flexcoders] Re: Smooth scrolling when setting verticalScrollPosition on TextArea
That's funny, I JUST did that same thing last week on Wednesday. AnimateProperty is the right choice. Mine looks smooth during the movement, is yours doing something weird or choppy? You could also look at using an easing function and see what that does for you. - Kevin --- In flexcoders@yahoogroups.com, Mark Carter [EMAIL PROTECTED] wrote: In AS3, I set the vertical scroll position of the text area, but would like the area to smoothly scroll to that area rather than jump to it (disorientating the user). I've done this using the AnimateProperty class on the verticalScrollPosition property. Is there a more standard way? -- View this message in context: http://www.nabble.com/Smooth-scrolling-when-setting-verticalScrollPosition-on-TextArea-tp19930681p19930681.html Sent from the FlexCoders mailing list archive at Nabble.com.
[flexcoders] Re: Custom Tooltip
--- In flexcoders@yahoogroups.com, Manu Dhanda [EMAIL PROTECTED] wrote: ok, for an example, I have a row in the list. And for it's tooltip, I want to display various characteristics (which I have in the form of name/value pairs in a list). Does that give you an idea?? ---row1 ---row2 (ToolTip)[has a name/value list, which can be represented as a tooltip] --- ---rowN So, my concern of passing an Object to Tooltip is passing anything that can be an Object as in ArrayCollection/Array/String/int/image etc.. I think you may be interested in the dataTipFunction property that all of the List based components have. You can set this up to use the data in the current item to look up any information available to the program. HTH; Amy
[flexcoders] function to get a color uint value from a color name string?
Is there a function somewhere that takes something like red as input and returns 0xFF? I've looked all over in the docs and can't find it. Thanks. -- Jason
RE: [flexcoders] function to get a color uint value from a color name string?
The badly-named StyleManager.getColorName() method. - Gordon From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Pan Troglodytes Sent: Monday, October 13, 2008 12:50 PM To: flexcoders Subject: [flexcoders] function to get a color uint value from a color name string? Is there a function somewhere that takes something like red as input and returns 0xFF? I've looked all over in the docs and can't find it. Thanks. -- Jason
Re: [flexcoders] function to get a color uint value from a color name string?
Ironically, this was the one class I skipped and meant to come back to while really casting about for anything that might even be close. Thanks! On Mon, Oct 13, 2008 at 2:54 PM, Gordon Smith [EMAIL PROTECTED] wrote: The badly-named StyleManager.getColorName() method. - Gordon *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Pan Troglodytes *Sent:* Monday, October 13, 2008 12:50 PM *To:* flexcoders *Subject:* [flexcoders] function to get a color uint value from a color name string? Is there a function somewhere that takes something like red as input and returns 0xFF? I've looked all over in the docs and can't find it. Thanks. -- Jason -- Jason
Re: [flexcoders] Flex Workspace Preferences
Maybe one way...open up your current workspace, choose File Switch Workplace Other. In the dialog you will see Copy Settings, toggle it open and check things off. Set and open your new workspace. HTH DK On Mon, Oct 13, 2008 at 12:37 PM, Amy [EMAIL PROTECTED] wrote: Hi, all; Is there a way to copy preferences from one workspace to another? For example, things like my help contexts I always want to be the same across projects. But it's aggravating that each time I create a new project I have to do all this setup again. Thanks; Amy -- Douglas Knudsen http://www.cubicleman.com this is my signature, like it?
[flexcoders] Re: PopUpMenuButton.itemClick event
Hi Maciek, The click event pertains to the popup button itself. You can use that to open the menu: mx:PopUpButton id=myPopupButton creationComplete=initMyPopupButtonMenu() click={ myPopupButton.open() }/ The change event is the one that you use when a menu item is selected: private function initMyPopupButtonMenu():void { myMenu = new List(); var myMenuItemRenderer:ClassFactory = new ClassFactory(myItemRenderer); myMenuItemRenderer.properties = { labelField: myField }; myMenu.itemRenderer = myMenuItemRenderer; myMenu.dataProvider = myDataProvider; myMenu.addEventListener(change, myMenuChangeHandler); myPopupButton.popUp = myMenu; } -TH --- In flexcoders@yahoogroups.com, Maciek Sakrejda [EMAIL PROTECTED] wrote: I've set PopUpMenuButton.openAlways = true and it looks like the PopUpMenuButton itemClick event is firing even when I click on the main button (with the first item as the selected menu item). Is there any way to get around this? Basically, what I would like is to *only* pop up the menu when the user clicks on the button (whether the main button or the expand menu arrow). I only want a click event when the user actually selects something from the menu. I tried testing currentTarget, but apparently it's the PopUpMenuButton itself whether you're clicking on the main button or the arrow. Any ideas? -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com
Re: [flexcoders] Re: PopUpMenuButton.itemClick event
Thanks, Tim. I was hoping for something more straightforward (the PopUpMenuButton.itemClick description says Dispatched when a user selects an item from the pop-up menu; this is exactly what I want--or rather would be, if it did what is documented), but this will do. Thanks, -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: Tim Hoff [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: PopUpMenuButton.itemClick event Date: Mon, 13 Oct 2008 20:40:46 - Hi Maciek, The click event pertains to the popup button itself. You can use that to open the menu: mx:PopUpButton id=myPopupButton creationComplete=initMyPopupButtonMenu() click={ myPopupButton.open() }/ The change event is the one that you use when a menu item is selected: private function initMyPopupButtonMenu():void { myMenu = new List(); var myMenuItemRenderer:ClassFactory = new ClassFactory(myItemRenderer); myMenuItemRenderer.properties = { labelField: myField }; myMenu.itemRenderer = myMenuItemRenderer; myMenu.dataProvider = myDataProvider; myMenu.addEventListener(change, myMenuChangeHandler); myPopupButton.popUp = myMenu; } -TH --- In flexcoders@yahoogroups.com, Maciek Sakrejda [EMAIL PROTECTED] wrote: I've set PopUpMenuButton.openAlways = true and it looks like the PopUpMenuButton itemClick event is firing even when I click on the main button (with the first item as the selected menu item). Is there any way to get around this? Basically, what I would like is to *only* pop up the menu when the user clicks on the button (whether the main button or the expand menu arrow). I only want a click event when the user actually selects something from the menu. I tried testing currentTarget, but apparently it's the PopUpMenuButton itself whether you're clicking on the main button or the arrow. Any ideas? -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com
[flexcoders] Resource Bundle Missing in AIR
I'm using localization on a flex project for a slightly different use. We have 2 projects that share the same code base, but we want to change some UI text that's displayed. So, we're using localization to swap certain text strings to be project specific. Everything works fine for the web version, but if I try to take that same localization setup and use it in our AIR version, it cannot find the required resource bundles. I've looked and they(web/AIR) appear to be set up identically. My locales are: en_US_ProjA and en_US_ProjB. The AIR compiler argument is -locale=en_US,en_US_ProjA. I only put the one project in to test getting the proper resource. My directories are: projRoot.src.locale.en_US.* projRoot.src.locale.en_US_ProjA.* projRoot.src.locale.en_US_ProjB.* When I debug a piece of localization code I see that the localeMap has 2 entries, en_US and en_US_ProjA. Both contain the same entries, but the properties files are pointing to different Obects. For example: en_US_ProjA$CairngormMessages_properties (@c3547b9). I should be seeing a UI_Text property file in the list of resource bundle objects, but it's missing. I'm stumped as to why it works just fine from a browser, but pukes in AIR. Thanks, Geoff
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++) {
[flexcoders] Re: PopUpMenuButton.itemClick event
Actually itemClick should work for a PopupMenuButton. I misread your question as PopupButton. -TH --- In flexcoders@yahoogroups.com, Maciek Sakrejda [EMAIL PROTECTED] wrote: Thanks, Tim. I was hoping for something more straightforward (the PopUpMenuButton.itemClick description says Dispatched when a user selects an item from the pop-up menu; this is exactly what I want--or rather would be, if it did what is documented), but this will do. Thanks, -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: Tim Hoff [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: PopUpMenuButton.itemClick event Date: Mon, 13 Oct 2008 20:40:46 - Hi Maciek, The click event pertains to the popup button itself. You can use that to open the menu: mx:PopUpButton id=myPopupButton creationComplete=initMyPopupButtonMenu() click={ myPopupButton.open() }/ The change event is the one that you use when a menu item is selected: private function initMyPopupButtonMenu():void { myMenu = new List(); var myMenuItemRenderer:ClassFactory = new ClassFactory(myItemRenderer); myMenuItemRenderer.properties = { labelField: myField }; myMenu.itemRenderer = myMenuItemRenderer; myMenu.dataProvider = myDataProvider; myMenu.addEventListener(change, myMenuChangeHandler); myPopupButton.popUp = myMenu; } -TH --- In flexcoders@yahoogroups.com, Maciek Sakrejda msakrejda@ wrote: I've set PopUpMenuButton.openAlways = true and it looks like the PopUpMenuButton itemClick event is firing even when I click on the main button (with the first item as the selected menu item). Is there any way to get around this? Basically, what I would like is to *only* pop up the menu when the user clicks on the button (whether the main button or the expand menu arrow). I only want a click event when the user actually selects something from the menu. I tried testing currentTarget, but apparently it's the PopUpMenuButton itself whether you're clicking on the main button or the arrow. Any ideas? -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com
RE: [flexcoders] Remote calls are not happening using blazeDS in secured environment
You need to use a SecureAMFChannel to interact with a SecureAMFEndpoint. It’s not clear from your emails why the server is receiving HTTP requests rather than HTTPS requests. If you’re using a SecureAMFChannel on the client, its requests will be sent via HTTPS. If you have something in front of your server that’s handling HTTPS (say a hardware SSL accelerator) that passes insecure HTTP requests back to the server, you need to mix and match a secure channel class for the hop from the client to the SSL appliance, with an insecure endpoint for the hop from the SSL appliance to the app server. The config for this would be something like: channel-definition id=secure-amf class=mx.messaging.channels.SecureAMFChannel endpoint url=https://{server.name}:{server.port}/secureamf; class=flex.messaging.endpoints.AMFEndpoint/ … Note the secure channel class, secure endpoint URL and insecure endpoint class. But again, you only need to configure things this way when you have a component between the client and server handling SSL. Hope that helps, Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of venkateswarlu naidu Sent: Thursday, October 09, 2008 8:23 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Remote calls are not happening using blazeDS in secured environment Here is the exact error message that i am seeing in the server console secure endpoint /messageborker/secureamf must be contacted via secure protocol Please help me on this. Thanks Regards, Venkat. - Original Message From: venkateswarlu naidu [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, 9 October, 2008 9:33:56 PM Subject: [flexcoders] Remote calls are not happening using blazeDS in secured environment Hi All, Even after adding my-secure-amf channel to remote-config. xml, our flex application coludn,t make remote calls. I am seeing a failover to HTTP from a HTTPS request in the http url log, dont know why it is failing over to HTTP://context/messagebroker/ amf from HTTPS://context/messagebroker/ secureamf in a secured environment. Actually this failover is not happening in DEV (in which we have both HTTP and HTTPS enabled). The problem is specific to QA env (weblogic+clustered +secured) , i dont have any clues. Can any body help me on this? Thanks Regards, Venkat. - Original Message From: venkateswarlu naidu contactvenku@ yahoo.co. in To: [EMAIL PROTECTED] ups.com Sent: Wednesday, 8 October, 2008 10:41:13 PM Subject: [flexcoders] could not establish connection to java data service from flex client using blazeDS Hi All, We have a flex+blazeDS+ Java based application, after deploying the application in QA env, java data service calls are not happening. When i see the URL log in HTTP sniffer tool, the request is getting stopped at URL context-root /messagebroker/ amf and finally seeing 502 (CANNOT_CONNECT) status. The same application is working fine in DEV environment. Our QA environment: secured, HTTPS, running behind firewalls and clustered. Why the flex client can not connect to the java data services? Any help is greatly appreciated. Thanks Regards, Venkat.
[flexcoders] Efficiency and objects in the display list
We have an app which adds 50 or 60 dynamically created and animated canvas-based objects to the display list as it runs. I've noticed when running this under the profiler that even though these canvas-based components are really simple (they have a draw function and a rotate function in them and don't import any other classes) they each add about 1 Mb to the overall memory consumed by the app. I've also tried making the components UIComponent based instead of using Canvas (as I believe it's a little more lightweight) but it doesn't seem to make a huge difference. Is there a better/more efficient way to dynamically create, draw, rotate and animate a bunch of small objects in a flex app? TIA Guy
[flexcoders] Problem with the DataGrid column keeps switching location
Hello, I have been working on a solution to make some sort of property grid in Flex and I have been using the DataGrid. Only I am experiencing some problems with it. The datagrid consists of two columns called name and value. The second value is a column where I used a custom itemRenderer to change the input editor based on given instructions in the dataProvider. Only I am sadly enough I am experiencing some strange problem with it. The problem is that when I am filling the dataProvider and later clear the dataProvider and then add some data again. The input editors in the second column don't match the title shown at the first column. The input editor will move one row time each time you are refilling it. I have made a Flex project which reproduces this problem. Does anyone know how this problem can be fixed? The download can be found at: www.dustyfrog.nl/dropbox/dbgrid_problem.zip Also does anyone know a better or different approach to accomplish the same in a way without the above mentioned problem? The code is based on code from Tink (I am bit disparate) Yours, Weyert
Re: [flexcoders] Problem with the DataGrid column keeps switching location
The problem is shown when you click a few times on the buttons.
Re: [flexcoders] Re: How to make a Docking Window Framework/component like Eclipse/InfoDock/JDocking
We've all gotta pay the rent mate :) I won't be much help beta testing at the moment, as the project I'd need it on won't be at that stage for quite a while yet. It looks great though, and we'll probably have a need for it at my 9-5 sometime down the track, so I'd definitely appreciate a heads-up when it's released. -Josh On Thu, Oct 9, 2008 at 7:51 PM, Michael Schmalle [EMAIL PROTECTED]wrote: @Josh Well buddy, this dads gotta make money for the little people in his house but, since you are one of the groupies around here, I could use some beta testers and then flip you it for free (for your time ;-) @Tim Thanks, and these frameworks were designed with love. If you look at my blog, it looks like I died or got abducted by aliens. Really, I have been working hard on something I could finally feel comfortable saying this could be around for 5+ years. Coming up; Windowing Framework Transformation Framework View Framework Docking Framework The windowing framework plays a major role in anything I do from here out. The framework will cross pollinate with AIR. I also borrowed some design patterns from eclipse that abstract window implementation from the actual view component itself. This is the first one I'm releasing. Plus this time I am selling the source code as well. Mike On Wed, Oct 8, 2008 at 10:00 PM, Tim Hoff [EMAIL PROTECTED] wrote: If it's anything like your components and/or framework Mike, it's going to rock! I've found them to be very useful. -TH --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote: Mike, I'm very interested in this. Will it be for-pay, or OSS? If it's OSS, need any help? -Josh On Wed, Oct 8, 2008 at 11:37 PM, Michael Schmalle [EMAIL PROTECTED]: Ironically, I am releasing a framework like this in 2 months. Truth be told, I have spent 1 1/2 years creating a base framework that made it happen. Mike -- 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] -- Teoti Graphix, LLC http://www.teotigraphix.com Teoti Graphix Blog http://www.blog.teotigraphix.com You can find more by solving the problem then by 'asking the question'. -- 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/
[flexcoders] Tab Navigator/SWF Loader
Hi All, I've got a tab navigator in an app that's throwing a strange exception. What happens is that if you *click* on a tab, you don't see this error, but if you use the arrow keys to move to one of the tabs, you do. The tab in question is different from the others in that it's the only one that uses a swf loader to load a swf. I was earlier seeing an Error #2025: The supplied DisplayObject must be a child of the caller message; I'm now seeing the one I've reproduced below. Has anyone seen a similar error or have any thoughts on how to proceed? Thanks, David TypeError: Error #1034: Type Coercion failed: cannot convert flash.events::[EMAIL PROTECTED] to mx.events.ResizeEvent. at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.managers::SystemManager/setActualSize() [E:\dev\flex_201_borneo\sdk\frameworks\mx\managers\SystemManager.as:17 53] at mx.controls::SWFLoader/doScaleContent() [E:\dev\flex_201_borneo\sdk\frameworks\mx\controls\SWFLoader.as:1449] at mx.controls::SWFLoader/updateDisplayList() [E:\dev\flex_201_borneo\sdk\frameworks\mx\controls\SWFLoader.as:1091] at mx.core::UIComponent/validateDisplayList() [E:\dev\flex_201_borneo\sdk\frameworks\mx\core\UIComponent.as:5826] at mx.managers::LayoutManager/validateDisplayList() [E:\dev\flex_201_borneo\sdk\frameworks\mx\managers\LayoutManager.as:60 0] at mx.managers::LayoutManager/doPhasedInstantiation() [E:\dev\flex_201_borneo\sdk\frameworks\mx\managers\LayoutManager.as:67 3] at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.core::UIComponent/callLaterDispatcher2() [E:\dev\flex_201_borneo\sdk\frameworks\mx\core\UIComponent.as:7975] at mx.core::UIComponent/callLaterDispatcher() [E:\dev\flex_201_borneo\sdk\frameworks\mx\core\UIComponent.as:7918]
Re: [flexcoders] Custom Tooltip
I am asking to pass an object to a ToolTip rather then only a String. Does anyone have any direction on that?? Thanks. Amy-28 wrote: --- In flexcoders@yahoogroups.com, Manu Dhanda [EMAIL PROTECTED] wrote: ok, for an example, I have a row in the list. And for it's tooltip, I want to display various characteristics (which I have in the form of name/value pairs in a list). Does that give you an idea?? ---row1 ---row2 (ToolTip)[has a name/value list, which can be represented as a tooltip] --- ---rowN So, my concern of passing an Object to Tooltip is passing anything that can be an Object as in ArrayCollection/Array/String/int/image etc.. I think you may be interested in the dataTipFunction property that all of the List based components have. You can set this up to use the data in the current item to look up any information available to the program. HTH; Amy -- View this message in context: http://www.nabble.com/Custom-Tooltip-tp19953678p19965996.html Sent from the FlexCoders mailing list archive at Nabble.com.
Re: [flexcoders] Smooth scrolling when setting verticalScrollPosition on TextArea
Oh, its fine - not choppy at all. I've even been toying with the idea of doing something more acceleration based instead, but probably won't bother. I scroll to a position where some text is newly selected. I just needed to be careful that I only made the selection after the scrolling finished. Otherwise, I think it jumps straight there when you make the selection... Also, if the number of lines to be scrolled is below a certain minimum, I base the duration on the number of lines (so it doesnt scroll too slow). Above that minimum, I use a fixed duration. private function verticalScrollToPosition(newPosition:int, nextFunc:Function, durationInMillis:Number = SCROLL_DURATION_IN_MILLIS):void { var scrollEffect:AnimateProperty = new AnimateProperty(this) scrollEffect.addEventListener(EffectEvent.EFFECT_END, function(evt:EffectEvent):void { if (nextFunc != null) { nextFunc(); } }); scrollEffect.property = verticalScrollPosition; scrollEffect.toValue = newPosition; // maybe possible to use scrollEffect.fromValue instead of this.verticalScrollPosition? var linesToScroll:int = Math.abs(newPosition - this.verticalScrollPosition); // don't go too slow scrollEffect.duration = Math.min(durationInMillis, (1000 * linesToScroll) / MIN_SCROLL_SPEED); scrollEffect.play(); } I'd never heard of easing functions before. I'll check them out... -- View this message in context: http://www.nabble.com/Smooth-scrolling-when-setting-verticalScrollPosition-on-TextArea-tp19930681p19966745.html Sent from the FlexCoders mailing list archive at Nabble.com.
Re: [flexcoders] AIR with twitter
i hope you have found the answer on twitter mailing list. replace .format with .xml as you are expecting e4x. - shahid On Mon, Oct 13, 2008 at 3:02 PM, abhishekchess1 [EMAIL PROTECTED]wrote: hello all frnds, i want to connect my AIR application with twitter API, i never used any API before, i used mx:HTTPService id=httpSerSendMessage url=http://twitter.com/direct_messages/new.format; result= resultHandlerSendMessage(event); fault=faultHandlerSendMessage(event); method=POST resultFormat=e4x mx:request user{userName}/user text{message}/text /mx:request /mx:HTTPService but it give an error [RPC Fault faultString=HTTP request error faultCode=Server.Error.Request faultDetail=Error: [IOErrorEvent type=ioError bubbles=false cancelable=false eventPhase=2 text=Error #2032: Stream Error. URL: http://twitter.com/direct_messages/new.format; errorID=2032]. URL: http://twitter.com/direct_messages/new.format;] is authentication mtd is req ? how to use authentication mthod http://twitter.com/account/verify_credentials.format , and wat to send in it ?