A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: THIS ISN'T WORKING .... HELPPP

  1. #1
    Junior Member
    Join Date
    Jul 2000
    Posts
    15

    transfering variables --- HELPPPP

    <SCRIPT language=javascript>

    var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
    var theMovie = InternetExplorer ? window.ourMovie : window.document.ourMovie;

    WM_setCookie('cookie', 'true');
    var beenhere = WM_readCookie('cookie');

    if (beenhere == "true") {
    theMovie.SetVariable("switch", "true");
    }

    </script>

    <BODY bgcolor="#FFFFFF">
    <OBJECT classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"
    codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0" ID=ourMovie WIDTH=100% HEIGHT=100%>
    <PARAM NAME=Movie VALUE="intro.swf">
    <PARAM NAME=quality VALUE=high>
    <PARAM NAME=bgcolor VALUE=#FFFFFF>
    <EMBED NAME="ourMovie" src="intro.swf" quality=high bgcolor=#FFFFFF WIDTH=100% HEIGHT =100% TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>
    </OBJECT>

    ----------------------------

    This is giving me an error ... "'theMovie' is not an object"
    This is also giving me a headache but I cant figure it out ... its probably something simple ....

    Thanx

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Posts
    263
    Not that I know what I am talking about, but
    I'm going to guess!

    After looking at a few HTML pages with Flash content.
    None of them had anything between
    <EMBED NAME= and src="intro.swf"

    This is your statement:
    <EMBED NAME="ourMovie" src="intro.swf"

    and I think, it should look like:
    <EMBED src="intro.swf"

    Let me know if it is a good or bad guess!!!
    MA

  3. #3
    Senior Member
    Join Date
    Mar 2000
    Posts
    177
    Magister, good guess, but the Embed NAME tag needs to be added so Netscape can control the SWF object with JS.

    lebplaya,
    I've seen browser-specific code like yours around, but never got it to work for me. I found something simpler on the mothership:
    http://www.macromedia.com/support/fl..._variables.htm
    (scroll to the bottom)

    This code works in both browsers. The crux is:
    function sendVar() {
    window.document.themovie.SetVariable("varname", "value");
    }


    Make sure you put swLiveConnect=true in the EMBED tag. For an example, see:
    http://rpenner.webhostme.com/flashki...avascript.html

  4. #4
    Junior Member
    Join Date
    Jul 2000
    Posts
    17
    I posted a reply in the Scripting section of the board. Check it out at:

    http://www.flashkit.com/board/showth...threadid=15153

    Hopefully this will help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center