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
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] 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] 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.
Re: [flexcoders] Dynamically loading image from URL
You must wait fot the 'complete' event. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Jan 27, 2009 at 12:10 AM, pratikshah83 pratiksha...@yahoo.comwrote: Hi Guys, I want to have a custom image as the itemrenderer for plot chart... just like the butterfly image here http://livedocs.adobe.com/flex/3/html/help.html?content=charts_formatting_12.html. But I want to load image dynamically from an URL, and not embed it in. Can any one help me with this. I tried using loader but loader.content is null. Thanks in advance. -Pratik
Re: [flexcoders] Develop Flex application for 1024x768 Resolution
Use percent sizes for the main container and set minWidth and minHeight for 1024x768. For inner containers/controls, use percent sizes and the left/right/top/bottom properties for the positions. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Mon, Jan 26, 2009 at 4:30 PM, liltyga mag...@ingenuitek.com wrote: Hello, I am trying to figure out the best way to create a Flex application so that it accommodates a 1024 x 768 Resolution, but will expand to fill a screen that has a higher resolution than that. In other words I want to dynamically set 1024 x 768 as the default but scale to 100% if need be without manually defining the pixel height and width of the application. Has anyone dealt with this before, and if so, are there any intuitive ways to deal with it, other than just eyeballing the output in the resolution size of choice? Thanks in advance for your help!
Re: [flexcoders] Re: Base one mxml component on another from Library
If you have UFDCommonLib.swc, then add it to the libs folder. Now you must know in which package popupTitleWindow is defined. From your last mail, I guess it could be 'modulecode', so try this: xmlns:modulecode=modulecode Otherwise ask the developer who gave you the swc. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Mon, Jan 26, 2009 at 6:43 PM, markgoldin_2000 markgoldin_2...@yahoo.comwrote: xmlns:modulecode=/UFDCommonLib/src/modulecode UFDCommonLib - is my common library name, src/modulecode is location of a mxml component. I have tried differnt variations of xmlns:modulecode=/UFDCommonLib/src/modulecode but all I am getting is: Could not resolve modulecode:popupTitleWindow to a component implementation. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Paul Andrews p...@... wrote: - Original Message - From: markgoldin_2000 markgoldin_2...@... To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Sent: Monday, January 26, 2009 5:35 PM Subject: [flexcoders] Re: Base one mxml component on another from Library here is my simplified component definition: ?xml version=1.0 encoding=utf-8? modulecode:popupTitleWindow xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute width=400 height=300 xmlns:modulecode=/UFDCommonLib/src/modulecode /modulecode:popupTitleWindow But that does not work. Are you sure the path is correct - can you create popupTileWindow elsewhere? What is the error? Paul --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Paul Andrews paul@ wrote: - Original Message - From: markgoldin_2000 markgoldin_2000@ To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Sent: Monday, January 26, 2009 5:26 PM Subject: [flexcoders] Base one mxml component on another from Library I have a project with a common component library added to it as SWC. I am trying to create a mxml component in my project that would be based on a component from the library. How do I do that? Components are based on the component that's used at the top level in the component definition. I would assume it's just a case of using the component in the swc as the top component of your new component. Paul Thanks
Re: [flexcoders] Repeater Selected Index
If tab2 is selected then you should see the content of tab2. If you are seeing the content of tab1, then it seems like after refresh you are putting the data of tab1 in tab2. What happens when you select the other tabs when you are in this situation after refresh? Are the tabs displaying the correct data? How are you creating the tabs and what are you doing on refresh? Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Sat, Jan 24, 2009 at 7:30 AM, Jaswant jaswant...@gmail.com wrote: I am developing an AIR application with dynamic tab using TabNavigator. Each Tab is rendered by using repeater. Suppose my repeater has 3 items then application would have 3 tabs let Tab1 Tab2, Tab3. My application gets refreshed automatically after each 5 seconds. Its working very well. Now the problem is suppose I have selected tab 2 and application gets refreshed, then tab2 will be selected, yes it is okay. But in tab 2 the data of tab1 is being displayed. so what should I do so if tab2 is selected on application refresh then the data of only tab two should be displayed. That is if tab index 2 is selected than repeater index should also be 2. Please help!! jaswant
Re: [flexcoders] removePopUp on rollout, but not if rollOver popup itself?
I had the same problem with a component I developed and the only solution I found was to track rollOver and rollOut on both components (in your case for the day and the popUp). For every component I set a flag to true on rollOver. On rollOut I set it to false then only if both flags are false I remove the popUp and clean the event listeners. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Fri, Jan 23, 2009 at 3:12 AM, Tracy Spratt tspr...@lariatinc.com wrote: I have a calendar component. When I rollOver a day that has a calendarevent, I pop-up a panel with the event 's detail. I want to hide the detail popup when the user rolls out of the day. But if I roll over the currently displayed popup, flex registers a rollout of the day, hides the pop-up, but then the cursor is still over the day so the popup tries to display, which registers a rollout, so my UI just blinks. I looked for a rollInto property I could check, but didn't find anyting useful. Any suggestions? Maybe I need to track rollOver on the popUp, and set a flag and check that in the day rollOver handler? Tracy Spratt Lariat Services Flex development bandwidth available
Re: [flexcoders] Pop-up Window issue
Any code to test this behavior? Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Fri, Jan 23, 2009 at 3:52 PM, Eric Dunn ed...@adpt-tech.com wrote: Any suggestions on how to stay out of this hole. I am using a button with a click and not using KEY_UP or KEY_DOWN or ENTER. This thing is driving me to drinking... Eric W Dunn Adaption Technologies 281-465-3326 ed...@adpt-tech.com - Original Message - From: Alex Harui aha...@adobe.com To: flexcoders@yahoogroups.com Sent: Friday, January 23, 2009 12:03:04 AM GMT -06:00 US/Canada Central Subject: RE: [flexcoders] Pop-up Window issue I've seen something like this where the events in the pipeline get sent to the underlying app and result in dispatching an event that opens the dialog. For example, if you used ENTER to close the window, if someone leans on the ENTER key too long it repeats and the second ENTER goes to the app that activates the button that opened the dialog. You can also get in this hole if you use KEY_DOWN and KEY_UP *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Eric Dunn *Sent:* Thursday, January 22, 2009 12:21 PM *To:* flexcoders *Subject:* [flexcoders] Pop-up Window issue Not sure what is going on.. maybe someone can help .. Here is the set up: Main app with a manage button. The button opens a pop up TitleWindow where a user can add, update or delete schedules. Once a schedule has been added, updated or deleted, the hanged is pushed to the database and the window should close. I am passing variables in from the parent app. The Issue: The first schedule I delete works fine, the database gets updated and the window closes. Now if I try to open it again and delete another schedule, the window opens, the delete function works but the window does not close. While debugging, I see the correct varaibles passed in on window open, the delete function processes and then the variables revert to the orginal and the window never closes. I watch the code process the commands of close window but it never closes. The! thing that puzzles me most is the variables reverting... Anyone seen this or have an idea on how to resolve? Eric W Dunn Adaption Technologies 281-465-3326 callto:+1281-465-3326 ed...@adpt-tech.com
Re: [flexcoders] Application - vertical scroll position
Are you sure the scrollbar you see on the screen is of the application? Perhaps it belongs to some top level container (Canvas)? Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Thu, Jan 22, 2009 at 5:15 PM, Besite - Bart b...@besite.be wrote: Hi all, I want to set the vertical scroll position programmatically back to zero.. but when I call Application.application.verticalScrollPosition = 0; nothing happens ... Any idea of how to let my application scroll to the top of the window ? Kind regards, Bart Ronsyn
Re: [flexcoders] RTL with FP10, Flex 3
There are examples with the TLF distribution. Start with them and for rendering text from right to left, you just have to set the direction of the text flow to RTL. You can check the 'changeDirection' function in the Flex example. Try also these links (from the readme file of the TLF distribution): - Framework Overview http://www.adobe.com/go/textlayout_overview (pdf) – Overview for developers using the Text Layout Framework - Framework API http://www.adobe.com/go/textlayout_api – API Documentation for the Text Layout Framework Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Wed, Jan 21, 2009 at 4:05 AM, Hyder hyder_...@hotmail.com wrote: I tried reading docs on the new text layout framework but I found it really confusing. I'd love to get some quick tips on getting started with rendering text from right to left.
Re: [flexcoders] internationalization
Yes, they are called resource modules! Thanks Gordon! http://livedocs.adobe.com/flex/3/html/l10n_5.html#158277 Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Jan 20, 2009 at 10:37 PM, Gordon Smith gosm...@adobe.com wrote: Haykel is probably talking about loading a resource module. The resource bundles in a resource module automatically get added to the ResourceManager. Gordon Smith Adobe Flex SDK Team *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Yves Riel *Sent:* Tuesday, January 20, 2009 4:16 AM *To:* flexcoders@yahoogroups.com *Subject:* RE: [flexcoders] internationalization Haykel, out of curiosity, when you load them dynamically at run-time, do you pass them to the resource bundle manager? That's what we did but I'm curious to see what other did and if there are a open source libraries that do just that. We didn't find any at the time so we had to do it all ourselves. -- *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Haykel BEN JEMIA *Sent:* Tuesday, January 20, 2009 3:33 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] internationalization Use resource bundles. If you only have 2 or 3 languages and the resources are not heavy in size, you can simply compile them in the application, otherwise load them at runtime. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Jan 20, 2009 at 6:46 AM, Scott h...@netprof.us wrote: I'm working on a project that requires multiple languages. I'm thinking I have two choices... 1) Use an XML file to change the text to different languages 2) Create a query/remote object through coldfusion to pull the different language. Are those my only options? Or should I say, what is the best way to do this? Has anyone done this or come across any articles? The articles I've found thus far deal with changing the currency/calendar/etc.. While that is something that I need to use, it's not the whole story... Thanks much. Scott
Re: [flexcoders] ContextMenuItem with a checkbox ?
There is already support for checkbox menu items. Just set their 'type' property to 'check'. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Mon, Jan 19, 2009 at 11:57 PM, Michael Pelz-Sherman mpelzsher...@gmail.com wrote: Hi again, I thought I'd try extending the ContextMenuItem class to provide this behavior, but according to the compiler, the ContextMenuItem class is declared final in the Gumbo Flex SDK. I found a post from 2006 that shows ContextMenuItem being extended: http://www.bigroom.co.uk/blog/custom-context-menu-with-keyboard-shortcuts-in-flash Did this change recently? If so, why? Thanks, - Michael -- *From:* Michael Pelz-Sherman mpelzsher...@gmail.com *To:* flexcoders@yahoogroups.com *Sent:* Monday, January 19, 2009 2:15:33 PM *Subject:* [flexcoders] ContextMenuItem with a checkbox ? Hi, I'd like to create a ContextMenuItem with a checkbox that toggles some behavior. Is this possible? Thanks! - Michael
Re: [flexcoders] internationalization
This is more than a simple internationalization, but I think the way you do it is ok as long as you only use text resources. The advantage of resource modules (and why they are compiled to swf) is that they also allow to use media files with the resources. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Wed, Jan 21, 2009 at 2:00 PM, Yves Riel r...@cae.com wrote: The only problem I have with resource modules is that they are compiled into swf. Our users require that the language files be accessible using notepad or any text editor so I cannot use Flex. A typical example would be a lexicon file where the user could add terms at any time. We had to load the file separately and push it into the resource manager. Of course we lose bandwidth but it's what our user base needs. I was just curious to see if other were doing it this way. -- *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Haykel BEN JEMIA *Sent:* Wednesday, January 21, 2009 5:12 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] internationalization Yes, they are called resource modules! Thanks Gordon! http://livedocs.adobe.com/flex/3/html/l10n_5.html#158277 Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Jan 20, 2009 at 10:37 PM, Gordon Smith gosm...@adobe.com wrote: Haykel is probably talking about loading a resource module. The resource bundles in a resource module automatically get added to the ResourceManager. Gordon Smith Adobe Flex SDK Team *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Yves Riel *Sent:* Tuesday, January 20, 2009 4:16 AM *To:* flexcoders@yahoogroups.com *Subject:* RE: [flexcoders] internationalization Haykel, out of curiosity, when you load them dynamically at run-time, do you pass them to the resource bundle manager? That's what we did but I'm curious to see what other did and if there are a open source libraries that do just that. We didn't find any at the time so we had to do it all ourselves. -- *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Haykel BEN JEMIA *Sent:* Tuesday, January 20, 2009 3:33 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] internationalization Use resource bundles. If you only have 2 or 3 languages and the resources are not heavy in size, you can simply compile them in the application, otherwise load them at runtime. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Jan 20, 2009 at 6:46 AM, Scott h...@netprof.us wrote: I'm working on a project that requires multiple languages. I'm thinking I have two choices... 1) Use an XML file to change the text to different languages 2) Create a query/remote object through coldfusion to pull the different language. Are those my only options? Or should I say, what is the best way to do this? Has anyone done this or come across any articles? The articles I've found thus far deal with changing the currency/calendar/etc.. While that is something that I need to use, it's not the whole story... Thanks much. Scott
Re: [flexcoders] Navigational Design Patterns?
Perhaps you can find some hints here: http://designinginterfaces.com/ Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Wed, Jan 21, 2009 at 1:07 PM, nwebb neilw...@gmail.com wrote: Hi, We have a modular Flex project. Each screen has back and next buttons. There are various routes through the application and I'm about to re-write the logic which determines where the buttons take the user when they are pressed (what is already in place is overly complex). I'm guessing that there are fairly established methods for achieving this and would be interested to see what exists, rather than roll out a bespoke solution. Can anyone point me in the direction of a good resource? Cheers, Neil
Re: [flexcoders] Centered preloader that displays while image is loading
One simple way to do it is to create a component with two states: 'progress' and 'image' for example. The default state would be 'progress', where a progress bar (or text, or animation) is visible and the image is hidden. Update the progress bar while the image is loading and in the 'complete' event handler change the state to 'image', in which the progress bar is hidden and the image is visible. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Wed, Jan 21, 2009 at 11:41 AM, stinasius stinas...@yahoo.com wrote: how can i show a preloader while an image?
Re: [flexcoders] RTL with FP10, Flex 3
I wanted to suggest Flex 4 also, but it's still alpha! I had to use it for a project because I needed support for the Arabic language, but I often faced problems with bugs in the framework and renamings made to the classes/functions. In the same time I found the new skinning concept and DOM structure very helpful and I have sometimes some difficulty to go back to Flex 3 :) Anyway, if you are ready to put some time in finding bugs and to cope with changes that can break compilation of your project after a svn update (I would estimate it to be 10%-15% of your time), then I would definitely advise to use Flex 4. But be careful: you can become Gumboholic! Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Thu, Jan 22, 2009 at 5:25 AM, Gordon Smith gosm...@adobe.com wrote: Do you really need to use Flex 3? We're adding TLF support to Flex 4. Gordon Smith Adobe Flex SDK Team *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Haykel BEN JEMIA *Sent:* Wednesday, January 21, 2009 2:07 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] RTL with FP10, Flex 3 There are examples with the TLF distribution. Start with them and for rendering text from right to left, you just have to set the direction of the text flow to RTL. You can check the 'changeDirection' function in the Flex example. Try also these links (from the readme file of the TLF distribution): - Framework Overview http://www.adobe.com/go/textlayout_overview(pdf) – Overview for developers using the Text Layout Framework - Framework API http://www.adobe.com/go/textlayout_api – API Documentation for the Text Layout Framework Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Wed, Jan 21, 2009 at 4:05 AM, Hyder hyder_...@hotmail.com wrote: I tried reading docs on the new text layout framework but I found it really confusing. I'd love to get some quick tips on getting started with rendering text from right to left.
Re: [flexcoders] Im new, and this is an old question
RIA doesn't mean no pages. There are situations where you have simply different pages. How you implement them, as different apps, modules or as a viewstack depends. But among other things, a RIA reduces page loading in many cases. In your example, the login can be a page and the calendar another page. But in the calendar page, if the user chooses to see the details of an item, edit an item, add a new one or add a comment for example, then you can do all this in one page. So I would split the app by functionality and implement the different parts independently, then you could put them on different pages or load them as modules. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Sun, Jan 18, 2009 at 7:54 PM, nycynik m...@theinfluence.net wrote: I am new to flex and RIA in general. I have been working with .net and java for a while now, and I am just starting to try to create a new interface for some projects of mine, and thought flex might be the answer, but I am having trouble wrapping my head around the idea that its less like a web page, and more like a desktop application, to stop thinking about page reloads, and start thinking about ViewStacks. So my original thought was to begin with multiple swf applications, and convert parts of the site over one part at a time (for instance, user registration, and then move on to the shared calendar, or another part of the site). But after doing some reading, it seems that its better to build the whole site as one application. Well I hope i can get some help, here is my question.. -- I did a lot of searching, and found a lot of posts that seem to disagree. The basic question is: I am building a big application for a website, using flex/swf as a front end, and .net as a back end. How do I control the project so that its not one monster swf file? Answers seem to range between using a single ViewStack, to using modules that you load in. Almost everyone wrote, to not build multiple swf/flex projects and try to communicate between them using .net or directly between swf files. -- I hope that is clear enough, so i should begin by learning about loading and unloading modules? Is that right? Thanks, Mike
Re: [flexcoders] internationalization
Use resource bundles. If you only have 2 or 3 languages and the resources are not heavy in size, you can simply compile them in the application, otherwise load them at runtime. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Jan 20, 2009 at 6:46 AM, Scott h...@netprof.us wrote: I'm working on a project that requires multiple languages. I'm thinking I have two choices... 1) Use an XML file to change the text to different languages 2) Create a query/remote object through coldfusion to pull the different language. Are those my only options? Or should I say, what is the best way to do this? Has anyone done this or come across any articles? The articles I've found thus far deal with changing the currency/calendar/etc.. While that is something that I need to use, it's not the whole story... Thanks much. Scott
Re: [flexcoders] Do states and transitions behave differently depending on the context?
I don't know why it's behaving like that, but it seems to work if you set the state after the form item has been created, like this: mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:Form mx:FormItem label=Type creationComplete=st.currentState='taskQueue' view:SectionTypeControl id=st / /mx:FormItem /mx:Form /mx:Application Anyone has an explanation? Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Mon, Jan 19, 2009 at 5:59 PM, mauricen maur...@morninglight.co.ukwrote: I have a component which can appear initially in one of two states, and can subsequently be switched between them. When this switch takes place, I want a transition to occur. Here's a tiny model of my component: mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; mx:states mx:State name=state1 mx:AddChild mx:HBox mx:Text id=text1 text=t1:/ mx:Text id=text2 text=t2:/ /mx:HBox /mx:AddChild /mx:State /mx:states mx:transitions mx:Transition mx:Move targets={[text1, text2]}/ /mx:Transition /mx:transitions /mx:Canvas If I embed this component (call it MyComp) like this: mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; view:MyComp currentState=state1/ /mx:Application the transition takes place as the component appears, and everything is fine. But if I put it inside a FormItem, like this: mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:Form mx:FormItem label=Type view:SectionTypeControl currentState=taskQueue/ /mx:FormItem /mx:Form /mx:Application the transition never takes place and the two labels remain superimposed. In fact the problem is a little worse than this. In the toy application above, you can replace FormItem by a container like HBox and it works again. But in my real app I can't use it inside a Form at all. What gives? Maurice
Re: [flexcoders] Do states and transitions behave differently depending on the context?
I don't know why it's behaving like that, but it seems to work if you set the state after the form item has been created, like this: mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:Form mx:FormItem label=Type creationComplete=st.currentState='taskQueue' view:SectionTypeControl id=st / /mx:FormItem /mx:Form /mx:Application Anyone has an explanation? Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Mon, Jan 19, 2009 at 5:59 PM, mauricen maur...@morninglight.co.ukwrote: I have a component which can appear initially in one of two states, and can subsequently be switched between them. When this switch takes place, I want a transition to occur. Here's a tiny model of my component: mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; mx:states mx:State name=state1 mx:AddChild mx:HBox mx:Text id=text1 text=t1:/ mx:Text id=text2 text=t2:/ /mx:HBox /mx:AddChild /mx:State /mx:states mx:transitions mx:Transition mx:Move targets={[text1, text2]}/ /mx:Transition /mx:transitions /mx:Canvas If I embed this component (call it MyComp) like this: mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; view:MyComp currentState=state1/ /mx:Application the transition takes place as the component appears, and everything is fine. But if I put it inside a FormItem, like this: mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:Form mx:FormItem label=Type view:SectionTypeControl currentState=taskQueue/ /mx:FormItem /mx:Form /mx:Application the transition never takes place and the two labels remain superimposed. In fact the problem is a little worse than this. In the toy application above, you can replace FormItem by a container like HBox and it works again. But in my real app I can't use it inside a Form at all. What gives? Maurice
Re: [flexcoders] Do states and transitions behave differently depending on the context?
I don't know why it's behaving like that, but it seems to work if you set the state after the form item has been created, like this: mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:Form mx:FormItem label=Type creationComplete=st.currentState='taskQueue' view:SectionTypeControl id=st / /mx:FormItem /mx:Form /mx:Application Anyone has an explanation? Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Mon, Jan 19, 2009 at 5:59 PM, mauricen maur...@morninglight.co.ukwrote: I have a component which can appear initially in one of two states, and can subsequently be switched between them. When this switch takes place, I want a transition to occur. Here's a tiny model of my component: mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; mx:states mx:State name=state1 mx:AddChild mx:HBox mx:Text id=text1 text=t1:/ mx:Text id=text2 text=t2:/ /mx:HBox /mx:AddChild /mx:State /mx:states mx:transitions mx:Transition mx:Move targets={[text1, text2]}/ /mx:Transition /mx:transitions /mx:Canvas If I embed this component (call it MyComp) like this: mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; view:MyComp currentState=state1/ /mx:Application the transition takes place as the component appears, and everything is fine. But if I put it inside a FormItem, like this: mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:Form mx:FormItem label=Type view:SectionTypeControl currentState=taskQueue/ /mx:FormItem /mx:Form /mx:Application the transition never takes place and the two labels remain superimposed. In fact the problem is a little worse than this. In the toy application above, you can replace FormItem by a container like HBox and it works again. But in my real app I can't use it inside a Form at all. What gives? Maurice
Re: [flexcoders] ContextMenuItem with a checkbox ?
http://livedocs.adobe.com/flex/3/html/menucontrols_3.html#410684 Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Mon, Jan 19, 2009 at 8:15 PM, Michael Pelz-Sherman mpelzsher...@gmail.com wrote: Hi, I'd like to create a ContextMenuItem with a checkbox that toggles some behavior. Is this possible? Thanks! - Michael
Re: [flexcoders] Re: Do states and transitions behave differently depending on the context?
Why do you need the one state? Is it only to make the transition when the component is created or do you have other states? What do you want to achieve exactly? Perhaps there is a better solution! Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Jan 20, 2009 at 1:42 PM, mauricen maur...@morninglight.co.ukwrote: Thanks very much! It looks as though the transition will work - or not - depending on when it's invoked in the component creation process. And invoking it at the wrong time (ie as part of initialisation, as I did) prevents it from working later, as in your solution. Transitions seem to have a very steep learning curve. The solution for the toy example /still/ doesn't work in my real application! So there must be some other inexplicable glitch to be isolated... --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Haykel BEN JEMIA hayke...@... wrote: I don't know why it's behaving like that, but it seems to work if you set the state after the form item has been created, like this: mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:Form mx:FormItem label=Type creationComplete=st.currentState='taskQueue' view:SectionTypeControl id=st / /mx:FormItem /mx:Form /mx:Application Anyone has an explanation? Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Mon, Jan 19, 2009 at 5:59 PM, mauricen maur...@...wrote: I have a component which can appear initially in one of two states, and can subsequently be switched between them. When this switch takes place, I want a transition to occur. Here's a tiny model of my component: mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; mx:states mx:State name=state1 mx:AddChild mx:HBox mx:Text id=text1 text=t1:/ mx:Text id=text2 text=t2:/ /mx:HBox /mx:AddChild /mx:State /mx:states mx:transitions mx:Transition mx:Move targets={[text1, text2]}/ /mx:Transition /mx:transitions /mx:Canvas If I embed this component (call it MyComp) like this: mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; view:MyComp currentState=state1/ /mx:Application the transition takes place as the component appears, and everything is fine. But if I put it inside a FormItem, like this: mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:Form mx:FormItem label=Type view:SectionTypeControl currentState=taskQueue/ /mx:FormItem /mx:Form /mx:Application the transition never takes place and the two labels remain superimposed. In fact the problem is a little worse than this. In the toy application above, you can replace FormItem by a container like HBox and it works again. But in my real app I can't use it inside a Form at all. What gives? Maurice
Re: [flexcoders] flex not seeing method
I don't know if this is related, but there is one problem with the name of the event. The event is downloadresizeevent, while in the meta declaration and the event handler you are calling it DownloadResizeEvent. You will have either to change the event's name with: public static const DOWNLOADRESIZE_EVENT:String = DownloadResizeEvent; or correct how you reference it: snip mx:Metadata [Event(name=downloadresizeevent, type=elib.event.DownloadResizeEvent)] /mx:Metadata snip snip view:componentmxml downloadresizeevent=handler_resize(event)/ //snip Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Sun, Jan 18, 2009 at 6:35 PM, dnk d.k.emailli...@gmail.com wrote: Hi there, I have an mxml component that dispatches an event. Now when i use the component, the meta data is showing up fine. But when i assign a handler, flex says that it is a call to a possibly undefined method. But it is there plain as day. IDeas??? Code snippets below. DownloadResizeEvent.as - pretty stock custom event: package elib.event { import flash.events.Event; public class DownloadResizeEvent extends Event { public static const DOWNLOADRESIZE_EVENT:String = downloadresizeevent; public function DownloadResizeEvent(type:String):void { super(type); } // Override the inherited clone() method. override public function clone():Event { return new DownloadResizeEvent(type); } } } now in my component.mxml: (in a script block) snip import elib.event.*; //snip (in same script block) snip //located in a method dispatchEvent( new Event(DownloadResizeEvent.DOWNLOADRESIZE_EVENT) ); //snip Then later in my mxml snip mx:Metadata [Event(name=DownloadResizeEvent, type=elib.event.DownloadResizeEvent)] /mx:Metadata //snip An now in my other mxml file that has my component.mxml called in it: main.mxml (in my root tag) snip xmlns:view=elib.view.components.* //snip (in a script block) snip import elib.event.*; //snip (in same script block) snip //event handler private function handler_resize(evt:Event):void { } //snip snip view:componentmxml DownloadResizeEvent=handler_resize(event)/ //snip
Re: [flexcoders] Flex drop down horizontal menu
Take a look at the MenuBar control: http://livedocs.adobe.com/flex/3/langref/mx/controls/MenuBar.html Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Mon, Jan 19, 2009 at 12:06 AM, brucewhealton br...@futurewavedesigns.com wrote: Hello all, I was wondering if anyone could share some tutorials on how to create a horizontal menu with drop-down sub-menus. Please let me know if you can think of any good examples with tutorials/script examples for learning, etc. Thanks, Bruce