Going crazy with flashVars, someone please help

Hi All,

I do my best to search a forum through and through before I post a question and I think I’ve literally read every post on FlashVars and I’m still not getting any luck. I’m using swfObject2 and I’m not getting anything, just a big headache, can someone pleeease help me.

swfobject2 code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
        <title>flashVar test</title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <script type="text/javascript" src="swfobject.js"></script>
        <script type="text/javascript">
        var flashVars = {myXML: "testXML.xml"};
        swfobject.registerObject("myId", "9.0.0", "expressInstall.swf", flashVars, params, attributes);
            <object id="myId" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="550" height="400">
                <param name="movie" value="so_test.swf" />
                <!--[if !IE]>-->
                <object type="application/x-shockwave-flash" data="so_test.swf" width="550" height="400">
                    <h1>Alternative content</h1>
                    <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
                <!--[if !IE]>-->

I’ve tried a number of different ways in my AS3 code, but everyone seems to be having good luck with:

var value1:String = root.loaderInfo.parameters.myXML
test_txt.text = value1;

When I trace “value1” I get null, which makes sense because the variable is coming from the html file, but when I add

test_txt.text = value1;

I get an error

TypeError: Error #2007: Parameter text must be non-null.
    at flash.text::TextField/set text()
    at so_test_fla::MainTimeline/frame1()

Everyone else seems to get it right but I’m still having issues (story of my life) someone please help.