Transferring Parameters from HTML to Flash (Exclusive Tutorial)
Until recently the most well-known and widely-used method for transferring variables of a Flash movie from HTML-view, was the addition of the segments to the URL of .swf-document, as shown below:

<OBJECT ...
<PARAM NAME=movie VALUE="flash.swf ?var1=value1&var2=value2&...&varN=valueN ">
...
<EMBED src="flash.swf ?var1=value1&var2=value2&...&varN=valueN "
...
</EMBED></OBJECT> (using files test.fla, test.html with this method)

Essentially, this is nothing other than the GET method, so it does not allow "hooking on" more than 256 symbols to the address line, and in other words the transference in a clip of a large quantity of variables or their long line values. But this is not its main disadvantage, since in most cases of these parameters, the length of the query is absolutely sufficient. The basic disadvantage of this method is that when changing the lines of parameters, a Flash clip once again downloads from the server to the client's computer and if its size is sufficiently big, then during every change to a new HTML-page, it is necessary to wait for the page to reload losing all meaning of using this method.

In Flash-Player's 6 th version, a new parameter, called FlashVars, has appeared, which facilitates sending Flash-clip variables from their HTML-view. The method of using it is shown below:

<OBJECT ...
<PARAM NAME=movie VALUE="flash.swf">
<PARAM NAME= FlashVars VALUE="var1=value1&var2=value2&...&varN=valueN">
...
<EMBED src="flash.swf"
FlashVars ="var1=value1&var2=value2&...&varN=valueN"
...
</EMBED></OBJECT> (using files test2.fla, test2.html adapted with this method)

Variables are given in the root ( _root ) foundation of a Flash-clip ( _level0 ).

Advantages: This method of sending variables of a Flash clip converted to HTML-view removes the limitations and disadvantages of the GET method.

Close    To Top
  • Prev Article-Flash:
  • Next Article-Flash:
  • Now: Tutorial for Web and Software Design > Flash > Flash Articles > Flash Content
    Photoshop Tutorial
     

    Special Effect

      3D Effect
      Photoshop Articles
    Programming Tutorial
     

    C/C++ Tutorial

      Visual Basic
      C# Tutorial
    Database Tutorial
     

    MySQL Tutorial

      MS SQL Tutorial
      Oracle Tutorial
    Geek Tutorial
     

    Blogging Tutorial

      RSS Tutorial
      Podcasting Tutorial
    Graphic Design Tutorial
      Coreldraw Tutorial
      Illustrator Tutorial
      3D Tutorials
    Webmaster Articles
     

    Domain Service

      Web Hosting
      Site Promotion
    Java Tutorial/ Articles
     

    Java Servlets

      JavaEE Tutorial
     

    JavaBeans Tutorial

    XML Tutorial/ Articles
     

    XML Style

      AJAX Tutorial
      XML Mobile
    Flash Tutorial/ Articles
     

    Flash Video

      Action Script
      Flash Articles
    OS Tutorial/ Articles
      Linux Tutorial
      Symbian Tutorial
      MacOS Tutorial
    Personal Tech
      Hardware Tutorial
      Software Tutorial
      Online Auction