Hi,

I have a couple of mods / features you might want to consider for the next release.
Some I have implemented, others are just crazy ideas.

Passing valid xml content into flash.

Basically the idea is that any html / xml in the target div is passed into the flash movie via a flashvar. The tricky bit is making sure the html is valid xml. Inner html returns a lot of crap in IE which flash cant parse correctly. To get around this I added some code to build the xml using the dom.

Dry easy insert function.

One thing we do at work is require a file name convention for all swfs. The reason we started doing this is you always need to know the width and height and someone inserting the flash might not have that information to hand. Same goes for flash version etc. So we came up with the following.

{name}_{flash_version}_{width}x{height}_{optional_version} 

Here is an example of a filename.

spotlight_f7_300x200_v2.swf

We wrote a wrapper function around swfobject which makes it dead simple to insert flash..
This function also takes an object as its second param which you can use to set flashvars.

<div id="spotlight_content">This is a cool html spotlight</div>
<script> ezInsertFlash('spotlight_f7_300x200_v2.swf') </script>

<div id="coolapp_content">To view this funky app you need flash!</div>
<script> ezInsertFlash('coolapp_f7_640x480_beta.swf', {config:'/path/to/config.xml'}) </script>

Custom trigger attribute on divs.

I just had this idea. How about this..

<div id="spotlight_content" swf:alt="spotlight_f7_300x200_v2.swf'">My content goes here.. search engines love it!</div>

After the page has loaded this would be picked up by some automagic.

Last but not least ?no_flash

One final mod im sure most people will find useful is checking location.href for the string no_flash.
If its set, then disable flash insertion. This is really handy for quickly testing how things look without flash.

- Luke



Also: If anyone has new feature requests for this next version, now is the time to get them out there, so if there is one killer feature that you would like to add in, let me know what it is and i'll see if it's cool enough to make it in the next build :)

_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org

Reply via email to