LoadVars and sendAndLoad

Hi all,

I am looking for some help please.

I have been working with the code below to transfer variables from one asp page to another via Flash.

gatherData = function ()
    myData = new LoadVars();
    myData.fromFlash = sfid;
    input_txt.html = true;
    input_txt.htmlText = myData.fromFlash;
    myData.toFlash = this.toFlash;
    myData.onLoad = function ()
        display_txt.html = true;
        display_txt.htmlText = myData.toFlash;
    myData.sendAndLoad("sample.asp", myData, "POST");

It works just fine in a test swf.

I am wanting to run this function at the start of an existing fla to check for variables before playing the rest - but it just will not work.

Do I simply copy and paste the entire function to the top of the Actionscript?

Here is the first part of the AS of the existing FLA…

import mx.transitions.Tween;
import mx.transitions.easing.*;
var thisWidth:Number;
var thisHeight:Number;
var maximumHeight:Number;
var maximumWidth:Number;
var oldx:Number;
var oldy:Number;
var ratio:Number;
var toggle_flag:Boolean = false;
var mclis:Object = new Object();
mclis.onLoadInit = function(target_mc:MovieClip) {
thisWidth = target_mc._width;
maximumWidth = 180;
thisHeight = target_mc._height;
maximumHeight = 179;

I thought I read somewhere that there is something different about Loadvars with mx.transitions - but I may be horrible mistaken.

Any help would be appreciated - I am rather lost…