A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: using flashvars to import var to flash cs3

  1. #1
    Member
    Join Date
    Dec 2003
    Posts
    32

    using flashvars to import var to flash cs3

    Hi everybody,

    I would like to import a variable called "actief" from HTML into flash
    using flashvars:

    this AS code is on the 1st frame of my movie:
    --------
    var actief:String;

    function Main()
    {
    getHTMLvars();
    }

    function getHTMLvars():void
    {
    var value:String;
    var obj:Object=LoaderInfo
    (root.loaderInfo).parameters;

    for (value in obj)
    {
    actief=String(obj[value]);
    try_txt.text=actief;
    }
    ------
    In the embed tag for the SWF I use:

    <script type="text/javascript">
    var flashvars = { actief: "0"};
    var params = {wmode: "transparent"};
    var attributes = {};
    swfobject.embedSWF("plugins/menu.swf", "myContent", "328", "705", "9.0.0", "plugins/expressInstall.swf",flashvars, params, attributes);
    </script>

    ------

    When I test this nothing happens

    If anyone knows what I am doing wrong, please reply to this thread,
    I could really use your help.

    Kind regards,
    Fennek

  2. #2
    Will moderate for beer
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    6,801
    Are you actually calling Main?

  3. #3
    Member
    Join Date
    Dec 2003
    Posts
    32

    Thumbs up thanks for your reply

    duh, that's probably it , thanks for the tip

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