Re: [flexcoders] Advantages and Disadvantages of skinning
The new skinning architecture in Flex 4 separates business logic and design for a component. The component itself contains only the functionality (the M and C of the MVC pattern) and the skin defines its visual aspect (the V of MVC). If used correctly, you can change the design (skin) of a component without the need for changing the code of the component itself. One component and many skins, e.g. for desktop, for mobile, for different applications. Skinning is very good documented and there are many resources available, just search for spark skinning. Haykel Ben Jemia Allmas Web Mobile Development http://www.allmas-tn.com On 9 February 2012 18:07, Davidson, Jerry jerry.david...@illinois.govwrote: ** I think the skinning allows the components to be lighter. But it makes everything a lot more complex. ** ** A month ago I started a thread on what the pieces in a skin mean and not one person was able to respond so there seems to be a learning curve at work. ** ** *From:* flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] *On Behalf Of *Myadi H *Sent:* Wednesday, February 08, 2012 10:33 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Advantages and Disadvantages of skinning ** ** Hello folks, Today I have been asked to explain advantages and disadvantages of skinning in flex. I thought of asking this to all experienced flexers, and here it is. I hope this discussion will help everybody in future. So please input/share your knowledge. Thank you.
Re: [flexcoders] Displaying spark scrollbars for mx components wrapped in a scroller
The child of the Scroller (called viewport) must resize freely for scrolling to work. If you set its size to '100%' then it will always have the size of the scroller and scrolling will never be required. Try this (not tested): s:Scroller width=100% height=100% verticalScrollPolicy=on s:Group mx:Container verticalScrollPolicy=off horizontalScrollPolicy=off / /s:Group /s:Scroller / Haykel Ben Jemia Allmas Web Mobile Development http://www.allmas-tn.com On 9 February 2012 02:15, method_air loudj...@hotmail.com wrote: ** Is it possible to hide the mx scrollbars for an mx component, and show the spark scrollbars of the spark 'scroller' component wrapping it instead? How can I get this example to work: s:Scroller width=100% height=100% verticalScrollPolicy=on s:Group width=100% height=100% mx:Container width=100% verticalScrollPolicy=off horizontalScrollPolicy=off height=100% / /s:Group /s:Scroller / Cheers, Philip
Re: [flexcoders] Re: s:Image and s:BitmapImage?
Use Image if you want to display loading states of images, generally when loading external images based on user interaction. Use BitmapImage for skinning purposes. Haykel Ben Jemia Allmas Web Mobile Development http://www.allmas-tn.com On 7 February 2012 15:38, markflex2007 markflex2...@yahoo.com wrote: ** Which one (s:Image or s:BitmapImage) I should use in mobile application for a jpeg image.Thanks Mark Hi, what is the different between s:Image and s:BitmapImage? I am a little confuse.Thanks Mark -- Alex Harui Flex SDK Team Adobe Systems, Inc. http://blogs.adobe.com/aharui
Re: [flexcoders] Need help dynamically modifying text displayed based on DB return
I think the best way is to use states. Define the different states for your component, e.g. s:states s:State name=available / s:State name=sold / s:State name=other / /s:states You have now to track changes to win.status and set the current state accordingly, e.g. by listening to the property change event on win: protected function win_propertyChangeHandler(event:PropertyChangeEvent):void { switch (event.property) { case status: imageStatus = event.newValue; switch (event.newValue) { case Available: currentState = available; break; case Sold: currentState = sold; break; default: currentState = other; break; } break; } } and finally set the properties of the artPrice text based on the current state: s:RichText id=artPrice width=120 color=#00 color.sold=#C39F70 fontFamily=Times New Roman fontSize=18 text={imageStatus} text.available={imagePrice} / I hope this helps. Haykel Ben Jemia Allmas Web Mobile Development http://www.allmas-tn.com On 30 January 2012 14:55, hermeszfineart hermeszfine...@comcast.net wrote: ** Part of the functionality in the gallery app ia am working on for my wife is a popup window that displays information about the specific painting or drawing. I am trying to figure out how to do the following based on the value returned from the DB for the imageStatus field: 1) Change the text displayed for the Price to the {imageStatus)if that value is anything other than Available. 2) Change the color of the above text to RED if the {imageStatus) == Sold. fx:Script ![CDATA[ ... //cut for brevity [*Bindable*] *public* *var* imageTitle:String = *{win.title}*; [*Bindable*] *public* *var* imageStatus:String = *{win.status}*; [*Bindable*] *public* *var* imagePrice:String = *{win.price}*; [ *Bindable*] *public* *var* displayPrice:String ; ... // cut for brevity ]] /fx:Script s:Group s:layout s:VerticalLayout/ /s:layout s:RichText id=style x=13 y=14 width=120 color=#C39F70 fontFamily=Times New Roman fontSize=18 text={imageStyle}/ s:RichText width=120 color=#C39F70 fontFamily=Times New Roman fontSize=18 text={imageMedium}/ s:RichText id=dimensions width=112 color=#C39F70 fontFamily=Times New Roman fontSize=18 text={imageHeight} x {imageWidth}/ s:RichText id=artPrice width=120 color=#C39F70 fontFamily=Times New Roman fontSize=18 text={imagePrice} / !-- Currently displaying the art's price -- /s:Group I have tried several things with public functions, getters/setters, but have gotten no where. Could someone kindly point me in the right direction? Thanks, John
Re: [flexcoders] Re: mobile app need show a web page
StageWebView Haykel. Sent from my Android phone. Le 27 janv. 2012 19:53, markflex2007 markflex2...@yahoo.com a écrit : ** Hi, any way to embed HTML page in mobile application? it seem not uicomponent to do this for mobile. Please help. Mark --- In flexcoders@yahoogroups.com, markflex2007 markflex2007@... wrote: Hi I develop a mobile android app now. I need show a html web page.I try to use StageWebView now the problem is StageWebView take all apace of the screen. I need include other text and textInput in the same page. I use mx:html in flex 3 before, but I can not find a same component in flex 4 for mobile. Please help me Thanks Mark
[flexcoders] P2P multicast and upstream bandwidth
Hi, I'm in the process of developing a realtime video chat application where multiple users can send video streams simultanuously. The number of users receiving the streams can be very big, e.g. 10 broadcasters and 500 receivers, each receiver should get all streams. I use RTMFP connections to an FMS and streams are published in P2P multicast groups by passing the groupspec to the NetStream constructor. Currently I'm having problems with audio/video synchronization and video stream 'jumps' (not continuous). From what I read in the internet, this is related to the fact that there is not enough upstream bandwidth for sending the streams. So my questions are: 1. How to calculate the required upstream bandwidth on every peer for the given example of 10 broadcasters and 500 receivers (is it 10*bandwidth of one stream)? 2. What settings (on NetStream, Camera, Microphone etc.) should be used for best results and how to adapt them based on the number of broadcasters? I hope my questions make sense! Thanks, Haykel Ben Jemia Allmas Web Mobile Development http://www.allmas-tn.com
Re: [flexcoders] Re: Flex alternatives
Staying with Flex until I see what happens with it during its first year as an Apache project. I expect big improvements and many new and cool features, it will only depend on Adobe if it will follow with the player. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Thu, Jan 12, 2012 at 3:16 AM, michael_reg...@dell.com wrote: ** Staying with Flex. Not looking elsewhere. ** ** *Michael* ** ** *From:* flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] *On Behalf Of *Ron G *Sent:* Wednesday, January 11, 2012 8:15 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Re: Flex alternatives ** ** Yes, we have also abandoned Flex in favor of ZKoss. Since we are already a Java shop, on the server side, it seemed logical to use a Java based framework on the client-side. The thing I really like about ZK or ZKoss is that it has equivalent components to Flex. In fact, it actually has more components than Flex. It implements an approach that I really like of separating the UI into appearance and behavior - much like the Spark components of Flex. Well, not exactly, but sort of. :) Here's what I mean. For each UI object, it has a client side (widget) and server side (component). I won't go into further detail, but it gives you a nice separation of concerns that you can avail yourself of. This feature also greatly insulates the rendered pages from x-browser compatibility issues. Check it out for yourself at their site (zkoss.org). Ron --- In flexcoders@yahoogroups.com, Sal sal.celli@... wrote: hi, as i can sadly see from the message history bottom grid, many programmers are leaving flex. So this thread is to ask you all, if you have already found a valid alternative to flex for RIA development.
Re: [flexcoders] Re: Flex with bluetooth input data
I'm not sure but it should be possible by writing a native extension. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Fri, Dec 30, 2011 at 3:10 PM, markflex2007 markflex2...@yahoo.comwrote: ** Hi, I need to use blue tooth scanner to input bar code to Flex application.do you think if it is possible. Please give me a idea. Thanks Mark --- In flexcoders@yahoogroups.com, markflex2007 markflex2007@... wrote: Hi, How to make Flex (or Air) application can receive bluetooth device's input? Thanks Mark
Re: [flexcoders] You are the product
Interesting answers but they almost all are based on the assumption that you have much time and enough money to waste. You can do almost everything with HTML/JS/CSS, but for many things you will require much (really much) more time than with Flash. I say 'almost' because there are things you can't do, an example is applications using peer-assisted networking (peer-to-peer), which is a realworld project I'm working on currently. Let's stop this war because both technologies are complementary and there are things you should do with one technology and others with other technologies. Now regarding the attitude of Adobe, it's true that the way they did the annoucement was not 'friendly', but it was actually a logical decision. There is no flash application on the web that was designed with mobile devices in mind. Users generally install apps on their devices and we have AIR for that, especially with the new native extensions there is no limitations to what you can do anymore. Developing using Flash and native languages for extensions is a new way of developing applications and it should be the same for web apps, where we develop with Flash and HTML. The reality is that every technology has its advantages and as a developer you have to know when to use each one. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Sun, Dec 18, 2011 at 11:24 AM, Rick Winscot rick.wins...@zyche.comwrote: ** Uh… the original question is pretty simple - can you do anything [ like the link provided ] in HTML / CSS? The short answer is, yes. Since you opened a can of worms… I'll bite. Specs not yet finished… blah blah blah. If you're looking for a language to get carved in stone before you write a line of code… good luck. There are plenty of apps out there that are working just fine on 'draft' technology. Innovation typically drives change – not the other way around. Newer features… bah! If you find a browser that supports the features you must have… try to standardize on that browser if you can. If you can't… then cross that bridge if you have to come to it and not before. Getting your panties in a wad over something that isn't on your plate is a waste of time. One code-base everywhere… Urk. Really? I thought that was what Flash was supposed to do! Seriously… I don't know what you're trying to say here. If you need an HTML/CSS app that runs just about anywhere… wrap it in AIR and move on. Did he even state that it needs to run on desktop, mobile, tablets, and the voyager I spacecraft? Any good programmer… barf. I do get sick of pious comments like this. I mean – the guy just asked a simple question. Architecture is a subject best served after a developer has a chance to get cozy with the technology. I mean – I appreciate your desire to go deep on this question but really… milk before meat. The question was simple – if he needs more – let the subject blossom. From: Robert VanCuren Jr robert.vancuren...@gmail.com Reply-To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com Date: Sun, 18 Dec 2011 01:01:27 -0500 To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com Subject: Re: [flexcoders] You are the product There is no one size fits all solution if you want to build a complex application. Flash might be a good choice for one and HTML for another and you might need to go native depending on what you are trying to do. Maybe you even want to use Java or Silverlight! When you ask if you can do something in HTML5/JS/CSS you need to keep in mind that many of the specs are not yet finished. It will be several more years before they are even in the recommendation phase. So while it may be possible to do some things in some browsers HTML5/JS/CSS is far from being cross platform ready. Standards move slow by their nature and because of that browser vendors will release features before the standards are finished, many times that means that each browser will have a different API or implementation for the same feature. If you are going to use newer html features it is recommended that you only use the ones that are relatively stable. May of the really cool features that you will want to use are not yet production ready and should be avoided for a real project. Of course if you can limit your scope to a couple browsers there is a lot more you can do. All of that said you can make some really kick ass stuff using the HTML5, CSS3, and JavaScript. There are tons of libraries that will abstract out the browser specific things and attempt to make one code base work everywhere. Things like Modernizr, Three.js, Dojo, jQuery, EaselJS ,ect, ect. Even when using these libraries there are performance differences across devices and even browser versions. Making a web application that really works across platforms and devices is not a trivial task. Take a look at some of the stuff you can do https://developer.mozilla.org/en-US/demos/ http
Re: [flexcoders] Background color of Vgroup
can you share the mxml file? Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Thu, Dec 1, 2011 at 1:15 PM, sony antony pow_like_me...@yahoo.co.inwrote: ** I tried that, but the color is not filled in, it's filled just till where the other components starts. :-o -- *From:* Haykel BEN JEMIA hayke...@gmail.com *To:* flexcoders@yahoogroups.com *Sent:* Wednesday, 30 November 2011 4:49 PM *Subject:* Re: [flexcoders] Background color of Vgroup Just add a black 'Rect' before the 'VGroup' with the same position and size. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Wed, Nov 30, 2011 at 10:34 AM, sony antony pow_like_me...@yahoo.co.inwrote: ** Hello all, Can you please tell me how to give a black background color to a VGroup container Thanks and Regards Sony.
Re: [flexcoders] Background color of Vgroup
Just add a black 'Rect' before the 'VGroup' with the same position and size. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Wed, Nov 30, 2011 at 10:34 AM, sony antony pow_like_me...@yahoo.co.inwrote: ** Hello all, Can you please tell me how to give a black background color to a VGroup container Thanks and Regards Sony.
Re: [flexcoders] Why Flex now?
Because today HTML5 is not yet ready and will not be ready for the next 5-10 years in my opinion. There are still many things you can only do in Flash and many other that are very difficult to do with HTML5. In my opinion HTML5 is a hype anyway, some new tags, css and js elements and functions. Browser-compatibility, layout, animation, video and much more is handled very easily with Flex/Flash. Should we replace the strong-typed and compiled AS 3 language with JavaScript? I'm working on a video chat application that uses FMS and P2P multicats, can you do that with HTML?? Personnally I don't think Flex is dead, the Flex community will continue to implement it and there will be some companies offering support for it. Only when Adobe stops the development of the Flash player for the Desktop I will say that Flash is really dead. Let's help the Spoon project and make Flex better than ever! Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Nov 15, 2011 at 4:43 PM, Rick Schmitty flexc...@gmail.com wrote: ** I've been a Flex developer since it's first beta however many years ago. Today I just saw this response from Adobe: http://blogs.adobe.com/flex/2011/11/your-questions-about-flex.html *Does Adobe recommend we use Flex or HTML5 for our enterprise application development? *In the long-term, *we believe HTML5 will be the best technology for enterprise application development*. We also know that, currently, Flex has clear benefits for large-scale client projects typically associated with desktop application profiles. Given our experiences innovating on Flex, we are extremely well positioned to positively contribute to the advancement of HTML5 development, starting with mobile applications. In fact, *many of the engineers and product managers who worked on Flex SDK will be moving to work on our HTML efforts*. We will continue making significant contributions to open web technologies like WebKit jQuery, advance the development of PhoneGap and create new tools that solve the challenges developers face when building applications with HTML5. Emphasis mine. If anyone has followed any game or application development where 'many members' of the team are switched to the next greatest thing, that normally means there are few maintenance developers for the existing product and not much new innovation to it. The company wants its best and brightest working on its future, not supporting its past. Combine that with the facts that Adobe bought PhoneGap and released Edge preview. It's not hard to put all these facts together and see that long term they want an IDE framework for app development in HTML5. Perhaps Flex5 will be an HTML5 version of Flex as they start putting together html5 components Outside of having to support IE6 why would you choose to start a project in Flex today?
Re: [flexcoders] Restrict access to an API to only allowed applications
It is not the case here, we only need a way to securely store a secret key and get it once when the application starts. The important thing here is actually to make sure only approved applications can access the API, if the overhead would fullfill the requirement, then it is OK. I can't think of a solution to this problem unless the OS itself would offer a way to identify an application through its signing certificate. Any idea in this direction? can we use that certificate somehow? Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Mon, Sep 26, 2011 at 8:43 PM, Johannes Nel johannes@gmail.comwrote: ** The problem with making it as hard as possible is the overhead on your client application. decrypting a lot of data is a processer intensive operation and your own UI could suffer, while someone stealing data could decrypt it in C and republish that data unencrypted, giving their UI the edge over yours. On Mon, Sep 26, 2011 at 6:45 PM, Haykel BEN JEMIA hayke...@gmail.comwrote: ** yeah you have just confirmed my 'fear' that for client applications there is actually no secure way to identify them because anything they include (data, algorithms etc.) can be cracked and the identification process can be reproduced. We can only try to make it as hard as possible. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Mon, Sep 26, 2011 at 1:35 PM, claudiu ursica the_bran...@yahoo.comwrote: ** The thing is that most client side apps implement security by obscurity which pretty much means that you will never be safe 100%, the only thing you do is not putting it in plain sight. So as you continue is add more level of obscurity, but as said that will only make it harder still not impossible to crack. You can double/triple that by server side checks e.g. trusted ips, domains, user etc. Whenever server feels like there is not enough trust should deny the connection. Obviously the topic is large enough to tackle in just a couple of lines, hopes this gives you a start ... C -- *From:* Haykel BEN JEMIA hayke...@gmail.com *To:* flexcoders@yahoogroups.com *Sent:* Monday, September 26, 2011 1:40 PM *Subject:* Re: [flexcoders] Restrict access to an API to only allowed applications Thanks Claudiu, I have found a PDF of the presentation and on page 4 it says the following about protecting sensitive data through embedding: * Most decompilers don’t look at embedded data. * Given that SWF is an open file format, nothing is really stopping them from doing this in the future. * Useful for quick/dirty storage of WebService credentials. So this is definitly better than storing the keys in plain text format, but still easy to crack. Any other suggestions. Thanks, Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Mon, Sep 26, 2011 at 11:33 AM, claudiu ursica the_bran...@yahoo.comwrote: ** You can embed the keys instead of keeping them in plain site. check this session I think you will find some useful stuff: http://tv.adobe.com/watch/360flex-conference/encrypting-flex-protecting-revenue-by-andrew-westberg/ C -- *From:* Haykel BEN JEMIA hayke...@gmail.com *To:* flexcoders flexcoders@yahoogroups.com *Sent:* Monday, September 26, 2011 12:00 PM *Subject:* [flexcoders] Restrict access to an API to only allowed applications Hi, I'm looking for the best and most secure way to restrict access to a web API to only allowed applications. The best option I found is to use 2-Legged OAuth where applications would get a consumer key and a secret key. The problem here is that SWF files can be easily decompiled and the keys extracted. My questions here are: * Does anybody know a way to protect the keys? * Is there another authorization mechanism that is better suited for such client applications in general (Flash, JavaScript ...) Thanks. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com -- j:pn \\no comment
[flexcoders] Restrict access to an API to only allowed applications
Hi, I'm looking for the best and most secure way to restrict access to a web API to only allowed applications. The best option I found is to use 2-Legged OAuth where applications would get a consumer key and a secret key. The problem here is that SWF files can be easily decompiled and the keys extracted. My questions here are: * Does anybody know a way to protect the keys? * Is there another authorization mechanism that is better suited for such client applications in general (Flash, JavaScript ...) Thanks. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com
[flexcoders] tv.adobe.com hacked??
The following course have been replaced by an ad for 'The Bourne Ultimatum'!! Hackers at work? http://tv.adobe.com/watch/360flex-conference/encrypting-flex-protecting-revenue-by-andrew-westberg/ Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com
Re: [flexcoders] Restrict access to an API to only allowed applications
Thanks Claudiu, I have found a PDF of the presentation and on page 4 it says the following about protecting sensitive data through embedding: * Most decompilers don’t look at embedded data. * Given that SWF is an open file format, nothing is really stopping them from doing this in the future. * Useful for quick/dirty storage of WebService credentials. So this is definitly better than storing the keys in plain text format, but still easy to crack. Any other suggestions. Thanks, Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Mon, Sep 26, 2011 at 11:33 AM, claudiu ursica the_bran...@yahoo.comwrote: ** You can embed the keys instead of keeping them in plain site. check this session I think you will find some useful stuff: http://tv.adobe.com/watch/360flex-conference/encrypting-flex-protecting-revenue-by-andrew-westberg/ C -- *From:* Haykel BEN JEMIA hayke...@gmail.com *To:* flexcoders flexcoders@yahoogroups.com *Sent:* Monday, September 26, 2011 12:00 PM *Subject:* [flexcoders] Restrict access to an API to only allowed applications Hi, I'm looking for the best and most secure way to restrict access to a web API to only allowed applications. The best option I found is to use 2-Legged OAuth where applications would get a consumer key and a secret key. The problem here is that SWF files can be easily decompiled and the keys extracted. My questions here are: * Does anybody know a way to protect the keys? * Is there another authorization mechanism that is better suited for such client applications in general (Flash, JavaScript ...) Thanks. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com
Re: [flexcoders] Restrict access to an API to only allowed applications
Access should only be granted to applications approved by the team. At the beginning these will be our own applications but we want to approve apps from other developers in the future. Your suggestion works for web applications and we are planning to use it, but it can not be used for AIR applications. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Mon, Sep 26, 2011 at 4:04 PM, Alex Harui aha...@adobe.com wrote: ** What kind of access to the web API are you trying to prevent? What configurations need to use the API? If the API doesn’t need to be used by other servers, I thought you could check the headers and make sure the API is being called from a client served from your domain and deny all others. I think that’s the point of crossdomain.xml. -Alex On 9/26/11 5:35 AM, claudiu ursica the_bran...@yahoo.com wrote: The thing is that most client side apps implement security by obscurity which pretty much means that you will never be safe 100%, the only thing you do is not putting it in plain sight. So as you continue is add more level of obscurity, but as said that will only make it harder still not impossible to crack. You can double/triple that by server side checks e.g. trusted ips, domains, user etc. Whenever server feels like there is not enough trust should deny the connection. Obviously the topic is large enough to tackle in just a couple of lines, hopes this gives you a start ... C -- *From:* Haykel BEN JEMIA hayke...@gmail.com *To:* flexcoders@yahoogroups.com *Sent:* Monday, September 26, 2011 1:40 PM *Subject:* Re: [flexcoders] Restrict access to an API to only allowed applications Thanks Claudiu, I have found a PDF of the presentation and on page 4 it says the following about protecting sensitive data through embedding: * Most decompilers don’t look at embedded data. * Given that SWF is an open file format, nothing is really stopping them from doing this in the future. * Useful for quick/dirty storage of WebService credentials. So this is definitly better than storing the keys in plain text format, but still easy to crack. Any other suggestions. Thanks, Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Mon, Sep 26, 2011 at 11:33 AM, claudiu ursica the_bran...@yahoo.com wrote: You can embed the keys instead of keeping them in plain site. check this session I think you will find some useful stuff: http://tv.adobe.com/watch/360flex-conference/encrypting-flex-protecting-revenue-by-andrew-westberg/ C -- *From:* Haykel BEN JEMIA hayke...@gmail.com *To:* flexcoders flexcoders@yahoogroups.com *Sent:* Monday, September 26, 2011 12:00 PM *Subject:* [flexcoders] Restrict access to an API to only allowed applications Hi, I'm looking for the best and most secure way to restrict access to a web API to only allowed applications. The best option I found is to use 2-Legged OAuth where applications would get a consumer key and a secret key. The problem here is that SWF files can be easily decompiled and the keys extracted. My questions here are: * Does anybody know a way to protect the keys? * Is there another authorization mechanism that is better suited for such client applications in general (Flash, JavaScript ...) Thanks. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
Re: [flexcoders] Restrict access to an API to only allowed applications
yeah you have just confirmed my 'fear' that for client applications there is actually no secure way to identify them because anything they include (data, algorithms etc.) can be cracked and the identification process can be reproduced. We can only try to make it as hard as possible. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Mon, Sep 26, 2011 at 1:35 PM, claudiu ursica the_bran...@yahoo.comwrote: ** The thing is that most client side apps implement security by obscurity which pretty much means that you will never be safe 100%, the only thing you do is not putting it in plain sight. So as you continue is add more level of obscurity, but as said that will only make it harder still not impossible to crack. You can double/triple that by server side checks e.g. trusted ips, domains, user etc. Whenever server feels like there is not enough trust should deny the connection. Obviously the topic is large enough to tackle in just a couple of lines, hopes this gives you a start ... C -- *From:* Haykel BEN JEMIA hayke...@gmail.com *To:* flexcoders@yahoogroups.com *Sent:* Monday, September 26, 2011 1:40 PM *Subject:* Re: [flexcoders] Restrict access to an API to only allowed applications Thanks Claudiu, I have found a PDF of the presentation and on page 4 it says the following about protecting sensitive data through embedding: * Most decompilers don’t look at embedded data. * Given that SWF is an open file format, nothing is really stopping them from doing this in the future. * Useful for quick/dirty storage of WebService credentials. So this is definitly better than storing the keys in plain text format, but still easy to crack. Any other suggestions. Thanks, Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Mon, Sep 26, 2011 at 11:33 AM, claudiu ursica the_bran...@yahoo.comwrote: ** You can embed the keys instead of keeping them in plain site. check this session I think you will find some useful stuff: http://tv.adobe.com/watch/360flex-conference/encrypting-flex-protecting-revenue-by-andrew-westberg/ C -- *From:* Haykel BEN JEMIA hayke...@gmail.com *To:* flexcoders flexcoders@yahoogroups.com *Sent:* Monday, September 26, 2011 12:00 PM *Subject:* [flexcoders] Restrict access to an API to only allowed applications Hi, I'm looking for the best and most secure way to restrict access to a web API to only allowed applications. The best option I found is to use 2-Legged OAuth where applications would get a consumer key and a secret key. The problem here is that SWF files can be easily decompiled and the keys extracted. My questions here are: * Does anybody know a way to protect the keys? * Is there another authorization mechanism that is better suited for such client applications in general (Flash, JavaScript ...) Thanks. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com
Re: [flexcoders] Re: Is it possible to add Flex components to the Stage?
if for some reason you don't want or can't use Flex, then you try some of the pure AS component libraries: * ASDPC : http://sibirjak.com/osflash/projects/as-dataprovider-controls/ * AsWing : http://www.aswing.org/ and there are more. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Thu, Sep 22, 2011 at 11:06 PM, Hogs Haven e_ba...@yahoo.com wrote: ** Thanks Alex for the reply. Yea, with systemManager being a Flex component I guess I'm out of luck. OK, refactor time. --- In flexcoders@yahoogroups.com, Alex Harui aharui@... wrote: Flex components cannot be added to the Stage. You can add them to SystemManager and get pretty much the same effect. On 9/22/11 11:56 AM, Hogs Haven e_baggg@... wrote: Thanks, but flash.display.Stage is not a Flex component; therefore it only has addChild(). addElement() is part of the spark Flex classes. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , grimmwerks grimm@ wrote: Try stage.addElement rather than addChild? On Sep 22, 2011, at 2:30 PM, Hogs Haven wrote: From everything I've read, Flex components can only be added to Flex Components (ie: VBox to Application, VGroup to Panel, etc) I'm working in an AS3 view library (no Flex, just Sprites) where I need to add a Scrollable container component to the Stage on a click event. There's no way to do this as I see it unless I write my own Scroll container, use Flex SDK (don't think this works), or use fl.containers.ScrollPane (which is not an option since we're not using a .fla) So basically, I'm trying to accomplish this, as simple runnable example, but it fails silently and nothing appears...any ideas? Thanks. ?xml version=1.0 encoding=utf-8? s:Application xmlns:fx=http://ns.adobe.com/mxml/2009; xmlns:s=library://ns.adobe.com/flex/spark xmlns:mx=library://ns.adobe.com/flex/mx creationComplete=application1_creationCompleteHandler(event) fx:Script ![CDATA[ import mx.containers.Panel; import mx.core.UIComponent; import mx.events.FlexEvent; protected function application1_creationCompleteHandler(event:FlexEvent):void { addEventListener(Event.ADDED_TO_STAGE, onAdded); } private function onAdded(e:Event):void { var myPanel : Panel = new Panel(); myPanel.width=100; myPanel.height=100; stage.addChild(myPanel); //nothing happens } ]] /fx:Script fx:Declarations/fx:Declarations /s:Application -- 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 Garry Schafer grimmwerks grimm@ portfolio: www.grimmwerks.com/ -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
Re: [flexcoders] e4x help
working for me. here is the code I used for testing: package { import flash.display.Sprite; public class Test extends Sprite { private var xmlRoot:XML = REGISTRY REGISTRY_DECLARATION/ REGISTRY_ENTRIES Attribute AttributeNameAttr_1/AttributeName /Attribute Attribute AttributeNameAttr_2/AttributeName /Attribute Attribute AttributeNameAttr_3/AttributeName /Attribute /REGISTRY_ENTRIES /REGISTRY; public function Test() { if (xmlRoot xmlRoot.length() 0) { var lst:XMLList = xmlRoot..Attribute; trace(lst length = + lst.length()); } } } } it outputs 'lst length = 3' as expected. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Thu, Sep 22, 2011 at 3:54 PM, michael_reg...@dell.com wrote: ** I must be missing something simple here. I’m reading in XML that looks like this: ** ** ?*xml* version=1.0 encoding=UTF-8? REGISTRY REGISTRY_DECLARATION/ REGISTRY_ENTRIES Attribute AttributeNameAttr_1/AttributeName /Attribute Attribute AttributeNameAttr_2/AttributeName /Attribute Attribute AttributeNameAttr_3/AttributeName /Attribute /REGISTRY_ENTRIES /REGISTRY ** ** I’m trying to get all Atribute nodes using the .. operator, but it always returns 0, even though xmlRoot looks fine. ** ** *protected* *function* xmlService_resultHandler(event:ResultEvent):*void** *** { *if* (event != *null* event.result != *null* event.result *is*XML) { *var* xmlRoot:XML = event.result *as* XML; *if* (xmlRoot xmlRoot.length() 0) { *var* lst:XMLList = xmlRoot..Attribute; *trace*(*lst length = * + lst.length()); } } } ** ** ** ** *Michael* ** **
Re: [flexcoders] e4x help
because the elements are then defined in the namespace http://schemas.dell.com/wbem/biosattributeregistry/1;. To access them through e4x you have to create a corresponding namespace object, e.g.: private namespace biosattributeregistry = http://schemas.dell.com/wbem/biosattributeregistry/1;; use namespace biosattributeregistry; Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Thu, Sep 22, 2011 at 4:32 PM, michael_reg...@dell.com wrote: ** I guess I should have copied the entire XML. ** ** REGISTRY xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://schemas.dell.com/wbem/biosattributeregistry/1file:///C:/work/12G/Attribute%20Registry/DCIM_AttributeRegistry.xsd; *xmlns*=http://schemas.dell.com/wbem/biosattributeregistry/1; ** ** Turns out if I just remove the last namespace, *xmlns*= http://schemas.dell.com/wbem/biosattributeregistry/1 ** ** Then it works correctly. ** ** Any idea why this would cause it to not be able to find the children? ** ** *Michael J. Regert* ** ** Please consider the environment before printing this email. ** ** Confidentiality Notice | This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential or proprietary information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, immediately contact the sender by reply e-mail and destroy all copies of the original message. ** ** ** ** *From:* flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] *On Behalf Of *Brendan Meutzner *Sent:* Thursday, September 22, 2011 10:20 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] e4x help ** ** You shouldn't do a check on the length() for xmlRoot... that represents the REGISTRY level... otherwise your code looks fine. ** ** ** ** On Thu, Sep 22, 2011 at 4:54 PM, michael_reg...@dell.com wrote: I must be missing something simple here. I’m reading in XML that looks like this: ?*xml* version=1.0 encoding=UTF-8? REGISTRY REGISTRY_DECLARATION/ REGISTRY_ENTRIES Attribute AttributeNameAttr_1/AttributeName /Attribute Attribute AttributeNameAttr_2/AttributeName /Attribute Attribute AttributeNameAttr_3/AttributeName /Attribute /REGISTRY_ENTRIES /REGISTRY I’m trying to get all Atribute nodes using the .. operator, but it always returns 0, even though xmlRoot looks fine. *protected* *function* xmlService_resultHandler(event:ResultEvent):*void** *** { *if* (event != *null* event.result != *null* event.result *is*XML) { *var* xmlRoot:XML = event.result *as* XML; *if* (xmlRoot xmlRoot.length() 0) { *var* lst:XMLList = xmlRoot..Attribute; *trace*(*lst length = * + lst.length()); } } } *Michael* ** **
Re: [flexcoders] What is the a correct lifecycle phase to add new child components?
Hi Nick, if you use Spark components and the child components you want to add are fixed and known, e.g. a 'close' button that should be visible on mouse-over, then I would use skin states and manage visibility of the components in the skin. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Sep 6, 2011 at 10:28 AM, Nick Middleweek n...@middleweek.co.ukwrote: ** Hi, I've been trying to find the correct 'place' to create new components after the parent component is UPDATE_COMPLETE. During initialisation, we create child components in *createChildren()*but where/ when should we create them for e.g. in response to a mouseOver or a mouseClick event? Is it simply 'ok' to *this.addChild( *myNewButton *)* in a MOUSE_EVENT function handler or should I be setting some dirty flag to trigger off an invalidation and then add the button in a lifecycle override function? Thanks, Nick -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, mobile: +44(0)774 035 5424 } );
Re: [flexcoders] What is the a correct lifecycle phase to add new child components?
Yes. To take advantage of the spark architecture you have to extend SkinnableComponent (or one of the other SkinnableXXX classes, depending on your needs). Example: Creating a skinnable Spark component http://help.adobe.com/en_US/flex/using/WS460ee381960520ad-2811830c121e9107ecb-7feb.html Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Sep 6, 2011 at 6:48 PM, Nick Middleweek n...@middleweek.co.ukwrote: ** Thanks for this... So I'm extending UIComponent, does this mean I'm doing it the MX way? Cheers... On 6 September 2011 14:38, Haykel BEN JEMIA hayke...@gmail.com wrote: ** Hi Nick, if you use Spark components and the child components you want to add are fixed and known, e.g. a 'close' button that should be visible on mouse-over, then I would use skin states and manage visibility of the components in the skin. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Sep 6, 2011 at 10:28 AM, Nick Middleweek n...@middleweek.co.ukwrote: ** Hi, I've been trying to find the correct 'place' to create new components after the parent component is UPDATE_COMPLETE. During initialisation, we create child components in *createChildren()*but where/ when should we create them for e.g. in response to a mouseOver or a mouseClick event? Is it simply 'ok' to *this.addChild( *myNewButton *)* in a MOUSE_EVENT function handler or should I be setting some dirty flag to trigger off an invalidation and then add the button in a lifecycle override function? Thanks, Nick -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, mobile: +44(0)774 035 5424 } ); -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, mobile: +44(0)774 035 5424, blog: http://www.middleweek.co.uk } );
Re: [flexcoders] Re: I don't know if I need Flex (please help me to decide)
Fo the UI, you can try AsWing: http://www.aswing.org/ Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Wed, Sep 8, 2010 at 7:53 AM, enridp enr...@yahoo.com.ar wrote: mmm... I was attracted by ColdFusion a few months ago because it was from Adobe and I thought it will work better with Flash, but I think there are many downsides. First, I don't know ColdFusion ^_^ Is not Free And I have a lot of API's for PHP Anyway, I don't think in PHP like a problem, Facebook is working with PHP. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Bill Brutzman bill.brutz...@... wrote: Consider also Adobe's ColdFusion. I have found ColdFusion to be easier to use and more robust than PHP. --Bill From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com [mailto: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On Behalf Of enridp Sent: Tuesday, September 07, 2010 11:10 AM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: [flexcoders] Re: I don't know if I need Flex (please help me to decide) Yes, there's a lot of data. But I was thinking in AMFPHP for that. I think the alternatives are: 1) Adapting the Flex code that I need to a pure AS3 project (I'm not sure if this is possible in all the casses) 2) Using RSL's Because I can't start my project with 200Kb, the size is a really big problem. Can you (or someone) help me with some of the 2 options? I have not experience in it, so I can't think in possible problems with those solutions (Flex-AS3 and RSL's), can you see the problems? --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto: flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com , Bill Brutzman bill.brutzman@ wrote: My rule of thumb is that if there is data. like a database. then yes. Flex is the way to go. --Bill
Re: [flexcoders] actionscript + library
I think you can just create a Flex Library Project and if you don't use any Flex components then nothing from Flex will be added to the SWC. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Wed, Sep 8, 2010 at 9:42 PM, Ariel J arielj...@yahoo.com wrote: is there a way to configure a project in Flash Builder natively (as in, not using a custom builder) to create a pure actionscript project that compiles into a SWC not a SWF?
Re: [flexcoders] Find in Files in Flash Builder 4
It's now under the 'Search' menu. Le 2010 9 6 05:50, markflex2007 markflex2...@yahoo.com a écrit : Hi I use Flex Builder 3 before . I can search string cross my files by using Find in Files (under Edit menu),but I can not do this with FB4. Please help me how to search my files by a string. Thanks Mark
Re: [flexcoders] External CSS file in Flex 4
Hi, you could put in 'mycss.css' the default settings and then with PHP only send the values that are specific for the user in a simple format and apply them with 'styleManager.setStyleDeclaration'. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Fri, Sep 3, 2010 at 1:54 PM, Ghost Hack ghoxth...@yahoo.com.br wrote: Hi people, i'm having some trouble while using the tag fx:Style source=assets/mycss.css /. When I generate a release of my project, Flex 4 embed my CSS file into compiled application, while i want to use PHP to generate dynamic CSS based on the user configuration in database. Is there any workaround i'm missing? Thanks in advance, Marco Lacava.
Re: [flexcoders] Image component not resizing correctly
You have to set 'maintainAspectRatio' to false if you want the content to fill the image. Le 2010 9 2 01:56, method_air loudj...@hotmail.com a écrit : Currently experiencing an Image component resizing issue: An Image component (inside an ItemRenderer/Spark List, with a fixed width/height of '100') resizes incorrectly when it's source changes. The Image components source is initially set to an embedded placeholder graphic (while the new source loads), and the Image width/height is correct. However when the new source loads, the Image component does not resize to the Image width/height set dimensions, and the background of the item renderer is visible. Any ideas how to fix this? Thanks, Philip
Re: [flexcoders] Proper way to ensure components in a different state are created
You could add a bindable var, e.g. noteText, and set the text property in the mxml tag to {noteText}. Then you only have to assign the value to the noteText variable. Le 2010 9 1 10:48, dorkie dork from dorktown dorkiedorkfromdorkt...@gmail.com a écrit : When I try to access components that are in a different state on the line after I set the current state I get this error, TypeError: Error #1009: Cannot access a property or method of a null object reference. // code currentState = NOTES; noteComponent.text = value; // noteComponent exists in NOTES state and is not created yet I know this is because of the Flex invalidation cycle and I'm aware I could use databinding and I know I could use callLater. But if I needed to create the components immediately for only the state I'm going to how would I do that? Custom Component: Group states State 1 State 2 State 3 /states imageComponent includeIn=State 1/ videoComponent includeIn=State 2/ noteComponent includeIn=State 3/ /Group JP
Re: [flexcoders] basic authentification on air
You have to put the full URL in service.destination. Le 2010 8 30 05:30, cholid cholid cholid_rid...@yahoo.com a écrit : i try to get some property of an object with xmlrpc and it's work then i adopt the code to air application when it run, then show a login window that is not happen in flex application it says The Server admin (on port 0) requires a username and password this server uses 'basic' authentification username: password: are there has a different from air and flex code on handle authentification methode? thanks this the code; creationComplete=init() layout=absolute . import com.ak33m.rpc.xmlrpc.XMLRPCConnection; import mx.rpc.Fault; import com.ak33m.rpc.xmlrpc.XMLRPCObject; import mx.utils.Base64Encoder; import mx.utils.ArrayUtil; import mx.collections.ArrayCollection; import mx.rpc.events.ResultEvent; import mx.rpc.events.FaultEvent; import mx.rpc.AsyncToken; import mx.controls.Alert; import mx.collections.ItemResponder; [Bindable] public var returnedData:ArrayCollection; [Bindable] public var serviceEndpoint:String=http://admin:ad...@localhost:8080;; public var service:XMLRPCObject; public function init():void { service = new XMLRPCObject(); service.endpoint = serviceEndpoint; service.destination = /zport/dmd; service.addEventListener(FaultEvent.FAULT, onFault); service.addEventListener(ResultEvent.RESULT, onResult); } public function onResult(event:ResultEvent):void { Alert.show(String(event.result)); } public function onFault(event:FaultEvent):void { Alert.show(event.fault.faultString, event.fault.faultCode); } public function getId():void { service.call(getProductName); } ... mx:Button click=getId() label=Get ID width=100%/ .. /mx:WindowedApplication
Re: [flexcoders] How to tell if I am a popup.
http://livedocs.adobe.com/flex/3/langref/mx/core/IUIComponent.html#isPopUp Le 2010 8 30 22:44, aceoohay pa...@compuace.com a écrit : I have a mx:module component that I sometimes call with a moduleloader, and sometimes call with a popupManager. In order to close the item properly I need to know how I was instantiated (popup manager or module loader). Is there a property that I can check that will tell me this? Obviously I can set my own property, but I would prefer using one that already exists. Paul
Re: [flexcoders] Constraining one components location to another component
Hi, I think the best way is to create a new component that will hold the image and the floating components and handle visibility of these components through states. Example: ?xml version=1.0 encoding=utf-8? s:Group xmlns:fx=http://ns.adobe.com/mxml/2009; xmlns:s=library://ns.adobe.com/flex/spark xmlns:mx=library://ns.adobe.com/flex/mx s:states s:State name=normal / s:State name=loading / s:State name=error / /s:states fx:Script ![CDATA[ [Bindable] public var source:Object; ]] /fx:Script mx:Image id=image source={source} complete={currentState = 'normal'} progress={currentState = 'loading'} ioError={currentState = 'error'} / s:Label top=0 right=0 text=Loading... includeIn=loading / s:Label top=0 right=0 text=Error! includeIn=error / /s:Group Of course you can put any states you like and also set states from outside with : mainImage.currentState = . Hope this helps, Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Thu, Aug 26, 2010 at 9:50 PM, dorkie dork from dorktown dorkiedorkfromdorkt...@gmail.com wrote: Is there a way to constrain one component to another component? I've looked at constraint rows and constrain columns in the past but I haven't got it to work myself. IE, Group id=imageContainer width=500 height=500 Image id=mainImage width=100 height=100 verticalCenter=0 horizontalCenter=0/ /Group Image source=download.jpg toolTip=Download this image right=[Right edge of main image] top=[Top edge of main image]/ In this example the download icon would float in the upper right corner of the image component as the image component floats in the middle of the container it is in. FYI In this project there are additional components that will float relative to the location and size of the image as well. JP
Re: [flexcoders] styles are ignored
CSS in Flex 4 uses namespaces and you have to update your Flex 3 CSS files. You can simply open the CSS files in Flash Builder, put the cursor directly after every class name in the selectors and click 'Ctrl'-Space and Flash Builder will add the namespaces. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Fri, Aug 27, 2010 at 4:53 PM, Angelo Anolin angelo_ano...@yahoo.comwrote: I must assume that you are using Flex SDK 4. I am currently having the same issues now. Trying to port some Flex 3 codes to Flex 4 and a lot of styling and CSS things are going haywire. I thought that developer and designer productivity has been greatly enhanced in SDK 4.0 but it seems that people who are both dev/designer at the same time are getting a hard time actually making the code work. Angelo -- *From:* Jesse Warden jesse.war...@gmail.com *To:* flexcoders@yahoogroups.com *Sent:* Fri, 27 August, 2010 10:27:26 *Subject:* [flexcoders] styles are ignored This Flex app loads in a module, and an external stylesheet (no, I can't get into why). When I put my mx:Style source=defaults.css / in the app, they don't show up. If I trace out the CSSStyleDeclaration in creationComplete it's null. The code doesn't allow me to compile with -keep-generated-actionscript, so it's not easy for me to figure out why. So: 1. why the hell is it ignoring my syles; I have things like Selectors that are unique, yet aren't in StyleManager at all...? 2. If I load them in dynamically as a SWF, will that fix it?
Re: [flexcoders] window resizing issues
The createPopUp call looks suspicious to me, normally you should pass a class name as a second argument. Haykel. Le 2010 8 24 23:35, h_chris_87 h_chris...@yahoo.com a écrit : I have window W1 which has a Vertical Box which in turn has a Datagrid and one of those DataGrid columns of the Datagrid has a Horizontal Box which has a button icon. The MXML is somewhat like mx:VBox width=100% paddingBottom=10 paddingLeft=10 paddingRight=10 paddingTop=10 styleName=formSection mx:DataGrid id=my_grid dataProvider={my_grid_dp} headerHeight=0 width=100% allowMultipleSelection=true change=remove_value.enabled = expected_result_grid.selectedItems.length 0; rowCount=3 mx:columns mx:DataGridColumn headerText=Column 1 dataField=expected_result wordWrap=true / mx:DataGridColumn headerText=Column 2 dataField=expected_result width=45 mx:itemRenderer mx:Component mx:HBox horizontalAlign=center mx:Button icon=@Embed('../assets/img/edit.png') toolTip=View buttonMode=true click=outerDocument.openmyWin_fn('update')/ /mx:HBox /mx:Component /mx:itemRenderer /mx:DataGridColumn /mx:columns /mx:DataGrid /mx:VBox When the button icon is clicked(which is noted in bold above), another new window W2 is opened using the below function public function openmyWin_fn(eventObj:*):void { //Keeps multiple windows from being opened if(result_win == null){ result_win = PopUpManager.createPopUp(this, result_win, true) as result_win; } //Passes the parent object to the popup window result_win.openingParentWindow = this; //Set the mode (Add or Update) in which the form should operate result_win.form_mode = eventObj; } I tried to add a TextInput in the above MXML in Window W1's source which led to the window W2 opening in the rightmost part of browser window without a scroll bar instead of appearing with a scroll bar in the center of browser window. W2 should be appearing as overlapping W1, not adjacent to it. I commented the TextInput I added, even removed it, still the issue(window W2 opening in the rightmost part of browser window without a scroll bar) persists. I once faced this problem where inadvertently a height value was added to the whole W2 window. After I removed it, the window W2 was fine. This time I am comparing the source files before I added the TextInput control and after I removed it(when the window W2 was not displaying in the proper place) and the source files are identical. Window W2 was having scrollbars before I tried to add the TextInput MXML control. It was also centering in the application before I tried to add the TextInput MXML control. Where could I be erring to cause the W2 to appear in the rightmost part of browser? I don't understand what is causing it to happen if the source files are identical? Any suggestions would be appreciated.
[flexcoders] Speeding+project+compilation
Hi Amy, try putting the assets outside the 'src' directory. Haykel.
Re: [flexcoders] Speeding project compilation
Try putting the assets outside the 'src' directory. On Monday, August 23, 2010, Amy amyblankens...@bellsouth.net wrote: Hi all; We have a project that uses a lot of embedded assets. However, when the project compiles, it deletes all of the assets from the bin-debug folder, then re-adds them (even though they are embedded). I have hunted for a setting in Flex Builder that will let me turn this unneeded behavior orr, but I haven't found it. Does anyone know? TIA; Amy -- Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com
[flexcoders] Multiple instances of a module with different styles
Hi, I have a Flex 4 application that loads modules dynamically. The modules load style files dynamically based on their configuration files, so that every module can load different style files. If multiple instances of a module are created (with multiple ModuleLoader instances having the same url), everytime an instance loads a style file, it gets also applied (partially) to the other instances so that all instances end up with mixed styles. I originally thought that the per-module styles feature of Flex 4 should allow every module to apply its own styles, but it seems like it's more a per-module-type style. Is there any way to load styles per module instance? Thanks, Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com
Re: [flexcoders] Multiple instances of a module with different styles
Hi Alex, ok it's clear with the factory. But how can I handle the following scenario with class selectors : Module 'MyModule': * Module has a button with style name 'myButton' * Module gets a url for a style file from main application and loads it with styleManager.loadStyleDeclarations(mystyle) Application: * Creates ModuleLoader 1 with url 'MyModule.swf' and pass it style url 'style1.swf' which defines 'Button.myButton' with text color red * Creates ModuleLoader 2 with url 'MyModule.swf' and pass it style url 'style2.swf' which defines 'Button.myButton' with text color green I want to have one module with red text and the other with green text. What I'm getting now is that both use sometimes one color and sometimes the other, I think depending on which styles are loaded first. Thanks, Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Thu, Jul 1, 2010 at 5:58 PM, Alex Harui aha...@adobe.com wrote: A module is a factory for multiple instances of a class(es). Type selectors map to a class. Per-instance styles are often done with class selectors via the styleName property On 7/1/10 9:37 AM, Haykel BEN JEMIA hayke...@gmail.com wrote: Hi, I have a Flex 4 application that loads modules dynamically. The modules load style files dynamically based on their configuration files, so that every module can load different style files. If multiple instances of a module are created (with multiple ModuleLoader instances having the same url), everytime an instance loads a style file, it gets also applied (partially) to the other instances so that all instances end up with mixed styles. I originally thought that the per-module styles feature of Flex 4 should allow every module to apply its own styles, but it seems like it's more a per-module-type style. Is there any way to load styles per module instance? Thanks, Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
Re: [flexcoders] spark ButtonBar selectedIndex out of view
You can use the getScrollPositionDeltaToElement() function of the layout and add the x value of the returned point to the horizontalScrollPosition. Basically something like this (not tested): buttonbar1.layout.horizontalScrollPosition += buttonbar1.layout.getScrollPositionDeltaToElement(buttonbar1.selectedIndex).x; Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, May 11, 2010 at 9:14 AM, bhaq1972 mbha...@hotmail.com wrote: I have a spark ButtonBar with a horizontalLayout. The width of the ButtonBar is small ...so the end buttons don't show. When I set the selectedIndex to one of the end buttons...its not coming into view. How can I ensure the selectedItem is in view? thanks s:HGroup s:ButtonBar id=buttonbar1 width=500 requireSelection=true s:layout s:HorizontalLayout / /s:layout s:dataProvider s:ArrayCollection source=['Button1', 'Button2', 'Button3', 'Button4', 'Button5', 'Button6', 'Button7', 'Button8'] / /s:dataProvider /s:ButtonBar s:TextInput id=t1 text=7/ s:Button label=selectIndex click=buttonbar1.selectedIndex = Number(t1.text)/ /s:HGroup
Re: [flexcoders] DataGrid in a Spark Window Bug
Such strange skin related errors in modular applications arise generally when you reference a module by name in another module or application. Use interfaces instead for communication with modules. For more details, look at the following bug report: https://bugs.adobe.com/jira/browse/SDK-26120 Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Fri, May 7, 2010 at 4:57 PM, Jeff jbarts1...@yahoo.com wrote: Hello, I've got a modular application where I popup a TitleWindow for an import Wizard. From there, I try to open a Window with a DataGrid inside. In addition to a bunch of cFF font warnings, this error is thrown: TypeError: Error #1007: Instantiation attempted on a non-constructor. at mx.controls.dataGridClasses::DataGridHeader/updateDisplayList()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\controls\dataGridClasses\DataGridHeader.as:329] at mx.core::UIComponent/validateDisplayList()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8531] at mx.managers::LayoutManager/validateClient()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:932] at mx.core::UIComponent/validateNow()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UIComponent.as:7631] at mx.controls.dataGridClasses::DataGridBase/updateDisplayList()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\controls\dataGridClasses\DataGridBase.as:594] at mx.controls::DataGrid/updateDisplayList()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\controls\DataGrid.as:1741] at mx.controls.listClasses::ListBase/validateDisplayList()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:3962] at mx.managers::LayoutManager/validateDisplayList()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:663] at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:736] at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:1072] The specific line that throws the exception is: var headerBGSkin:IFlexDisplayObject = new headerBGSkinClass(); Anyone got a clue? I'm able to bring the spreadsheet up in my TitleWindow without issues, but when I try to put it in its own window. all hell breaks loose. Jeff
Re: [flexcoders] Mediators, Presentation Models and Flex 4 Components
Thanks Gabirel. I'm also thinking about the case when we use some flex framework like Parsley. For performance reasons it is generally advised to only manage lightweight classes by the framework and for views mediators are used. So any suggestion on how to create mediators that fit good in the new Flex 4 component/skin architecture? Thanks, Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com 2010/5/4 gabriel montagné gabr...@rojored.com Hi, On 04/05/2010, Haykel BEN JEMIA hayke...@gmail.com haykelbj%40gmail.com wrote: with the new Flex 4 components architecture which actually separates logic from design with the Skin paradigm, what is the best way to implement Mediators/Presentation Models that best uses the capabilities of this architecture (partAdded, partRemoved, getCurrentSkinState etc.). The new Flex 4 skin architecture allows a clean enough separation of layout and behavior concerns to be able to do without other options which aim at the same kind abstraction but cannot achieve the same degree of integration with the framework. For now I'm simply using the AS class of a component as a mediator and the skin as a view. I would say this is perfectly complete, I wouldn't go looking for any more levels of indirection. Cheers, Gabriel -- gabriel montagné láscaris comneno http://rojored.com +44 (0) 7500 709 209
[flexcoders] Mediators, Presentation Models and Flex 4 Components
Hi, with the new Flex 4 components architecture which actually separates logic from design with the Skin paradigm, what is the best way to implement Mediators/Presentation Models that best uses the capabilities of this architecture (partAdded, partRemoved, getCurrentSkinState etc.). For now I'm simply using the AS class of a component as a mediator and the skin as a view. How do you handle this? Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com
[flexcoders] Strange mask problem
Hi, I'm trying to create some sort of sprite using the Flex 4 'Path' graphic element. The idea is to create the Path element that defines the visual look of the sprite, then another one with the same properties in a Group but using a black color with alpha set to 1. Then use this group as the mask for the sprite and set the mask type to 'alpha'. This also works but only when the sprite has the position (0, 0). When it is moved, it is displayed correctly but mouse interaction is broken. Please find an example here: http://www.allmas-tn.com/files/tests/fxgtests/FXGTests.html The application has 'view source' enabled. Any idea why even though the mask is correct (because the geometry is displayed and not masked out), mouse interaction is broken when the object is moved? Thanks, Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com
Re: [flexcoders] Detecting Scrollbar presence on Flex 4 List
Try to look in the List.scroller or List.scroller.viewport properties. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Fri, Apr 23, 2010 at 3:10 AM, Jeff jbarts1...@yahoo.com wrote: I'm trying to use a Spark List with a single itemRenderer in the place of an mx:DataGrid for memory/performance reasons. The itemRenderer that has all the items horizontally I need. The problem I'm running into is getting the header (which I've created outside of the List control to have the labels that line up with my itemrenderer elements. Things work great until my list requires scrolling. Then the 16 pixel scrollbar throws things out of whack. I could probably make a simple adjustment if I could detect the presence of the scrollbar on the list component and adjust my header elements accordingly. I just haven't been able to figure out how to do that yet. Anyone dealt with this? Jeff
Re: [flexcoders] Flex 4: using controlBarLayout, controlBarGroup, controlBarContent with AS3
controlBarLayout and controlBarContent are simple properties and you can access them directly, controlBarGroup is a skin part and you need either to create a new skin to change it or access it by overriding the partAdded method. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Apr 27, 2010 at 11:09 AM, de.newsight gro...@newsight.de wrote: Hi all, I have a AS3 class extended form a spark TitleWindow class, and now I am looking for a way how I can change the controlBarLayout, controlBarGroup and add items to controlBarContent directly with AS. I'vo goggled a lot but couldn't find any example. Can anyone help me? Thanks, Artur
Re: [flexcoders] Hide/Show parts of a From
How are you creating the form, mxml or AS? If mxml, you could create a bindable Boolean property for each group and set the visible property of each item set to the value of the corresponding group and just change that one variable to show/hide a group. Example: [Bindable] private var group1Visible:Boolean = true; [Bindable] private var group2Visible:Boolean = false; FormItem visible={group1Visible} ... FormItem visible={group1Visible} ... FormItem visible={group2Visible} ... FormItem visible={group2Visible} ... Somewhere in your code: group1Visible = false; group2Visible = true; Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Thu, Apr 29, 2010 at 3:25 PM, Wally Kolcz wko...@isavepets.com wrote: I have a Form that has different information to fill out based on a selected. All FormItems are contained inside a Form parent. Is there a way to hide/show 'groups' of FormItems (includeInLayout/Visible = false) and still keep the format consistent (all the labels line up)? I tried containing FormItems in a VGroup which I can easily hide/show the whole group but the label alignment is off.. I don't want to hide/show each element since some of the information groups are pretty large and to condition that would be an line nightmare..
Re: [flexcoders] Strange mask problem
Same result. Actually the mask is correct, because if I add a Rect to fill the component, it is being masked correctly and only the portion under the Path is displayed. The only thing that's not working is the mouse interaction when the component is not at position (0,0). To summarize again: * At position (0,0), everything works correctly. * At any other position, display masking is correct but mouse behaves incorrectly. This sounds like a bug, any thoughts? Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Thu, Apr 29, 2010 at 6:07 PM, Alex Harui aha...@adobe.com wrote: I don’ t think we support setting mask from MXML. You may need to addChild and size it. On 4/29/10 1:40 AM, Haykel BEN JEMIA hayke...@gmail.com wrote: Hi, I'm trying to create some sort of sprite using the Flex 4 'Path' graphic element. The idea is to create the Path element that defines the visual look of the sprite, then another one with the same properties in a Group but using a black color with alpha set to 1. Then use this group as the mask for the sprite and set the mask type to 'alpha'. This also works but only when the sprite has the position (0, 0). When it is moved, it is displayed correctly but mouse interaction is broken. Please find an example here: http://www.allmas-tn.com/files/tests/fxgtests/FXGTests.html The application has 'view source' enabled. Any idea why even though the mask is correct (because the geometry is displayed and not masked out), mouse interaction is broken when the object is moved? Thanks, Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
Re: [flexcoders] Strange mask problem
Seems to be related to this bug: https://bugs.adobe.com/jira/browse/SDK-25492 I have tried to use clip masking instead of alpha masking, mouse behavior is correct, but there are problems with the masking in the stroke region! Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Thu, Apr 29, 2010 at 7:16 PM, Haykel BEN JEMIA hayke...@gmail.comwrote: Same result. Actually the mask is correct, because if I add a Rect to fill the component, it is being masked correctly and only the portion under the Path is displayed. The only thing that's not working is the mouse interaction when the component is not at position (0,0). To summarize again: * At position (0,0), everything works correctly. * At any other position, display masking is correct but mouse behaves incorrectly. This sounds like a bug, any thoughts? Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Thu, Apr 29, 2010 at 6:07 PM, Alex Harui aha...@adobe.com wrote: I don’ t think we support setting mask from MXML. You may need to addChild and size it. On 4/29/10 1:40 AM, Haykel BEN JEMIA hayke...@gmail.com wrote: Hi, I'm trying to create some sort of sprite using the Flex 4 'Path' graphic element. The idea is to create the Path element that defines the visual look of the sprite, then another one with the same properties in a Group but using a black color with alpha set to 1. Then use this group as the mask for the sprite and set the mask type to 'alpha'. This also works but only when the sprite has the position (0, 0). When it is moved, it is displayed correctly but mouse interaction is broken. Please find an example here: http://www.allmas-tn.com/files/tests/fxgtests/FXGTests.html The application has 'view source' enabled. Any idea why even though the mask is correct (because the geometry is displayed and not masked out), mouse interaction is broken when the object is moved? Thanks, Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
Re: [flexcoders] Flex 4 - Is it possible to create a generic Button skin
Try this (not etsted): s:SparkSkin xmlns:fx=http://ns.adobe.com/mxml/2009; xmlns:s=library://ns.adobe.com/flex/spark fx:Metadata [HostComponent(spark.components.Button)] /fx:Metadata s:states s:State name=up / s:State name=over / s:State name=down / s:State name=disabled / /s:states s:BitmapImage source.up=getStyle('upSkin') source.over=getStyle('overSkin') source.down=getStyle('downSkin') / /s:SparkSkin Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Apr 27, 2010 at 12:47 PM, bhaq1972 mbha...@hotmail.com wrote: I have a set of button skins which all look like the following skin s:SparkSkin xmlns:fx=http://ns.adobe.com/mxml/2009; xmlns:s=library://ns.adobe.com/flex/spark fx:Metadata [HostComponent(spark.components.Button)] /fx:Metadata s:states s:State name=up / s:State name=over / s:State name=down / s:State name=disabled / /s:states !-- UP ICON -- s:BitmapImage source=@Embed('assets/previous_default.png') includeIn=up / !-- OVER ICON -- s:BitmapImage source=@Embed('assets/previous_hover.png') includeIn=over / !-- DOWN ICON -- s:BitmapImage source=@Embed('assets/previous_down.png') includeIn=down / /s:SparkSkin --- The only difference between all the skins is the image source they use. Is it possible to make this generic so I can define the image source in the style sheet. Thanks Btw, In Flex 3, it was very easy to change the image skin in the style sheets using styleName. eg mx:Button styleName=LeftArrow/ mx:Button styleName=RightArrow/ mx:Style .LeftArrow { upSkin: Embed(source=assets/previous_default.png); overSkin: Embed(source=assets/previous_hover.png); downSkin: Embed(source=assets/previous_down.png); } .RightArrow { upSkin: Embed(source=assets/right_default.png); overSkin: Embed(source=assets/right_hover.png); downSkin: Embed(source=assets/right_down.png); } /mx:Style
Re: [flexcoders] Re: Flex 4 - Is it possible to create a generic Button skin
If it does not work try replacing getStyle with hostComponent.getStyle. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Apr 27, 2010 at 1:43 PM, bhaq1972 mbha...@hotmail.com wrote: Its a great idea but I haven't been able to make it work. I will try again after lunch (need a break) --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Haykel BEN JEMIA hayke...@... wrote: Try this (not etsted): s:SparkSkin xmlns:fx=http://ns.adobe.com/mxml/2009; xmlns:s=library://ns.adobe.com/flex/spark fx:Metadata [HostComponent(spark.components.Button)] /fx:Metadata s:states s:State name=up / s:State name=over / s:State name=down / s:State name=disabled / /s:states s:BitmapImage source.up=getStyle('upSkin') source.over=getStyle('overSkin') source.down=getStyle('downSkin') / /s:SparkSkin Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Apr 27, 2010 at 12:47 PM, bhaq1972 mbha...@... wrote: I have a set of button skins which all look like the following skin s:SparkSkin xmlns:fx=http://ns.adobe.com/mxml/2009; xmlns:s=library://ns.adobe.com/flex/spark fx:Metadata [HostComponent(spark.components.Button)] /fx:Metadata s:states s:State name=up / s:State name=over / s:State name=down / s:State name=disabled / /s:states !-- UP ICON -- s:BitmapImage source=@Embed('assets/previous_default.png') includeIn=up / !-- OVER ICON -- s:BitmapImage source=@Embed('assets/previous_hover.png') includeIn=over / !-- DOWN ICON -- s:BitmapImage source=@Embed('assets/previous_down.png') includeIn=down / /s:SparkSkin --- The only difference between all the skins is the image source they use. Is it possible to make this generic so I can define the image source in the style sheet. Thanks Btw, In Flex 3, it was very easy to change the image skin in the style sheets using styleName. eg mx:Button styleName=LeftArrow/ mx:Button styleName=RightArrow/ mx:Style .LeftArrow { upSkin: Embed(source=assets/previous_default.png); overSkin: Embed(source=assets/previous_hover.png); downSkin: Embed(source=assets/previous_down.png); } .RightArrow { upSkin: Embed(source=assets/right_default.png); overSkin: Embed(source=assets/right_hover.png); downSkin: Embed(source=assets/right_down.png); } /mx:Style
Re: [flexcoders] Re: Flex 4 - Is it possible to create a generic Button skin
Of course! The getStyle function calls need to be set in curly braces like: source.up={getStyle('upSkin')} Sorry! Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Apr 27, 2010 at 3:03 PM, bhaq1972 mbha...@hotmail.com wrote: Hasn't worked. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Haykel BEN JEMIA hayke...@... wrote: If it does not work try replacing getStyle with hostComponent.getStyle. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Apr 27, 2010 at 1:43 PM, bhaq1972 mbha...@... wrote: Its a great idea but I haven't been able to make it work. I will try again after lunch (need a break) --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.comflexcoders% 40yahoogroups.com, Haykel BEN JEMIA haykelbj@ wrote: Try this (not etsted): s:SparkSkin xmlns:fx=http://ns.adobe.com/mxml/2009; xmlns:s=library://ns.adobe.com/flex/spark fx:Metadata [HostComponent(spark.components.Button)] /fx:Metadata s:states s:State name=up / s:State name=over / s:State name=down / s:State name=disabled / /s:states s:BitmapImage source.up=getStyle('upSkin') source.over=getStyle('overSkin') source.down=getStyle('downSkin') / /s:SparkSkin Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Apr 27, 2010 at 12:47 PM, bhaq1972 mbhaque@ wrote: I have a set of button skins which all look like the following skin s:SparkSkin xmlns:fx=http://ns.adobe.com/mxml/2009; xmlns:s=library://ns.adobe.com/flex/spark fx:Metadata [HostComponent(spark.components.Button)] /fx:Metadata s:states s:State name=up / s:State name=over / s:State name=down / s:State name=disabled / /s:states !-- UP ICON -- s:BitmapImage source=@Embed('assets/previous_default.png') includeIn=up / !-- OVER ICON -- s:BitmapImage source=@Embed('assets/previous_hover.png') includeIn=over / !-- DOWN ICON -- s:BitmapImage source=@Embed('assets/previous_down.png') includeIn=down / /s:SparkSkin --- The only difference between all the skins is the image source they use. Is it possible to make this generic so I can define the image source in the style sheet. Thanks Btw, In Flex 3, it was very easy to change the image skin in the style sheets using styleName. eg mx:Button styleName=LeftArrow/ mx:Button styleName=RightArrow/ mx:Style .LeftArrow { upSkin: Embed(source=assets/previous_default.png); overSkin: Embed(source=assets/previous_hover.png); downSkin: Embed(source=assets/previous_down.png); } .RightArrow { upSkin: Embed(source=assets/right_default.png); overSkin: Embed(source=assets/right_hover.png); downSkin: Embed(source=assets/right_down.png); } /mx:Style
Re: [flexcoders] How call to a function declared in MXML file from ActionScript class ?
Where do you set the dataProvider of the DataGrid? What is the bpmnDataComponent that you pass to the retreiveData() function? Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Mon, Apr 26, 2010 at 11:10 AM, Nini7016 Nini7016 nahloulaha...@hotmail.com wrote: Hello :) I created a dataGrid in a file MXML like this : * mx:Panel title= Handing Data height=100% width=100% paddingTop=10 paddingLeft=10 paddingRight=10 !--mx:Label width=100% color=blue text=Select a row in the DataGrid control./-- mx:DataGrid id=dg name=dataGrid width=100% editable=true resizableColumns=true mx:columns mx:DataGridColumn dataField=variable headerText=Variable / mx:DataGridColumn dataField=type headerText=Type / mx:DataGridColumn dataField=value headerText=Value / mx:DataGridColumn dataField=operation headerText=Operation / /mx:columns /mx:DataGrid mx:HBox width=100% height=100% mx:Button name=validate label=Validate*click={retreiveData(4,bpmnDataComponent)} * / mx:Button name=cancel label=Cancel click={display(bpmnDataComponent)}/ mx:Button name=add label=Add Data click={fillDataGridData2(start)}/ /mx:HBox /mx:Panel and i created a function called *retreiveData * like this in the same Script : public function retreiveData(index : int , bpmnDataComponent : BpmnDataComponent): void { var dp: ListCollectionView = dg.dataProvider as ListCollectionView; if(dp==null){ //dg.dataProvider = handData; } else { Alert.show(longueur de DP+dp.length.toString()); var Objec : Object = dp.getItemAt(index); bpmnDataComponent.Variable = Objec.variable; bpmnDataComponent.Value = Objec.value; bpmnDataComponent.Type = Objec.type; } } And i called this function *retreiveData * when i clik in the button validate in order to test if the function works well or not :) So it works well My aim is to call this function *retreiveData *from an actionScript but when i do this : private function upateData(event:Event):void { var bpmnFigureData : BpmnFigureData = new BpmnFigureData(); // BpmnFigureData : the name of the MXML FILE bpmnFigureData.width=300; bpmnFigureData.height=300; bpmnFigureData.retreiveData(1,this); this.addChild(bpmnFigureData); } But unfortunatelley it didn't do what i asked ?? So my question how we can call function which be applicated in DATAGRID from an ActionScript Class ..??? Any help please :(:( :( :( Thank you very much -- Envie de naviguer sur Internet sans laisser de trace? La solution avec Internet Explorer 8 http://clk.atdmt.com/FRM/go/207186970/direct/01/
Re: [flexcoders] make swf play and stop in frame one
In the handler of the 'complete' event cast the 'content' property to MovieClip and call gotoAndStop(1) on it. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Sat, Apr 24, 2010 at 3:27 AM, markflex2007 markflex2...@yahoo.comwrote: Hi, I want to use swfloader load a swf file and show the first frame of the swf. Do you have a idea to do this?I need your help. Thanks Mark
Re: [flexcoders] Need Help Getting A Value Into My App Via Flex And Php
Probably this has to do with the fact that you are setting the data type to xml but not outputting valid xml. Try with something like: echo responsenextIncrement$next_increment/nextIncrement/response; Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Fri, Apr 23, 2010 at 10:49 PM, James garymoorcroft_...@yahoo.co.ukwrote: I know this may not be the place to ask about php but I thought people may have came across a similar problem. Basically the data for my app is stored in a mysql database table and what I need to do is get the auto increment value of this table into my app via a http request. I'm trying to make a php file which gets this value and outputs this value as xml but I am awful at creating php to do such things and just get constant errors. Can anyone take a look at this and help me out to tweak it so it does what I want please? The table in question is called links and the field/row/column in the table I'm after is called linkid. It's the next autoincrement value of that row outputted as xml is what I want. Here's the php so far:- ?php header(Content-type: text/xml); $host = ; $user = ; $pass = ; $database = ; $linkID = mysql_connect($host, $user, $pass) or die(Could not connect to host.); mysql_select_db($database, $linkID) or die(Could not find database.); $tablename = links; $next_increment = 0; $qShowStatus = SHOW TABLE STATUS LIKE '$tablename'; $qShowStatusResult = mysql_query($qShowStatus) or die ( Query failed: . mysql_error() . br/ . $qShowStatus ); $row = mysql_fetch_assoc($qShowStatusResult); $next_increment = $row['Auto_increment']; echo next increment number: [$next_increment]; ?
Re: [flexcoders] Re: Flex 4 HGroup and Group background colour
I don't think this is bug because using top,left, right and bottom properties would need a layout that uses absolute positioning, while vertical, horizontal and tail layout are automatic layouts and don't use absolute positioning. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Fri, Apr 23, 2010 at 9:45 AM, bhaq1972 mbha...@hotmail.com wrote: Thanks Peter. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Peter DeHaan pdeh...@... wrote: Try setting the Rect's width/height to 100%: ?xml version=1.0 encoding=utf-8? s:Application xmlns:fx=http://ns.adobe.com/mxml/2009; xmlns:s=library://ns.adobe.com/flex/spark xmlns:mx=library://ns.adobe.com/flex/mx s:layout s:VerticalLayout / /s:layout s:Group width=100% height=28 s:Rect top=0 right=0 bottom=0 left=0 s:fill s:SolidColor color=green / /s:fill /s:Rect /s:Group s:HGroup width=100% height=28 s:Rect width=100% height=100% s:fill s:SolidColor color=red / /s:fill /s:Rect /s:HGroup /s:Application Not exactly sure why using left/right/top/bottom constraints didn't work on the bottom HGroup, but feel free to file a bug at http://bugs.adobe.com/flex/ and Adobe can look into it. Peter From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com [mailto: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On Behalf Of bhaq1972 Sent: Thursday, April 22, 2010 4:53 AM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: [flexcoders] Flex 4 HGroup and Group background colour Why does this work s:Group width=100% height=28 s:Rect top=0 right=0 bottom=0 left=0 s:fill s:SolidColor color=0x4960a6 / /s:fill /s:Rect /s:Group But this doesnt? s:HGroup width=100% height=28 s:Rect s:fill s:SolidColor color=0x4960a6 / /s:fill /s:Rect /s:HGroup thanks
Re: [flexcoders] Flex 3 to 4 Path
Hi Lee, I have ported an application from Flex 3 to Flex 4 and here are the points I can remember: - The good news is you don't need to replace the halo components with their spark equivalents at the beginning - You should use the Spark theme and correct any errors to be ready to go with Flex 4 skinning - Some styles are not supported anymore with Spark and need to be handled differently - Where you need containers with borders and background colors/images use the spark BorderContainer (bg colors don't work with Canvas, that was the case for me, I don't know if this is general) - You will need to add namespaces for styles, for the beginning you can simply define the mx namspace as the default namespace: - @namespace library://ns.adobe.com/flex/mx; - You must change all StyleManager references with styleManager (new property of UIComponent) - Don't reference modules by class name, use interfaces instead. For example if you have a module called MyModule and load it with a ModuleLoader loader, don't do var module:MyModule = loader.child as MyModule to access it. Define an interface, i.e. IMyModule, make MyModule implement it and do var module:IMyModule = loader.child as IMyModule. Otherwise you can have many strange runtime errors. For the start you can also disable per module styles with the compiler option '-isolate-styles=false' until you have finished correcting these module issues. - You have to use the new syntax for states and transitions. Always use the spark transitions ans effects as they work much better than the halo ones. I think that's it for now! I hope it helps, Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Fri, Apr 23, 2010 at 12:54 PM, Lee Jenkins l...@datatrakpos.com wrote: Anyone know of significant gotchas when going from Flex 3 to Flex 4? Thanks, -- Warm Regards, Lee
Re: [flexcoders] Flex 4 and StyleManager
Hi, Flax 4 supports per-module style management and the StyleManager is not a singleton anymore. Each module has its own StyleManage and you have to reference that one. For UIComponent and subclasses (all visual Flex components), the style manager is available in the styleManager property. For your example, simple change the uppercase 'S' of StyleManager to a lowercase 's': styleManager.loadStyleDeclarations(styles/BlueBackground.swf, true); Bye, Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Thu, Apr 22, 2010 at 9:25 AM, bobby_world bobby_wo...@yahoo.com wrote: Hi! I have a Flex4 based Application and I'm trying to load Styles from a swf file. StyleManager.loadStyleDeclarations(styles/BlueBackground.swf, true); I get an error saying this is deprecated in Flex4. Bobby
Re: [flexcoders] Potential Bug in Flash Builder 4?
Can not reproduce. Check your namespaces, are you defining the fx namespace or is it set as the default namespace? Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Thu, Apr 22, 2010 at 12:48 PM, Wally Kolcz wko...@isavepets.com wrote: Anyone else notice that when you use code hint to choose an external itemrenderer that it, not only adds the full dot note path in the itemRender property, but also imports it? But my error inquiry is that it imports it inbetween two Script tags and not fx:Script To replicate. Create a itemRender in one 'folder' and then create a s:Tile. When you add the itemRender property, it should pop up the option to create a new one or use an existing. Click on the existing and then look towards the top of the MXML document. I keep getting a Script block. Can anyone else reproduce this? Is this a bug?
Re: [flexcoders] Flex and REST
Anyone tried one of these libs? http://code.google.com/p/as3httpclient/ http://code.google.com/p/as3httpclientlib/ They seem to support all required http verbs. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Wed, Sep 2, 2009 at 12:55 PM, DannyT danmo...@googlemail.com wrote: Can anyone give me the definitive answer to whether you can build REST based apps with Flex? There seems to be an incredible amount of FUD about the topic and whilst I appreciate it might not be supported in it's purest form I need to know what is involved in supporting a full REST implementation. I have no experience with REST but we're in the position that a client is going to implement a RESTful service for us to build a Flex application against. If it will 'just work' then great, if not I need to educate them as to any considerations/workarounds necesscary on the service side of things. Can anyone offer any advice? Cheers, Dan -- http://danny-t.co.uk
[flexcoders] Flex Accordion Menu?
I am creating a website in Flex, and one of the requirements is an accordion like menu. See this image for what it needs to look like: http://i25.tinypic.com/1735hy.png The gray items do not have children. The dark blue items are children of the light blue item. Would someone tell me a good way to make this? I tried using a Tree with custom item renderers but have so far been unsuccessful. Any help is greatly appreciated.
[flexcoders] Re: Flex Accordion Menu?
Thank you! That works perfectly. I'm using normal buttons for the top level items with no children, and I'm using a window shade for top level items with children. I also set the verticalGap and the paddingTop to 0 on the window shade to remove extra space. --- In flexcoders@yahoogroups.com, Vivian Richard kanps...@... wrote: See if this helps http://flexlib.googlecode.com/svn/trunk/examples/WindowShade/WindowShade_Sample.swf On Mon, Aug 3, 2009 at 5:59 PM, Benthegoosm...@... wrote: I am creating a website in Flex, and one of the requirements is an accordion like menu. See this image for what it needs to look like: http://i25.tinypic.com/1735hy.png The gray items do not have children. The dark blue items are children of the light blue item. Would someone tell me a good way to make this? I tried using a Tree with custom item renderers but have so far been unsuccessful. Any help is greatly appreciated.
[flexcoders] Flex Modules and chaching
I have broken my application up to use multiple modules, with each module having it's own set of remoting calls. For some reason when I go to deploy to my production server and swap out the services-config.xml and do a re-build of the Flex project the modules still try to access the Flex Gateway from my local machine. I've deleted all the .swf files and do a new build but it seems as though the modules hold on to the old settings. Is there a way when you build your project in Flex Builder to force it to grab the newest settings? Thanks, Ben
[flexcoders] Remoting Question
I have an app that I'm having some issues accessing a session variable that is set in ColdFusion. I think it's due to my services-config.xml file having the flexgateway url set to have the www. If I'm at www.mydomain.com I can make the remoting call and have the cfc return the session variable to Flex. If I go to just http://mydomain.com then I seem to have an issue. I created a cross domain policy file to allow with the www and without but because the session variable is set on the domain without the www and then the remoting call is trying to access the cfc with the www the session variables are being reset. I can force the page to always go to www but wanted to see if others have run into this and the best way to handle it. Thanks, Ben
[flexcoders] Issue with TileList
I am using a TileList to pull in some profile info for an app I'm building. Inside the TileList I have a few Text Components that I'm trying to add a click event to. For some reason when I build the project I get an error that the method I'm trying to call does not exist, even though it does. Is it not possible to call a method on a component inside a TileList other than using the itemClick event on the TileList itself? The TileList is below. Thanks, Ben mx:TileList id=searchList dataProvider={searchAryCol} paddingTop=25 left=10 borderStyle=none allowMultipleSelection=false direction=horizontal top=56 right=10 selectable=false verticalScrollPolicy=auto height=404 columnCount=1 mx:itemRenderer mx:Component mx:VBox width=90% height=100% paddingRight=5 paddingLeft=5 horizontalAlign=center mx:HBox width=100% height=100% mx:Image height=200 width=100 source=/profile_pics/{data.ProfileID}/{data.userPicture} / mx:VBox width=100% height=100% mx:Label id=friendName text={data.FirstName} {data.LastName}/ mx:Label id=friendLocation text={data.ProfileCity}, {data.ProfileState} / mx:Label id=friendStatus text={data.status} / /mx:VBox mx:VBox verticalGap=0.1 mx:Text x=500 y=0 text=Add as Friend useHandCursor=true buttonMode=true mouseChildren=false id=txtAddFriend click=addFriend(); / mx:HRule / mx:Text x=500 y=5 text=Send a Message / mx:HRule / mx:Text x=500 y=10 text=View Profile / mx:HRule / /mx:VBox /mx:HBox /mx:VBox /mx:Component /mx:itemRenderer /mx:TileList
[flexcoders] What to use instead of Model component in Flex 4?
Hey guys, Just starting to build my first Flex 4 app. I'm making an MenuBar as the first thing I'm attempting. I can get it working with XML data if I do mx:MenuBar s:dataProvider myxml /s:dataProvider /mx:MenuBar However, I'd like to break out the XML data into a separate file/component. Normally I'm not so organized - so I don't really think I ever did this in Flex 3, but I understand you can just create a Model container, and you're good. It doesn't look like I can do this in Flex 4. I'm trying different things with the DataGroup container - putting a dataprovider in it, or a XMLList in it, but nothing seems to work out. Does anybody know the proper way to do this? thanks! ben
Re: [flexcoders] What to use instead of Model component in Flex 4?
OK never mind, finally figured this out. Hadn't heard of the declarations tag before. And so I just created an XMLListCollection component, and then put the XMLList in that with my data inside that. And then on my application MXML component, I put this new XMLListCollection component inside my declarations tag. Thanks, and just ignore me! ben gomez farrell wrote: Hey guys, Just starting to build my first Flex 4 app. I'm making an MenuBar as the first thing I'm attempting. I can get it working with XML data if I do mx:MenuBar s:dataProvider myxml /s:dataProvider /mx:MenuBar However, I'd like to break out the XML data into a separate file/component. Normally I'm not so organized - so I don't really think I ever did this in Flex 3, but I understand you can just create a Model container, and you're good. It doesn't look like I can do this in Flex 4. I'm trying different things with the DataGroup container - putting a dataprovider in it, or a XMLList in it, but nothing seems to work out. Does anybody know the proper way to do this? thanks! ben
[flexcoders] DataGridColumn backgroundColor bug?
Hi guys, This seems like an awfully simple thing for nobody to have picked up before, so hopefully someone can point me in the right direction as to what I'm doing wrong. I have gone way heaps hardcore and simplified the issue to the following using SDK3.2: mx:DataGrid showHeaders=false mx:columns mx:DataGridColumn backgroundColor=#00 / /mx:columns /mx:DataGrid With either showHeaders=false or headerHeight=0 the code is generating the following error found in DataGrid's drawColumnBackground function: TypeError: Error #1010: A term is undefined and has no properties. at mx.controls::DataGrid/drawColumnBackground()[C:\autobuild\3.2.0\framewor\ ks\projects\framework\src\mx\controls\DataGrid.as:3012] at mx.controls::DataGrid/drawLinesAndColumnGraphics()[C:\autobuild\3.2.0\fr\ ameworks\projects\framework\src\mx\controls\DataGrid.as:3311] at mx.controls::DataGrid/drawLinesAndColumnBackgrounds()[C:\autobuild\3.2.0\ \frameworks\projects\framework\src\mx\controls\DataGrid.as:3207] at mx.controls::DataGrid/updateDisplayList()[C:\autobuild\3.2.0\frameworks\\ projects\framework\src\mx\controls\DataGrid.as:1506] at mx.controls.listClasses::ListBase/validateDisplayList()[C:\autobuild\3.2\ .0\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as\ :3280] at mx.managers::LayoutManager/validateDisplayList()[C:\autobuild\3.2.0\fram\ eworks\projects\framework\src\mx\managers\LayoutManager.as:622] at mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.2.0\fr\ ameworks\projects\framework\src\mx\managers\LayoutManager.as:677] at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.2.0\framework\ s\projects\framework\src\mx\core\UIComponent.as:8628] at mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.2.0\frameworks\ \projects\framework\src\mx\core\UIComponent.as:8568] Line 3012 is: var xx:Number = columnHeader.rendererArray[columnIndex].x There appears to be no rendererArray. Can someone shed some light on this? Is it something fixed in 3.3 (which is something I'm unable to test at this point)? MrB
[flexcoders] Re: specify services-comfig.xml in either MXML or AS?
It's actually really simple (at least for the most basic implementation) to get rid of services-config.xml and the need for the -services compiler argument. I've had no problems using it with amfphp or granite. In the Application's creationComplete() I have something along the lines of channelSet = new ChannelSet(); var uri = http://path.to.your/amfphp/gateway.php;; channelSet.addChannel(new AMFChannel(whatever, uri)); And I pass the channelSet to Services.mxml as a bindable variable. business:Services channelSet={channelSet} / Within Services.mxml: ?xml version=1.0 encoding=utf-8? cairngorm:ServiceLocator xmlns:mx=http://www.adobe.com/2006/mxml; xmlns:cairngorm=com.universalmind.cairngorm.business.* mx:Script ![CDATA[ import mx.messaging.ChannelSet; [Bindable] public var channelSet:ChannelSet; ]] /mx:Script mx:RemoteObject id=MyService channelSet={channelSet} destination=MyService makeObjectsBindable=true showBusyCursor=true source=vo.net.likethewolf.whatever.MyServiceDAO / /cairngorm:ServiceLocator MrB --- In flexcoders@yahoogroups.com, dnk d.k.emailli...@... wrote: Hi there, I was wondering if it was possible to specify my services-comfig.xml in either MXML or AS? I just wanted to include that in my actual code (as opposed to a compiler arg) for portability. I have been searching google, and nothing yet... Thanks! / D
[flexcoders] Re: Trigger DateFormatter bindings
Hey TH, I'd tried binding the formatString but I hadn't considered reinstantiation. Thanks. Of course I was hoping for a panacea for all my problems without any code whatsoever. :P This actually relates to a larger problem regarding dynamic resource switching that I'd got no help on before, and this is the latest in a series of kludges to get there. Thanks again, MrB. --- In flexcoders@yahoogroups.com, Tim Hoff timh...@... wrote: Hi Ben (MrB), Looks like you're going to have to do a little trickery. Binding the formatString doesn't seem to change the date formats. However, if you re-instantiate the DateFormatter it works: [Bindable] private var myDate:Date = new Date(); [Bindable] private var formatString:String = -MM-DD; private function changeFormat():void { df = new DateFormatter(); formatString = MM/DD/; } mx:DateFormatter id=df formatString={ formatString }/ mx:Text text={ df.format(myDate) }/ -TH --- In flexcoders@yahoogroups.com, Ben Reynolds mrben1@ wrote: Hey guys, Is there a way to trigger the binding on all related items when changing the DateFormatter's formatString? eg. becomes MMM, via actionscript in the following: mx:DateFormatter id=df formatstring= / mx:Text text={df.format(date)}/ I'd prefer not to be manually injecting the new format into each of the text objects every time. Regards, MrB.
[flexcoders] Trigger DateFormatter bindings
Hey guys, Is there a way to trigger the binding on all related items when changing the DateFormatter's formatString? eg. becomes MMM, via actionscript in the following: mx:DateFormatter id=df formatstring= / mx:Text text={df.format(date)}/ I'd prefer not to be manually injecting the new format into each of the text objects every time. Regards, MrB.
[flexcoders] Re: DateFormatter and dynamic resource management errror
Maybe all this will help someone else here looking for a solution to this problem (and maybe some kindly bots will run across it at some point too). In short, you have to compile your own SWCs for each of the languages, and not just the resource library SWFs every other instruction set tells you about. This means finding out on your lonesome all the translations for days of the week and months of the year, and anything else pertinent like date and currency format defaults. The steps are: 1) use the copylocale to copy the en_US files to your new language directories. 2) edit the .properties files located in your equivalent of C:\Program Files\Adobe\Flex Builder 3\sdks\3.2.0\frameworks\projects\framework\bundles\es_ES\src. The dayNames and monthNames key/value pairs are located in SharedResources.properties 3) recompile the framework_rb.swc file. From within C:\Program Files\Adobe\Flex Builder 3\sdks\3.2.0\frameworks\ I used the following command (taken from the build.xml script, which I'm still struggling to get working - seriously damaging my cred). compc -locale=es_ES -output=locale/{locale}/framework_rb.swc -include-resource-bundles SharedResources collections containers controls core effects formatters logging skins states styles utils validators -source-path=projects\framework\bundles\{locale}\src,projects\framewo\ rk\src -external-library-path=libs\player\9\playerglobal.swc 4) from your project's root directory, re-run your language compiler for each of the languages. Again using Spanish as an example, use: mxmlc -locale=es_ES -source-path=locale/{locale} -include-resource-bundles=LanguageResource,SharedResources,collections,c\ ontainers,controls,core,effects,formatters,logging,messaging,rpc,skins,s\ tyles,utils -output=src/Resources_es_ES.swf Formatters will now do their internationally spelled magic. Hopefully this will all become useless very soon, with Adobe just handing over all these languages by default. A man can dream. A man can dream. - MrB --- In flexcoders@yahoogroups.com, Ben Reynolds mrb...@... wrote: Okay, I have what I suppose is a solution to this, but I'm still short a coupla answers. 1) I ran the resource-bundle-list option again on my application mxmlc -locale= -resource-bundle-list=myresources.txt -include-libraries+=..\libs\CairngormWithExtensions.swc app.mxml which came up with: CairngormMessages LanguageResource SharedResources collections containers controls core effects formatters logging messaging rpc skins styles utils The difference is the SharedResources and formatters, which wasn't in the original. 2) I recompiled the resource bundles (skipping CairngormMessages, which I'm not using) over the 15 languages. ie. mxmlc -locale=da -source-path=locale/{locale} -include-resource-bundles=LanguageResource,SharedResources,collections,c\ ontainers,controls,core,effects,logging,messaging,rpc,skins,styles,utils -output=src/Resources_da.swf So now it doesn't fall over on MMM or . However, I have but face. Also, I'm about to make some assumptions... The copylocale that I used earlier to create the resources seems to do exactly that: copies. It doesn't actually create a proper locale for all those places. So January in en_US is still January in it_IT when, according to Babelfish, it should be Gennaio etc. etc. What can I do about this? Where can I get proper versions of these locales? Is there a way to get the names from the operating system and apply them to DateBase or is this already happening and I just can't see it because I'm running an English machine? Danke for any light you can shed on this. --- In flexcoders@yahoogroups.com, Ben Reynolds mrben1@ wrote: Hey guys, I have a Flex 3 app that employs dynamic resource management - pretty much a cut-n-paste job from the Adobe sample - with the ComboBox to switch languages. I did all the copylocale rigmarole and it's all working perfectly with the languages I've set up. However, when I try to call a DateFormatter with a full month (MMM or ) in the formatString it crashes and burns with the following error: TypeError: Error #1009: Cannot access a property or method of a null object reference. at mx.formatters::DateBase$/http://www.adobe.com/2006/flex/mx/internal::ext\ \ ractTokenDate() This is probably referring to the DateBase.monthNamesLong array; formatting is not an issue with M or MM. Am I perhaps missing something in the creation of my resource files? This is a sample of the command I used: mxmlc -locale=es_ES -source-path=locale/{locale} -include-resource-bundles=LanguageResource,collections,containers,contro\ \ ls,core,effects,logging,messaging,rpc,skins,styles,utils -output=src/Resources_es_ES.swf But it even dies when the locale is set to en_US. Help? :)
[flexcoders] Re: Making ComboBox stay open after item select?
Still not too much to do on that. All the functionality appears to be in the close function. I've kludged up this to do what you want. There's a _calling variable in there as the close function gets called twice on every change (for reasons I don't care to examine) that'll allow it to dispatch the change event once per frame. package { import flash.events.Event; import mx.controls.ComboBox; import mx.events.ListEvent; public class ComboBoxNoClose extends ComboBox { private var _calling:Boolean = false; public function ComboBoxNoClose() { super(); } public override function close(trigger:Event = null):void { if (trigger != null) super.close(); else if (dropdown != null !_calling) { _calling = true; dispatchEvent(new ListEvent(change)); callLater(function():void { _calling = false} ); } } } } --- In flexcoders@yahoogroups.com, Sascha sbal...@... wrote: My problem is that writing a whole custom component is too involved for the few time I have and your method seems to work quite well. The only trouble I have (as described in my previous reply) is that the ComboBox should fire a change event everytime an item is selected while it stays opened. By default the ComboBox is only firing this event after it closes. However listening to the dropdown (the List component in the ComboBox) property's ListEvent.CHANGE seems not to cut it. It would be great if you would have a workaorund for this! Best, Sascha From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Ben Reynolds Sent: Thursday, April 16, 2009 14:23 To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Making ComboBox stay open after item select? I'm by no means on Alex's level of Flex knowledge, but a Button combined with a Menu component would work too. You wouldn't get into resizing issues and you'd still be able to do styling without resorting to UIComponent first principles. :) --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Sascha sbalkau@ wrote: I've made a short test and that seems to work so far. Thanks for the hint Ben! I almost started to try writing a custom component from a Button and a List wrapped into a UIComponent as Alex Harui suggested in a message I've found but seems that that's not necessary. Sascha From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Ben Reynolds Sent: Thursday, April 16, 2009 10:34 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Making ComboBox stay open after item select? Something like: package { import flash.events.Event; import mx.controls.ComboBox; public class ComboBoxNoClose extends ComboBox { public function ComboBoxNoClose() { super(); } public override function close(trigger:Event = null):void { if (trigger != null) super.close(); } } } --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Sascha sbalkau@ wrote: Does anyone know how to modify the ComboBox so that it stays open after selecting an item? I need such a ComboBox for a client that opens/closes only if the user clicks on the 'header area' of the ComboBox or that closes only if clicked outside the ComboBox. The use case for this is that the ComboBox will have custom item renderers that contain (for example) a CheckBox and a Label and the user should be able to make several selections without the ComboBox closing inbetween. I've made this before by wrapping all the stuff into a Panel and changing the Panels height on close so that only the header is visible but that method is rather suboptimal, especially for skinning. Would be great if somebody has a workaround for this! Thanks in advance! Sascha
[flexcoders] Re: DateFormatter and dynamic resource management errror
Okay, I have what I suppose is a solution to this, but I'm still short a coupla answers. 1) I ran the resource-bundle-list option again on my application mxmlc -locale= -resource-bundle-list=myresources.txt -include-libraries+=..\libs\CairngormWithExtensions.swc app.mxml which came up with: CairngormMessages LanguageResource SharedResources collections containers controls core effects formatters logging messaging rpc skins styles utils The difference is the SharedResources and formatters, which wasn't in the original. 2) I recompiled the resource bundles (skipping CairngormMessages, which I'm not using) over the 15 languages. ie. mxmlc -locale=da -source-path=locale/{locale} -include-resource-bundles=LanguageResource,SharedResources,collections,containers,controls,core,effects,logging,messaging,rpc,skins,styles,utils -output=src/Resources_da.swf So now it doesn't fall over on MMM or . However, I have but face. Also, I'm about to make some assumptions... The copylocale that I used earlier to create the resources seems to do exactly that: copies. It doesn't actually create a proper locale for all those places. So January in en_US is still January in it_IT when, according to Babelfish, it should be Gennaio etc. etc. What can I do about this? Where can I get proper versions of these locales? Is there a way to get the names from the operating system and apply them to DateBase or is this already happening and I just can't see it because I'm running an English machine? Danke for any light you can shed on this. --- In flexcoders@yahoogroups.com, Ben Reynolds mrb...@... wrote: Hey guys, I have a Flex 3 app that employs dynamic resource management - pretty much a cut-n-paste job from the Adobe sample - with the ComboBox to switch languages. I did all the copylocale rigmarole and it's all working perfectly with the languages I've set up. However, when I try to call a DateFormatter with a full month (MMM or ) in the formatString it crashes and burns with the following error: TypeError: Error #1009: Cannot access a property or method of a null object reference. at mx.formatters::DateBase$/http://www.adobe.com/2006/flex/mx/internal::ext\ ractTokenDate() This is probably referring to the DateBase.monthNamesLong array; formatting is not an issue with M or MM. Am I perhaps missing something in the creation of my resource files? This is a sample of the command I used: mxmlc -locale=es_ES -source-path=locale/{locale} -include-resource-bundles=LanguageResource,collections,containers,contro\ ls,core,effects,logging,messaging,rpc,skins,styles,utils -output=src/Resources_es_ES.swf But it even dies when the locale is set to en_US. Help? :)
[flexcoders] Re: Need help- cannot insert multiple statements in one SQL transaction.
Okay... 1) use a synchronous connection as async won't work for transactions. 2) yep, use transactions 3) put your statements in an array, not a semi-colon separated string 4) here's the key part of the code I use connection.begin(); for each (var sqlString:String in sqlArray) { statement.text = sqlString; try { statement.execute(-1); } catch(error:SQLError) { connection.rollback(responder); } } connection.commit(responder); connection.close(); --- In flexcoders@yahoogroups.com, icodeflex icodef...@... wrote: Air and Flex experts- I am having a heck of a time getting multiple insert and update statements to run within one transaction against my Air applications SQLite db. Only the first INSERT, UPDATE, or DELETE makes it in. I am not seeing errors, but it seems like it is failing. If I run the same SQL in another SQL editor, my SQL works fine. Example code is: Var myInsert: String = Insert into EMPLOYEES ( NAME ) VALUES (Bob); ; myInsert += Insert into EMPLOYEES ( NAME ) VALUES (John); ; myInsert += Insert into EMPLOYEES ( NAME ) VALUES (Fred); ; var localConnection : SQLConnection = new SQLConnection(); localConnection.open(myDatabase); localConnection.begin(); var statement: SQLStatement = new SQLStatement(); statement.sqlConnection = localConnection; statement.text = myInsert; statement.execute(); localConnection.commit(); I have tried in synchronous and async mode with the same results. Please tell me what I am doing wrong! :) Thanks! Dustin
[flexcoders] Re: Making ComboBox stay open after item select?
I'm by no means on Alex's level of Flex knowledge, but a Button combined with a Menu component would work too. You wouldn't get into resizing issues and you'd still be able to do styling without resorting to UIComponent first principles. :) --- In flexcoders@yahoogroups.com, Sascha sbal...@... wrote: I've made a short test and that seems to work so far. Thanks for the hint Ben! I almost started to try writing a custom component from a Button and a List wrapped into a UIComponent as Alex Harui suggested in a message I've found but seems that that's not necessary. Sascha From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Ben Reynolds Sent: Thursday, April 16, 2009 10:34 To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Making ComboBox stay open after item select? Something like: package { import flash.events.Event; import mx.controls.ComboBox; public class ComboBoxNoClose extends ComboBox { public function ComboBoxNoClose() { super(); } public override function close(trigger:Event = null):void { if (trigger != null) super.close(); } } } --- In flexcoders@yahoogroups.com, Sascha sbalkau@ wrote: Does anyone know how to modify the ComboBox so that it stays open after selecting an item? I need such a ComboBox for a client that opens/closes only if the user clicks on the 'header area' of the ComboBox or that closes only if clicked outside the ComboBox. The use case for this is that the ComboBox will have custom item renderers that contain (for example) a CheckBox and a Label and the user should be able to make several selections without the ComboBox closing inbetween. I've made this before by wrapping all the stuff into a Panel and changing the Panels height on close so that only the header is visible but that method is rather suboptimal, especially for skinning. Would be great if somebody has a workaround for this! Thanks in advance! Sascha
[flexcoders] Re: Making ComboBox stay open after item select?
Something like: package { import flash.events.Event; import mx.controls.ComboBox; public class ComboBoxNoClose extends ComboBox { public function ComboBoxNoClose() { super(); } public override function close(trigger:Event = null):void { if (trigger != null) super.close(); } } } --- In flexcoders@yahoogroups.com, Sascha sbal...@... wrote: Does anyone know how to modify the ComboBox so that it stays open after selecting an item? I need such a ComboBox for a client that opens/closes only if the user clicks on the 'header area' of the ComboBox or that closes only if clicked outside the ComboBox. The use case for this is that the ComboBox will have custom item renderers that contain (for example) a CheckBox and a Label and the user should be able to make several selections without the ComboBox closing inbetween. I've made this before by wrapping all the stuff into a Panel and changing the Panels height on close so that only the header is visible but that method is rather suboptimal, especially for skinning. Would be great if somebody has a workaround for this! Thanks in advance! Sascha
[flexcoders] DateFormatter and dynamic resource management errror
Hey guys, I have a Flex 3 app that employs dynamic resource management - pretty much a cut-n-paste job from the Adobe sample - with the ComboBox to switch languages. I did all the copylocale rigmarole and it's all working perfectly with the languages I've set up. However, when I try to call a DateFormatter with a full month (MMM or ) in the formatString it crashes and burns with the following error: TypeError: Error #1009: Cannot access a property or method of a null object reference. at mx.formatters::DateBase$/http://www.adobe.com/2006/flex/mx/internal::ext\ ractTokenDate() This is probably referring to the DateBase.monthNamesLong array; formatting is not an issue with M or MM. Am I perhaps missing something in the creation of my resource files? This is a sample of the command I used: mxmlc -locale=es_ES -source-path=locale/{locale} -include-resource-bundles=LanguageResource,collections,containers,contro\ ls,core,effects,logging,messaging,rpc,skins,styles,utils -output=src/Resources_es_ES.swf But it even dies when the locale is set to en_US. Help? :)
Re: [flexcoders] I want to use Flex Builder 3 to develop Flash Games
Hey, so I've been making some games in Flex Builder myself. Basically I got fed up with the Actionscript editor in Flash a few years ago, and then switched to Flash Develop. Flash Develop is a really great (and free) tool. However, I ditched that once I got Flex Builder, because as much as I loved Flash Develop, Flex worked a lot better for me. I still use Flash Develop if I have to compile in the Flash IDE. Anyway, the others are right, Flex and Flash are all Flash. The reason to use the Flex framework is to get some great UI components, and a great framework to develop a rich internet application in. I use Flex all the time, though that said, I stay clear of it for games since typically the framework is overkill in the application department for what I need. Flex Builder, though, is VERY handy for making games. Specifically your example with the rectangles - there are two ways to do this. The first is like what you said and to make a SWF. You can simply embed the SWF using the embed metatag. I'm going to completely butcher it, but it's something like this: [Embed( file='myswf.swf', symbol='myrectangle')] public var myrectangle:Class You can do this with pngs, gifs, jpgs, or swfs. Its simply just another graphical resource to use. It's a little wacky though because you have to assign type it as a class first, and then you can say: var x:myrectange = new myrectangle(); Typically I tend not to do this. My method of choice is to compile a SWC. If you embed a SWF in the above fashion, you will lose any and all code associated with it. That means if you have any frame labels, any, stops, any gotoAndPlay's in there, it's lost. If you use a SWC you can use it just for graphics, or you can make your graphics smarter with some code. Just go to the file properties and add the SWC into the library. In this fashion, you now have code completion, and dont have to worry about embedding as the library is linked to the project. All you have to do is make sure that your rectangle has AS3 export linkage assigned in the symbol properties in the Flash IDE, and then just export the SWC. Once in Flex Builder, you don't import anything (as its all in the local namepsace), and just do new myrectangle(); Hope that helps. SWCs are great stuff. ben Axonn wrote: Hm, I think I didn't ask the right question, because somebody told me that it *is* possible. What I want is this: - Create a FLA file in Flash. - Draw 2 rectangles. - Create an AS file in Flex 3. - Attach it to the Flash. - Export as SWF. - Continue development in Flex 3. When hit debug, my Flash-created SWF starts but the debug code is attached to Flex 3, because I am in Flex 3. But you know Flex 3 creates that default SWF. I don't want that. I want to use the Flash SWF, which *DOES* have my AS class from Flex in it. - DO modifications to the AS but DON'T START FLASH AGAIN until I need to modify graphics and such. Axonn. That is correct. Flex can only debug code in flex itself. I did see a book at barnes and noble last week that dealt with games in Flex (but I forgot the name of it). -- View this message in context: http://www.nabble.com/I-want-to-use-Flex-Builder-3-to-develop-Flash-Games-tp22752546p22766233.html http://www.nabble.com/I-want-to-use-Flex-Builder-3-to-develop-Flash-Games-tp22752546p22766233.html Sent from the FlexCoders mailing list archive at Nabble.com.
Re: [flexcoders] I want to use Flex Builder 3 to develop Flash Games
SWC is a compiled Flash asset. If you compile Game.as and get a SWC out of it, then everytime you change Game.as, you'll need to compile a new SWC. You might want to organize things differently. Assuming that Game.as is your main class that you compile for the game, you may not want to compile this with Flash if you're trying to use Flex Builder. The way I organize is to break down my stuff into 2 categories - the main game, and the objects/assets used by the game. The objects and assets I use are usually pretty simple. I like these as SWCs because I can give them a little logic, and maybe a animated timeline if need be. Typically if you keep these simple, you'll rarely have to touch the code, and just have to update with any art changes. The main game class, however (what I'm assuming you're calling Game.as), is something that you'll update constantly throughout the lifecycle of your game. So this is easier to leave as just some code, and don't compile into a SWC, just let Flex compile with each build of the game. You can organize stuff however you like though - you could completely ignore what I said, there's no right way to do it. The above just happens to be what works for me. You also talked about your artist not liking having to dig into movieclips and symbols in the library. Honestly, they should really learn some organization. Movieclips are the basic building blocks for interactivity in the Flash IDE. There is no way you'll build a game even in the Flash IDE without grouping your art into some form of Movieclip or Sprite. If your artist can only draw on the main stage, it'll end up being your job to figure out how to organize things into the movieclips as you need them and just do the production work yourself. The downside of this, is having to do this production work everytime the art gets updated. I've been through this it's not fun. It's easier to do a bit of pre-planning surrounding your game and get a dialog going with your artist on how to best organize the assets. If you both stick to the plan, they can work in Flash independently and just give you an updated SWC every so often while you work in Flex Builder, updating the logic surrounding the game. But like I said - people prefer different stuff - I'm sure once you get a little experience with this workflow, you'll have your own opinions. ben Axonn wrote: Hi Doobie and thanks for your answer! I just managed to get my first SWC into Flex ::- D. *rejoices*. However, I can't do anything with it ::- (... I have this Game.swc. In CS3, I set Game.as to its class. Game.as is in the same folder as Game.swc. After importing it in Flex, I modified Game.as. I added a trace. But nothing shows when I run it with Flex ::- ( ... please don't tell me I need to recompile the SWC if I modify the AS. As far as I understood so far that's the whole thing when using SWCs, you can code without Flash... so why don't my modifications take place? Axonn. doobiekeebler wrote: Hey, so I've been making some games in Flex Builder myself. Basically I got fed up with the Actionscript editor in Flash a few years ago, and then switched to Flash Develop. Flash Develop is a really great (and free) tool. However, I ditched that once I got Flex Builder, because as much as I loved Flash Develop, Flex worked a lot better for me. I still use Flash Develop if I have to compile in the Flash IDE. Anyway, the others are right, Flex and Flash are all Flash. The reason to use the Flex framework is to get some great UI components, and a great framework to develop a rich internet application in. I use Flex all the time, though that said, I stay clear of it for games since typically the framework is overkill in the application department for what I need. Flex Builder, though, is VERY handy for making games. Specifically your example with the rectangles - there are two ways to do this. The first is like what you said and to make a SWF. You can simply embed the SWF using the embed metatag. I'm going to completely butcher it, but it's something like this: [Embed( file='myswf.swf', symbol='myrectangle')] public var myrectangle:Class You can do this with pngs, gifs, jpgs, or swfs. Its simply just another graphical resource to use. It's a little wacky though because you have to assign type it as a class first, and then you can say: var x:myrectange = new myrectangle(); Typically I tend not to do this. My method of choice is to compile a SWC. If you embed a SWF in the above fashion, you will lose any and all code associated with it. That means if you have any frame labels, any, stops, any gotoAndPlay's in there, it's lost. If you use a SWC you can use it just for graphics, or you can make your graphics smarter with some code. Just go to the file properties and add the SWC into the library. In this fashion, you now have code completion, and dont
Re: [flexcoders] Component with Text and Image in sameline
Take a look at the Text Layout Framework [ http://labs.adobe.com/technologies/textlayout/ ]. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Wed, Mar 11, 2009 at 5:40 AM, Ashish Verma verma.lu...@gmail.com wrote: Hello All, Want to make a component in Flex 3: Here is the specification of the application – 1. We need to develop a windows/web application in which we want to have a component which can accommodate images in line with the text. 2. We can move/drag the images/text in that component using mouse. The text or images adjust themselves inline while moving. 3. We can cut / copy / paste the text not the images. 4. We can also write text in between the images. 5. You have to use the following XML to load this component. You can have the images where you will find the braces. You have to use different images for {0} and {1}. @xml version=”1.0” encoding=”utf-8” ? text This is {0} a windows application {1} in which we want to have text between the images text /xml Any Help would be appriciate.
Re: [flexcoders] Actionscript question
The metadata belongs to the class, so you have to put it directly before the class definition like this: package { import flash.display.Sprite; [SWF(backgroundColor=#ff)] public class SampleClass extends Sprite { public function SampleClass() { } } } Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Mar 3, 2009 at 1:34 AM, elevight i...@pilby.us wrote: I have created an empty actionscript class, and I'm trying to use metadata to change the background color: package { [SWF(backgroundColor=#ff)] import flash.display.Sprite; public class SampleClass extends Sprite { public function SampleClass() { } } } But the background color is not changing to red. Can anybody see what I'm doing wrong? Thanks.
Re: [flexcoders] Who have YOU used for outsourcing mid to large Flex/CF projects?
Hey, this is just my opinion and what I've learned from working for people that run small companies. I don't have direct experience - but here's what I think In my opinion $30k projects just aren't that big. They're great to maintain your business, and by all means money is money - so who wouldn't want to take them. But I'd call a $30k project small to low-mid size. Maybe its a large project for you folks, but it will most likely be a small project for a company you outsource to. At that level you probably won't see much difference in the price tag if you folks were to do it in house, or if an outsourcing firm were to do it in house. Once you get into the bigger numbers like $100-$200k, you can at least start marking yourselves up a little more because you landed the project - and still pay the outsourcing firm a decent rate. My recommendation would be to keep the project in-house, but maintain a large rolodex of contractors. $120/hour is probably normal for outsourcing because they'll most likely be hiring a project manager on top of their programmer to manage your project. If you contract a good programmer at like $60-$80 per hour, and use an in house project manager or producer, you can probably achieve the same results. Like I said.I've never run a company, so this might be bad advice - but its probably what I'd do. ben Pat Buchanan wrote: My company is where I like it - small and maintainable - just a few employees. But sometimes I get some BIG projects thrown at me that are nearly guaranteed. The problem is, I don't want to hire anyone and it's too hard to keep a good group of reserve programmers busy 100% of the time. I've turned away at least 3 $30,000 projects in the last few months alone - and I hate it. I want to be involved, I want to grow the company, but I think the best solution might be to use an outsourcing house. Eventually these clients will stop coming to me and go elsewhere - and I don't want that to happen. So --- who have YOU used to outsource your projects to? Someone that does it all - Flex, CF, .NET, SQL Server, etc. I don't have the money to blow to try out places to find out they suck pondwater or never return phone calls. I want to manage the project and I want to be involved in everything, but I need a group that can continue to work even though they run into a roadblock on a separate piece. Now there are some INCREDIBLE groups out there that we all know and love (I won't name names, but one of them trained me in Flex) but $120/hour in this economy isn't going to cut it. So - who have you used that you like, that won't break the bank? And do they communicate well? (It's WAAAY to hard for me to express what I want to someone that doesn't understand English, so I need to be careful there too) Any recommendations/thoughts/examples? If you ARE one of these groups, PLEASE don't respond on this list - just reply to me directly. There is already WAY too much traffic on this list to begin with (I even hesitated sending this message) But what I'm REALLY looking for is someone who has EXPERIENCE with some of these groups - good or bad. Thanks for listening!
Re: [flexcoders] Re: Mouse Clicks' Queue when Button is Disabled
The problem seems to be somewhere else and not in the Button. Run the following application, then click on the button to disbale it, then click again when it's disabled. For me it behaves as expected, I don't get any Click events for the clicks I do while the button is disabled. ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical creationComplete=init() mx:Script ![CDATA[ private var timer:Timer; private function init():void { timer = new Timer(3000, 1); timer.addEventListener(TimerEvent.TIMER, timer_timerHandler); } private function logClick():void { logger.text += (new Date()).toTimeString() + : Click\n; timer.start(); btn.enabled = false; } private function timer_timerHandler(e:TimerEvent):void { logger.text += (new Date()).toTimeString() + : Timer\n; btn.enabled = true; } ]] /mx:Script mx:Button id=btn label=Click Me click=logClick() / mx:TextArea id=logger width=400 height=400 / /mx:Application Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Feb 17, 2009 at 8:33 AM, giladozer gilado...@yahoo.com wrote: Thanks Alex for the quick response. However, the button is supposed to turn enabled after the result is returned. The problem is that while it looks like the button is disabled - clicking on it results in entering to the function which listens to it. Moreover, I logged/traced the time the the button turns back to enable + the time entering to the function that listens to it - it's exactly the same - by the millisecond. meaning - i can't event log the time the button was clicked - cause the mouse click event is only dispatched after the button turned enable. one last thing - I found a workaround by removing the eventListener when the button is disabled , and adding it back with a timer that starts counting after it turned enabled in ticks of 100ms. ( the the clicks are not listened in that time space of when the button turned enable and 100ms after that). The thing is that i don't want to use a timer... it's a very ugly solution. Thanks again, Gilad
Re: [flexcoders] Re: filter arraycollection with checkbox acting wired
Can you click on the checkbox more than once (let's say 5 times) and resend the output? Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Feb 17, 2009 at 8:57 AM, johndoematrix johndoemat...@yahoo.comwrote: when i replace the code and run the app, i get the following output when i click the pizza_ckb checkbox and all the info disappears [SWF] /IE_V1/bin/portal_V1-debug.swf - 2,109,478 bytes after decompression true
Re: [flexcoders] Re: filter arraycollection with checkbox acting wired
It seems like your data is OK. So I did a test application and I figured out that the filter function is wrong. It should only do the test if the checkbox is selected, otherwise it should always return true because in this case you want display all items. So here is my working test app, I hope you can use it to make your code work: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical mx:Script ![CDATA[ private var pizzaSelected:Boolean = false; private function pizzaFilter():void { pizzaSelected = pizza_ckb.selected; pizzaAr.refresh(); } private function myFilterFunction(item:Object):Boolean { if (pizzaSelected) return (item.pizza == pizzaSelected); else return true; } ]] /mx:Script mx:ArrayCollection id=pizzaAr filterFunction=myFilterFunction mx:Object label='Pizza 1' pizza='true' / mx:Object label='Not a pizza 1' pizza='false' / mx:Object label='Pizza 2' pizza='true' / mx:Object label='Pizza 3' pizza='true' / mx:Object label='Not a pizza 2' pizza='false' / /mx:ArrayCollection mx:CheckBox id=pizza_ckb change=pizzaFilter() / mx:List dataProvider={pizzaAr} labelField=label / /mx:Application Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Feb 17, 2009 at 9:09 AM, johndoematrix johndoemat...@yahoo.comwrote: sorry i had forgotten to trace the item.pool. anyhow when i do that and i click the check box once i get true false true false true true when i click five times i get true false true false true true false false true false true true true false true false true true false false true false true true true false true false true true
Re: [flexcoders] Components needed
Some links: http://www.quietlyscheming.com/blog/components/flexbook/ http://dougmccune.com/blog/2007/11/19/flex-coverflow-performance-improvement-flex-carousel-component-and-vertical-coverflow/ http://www.thetechlabs.com/3d/simulating-piclens-with-flex-and-away3d-%E2%80%93-part-1/(there are also other interesting articles on this site) Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Feb 17, 2009 at 5:27 AM, brucewhealton br...@futurewavedesigns.comwrote: Hello all, I was wondering if anyone could recommend some good resources for components, be they open-source, free, or commercial. I was reading Jack Herrington's book Flex 3: Component Solutions and I found a number of interesting components discussed. I'm looking at the ones for presenting images, or photo galleries. In particular I found these sites useful, afcomponents.com, fxcomponents.com and digicrafts.com to be useful and as having some great components. I'm doing a site for an Art Gallery. I wanted to find a good component for displaying photos that would look like presenting photos of art on a virtual wall, as it were. Can anyone recommend any good sites and components. In particular, if there are other great open-source components that would be great. I found a few Photo book, flexbook type components also. I thought there was a freeware, open-source version of this also. Thanks, Bruce
Re: [flexcoders] AMF instead of XML over http?
http://www.roboncode.com/articles/144 Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Feb 17, 2009 at 11:45 AM, Guy Morton g...@alchemy.com.au wrote: Is it possible to simply transfer data over http that has been encoded in AMF format, ie to bypass all the other remoting stuff and just use AMF as one might use XML? I've been looking at the docs and online and all the docs seem to assume you want the whole remoting thing with a gateway etc. I want to keep using http and just change the data format to AMF3. Is this possible? If so, is there a right way to do it, and can anyone point me in the right direction? TIA Guy
Re: [flexcoders] In AIR Application fonts getting distort
Did you clean the project after migrating to Flex 3.2? Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Feb 17, 2009 at 10:52 AM, Ashish Verma verma.lu...@gmail.comwrote: Hello All, Facing a strange problem. Actually I made an application using Flex - 3.0 later I build it Flex SDK 3.2 now on MAC system the font is getting distort what is wrong with application. I can see only the font with bold weight getting distort. Please advice me. Best, Ashish
Re: [flexcoders] Re: filter arraycollection with checkbox acting wired
You have to review the logic of your filter function. As Tracy said, you should try to debug, this will save you a lot of time. Put a break point in the filter function and test your conditions. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Feb 17, 2009 at 1:23 PM, johndoematrix johndoemat...@yahoo.comwrote: hi Ben when i tried the solution you gave, it worked very very well. but this is when am using a single criteria. when i try to add it to a filter function that filter's based on more than one criteria that's when there come's a problem.
Re: [flexcoders] Re: Components needed
There is a link to download the source to the right, just above Categories. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Wed, Feb 18, 2009 at 3:51 AM, brucewhealton br...@futurewavedesigns.comwrote: Hi, I thought the flexbook was open-source but I cannot find that information on the page now. I just seem to remember it being open source. Does anyone know? Bruce --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Haykel BEN JEMIA hayke...@... wrote: Some links: http://www.quietlyscheming.com/blog/components/flexbook/ http://dougmccune.com/blog/2007/11/19/flex-coverflow-performance-improvement-flex-carousel-component-and-vertical-coverflow/ http://www.thetechlabs.com/3d/simulating-piclens-with-flex-and-away3d-%E2%80%93-part-1/ (there are also other interesting articles on this site) Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Feb 17, 2009 at 5:27 AM, brucewhealton br...@...wrote: Hello all, I was wondering if anyone could recommend some good resources for components, be they open-source, free, or commercial. I was reading Jack Herrington's book Flex 3: Component Solutions and I found a number of interesting components discussed. I'm looking at the ones for presenting images, or photo galleries. In particular I found these sites useful, afcomponents.com, fxcomponents.com and digicrafts.com to be useful and as having some great components. I'm doing a site for an Art Gallery. I wanted to find a good component for displaying photos that would look like presenting photos of art on a virtual wall, as it were. Can anyone recommend any good sites and components. In particular, if there are other great open-source components that would be great. I found a few Photo book, flexbook type components also. I thought there was a freeware, open-source version of this also. Thanks, Bruce
Re: [flexcoders] Re: filter arraycollection with checkbox acting wired
Replace the following functions, run the app in debug mode and post the output: private function pizzaFilter():void { trace(pizza_ckb.selected); if ( == true) pizzaSelected = pizza_ckb.data; filterGrid(); pizzaAr.refresh(); } private function myFilterFunction(item:Object): Boolean { trace(item.pizza); return (item.pizza == pizzaSelected) ; } Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Feb 17, 2009 at 7:44 AM, johndoematrix johndoemat...@yahoo.comwrote: Hi, Tim i tried your code, but the result is not good too. when then check box is checked, all the data in the array collection disappears and when its unchecked all data shows up again. what i want to achieve is when the pizza_ckb is checked only the entries in the data base that have pizza show up and when i uncheck it all entries with or without pizza show up. thanks
Re: [flexcoders] Re: how to use a list's change event to refresh an array that is bound to it.
Can you give a real example of what you want to do? Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Fri, Feb 13, 2009 at 4:56 PM, stinasius stinas...@yahoo.com wrote: hello any help out there?
Re: [flexcoders] filter arraycollection with checkbox acting wired
Try this (not tested!): private var pizzaSelected:Boolean; private function pizzaFilter():void { pizzaSelected = pizza_ckb.selected; filterGrid(); } private function filterGrid() :void { pizzaAr.filterFunction = myFilterFunction; pizzaAr.refresh(); } private function myFilterFunction(item:Object): Boolean { return (item.pizza == pizzaSelected) ; } Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Mon, Feb 9, 2009 at 2:52 PM, johndoematrix johndoemat...@yahoo.comwrote: hi i am trying to filter an array collection using a checkbox, but when i select the check box all the data disappears. here is my filter function private var pizzaSelected:Boolean; private function pizzaFilter():void { if (pizza_ckb.selected == true) pizzaSelected = pizza_ckb.data; filterGrid(); pizzaAr.refresh(); } private function filterGrid() :void { pizzaAr.filterFunction=myFilterFunction; pizzaAr.refresh(); } private function myFilterFunction(item:Object): Boolean { return (item.pizza == pizzaSelected) ; } then on my pizza_ckb checkbox on the click event i call pizzaFilter(); is there something am doing wrong. if there is pizza then the result is true and pizza records show if false nothing is supposed to show up.
Re: [flexcoders] Loading properties files at runtime
I think one solution would be to load the properites file, parse it, extract the key-value pairs and create the resource bundle manually as described here: http://livedocs.adobe.com/flex/3/html/l10n_6.html#164919 Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Thu, Feb 12, 2009 at 7:39 PM, Mike Chang mik...@gmail.com wrote: Hi, Is it possible to localize Flex application in a way that properties file can be loaded at runtime? I know they can be made into resource modules, but I want to avoid compiling those too. Thanks, Mike
Re: [flexcoders] how to localize pageTitle
If I'm right, the pageTitle property is set during compilation in the html wrapper and it has no effect when set on runtime. You will have to use JavaScript for this. Override the resourcesChanged() method and call a JavaScript function which will set the window's title. Here you will find an example how to do it: http://livedocs.adobe.com/flex/3/html/passingarguments_4.html Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Feb 10, 2009 at 3:08 PM, Gautam P p.gau...@gmail.com wrote: Hi, Following is the code I tried out: mx:Application pageTitle={resourceManager.getString('AppMessages', 'GREETING')} xmlns:mx=http://www.adobe.com/2006/mxml; mx:Metadata [ResourceBundle(AppMessages)] /mx:Metadata I am not able to localize the application's pageTitle property string. Also the documentation says we can't use actionscript to update this property. Any idea what I am doing wrong... Thanks, Gautam.
Re: [flexcoders] Flex RegExp issues
The dot character matches any character, so that the regex 12.0 will match 12-0, 12x0, 12P0 etc. If you want to match the dot itself, you have to escape it, i.e. 12\.0. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Mon, Feb 9, 2009 at 1:54 AM, Manu Dhanda manuraj.dha...@gmail.comwrote: The problem is: I am trying to filter an arraycollection(labels) against the text. Using a filter function and in there I am trying to use RegExp. More specifically, whenever I enter a text like 12.0, it returns me results with - character as well like 12-0 etc. So I want that whenever I enter . in my search, it should only return me results with . and NOT - and vice-versa. Thanks, Manu.
Re: [flexcoders] Buttonbar not centering at startup
Hi, so, right now is working, but I have to do it like this: mx:ButtonBar id=figSelector width=330 height=100% horizontalGap=20 horizontalCenter=0 verticalAlign=middle buttonWidth=50 buttonHeight=50 Seems that using the width=100% was the problem ( even adding horizontalAlign=center ) :P thnx a lot for your attention here, see ya' around. On Feb 2, 2009, at 10:05 AM, Tracy Spratt wrote: It sort of does not make sense to have something be width=”100%”, then set horizontalCenter. The width setting will make the component be the same width as the container, so it will automatically be “centered”, but again, that does not really make sense. Marco is probably right. In this case, since your button bar fill the whole horizontal space, what you really want is to center the buttons within it, by setting horizontalalign=”center” Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Marco Catunda Sent: Monday, February 02, 2009 5:50 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Buttonbar not centering at startup Ben, horizontalCenter=0?? It should be horizontalAlign=center, shouldn't it? -- Marco Catunda On Sun, Feb 1, 2009 at 10:29 PM, Ben Cessa bce...@gmail.com wrote: Hi again, right now I'm just playing a little with AIR and PV3D writing a little useless app as an exercise. I'm having an odd problem with ButtonBar, the thing don't get the horizontal center when the apps starts, is aligned to the left, however, as soon as I start resizing the main window it works very nice. Any ideas about what could this be? The actual portion of code I'm using is this: mx:ButtonBar id=figSelector width=100% height=100% horizontalGap=20 horizontalCenter=0 verticalAlign=middle buttonWidth=50 buttonHeight=50 And here's a little screencap of what the component shows at startup By the way, I'm also having problems removing that ugly background from the buttons, can't figure out the skin needed, I was thinking in use a 100% transparent PNG as background image but I'm not sure, just in case someone know how to remove that too :P Well, thanx a lot for your attention and I hope someone can give me hand with this
[flexcoders] Buttonbar not centering at startup
Hi again, right now I'm just playing a little with AIR and PV3D writing a little useless app as anexercise. I'm having an odd problem with ButtonBar, the thing don't get the horizontal center when the apps starts, is aligned to the left, however, as soon as I start resizing the main window it works very nice. Any ideas about what could this be?The actual portion of code I'm using is this:mx:ButtonBar id="figSelector" width="100%" height="100%" horizontalGap="20" horizontalCenter="0" verticalAlign="middle" buttonWidth="50" buttonHeight="50">And here's a little screencap of what the component shows at startupBy the way, I'm also having problems removing that ugly background from the buttons, can't figure out the skin needed, I was thinking in use a 100% transparent PNG as background image but I'm not sure, just in case someone know how to remove that too :PWell, thanx a lot for your attention and I hope someone can give me hand with this
Re: [flexcoders] Re: Generated html page backgroundcolour
It does change the bg color in the wrapper. The behavior you talk about can happen if you use 'backgroundGradientColors' because the bg color of the wrapper is set from the 'backgroundColor' property, so even if you use gradient colors for the bg of the flex app, you should still set 'backgroundColor' for the bg color of the wrapper. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Fri, Jan 30, 2009 at 6:50 PM, Tracy Spratt tspr...@lariatinc.com wrote: Does that property actually change the background color in the wrapper, or does the Flex app just cover the entire browser? I do not know offhand. In a recent thread, someone noted that the browser background stayed the original color for a brief time before the Flex app loaded, and suggested adding an entry to the Additional Compiler Options in the Flex Builder Properties, to actually compile the background color into the wrapper. Tracy Spratt Lariat Services Flex development bandwidth available -- *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *bhaq1972 *Sent:* Friday, January 30, 2009 10:12 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Re: Generated html page backgroundcolour I just realized mx:Application backgroundColor=white etc generates the white background in the generated html wrapper --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, bhaq1972 mbha...@... wrote: I have my Flexbuilder set to the default settings. How can I make sure the generated HTML wrapper has a white backgroundColor. I know its something to do with ${bgcolor}. But how do I set this? Any help would be appreciated.
Re: [flexcoders] flex date and timezone
You could probably use the tz database [ http://www.twinsun.com/tz/tz-link.htm ]. Download the data archive [ ftp://elsie.nci.nih.gov/pub/tzdata2009a.tar.gz ] which contains different files with time zone information. The file 'zone.tab' contains geographic coordinates for the principal locations of the zones (perhaps you can use this data). The other files contain time zone data (GMT offsets and other data). I think the 'Zone' entries are what you need. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Wed, Jan 28, 2009 at 5:42 PM, Gordon Smith gosm...@adobe.com wrote: In java, there is a TimeZone class to handle it. is there something similar in Flex? No, sorry, there isn't anything comparable in the Flex framework. Gordon Smith Adobe Flex SDK Team *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *coder3 *Sent:* Tuesday, January 27, 2009 2:55 PM *To:* flexcoders@yahoogroups.com *Subject:* RE: [flexcoders] flex date and timezone Right. I only have the string. In java, there is a TimeZone class to handle it. is there something similar in Flex? Ryan Graham-3 wrote: If you have access to the GMT offsets, sure. Otherwise, if you have just the strings, I don't see an easy way... HTH, Ryan From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com [mailto: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On Behalf Of coder3 Sent: Tuesday, January 27, 2009 3:13 PM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: [flexcoders] flex date and timezone Hi All i have 3 timezone strings, for example, America/Thule, Indian/Maldives, and Europe/Luxembourg. is there a way to sort them from east to west? thanks!! c -- View this message in context: http://www.nabble.com/flex-date-and-timezone-tp21695609p21695609.html Sent from the FlexCoders mailing list archive at Nabble.com. This message is private and confidential. If you have received it in error, please notify the sender and remove it from your system. -- View this message in context: http://www.nabble.com/flex-date-and-timezone-tp21695609p21696340.html Sent from the FlexCoders mailing list archive at Nabble.com.