Ok, so this isn't the most useful example of Flex, but I have a soft spot for the old Lemonade Stand Apple IIe game of my youth. I rebuilt it with Flex:
http://ray.camdenfamily.com/demos/ls/main.html
It still has a few quirks, but have fun. I've also included the source code as an attachment to this zip. Please note that I'm very much a Flex newbie, so don't consider my code as anything even near "Best Practice".
Archived Comments
Ray,
Thanks for the example. I couldn't wrap my brain around binding data to different components and this showed me the way.
example: http://www.berkeley-county....
There was a mistake in the url of my example. Should be: http://www.berkeley-county....
Awesome - I'm glad my trivial little game could help someone. :)
*yelling* I remember this! I remember this! *sighing* oh man i remember this... starting to feel old here Ray, but thanks for making me feel like a kid again if only for a moment. -s
Crap, and I was going to try to get some code done when my wife's out of town....now I'll just sit and work on my citrus-beverage cartel.
Very nice, Ray!
Too fun. I'm at $1,400 in assets now! You need to increase the max number of cups beyond 999!! ;-)
Hi, am also new to Flex. Please question: How do I start / initialize my application with a custom dialog / Alert box that I wish to use for login plus a site description .swf like your lemonade example, please.
Jon Alexander
sales@e-revenues.com
Don't forget I included the zip with this blog post. If you download it and take a look, you will see how I'm launching that panel on application startup. (I use creationComplete.)
Thank you, shall have a look at the zip file. Am hoping this shall have a dialog / Alert Box whereas the main app is out of focus on starting, the purpose is to have a login box ontop of the main app showing first, with the main app in back but out of focus.
Thank you
Jon
You want to see my other Flex demo:
http://ray.camdenfamily.com...
Hi, thank you. I saw that one, thank you.
As your private function checkForm(), shows the Alert.show on error when the usernameValue ==''
This Alert dialog box, shows as a pop up while the main login (or in my case a desired main app) in the background as fuzzy.
The closest I have found for a visual example is the Mystic Support Ticket by Peter Ent, please note it is not working due to the Coldfusion connection to MySql, BUT, it does present an exact visual representation of what I hope to accomplish:
http://www.e-revenues.com/p...
htaccess username is: erev
htaccess password is: hi93Lj48
PLEASE REMOVE THE HTACCESS part after you have a chance to maybe jot it down.
But in this example you can see the login with the main app in the background faded out, but I hope to have a fuzzy'ed out look.
So one first arrival on my web site, the main app is in the background but the login dialog pop up is on top with the main app fuzzy'ed out.
Thank you.
Very sorry to take up your time, any thoughts would be most gratefully appreciated.
Jon
ok, may have figured it out, but stuck on one last part below is the code from which the main app calls a TitleWindow named MyLoginForm.
The part I am having difficulty is HOW to NOT need to use the mx:Button click="showLogin()
BUT instead have the showLogin() be performed when the app runs
<!-- main.mxml -->
<mx:Script>
<![CDATA[
import mx.managers.PopUpManager;
import mx.core.IFlexDisplayObject;
private function showLogin():void {
var helpWindow:IFlexDisplayObject =
PopUpManager.createPopUp(this, MyLoginForm, true);
}
]]>
</mx:Script>
<mx:Button click="showLogin();" label="Login" x="307.5" y="269"/>
Hi, maybe getting closer. I believe it may be that I need an onShow() with the creationComplete.
When the screen is shown, the creationComplete event calls the onShow() function to display the TitleWindow on top of the main app.
Any ideas, please?
Jon