Hi Geoff,

I'd like to test it but when I try to download the source code it points to v1.4. Is this normal?

On 9/19/06, Geoff Stearns < [EMAIL PROTECTED]> wrote:
Passing valid xml content into flash. 

I toyed with this a little bit... you can see the post and some comments that go into detail of how to do this and issues you'll have:


Dry easy insert function.

this one seems like something that could easily be a separate function in your own js file - just write a function you call that translates the params into swfobject embed code... wouldn't be that hard to do at all.

Custom trigger attribute on divs.

this one would be a fairly simple addon- combine it with the function above and run it when the page loads. it's a little out there for most people though i suspect, and it would break the page validation, wich means a lot of people wouldn't want to use it.


Last but not least ?no_flash

I've had a couple of requests for this one... i'll consider putting it in, but in the past i've decided not to add it becuase it's pretty easy to just disable _javascript_ in your browser to see the alternate content.

thanks for the ideas.




On Sep 19, 2006, at 6:32 AM, Luke Hubbard wrote:

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


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





--
::| Carlos Rovira
::| http://www.carlosrovira.com
::| http://www.madeinflex.com
_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org

Reply via email to