View Single Post
10-21-2007, 07:48 AM
#2
danmoore is offline danmoore
Status: I'm new around here
Join date: Oct 2007
Location: Perth, Western Australia
Expertise:
Software:
 
Posts: 18
iTrader: 0 / 0%
 

danmoore is on a distinguished road

  Old

Hi Tracyl,

Would be a good idea for you to look into swfObject. It's a good way for developers to embed flash but also allowing a method of "No Flash" in restrospect that - if the user doesn't have JavaScript or Flash enabled, will show.

the No Flash is somthing you can change with the drop of a hat, see below for display method.

Another up side to the swfObject embed method (and I understand this may be slightly off topic, but something I find to be quite a useful tool.), is you can pass variables into your flash movie through the javascript in the page.

You'll need to include a JavaScript file inside the <head> of your HTML document - this is the js that processes the appropriate information to embed the flash.

The following location is where you can download yourself a copy of the swfObject Flash. http://blog.deconcept.com/swfobject/#download

The next step is to create a div with the desired ID with which the contents will display your flash movie. (note, this is something you can style, postion etc. accordingly) you can give this an ID of anything you desire, as you'll be defining which ID to replace contents in a short moment. see following for example.
Code:
<div id="flashMovie">
    <!-- ** THIS IS WHERE I ENTER MY NO FLASH CONTENT ** -->
</div>
Once that has been added into your page, you can then jump down to the footer of the site and place the following code just before your </body> tag.
after the Code view i'll explain a little about each item in the following.

Code:
<script type="text/javascript">
   var so = new SWFObject("movie.swf", "mymovie", "400", "200", "8", "#336699");
   so.write("flashMovie");
</script>
you might be wondering "ok looks good, but what do i change to get my movie working properly? - An outline is provided below to explain each part to the JS.

The first line of our code is:
var so = new SWFObject("referance to my flash movie", "id for move it's self (not what we defined earlier)", "Width", "Height", "Flash Version", "Background color of movie");

above I've bolded each item you'll need to change.

the next line (so.write("flashMovie") is where we define the ID we gave our div earlier on in the HTML.

I understand that some/most of the above may already be known by yourself and other, but for the sake of those who do not understand this embed method, I've gone into a little more detail than usual.

send us a PM if you're still have issues and I've give you a hand.

Cheers,
Dan