So we had this weird bug, that we were likely the culprit of, but that we didn’t have time to properly find/fix involving SWFAddress, and some JSON and IE 6 & 7. Namely with anything less then IE 8 inclusion of the SWFAddress javascript file was killing the app when we removed it, things worked fine, albeit without deep link or browser history support.
So we needed to have a way for IE8, Firefox, Safari, Chrome (why not even Opera) load SWFAddress, but the rest not, behold:
Clever eh? it’s the extra -->s that do it, so all browers but IE ignore the only the (otherwise standard) conditional code, but still use the script, like we just put a couple of regular old comments up in there. This has only been tested on a few machines so your milage may vary. Lemme know if things workout (or don’t).
We’ve been using SWFAddress for a while now, and while I was cleaning old project files out of Flex I came across my first Flex Test using it. It’s simple, and in fact, SWFAddress has been improved a bunch since this test was made (mostly involving SEO, and fallback links + Google Analytics). Now we’re using it for running our entire navigation schemes for all Flash sites, mini-sites, components, and even in our pitches.
Plenty that’s been heard and said before, but with some good jokes, and relevant to the fans / obedient followers of Shepard Fairey and his arrest in Boston. (Glad I live in Somerville).
Pretty simple stuff. This was driving me a bit crazy at the beginning of the day so I decided to just cut and paste my source code hoping this will help someone else out. Basically I just want to create a custom validator that makes sure one field is equal to another in flex. Pretty simple but if you are a noob you will find this task a bit sucky…. Her is the code
<?xmlversion="1.0"encoding="utf-8"><mx:Panelxmlns:mx="http://www.adobe.com/2006/mxml"xmlns:tsclasses="com.flextradeshow.classes.*"><mx:StringValidatorid="nameValidator"source="{_iname}"property="text"minLength="4"/><mx:EmailValidatorid="emailValidator"source="{_iemail}"property="text"/><mx:EmailValidatorid="emailConfirmationValidator"source="{_iconfirmemail}"property="text"/><tsclasses:EqualValidatorid="sameEmailValidator"source="{_iconfirmemail}"textbox="{_iemail}"property="text"/><mx:FormlabelWidth="100"width="302"height="100%"horizontalScrollPolicy="off"><mx:FormItemlabel="Full Name"required="true"><mx:TextInputid="_iname"/></mx:FormItem><mx:FormItemlabel="Email"required="true"><mx:TextInputid="_iemail"/></mx:FormItem><mx:FormItemlabel="Confirm Email"required="true"><mx:TextInputid="_iconfirmemail"/></mx:FormItem><mx:FormItemlabel="Birthday"><mx:DateFieldid="_ibirthday"/></mx:FormItem><mx:Spacerheight="15"/><mx:Labeltext="Free mimoDesk Sample (Choose One)"></mx:Label><mx:BoxpaddingLeft="110"><mx:RadioButtonGroupid="freemimodesk"/><mx:RadioButtonlabel="Star Wars"groupName="freemimodesk"selected="true"/><mx:RadioButtonlabel="Tokidoki"groupName="freemimodesk"/><mx:RadioButtonlabel="Original Core Series"groupName="freemimodesk"/><mx:RadioButtonlabel="Not Interested"groupName="freemimodesk"/></mx:Box><mx:Spacerheight="15"/><mx:Labeltext="Subscribe to any of the following Newsletters"></mx:Label><mx:BoxpaddingLeft="110"><mx:CheckBoxlabel="Consumer"selected="true"/><mx:CheckBoxlabel="Press"/><mx:CheckBoxlabel="Wholesale"/></mx:Box><mx:BoxhorizontalAlign="right"width="100%"><mx:Buttonlabel="Subscribe"/></mx:Box></mx:Form></mx:Panel>
Some explanation: We’re working on a RSS feed that can be read by Facebook so it can add images to the newsfeed post automagically. Then we want to see if when we change it in the RSS feed, it updates on FB or not. Fingers Crossed.
Update: This worked out fine, but once the image is posted you’d have to replace the image on your webserver, with one of the same name, to change the one on FB (Since they externally load it each time).