0 Replies Latest reply on Sep 16, 2008 12:10 PM by

    Flashvars in AS2

      So I am really not getting how to use flashvars at all. I know it must be really simple, but I am just not making the connection, so I would really appreciate anybody's help.

      This is the html for my flash movie:

      <html xmlns=" http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
      <title>cameras</title>
      <script language="javascript">AC_FL_RunContent = 0;</script>
      <script src="AC_RunActiveContent.js" language="javascript"></script>
      </head>
      <body bgcolor="#ffffff">
      <!--url's used in the movie-->
      <!--text used in the movie-->
      <!-- saved from url=(0013)about:internet -->
      <script language="javascript">
      if (AC_FL_RunContent == 0) {
      alert("This page requires AC_RunActiveContent.js.");
      } else {
      AC_FL_RunContent(
      'codebase', ' http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
      'width', '800',
      'height', '100',
      'src', 'cameras',
      'quality', 'high',
      'pluginspage', ' http://www.macromedia.com/go/getflashplayer',
      'align', 'middle',
      'play', 'true',
      'loop', 'true',
      'scale', 'showall',
      'wmode', 'window',
      'devicefont', 'false',
      'id', 'cameras',
      'bgcolor', '#ffffff',
      'name', 'cameras',
      'menu', 'true',
      'allowFullScreen', 'false',
      'allowScriptAccess','sameDomain',
      'movie', 'cameras',
      'salign', ''
      ); //end AC code
      }
      </script>
      <noscript>
      <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=" http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="800" height="100" id="cameras" align="middle">
      <param name="allowScriptAccess" value="sameDomain" />
      <param name="allowFullScreen" value="false" />
      <param name="movie" value="cameras.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /> <embed src="cameras.swf" quality="high" bgcolor="#ffffff" width="800" height="100" name="cameras" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage=" http://www.macromedia.com/go/getflashplayer" />
      </object>
      </noscript>
      </body>
      </html>

      Here are the variables I want to change:

      vau_nbslots = "Number of products in the banner"

      Then for each product, you will have (starting at index 0, and with 6 products in this case: 0 to 5):

      vau_tooltip_0 = "Description of the Product - will be shown when mouse over"
      vau_picture_0 = "http link to the image url"
      vau_overlay_0 = "http link to the overlay image url (like a Free Shipping ribbon for instance) - if empty show nothing"
      vau_clicklink_0 = "http link of the new page to open when the user clicks on the product"
      .........
      ..........
      vau_tooltip_5 = "Description of the Product - will be shown when mouse over"
      vau_picture_5 = "http link to the image url"
      vau_overlay_5 = "http link to the overlay image url (like a Free Shipping ribbon for instance) - if empty show nothing"
      vau_clicklink_5 = "http link of the new page to open when the user clicks on the product"

      And here is the code (I think):

      for (slotIndex = 0; slotIndex < parseInt(this["vau_nbslots"]); slotIndex++)
      {
      pictureUrl = this["vau_picture_" + slotIndex];
      tooltipText = this["vau_tooltip_" + slotIndex];
      overlayUrl = this["vau_overlay_" + slotIndex];
      clickLink = this["vau_clicklink_" + slotIndex];

      I suppose my real question is where all this goes and if I have it right?