dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Write XML without Button

  1. #1
    I know nothing.
    Join Date
    Feb 2008
    Posts
    315

    Write XML without Button

    I have a peice of code the writes xml when a button is clicked, however I'm now in need of the xml to be written without the use of a button (onRelease). I've tried a few different options, with no success. Any ideas?

    PHP Code:
    root.target1._lockroot=true;

    btn_send.onRelease = function(){ 
    writeXML(); 
    };
    function 
    writeXML(){
    sv = new LoadVars();
    sv.text01 target1.text01.text;

    trace(sv);
    sv.sendAndLoad("write.php",sv,"POST");

    sv.onLoad = function(){
    trace("var1="+this.var1); 

    };
    }; 
    Last edited by intromo; 01-07-2009 at 09:36 PM.

  2. #2
    I know nothing.
    Join Date
    Feb 2008
    Posts
    315
    Ok. I'm stupid. Fixed the issue by just removing the button onload and pushing the writeXML back in my timeline.

    PHP Code:
    root.target1._lockroot=true


    writeXML(); 
    }; 
    function 
    writeXML(){ 
    sv = new LoadVars(); 
    sv.text01 target1.text01.text

    trace(sv); 
    sv.sendAndLoad("write.php",sv,"POST"); 

    sv.onLoad = function(){ 
    trace("var1="+this.var1); 

    }; 
    }; 

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