Blueprint – really cool plugin for Flex Builder
Blueprint is a plugin forĀ Flex Builder3 and Flash Builder4 that allows users to query for Adobe Flex and Adobe Flash code examples found on the Web directly inside of the development environment.No need of switching between IDE and web browser.
Anonymous Feedback
Many times we see some of our colleagues not doing things the right way.
At that time we feel like giving some constructive feedback, but refrain ourselves from doing so fearing reactions.
I have developed a tool which allows you to give anonymous feedback to anyone. This will help the person, who is receiving feedback, know his growth areas without worrying about anything.
Feedback widget is available at - http://aolfeedback.blogspot.com/
Feel free to drop in your feedback either directly by adding comment or anonymously
Flex Tip of the Day #20: Reduce SWF Dimensions in HTML
Problem: Reduce dimensions of swf in HTML
Solution:
<div style="width:300px;height:250px;border:1px solid gray;float:left;overflow:hidden;"> <object id='heatmap' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='750' height='550'> <param name='AllowScriptAccess' value='always'/> <param name='src' value='test.swf'/> <param name="quality" value="high" /> <param name="menu" value="false" /> <param name="scale" value="noborder"> <param name="wmode" value="transparent"> <param name="play" value="true"> <param name="loop" value="true"> <param name="flashvars" value="xmlData=test.xml"/> <embed play="true" loop="true" quality="high" scale="noborder" pluginspage="http://www.adobe.com/go/getflashplayer" src="test.swf" width="750" height="550" type="application/x-shockwave-flash" allowscriptaccess="always" wmode="transparent" flashvars="xmlData=test.xml" > </embed> </object> </div>
Overflow property, which specifies what should happen when an element’s content is too big to fit in a specified area, can be used as an alternative.
Read more at: http://www.w3schools.com/htmldom/prop_style_overflow.asp
Flex Tip of the Day #19: ExternalInterface with HTML
Problem: ExternalInterface does not load at all in IE
Solution:
<object id='heatmap' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='750' height='550'> <param name='AllowScriptAccess' value='always'/> <param name='src' value='test.swf'/> <param name="quality" value="high" /> <param name="menu" value="false" /> <param name="scale" value="noborder"> <param name="wmode" value="transparent"> <param name="play" value="true"> <param name="loop" value="true"> <param name="flashvars" value="xmlData=test.xml"/> <embed play="true" loop="true" quality="high" scale="noborder" pluginspage="http://www.adobe.com/go/getflashplayer" src="test.swf" width="750" height="550" type="application/x-shockwave-flash" allowscriptaccess="always" wmode="transparent" flashvars="xmlData=test.xml"> </embed> </object>
Using AllowScriptAccess to control outbound scripting from SWF.
AllowScriptAccess can have two possible values: “always” &“never”:
- When AllowScriptAccess is “never”, outbound scripting will always fail.
- When AllowScriptAccess is “always”, outbound scripting will always succeed.
- If AllowScriptAccess is not specified by an HTML page, it defaults to “always”.
Flex Tip of the Day #18: Add swf in html
<embed play="true" loop="true" quality="high" scale="noborder" pluginspage="http://www.adobe.com/go/getflashplayer" src="test.swf" width="750" height="550" type="application/x-shockwave-flash" allowscriptaccess="always" wmode="transparent" flashvars="xmlData=test.xml"> </embed>
If you are adding only embed code in your html page for loading swf, then it won’t work for IE because IE takes the attribute values from param tag, and not the embed tag
<object id='heatmap' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='650' height='650'> <param name='AllowScriptAccess' value='always'/> <param name='src' value='test.swf'/> <param name="quality" value="high" /> <param name="menu" value="false" /> <param name="scale" value="noborder"> <param name="wmode" value="transparent"> <param name="play" value="true"> <param name="loop" value="true"> <param name="flashvars" value="xmlData=test.xml"/> <embed play="true" loop="true" quality="high" scale="noborder" pluginspage="http://www.adobe.com/go/getflashplayer" src="test.swf" width="750" height="550" type="application/x-shockwave-flash" allowscriptaccess="always" wmode="transparent" flashvars="xmlData=test.xml"> </embed> </object>
What is the best way to find the minimum or maximum value in that Array?
var myArray:Array = [2,3,3,4,2,2,5,6,7,2];
myArray.sort(Array.NUMERIC);
var minValue:int = myArray[0];
var maxValue:int = myArray[myArray.length-1]
trace("Minimum value from Array is: "+minValue+" and Maximum value from Array is: "+maxValue)
//Output is: "Minimum value from Array is: 2 and Maximum value from Array is: 7"
Flex Tip of the day #17: Style in CSS not in MXML
Store as much style as possible in CSS, not in MXML
Its much harder to store every style in CSS than in HTML such as height & width, x & y simply can not go in to Flex CSS. Degrafa can help you here.
You can even use CSS for effects:
roll-over-effect: ClassReference("com.mycompany.ModeButtonGlowIn");
Flex Tip of the day #16: States in MXML
Don’t use states in your MXML
Try to avoid States in your application and use ViewStack instead. You can keep your design clean by creating custom components, and adding them as children of the ViewStack.


. As I learn new stuff and pickup interesting stuff from around the internet and the other Flash/Flex Gurus out there, I store them here in this blog so that I can always check back for stuff filled away safely.
