Expression > Forums Home > Expression Studio Forums > Expression Web and SuperPreview > I have a Flash vid that I want to load lastusing Javascript... help!
Ask a questionAsk a question
 

AnswerI have a Flash vid that I want to load lastusing Javascript... help!

  • Friday, October 30, 2009 12:45 AMGregCost Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Not a good JAVA programmer...

    The flash definition was generated by Expression inside a div and it works fine... What I am trying to do is wrap the FLASH <object id="flash1" data="E...  on a <body onload="loadFlash()" and I just can't figure out to put after the function loadFlash(){

    Any help greatly appreciated!!!!


    <body onload="loadFlash()"style="margin: 0px 0 0 0; border: thick #FF0000; background-color: #003366">
    <form method="post">
     <div>
     </div>
    </form>
    <p>&nbsp;</p>
    <div style="border: 1px #C0C0C0 solid; position: absolute; left: 50%; margin-left: -400px; background:white; width:800px; height:1020px; top: 15px; visibility: visible;"> 
     <div id="layer9" style="border: 1px #000000 solid; position: absolute; width: 600px; height: 710px; z-index: 1; left: 150px; top: 180px; visibility: visible; background-image: url('LoadingWait600x670.png');">
      <span class="style37">
      </span>
    <script type="text/javascript">
    function loadFlash(){
      <object id="flash1" data="EVA%20Intro%20Final%20Version.swf" style="width: 600px; height: 710px" type="application/x-shockwave-flash">
       <param name="movie" value="EVA%20Intro%20Final%20Version.swf" />
       <param name="quality" value="High" />
      </object>
    }
    </script>
     </div>

Answers

  • Sunday, November 01, 2009 5:06 PMpaladyn Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     AnswerHas Code

    Here is the exact source code I used in my test page, which works precisely as expected when tested in a browser. Copy it into a new, blank page, substitute the name and parameters of your Flash for mine, check the paths, and run it.

    When testing a solution it is important to minimize distractions and get down to least cases. Worry about integrating into your page when you've got it working, and not until.

    cheers,
    scott

    =====================

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    
    <head>
    <meta content="text/html; charset=windows-1252" http-equiv="Content-Type" />
    <title>Untitled 1</title>
    <script type="text/javascript" src="scripts/swfobject.js"></script>
    <script type="text/javascript">
     function startSWF() {
      swfobject.embedSWF("JergensFlashTrans.swf", "headerFlash", "450", "160", "9.0.0", "expressInstall.swf", {}, {wmode:"transparent"},{});
      }
    </script>
    <script type="text/javascript" src="scripts/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="scripts/jquery.innerfade.js"></script>
    
    <script type="text/javascript">
     $(document).ready(
      function timeout_init() {
         setTimeout('startSWF()', 5000);
      }
     );
    </script>
    
    </head>
    
    <body>
    
    <div id="headerFlash">
    </div>
    
    </body>
    
    </html>
    
    
    

     


    Plural's don't have apostrophe's. It seem's sometime's that any word's ending in "s" get a gratuitous apostrophe. Apostrophe's are used to indicate possessive's and elision's (contraction's or abbreviation's).

     

    • Marked As Answer byGregCost Wednesday, November 04, 2009 11:43 PM
    •  

All Replies

  • Friday, October 30, 2009 1:18 AMCheryl D WiseMVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Don't put spaces in your file names, it can break the page.

    If this is an aspx page your code must be inside of the </form> element. If it isn't an asp.net page they why do you have a form.

    Use SWFObject to load the Flash file. Google will get SWFObject.


    MS MVP Expression Tutorials & Help http://by-expression.com and online instructor led Expression Classes
  • Friday, October 30, 2009 2:30 AMMark Fitz Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    You can't do what you're doing You cannot wrap HTML in a javascript function. Since the HTML has no meaning to javascript all it will do is generate errors. What you would have to do is actually output the object code as text into a specific location. There are javascript libraries to take a few inputs and output the correct code to embed the player. A good one is SWFObject at: http://code.google.com/p/swfobject/wiki/whats_new

    Actually, just trying to get it to load with a javascript doesn't necessarily guarantee it's going to load last. The method you're using, will actually try to load it earlier rather than later since the onload starts running when the body of the document is loaded. Also, this probably just won't work because what you're going to do is load the flash plug-in pretty darned quick and the plug-in is going to wait for the loading. To really do this right, you have to put the loading feature within the flash file itself. I'm not a flash actionscript programmer so I can't really give any hints on how to do this.

  • Saturday, October 31, 2009 4:26 PMGregCost Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Thanks for the help... here is what I am trying to do... in a generated MS expressions 3 generated webpage I am trying to load a Flash movie as the las object.  the area to load the flash video in is inside div id="layer9"... So here is the code I've been playing around with but can get it to display the Vid... Doesn't work

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">

    <body onload="loadFlash()"style="margin: 0px 0 0 0; border: thick #FF0000; background-color: #003366">
    <p>&nbsp;</p>
    <div style="border: 1px #C0C0C0 solid; position: absolute; left: 50%; margin-left: -400px; background:white; width:800px; height:1020px; top: 15px; visibility: visible;"> 
     <div id="layer9" style="border: 1px #000000 solid; position: absolute; width: 600px; height: 710px; z-index: 1; left: 150px; top: 180px; visibility: visible; background-image: url('LoadingWait600x670.png');">
      <span class="style37">
      </span>
    <script type="text/javascript">
    <!--
    function loadFlash(){
    document.getElementById(“Flash1”).innerHTML='<object id type="application/x-shockwave-flash" data=" EVA%20Intro%20Final%20Version.swf " width="600" height="710">'
    +'<param name="movie" value=" EVA%20Intro%20Final%20Version.swf ">'
    +'</object>';
    }
    //-->
    </script>

     </div>
     

  • Saturday, October 31, 2009 4:35 PMSteve EastonMVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Try removing the spaces from the file name of the flash file.
    Replace them with dashes.
    EVA-Intro-Final-Version.swf

    Also note the spaces between the file name and the quotes: " EVA%20Intro%20Final%20Version.swf ">

     Remove them: "EVA-Intro-Final-Version.swf"
    Expression Web MVP
  • Saturday, October 31, 2009 6:14 PMpaladyn Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Has Code

    What Steve said. In fact, it doesn't matter what resource you're using on the Web, it is never a good idea to have spaces in the filenames. Hyphens, underscores, intercaps, whatever, but no spaces.

    Now, I doubt that you can guarantee that your Flash will load "last," because there's no way to know what order things will come in. However, you can set it up so that it starts after a specified interval.

    The method I will describe uses the jQuery library so that $(document).ready() is available. It also uses swfobject to load the Flash into the target element, with a combination of jQuery and standard ol' garden variety javascript to delay the load.

    OK, in the code, in the <head> section, you'll need to reference the jQuery library and swfobject.js. Next, ordinarily, you would simply call the embedSWF method from swfobject, passing in the name of the swf file, the target element, width and height, Flash Player version, and params.

    However, that would start the Flash playing immediately upon load. So, what you want to do instead is wrap that call in a function, one that you can invoke after a delay from load, like so:

    <script type="text/javascript" src="scripts/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="scripts/swfobject.js"></script>
    <script type="text/javascript">
     function startSWF() {
      swfobject.embedSWF("EVAIntroFinalVersion.swf", "flashTarget", "600", "710", "9.0.0", "expressInstall.swf", {}, {wmode:"transparent"},{});
      }
    </script>
    

    Note that startSWF() is the added wrapper function. Now, we want to ensure that that function isn't called until we're ready. So, we use jQuery's handy-dandy $(document).ready() to ensure that the document is ready before calling startSWF(), and javascript's setTimeout() to delay for a set period after the document is ready, like so:
     

    <script type="text/javascript">
     $(document).ready(
      function timeoutInit() {
         setTimeout('startSWF()', 5000);
      }
     );
    </script>
    
    Of course, you need an element in your body markup to receive the Flash when swfobject loads it...

    <body>
    
       <div id="flashTarget"> <!-- style and size this with CSS -->
       
       </div>
    ... other page content
    
    </body>
    

    Like that. Now, the page will load, then five seconds later the Flash file will play. The five seconds is that second parameter to setTimeout() that you see up there, expressed in milliseconds (1 sec. = 1000 millisec.). Change that value to however many seconds delay you want, times 1000.

    Enjoy... ;-)

    cheers,
    scott
    Plural's don't have apostrophe's. It seem's sometime's that any word's ending in "s" get a gratuitous apostrophe. Apostrophe's are used to indicate possessive's and elision's (contraction's or abbreviation's).
  • Sunday, November 01, 2009 1:13 AMGregCost Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Scott,  I understand what you are saying and all the images now load properly but the flash still does not start up... here is what I have implemented:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">

    <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <title>Software Page </title>
     <meta name="description" content="Software is a Global Provider of Enhanced Visual Access Internet software products..." />
     <meta name="keywords" content="Enhanced Visual Access,Visual Search,Internet Search,Visual" />

    <script type="text/javascript" src="scripts/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="scripts/swfobject.js"></script>
    <script type="text/javascript">
     function startSWF() {
      swfobject.embedSWF("EVAIntroFinalVersion.swf", "flashTarget", "600", "710", "9.0.0", "expressInstall.swf", {}, {wmode:"transparent"},{});
      }
    </script>

      <style type="text/css">
    removed...
    </style>

    </head>

    <body style="margin: 0px 0 0 0; border: thick #FF0000; background-color: #003366">
    <p>&nbsp;</p>

    <div style="border: 1px #C0C0C0 solid; position: absolute; left: 50%; margin-left: -400px; background:white; width:800px; height:1020px; top: 15px; visibility: visible;"> 
      
    <script type="text/javascript"><script type="text/javascript">
     $(document).ready(
      function timeoutInit() {
         setTimeout('startSWF()', 5000);
      }
     );
    </script>

      <div id="flashTarget" style="border: 1px #000000 solid; position: absolute; width: 600px; height: 710px; z-index: 10; left: 150px; top: 180px; visibility: visible; ">
      <span class="style37">
      </span>
     </div>

  • Sunday, November 01, 2009 1:27 AMpaladyn Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Two things I can think of. One, you will note that I renamed your Flash file using intercaps, no spaces, hyphens, etc. Did you? If not, swfobject can't find the file. Also, the example presumed that the Flash file was in the same folder with the page. Is yours?

    I've got to run up to the club now for a couple of hours. Check the things I suggested and let me know what happens. I'll be back later and check in.

    [EDIT: Aw, hel. I just got back and was looking over your markup again. It still looked OK, except for the two items I mentioned above. Scanning it again, it finally hit me. (Sometimes I need a sledgehammer to make the obvious explicit.) You must have both the jQuery library and swfobject.js in your scripts folder to make this markup work.

    This is not a problem; you can use the Google CDN to provide both. For the jQuery library, you can either download it or use the following line in place of the call to it above:

    <script type="text/javascript" src=http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js></script>

    For swfobject.js, you either download it or you can use the following line:

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>

    Replace the two lines calling local copies of those two libraries, double check to make sure your spelling of the Flash file's name is the same that I used (recommended), or change the spelling I provided to match yours, either one. Then make sure everything is located in the right folders and you should be good to go.]


    cheers,
    scott
    Plural's don't have apostrophe's. It seem's sometime's that any word's ending in "s" get a gratuitous apostrophe. Apostrophe's are used to indicate possessive's and elision's (contraction's or abbreviation's).
  • Sunday, November 01, 2009 12:40 PMGregCost Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hi Scott ... Well I loaded the libs directly into the root dir on the server:  jquery.min.js & swfobject.js.  I just cut and pasted the .swf filename directly into the script for the root dir...  I don't know how to embed an image into this reply so I cannot show you that what is up on the server acurately reflects these comment

    Additionally it does not work on MS exprs 3 as well even though I can confirm the libs are there by following, clicking the hyperlink in the script/html page...

    I do have one question - What is "expressInstall.swf" is this something else that needs to be resolved>

    <head>
     
    <script type="text/javascript" src="/jquery.min.js"></script>
    <script type="text/javascript" src="/swfobject.js"></script>
    <script type="text/javascript">
     function startSWF() {
      swfobject.embedSWF("EVAIntroFinalVersion.swf", "flashTarget", "600", "710", "9.0.0", "expressInstall.swf", {}, {wmode:"transparent"},{});
      }
    </script>

    <body style="margin: 0px 0 0 0; border: thick #FF0000; background-color: #003366">
    <p>&nbsp;</p>

    <div style="border: 1px #C0C0C0 solid; position: absolute; left: 50%; margin-left: -400px; background:white; width:800px; height:1020px; top: 15px; visibility: visible;"> 
      
    <script type="text/javascript"><script type="text/javascript">
     $(document).ready(
      function timeoutInit() {
         setTimeout('startSWF()', 5000);
      }
     );
    </script>

      <div id="flashTarget" style="border: 1px #000000 solid; position: absolute; width: 600px; height: 710px; z-index: 10; left: 150px; top: 180px; visibility: visible; ">
      <span class="style37">
      </span>
     </div>



  • Sunday, November 01, 2009 4:03 PMpaladyn Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    "What is "expressInstall.swf" is this something else that needs to be resolved"

    No. It is a small (773 bytes—that's bytes, not kB or MB) file that offers to update your version of Flash Player if it does not meet the criterion established in the passed param (i.e. 9.0.0 in the example). It is not something that you provide explicitly. IIRC, it is either installed with your version of Flash Player (v. 8+) or is hosted by Adobe. It's purpose is to display this dialog if your player isn't up to snuff (see Figure 1). Instead of including the param as a reference to expressInstall.swf, you can simply pass "false" if you don't want to worry about checking the player version.

    Hmm, PowerDesk's File Finder just finished and  revealed that expressInstall.swf exists in only two places on my entire system: In my Dreamweaver CS4 Shared Flash folder and in my Techsmith Jing folder, neither of which are referenced by or known to the Web page referencing the file. Therefore, it may be safely surmised that it is something provided by Adobe from an online location when the player check is done.

    In any event, it should not be causing your failure. As I said, I do not have a copy anywhere near the test page I constructed, which works just fine.

    Wait a minute. I just re-read your post and noted this: "Additionally it does not work on MS exprs 3 as well... " Surely you're not talking about the preview pane, are you? Dynamic content DOES NOT WORK in the preview pane of any version of Expression Web. The design pane, SuperPreview, and the Snapshot are all STATIC VIEWS of your page, and no dynamic content will work there. You must use Preview In Browser to see any dynamic content execute, including Flash.

    [EDIT: Reviewing your markup, if what you provided in your previous message is representative of your actual markup, you've screwed it up, even for a normal page. You have opened the body tag without closing the head element. For reasons unknown, you have moved the timeout function from the head, where I had it, to the body. In other words, you are not implementing this the way it is described, which has been tested as written and  is known to work if properly implemented.

    Do this. Forget about your page. Just create a new, empty page with one single div in it, with id="flashTarget." No styling, no positioning, no spans and no other divs, nada, zilch, just the one, unstyled div in the body. In the head, put the scripts and script calls I showed in my original example of this. That's in the head section, now, not the body, got it? You say the spelling of the swf file is accurate, fine; also ensure that it is in the same folder as the referencing page if you use the markup given.

    Now, save the page and click the Preview In Browser icon. What happens?]

    cheers,
    scott

    Plural's don't have apostrophe's. It seem's sometime's that any word's ending in "s" get a gratuitous apostrophe. Apostrophe's are used to indicate possessive's and elision's (contraction's or abbreviation's).
  • Sunday, November 01, 2009 5:01 PMGregCost Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    No not in the preview pane... MS expression allows you to launch IE locally against the MS expression website itself, those js libs do resolve.

    I did not include all of the code because the page has quite a bit to it... I only included the code pertaining to the areas you suggested to change so really all tags and tag clousres are accounted for.

    Ok I'll try it bare bones and let you know what happens!  thanks for the help.

  • Sunday, November 01, 2009 5:06 PMpaladyn Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     AnswerHas Code

    Here is the exact source code I used in my test page, which works precisely as expected when tested in a browser. Copy it into a new, blank page, substitute the name and parameters of your Flash for mine, check the paths, and run it.

    When testing a solution it is important to minimize distractions and get down to least cases. Worry about integrating into your page when you've got it working, and not until.

    cheers,
    scott

    =====================

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    
    <head>
    <meta content="text/html; charset=windows-1252" http-equiv="Content-Type" />
    <title>Untitled 1</title>
    <script type="text/javascript" src="scripts/swfobject.js"></script>
    <script type="text/javascript">
     function startSWF() {
      swfobject.embedSWF("JergensFlashTrans.swf", "headerFlash", "450", "160", "9.0.0", "expressInstall.swf", {}, {wmode:"transparent"},{});
      }
    </script>
    <script type="text/javascript" src="scripts/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="scripts/jquery.innerfade.js"></script>
    
    <script type="text/javascript">
     $(document).ready(
      function timeout_init() {
         setTimeout('startSWF()', 5000);
      }
     );
    </script>
    
    </head>
    
    <body>
    
    <div id="headerFlash">
    </div>
    
    </body>
    
    </html>
    
    
    

     


    Plural's don't have apostrophe's. It seem's sometime's that any word's ending in "s" get a gratuitous apostrophe. Apostrophe's are used to indicate possessive's and elision's (contraction's or abbreviation's).

     

    • Marked As Answer byGregCost Wednesday, November 04, 2009 11:43 PM
    •  
  • Sunday, November 01, 2009 5:53 PMGregCost Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    The Code bare bones:  thefile copied from the directroy by using the rename to highlight and then just a cut and paste into the embedSWF EVAIntroFinalVersion.swf.

    Is there anything I am doing wrong?

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">

    <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <title>These are libaray pointers for t</title>


    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
    <script type="text/javascript">
     function startSWF() {
      swfobject.embedSWF("EVAIntroFinalVersion.swf", "flashTarget", "600", "710", "9.0.0", "expressInstall.swf", {}, {wmode:"transparent"},{});
      }
    </script>

    <script type="text/javascript"><script type="text/javascript">
     $(document).ready(
      function timeoutInit() {
         setTimeout('startSWF()', 5000);
      }
     );
    </script>


    </head>

    <body>

    <div id="flashTarget" style="position: absolute; width: 600px; height: 710px; z-index: 1; left: 131px; top: 93px">
    </div>

    </body>

    </html>

  • Sunday, November 01, 2009 6:09 PMSteve EastonMVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Has Code
    Grab a copy of the free IrfanView, www.irfanview.com and its addins
    and install them.

    Then open irfanview and drag the flash file into it and see if it even works.
    IrfanView with the addins will play a bare flash .swf file.

    Additionally, if you want the flash to load last, fire the function that loads it using window.onload
    just before the closing body tag.
    Here is a sample of how to do it. note that the function is contained in the head section
    but the onload event fires it:
    <html>
    
    <head>
    <title>test</title>
    <script type="text/javascript">
    function trigger(){
    alert("hello");
    }
    
    </script>
    </head>
    
    <body>
    
    <script type="text/javascript">
    window.onload=trigger();
    </script>
    
    </body>
    
    </html>
    






    Expression Web MVP
  • Monday, November 02, 2009 12:22 PMGregCost Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Scott, I saw some differences in position of the scripts and for whatever reason when I placed them correctly it worked…  But the flash video in both your sample version and my “now working version” ignore the div placement and the flash video’s location resolves to position x=1, y=1 on the webpage?  I would assume it should be placed inside the div and wherever that div is located.  I have tried a couple of things but with no luck.

     

    Here is your version using the googleapis with a physical location for the div which is ignored…

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">

     

    <head>

    <meta content="text/html; charset=windows-1252" http-equiv="Content-Type" />

    <title>Untitled 1</title>

     

    <script type="text/javascript" src="scripts/swfobject.js"></script>

    <script type="text/javascript">

     function startSWF() {

      swfobject.embedSWF("EVAIntroFinalVersion.swf", "headerFlash", "600", "710", "9.0.0", "expressInstall.swf", {}, {wmode:"transparent"},{});

      }

    </script>

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>

    <script type="text/javascript">

     $(document).ready(

      function timeout_init() {

         setTimeout('startSWF()', 5000);

      }

     );

    </script>

    </head>

    <body>

     

    <div id="headerFlash"  style="border: 1px #000000 solid; position: absolute; width: 600px; height: 710px; z-index: 10; left: 150px; top: 180px; visibility: visible; ">

                            <span class="style37">

                            </span>

    </div>

    </body>

    </html>

     

  • Monday, November 02, 2009 6:13 PMpaladyn Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Has Code
    Hmm, OK, then, at least the basic functionality is working now. I gather from the above that the video is playing, and is doing so after the assigned delay. The issue now comes down to positioning.

    If you recall from an earlier message I said to forget about anything except getting the Flash to play after delay. Here's the quote: "When testing a solution it is important to minimize distractions and get down to least cases. Worry about integrating into your page when you've got it working, and not until." 

    Yet from the sample code above it is clear that you disregarded that. This is not least case:
    <div id="headerFlash"  style="border: 1px #000000 solid; position: absolute; width: 600px; height: 710px; z-index: 10; left: 150px; top: 180px; visibility: visible; ">
    
                            <span class="style37">
    
                            </span>
    
    </div>
    
    
    This is what was in my example:
    <div id="headerFlash">
    </div>
    
    
    And that is least case. Understand? I have no idea what style37 is, nor what that span is doing in that div. You are using absolute positioning, which is fraught with danger for the uninitiated who do not know of the consequences of using it. I have quite literally not used absolute positioning for almost a decade, and rarely use the CSS position attribute, any version, at all. It is not necessary, and usually leads to side effects that create cross-browser compatibility issues and sometimes accessibility issues.

    OK, here's the version you posted above, which is working but "not positioning correctly." (NOTE: You also had a reference to a local version of swfobject.js preceding the CDN-hosted versions.)  I have altered it to use CSS methods not requiring the position attribute for positioning. DO NOT ALTER IT! Paste it into a blank document and test it exactly as is.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    
    <head>
    
    <meta content="text/html; charset=windows-1252" http-equiv="Content-Type" />
    
    <title>Here is your version using the g</title>
    
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
     
    <script type="text/javascript">
     function startSWF() {
    	swfobject.embedSWF("EVAIntroFinalVersion.swf", "headerFlash", "600", "710", "9.0.0", "expressInstall.swf", {}, {wmode:"transparent"},{});
      }
    </script>
    
    <script type="text/javascript">
     $(document).ready(
      function timeout_init() {
         setTimeout('startSWF()', 5000);
      }
     );
    </script>
    <style type="text/css">
    #headerFlash {
    	width:600px;
    	height:710px;
    	margin-left:150px;
    	margin-top:180px;
    	border:1px solid black;
    }
    </style>
    </head>
    
    <body>
    
    <div id="headerFlash">
    </div>
    
    </body>
    
    </html>
    
    
    Note that since I don't have a copy of your Flash file here I could not test with it, but did test with a slightly smaller swf I have locally, and it positioned correctly and in accordance with the CSS specified in the style section. Test this exactly as given and see how it positions on your system.

    cheers,
    scott


    --------------------------------------------------------------------------------
    Plural's don't have apostrophe's. It seem's sometime's that any word's ending in "s" get a gratuitous apostrophe. Apostrophe's are used to indicate possessive's and elision's (contraction's or abbreviation's).
  • Tuesday, November 03, 2009 1:41 AMGregCost Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Scott in your example above which I did test the div that you define defaults to x=1, y=1  <div id="headerFlash">  you do not specify a location so I tried to implement a location... 
  • Tuesday, November 03, 2009 3:07 AMpaladyn Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Has Code
    Scott in your example above which I did test the div that you define defaults to x=1, y=1  <div id="headerFlash">  you do not specify a location so I tried to implement a location... 
    ???
    I did specify a location. Look at the CSS in my last post. See this?

    <style type="text/css">
    #headerFlash {
    	width:600px;
    	height:710px;
    	margin-left:150px;
    	margin-top:180px;
    	border:1px solid black;
    }
    </style>

    That CSS styles the #headerFlash div to have a top margin of 180 pixels and a left margin of 150 pixels, placing it exactly where your absolute position attribute would have placed it.

    Greg, you really need to learn something about HTML and CSS. From the foregoing, it's fairly clear that you are way over your head, because positioning using margins, floats , and padding is pretty basic, and is really the only way to do it in a standards compliant, cross-browser compatible, and accessible fashion. That you didn't realize that a position had been specified indicates that you have a good deal yet to learn.

    You're not going to be able to do it in dribs and drabs, one question at a time, the way this has been going. Frankly, most others would have lost patience and given up by now, but I wanted to try to see to the resolution of your original issue. And, in point of fact, the original question has been answered. When I test that markup, and measure using Iconico's Screen calipers, the border specified for that div appears precisely 180px from the top and 150px from the left. 

    Read the BEFORE POSTING thread, down at the bottom, to find a ton of learning resources. Your question is answered, and the Flash plays after an interval as desired. Providing a course in HTML and CSS is outside the scope of what can be done in a forum format, and you need to avail yourself of some of the many learning resources to acquire an understanding of how to use compliant CSS and HTML for positioning.

    cheers,
    scott

    Plural's don't have apostrophe's. It seem's sometime's that any word's ending in "s" get a gratuitous apostrophe. Apostrophe's are used to indicate possessive's and elision's (contraction's or abbreviation's).
  • Wednesday, November 04, 2009 11:37 AMGregCost Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Scott,  yes you are correct I am not an html/css programmer.  I work with and I am a network engineer with a programming background in C, C++,  VB and IBM BAL.  My boss made me the candiate for this quick fix... which wasn't so quick, and if it wasn't for help like this I would have been really stuck!  My previous comments were refering not to your last post but at the time I was working with your original exmple of Nov 1 which did not have the positioning statement...  Using your example from the 2nd worked fine and I greatly appreciate it!

    One last question:  how do I add params to turn off the looping of the flash video? 

    Scott,  you have helped me by being patient and walking me through this example,  I now have a good understanding for this particular type of thing so that if I do get called again (which I do not think my boss will do that) to dive into html code I at least understand some of the basics.

    Thanks Greg
  • Wednesday, November 04, 2009 5:14 PMpaladyn Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hmm, doing it within the page itself may be problematic. Checking the Deconcept pages documenting the original swfobject does not show the loop parameter as one of those supported by swfobject. OTOH, checking the swfobject2.1 docs at the repository says that swfobject2.1 does support the optional loop param, although it doesn't illustrate exactly where it goes in the param list or how it is worded ("loop=false", "loop=0", "loop: false", etc.?). And, of course, since we're working with the Google-hosted version, we're not even sure which we're working with.

    One thing that will work for sure, if you have access to the .fla source file for the swf (or to the developer ;-), is to add a stop() action in the last frame of the animation. As for the parameter option, I've tried several ramifications such as ... {wmode:"transparent"},{loop:"false"},{}); and {wmode:"transparent", loop:"false"},{});, etc., without success using the version of swfobject I used in my local test case.

    Nor have any of my searches on the subject turned up anything definitive other than using Actionscript to add a stop() action, as mentioned above. If you have, or can get, the .fla source, I can add the necessary Actionscript for you. I'll do some more research, because I know that swfoject2 has a different calling format. Maybe I can grok how to get loop recognized with a little more research.

    BTW, for the benefit of those who use the forum search feature, you might Mark As Answer those posts which you feel most helped answer your question. That will highlight them in green and make it easier for subsequent users to find them in the thread.

    cheers,
    scott


    Plural's don't have apostrophe's. It seem's sometime's that any word's ending in "s" get a gratuitous apostrophe. Apostrophe's are used to indicate possessive's and elision's (contraction's or abbreviation's).
  • Wednesday, November 04, 2009 10:05 PMpaladyn Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Greg, I have tried every expedient I could find while researching, with versions of swfobject from 1.5 to 2.2, and I have found no way to keep a swf file created with looping enabled from looping on playback. I've tried setting loop:'false' as a flashvar, a param, and an attribute, and nothing seems to be able to keep the thing from looping.

    As I said, if you have access to the original .fla file, or if you want to invest in a swf decompiler, I can add the necessary stop() to the Actionscript, but failing that, I'm afraid you're out of luck, unless someone else knows a method I couldn't find. Good luck.

    cheers,
    scott
    Plural's don't have apostrophe's. It seem's sometime's that any word's ending in "s" get a gratuitous apostrophe. Apostrophe's are used to indicate possessive's and elision's (contraction's or abbreviation's).
  • Wednesday, November 04, 2009 11:45 PMGregCost Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Thanks Scott for all the help!!! 

    I will hand this back to my boss now and go back to managing the network... Thank God!

    Take care,  Greg