LoadVariablesNum

Hi,
I have seen numerous forums on this topic but have a
different problem,
A Background
I have a SWF that has
more info buttons that calls-up a new window with
pre-entered text. As we wish to have more
than one button we would like to use external text files so
that we can have many different buttons but one popup window
in our SWF.
B Text file
File name
mytext.txt
Text file content
my_text=I want to see this text in my popup
text, second line
text, third line
&fName=peter&
&lName=pumkin eater&
&age=44-1&
&done=yes&
Action code
// attach the variables to level 0
loadVariablesNum("mytext.txt", 0);
// use a loop to preload the variables
this.onEnterFrame = function() {
if (_level0.done == "yes") {
// the variables have finished loading
trace(_level0.fName); //outputs nuno
trace(_level0.lName); //outputs mira
trace(_level0.age); //outputs 24
// delete the method to end the loop
delete this.onEnterFrame;
Problem
1. The trace values come-up so we know that the text file
works,
2. The text box has the correct my_text var,
3. There is NO text in my new window
Please help, any ideas will be most welcome.
Thanks and regards

One thing is: have you embedded the font in the dynamic
textField instance?
Second you may want to consider using the LoadVars class as
opposed to loadVariablesNum, which will provide you with more
control over the loading event, without having to use the
onEnterFrame function. you would write something like this as
follows:

Similar Messages

  • Loadvariablesnum not working on movie clip

    I have a movie clip called "popup" on my root timeline. In
    the popup movie clip, there is a dynamic text box with the variable
    set as "content". I have an external txt file called "file.txt". On
    my popup timeline, I have this code:
    loadVariablesNum ("file.txt",0);
    I have both my fla file and the txt file in the same folder.
    The txt file doesn't load. It loads if I put a dynamic text
    box on the root timeline and put the actionscript there too.
    What am I doing wrong? Thanks!

    what makes you think it doesn't load? if the text fails to
    appear in your textfield i would suspect you have a path issue
    because your variable (from the textfield) is loaded into _level0
    and your textfield variable is in _level0.popup.

  • LoadVariablesNum problem in different directory

    Hey everyone,
    This is a slightly strange one (to me at least) and i'd greatly appreciate any pointers.
    I have http://www.mydomain.com/index.php setup which includes/displays http://www.mydomain.com/site.swf
    When i visit http://www.mydomain.com/index.php the site/flash file displays correctly
    I also setup http://www.mydomain.com/subfolder/index.php which sets a couple of variables and then includes http://www.mydomain.com/index.php
    When i visit http://www.mydomain.com/subfolder/index.php the flash file loads and then stops at the point that loadVariablesNum usually runs (which prevents the swf file from continuing to load).
    I would be massively appreciative if anyone could point me towards what i should be looking into to fix this as i've tried numerous things and am very confused (and wondering if it's somethin completely unrelated that i'm missing as i can't see how this would have any effect on loadVariablesNum!)
    Thanks so much,
    Dave

    I can't be sure since I've not dealt with this twist of including a file from another folder, but it may be a case of failing to target whatever file the loadVariablesNum is trying to access.
    When you load an swf into a web page, that page defines the relative path for anything the swf loads.  So it may be a case where you need to place the data file in the same (relative) folder as the subfolder's index.php.  Even though the primary php file loads the swf, the subfolder page is the base of operations.

  • LoadVariablesNum on button to access cgi script mail form

    Greetings: I've used this method many times in the past to create an email form in a movie clip with a "send button" that accesses a perl, cgi script to email text input fields. It worked fine in past versions of Flash, but now I'm using Flash CS3 (v9.0, AS 2.0). I've tried 3 different cgi scripts I found online for this purpose and am sure the configurations for sendmail server & perl bins, etc are correct. All of the other "if" and "else" statements on the button work fine. But I can see a Safari (browser) error message saying POST was not used, but clearly it is. I'm trying to trouble shoot whether the problem is from the flash button or the cgi script.
    Has something changed in Flash CS3 from previous versions, where I'm certain it has worked before???
    Here is my button code:
    on (release) {
    //Make sure the user filled in all the required fields.
    if (name1 ne "" and name2 ne "" and subject ne "" and email ne "") {
    //Check to make sure the email address includes and @.
    i = "0";
    validmail = 0;
    while (Number(i)<=Number(length(email))) {
    if (substring(email, i, 1) eq "@") {
    validmail = 1;
    i = Number(i)+1;
    //If there's no @ in the email go to the error page.
    if (Number(validmail) == 0) {
    gotoAndStop("error");
    } else {
    //The line below assumes the script is in the same directory as the HTML page.
    loadVariablesNum("http://www.companyname.com/cgi-bin/FormMail.pl", 0, "POST");
    //Go to the confirmation frame.
    gotoAndStop("thankyou");
    } else {
    //if the user left required fields blank, show them an error message.
    gotoAndStop("error");
    Here is the error message I can access on Safari>window>activity:
    "The HTML form fails to specify the POST method, so it would not be correct for this script to take any action in response to your request.
    If you are attempting to configure this form to run with FormMail, you need to set the request method to POST in the opening form tag, like this: <form action="/cgi-bin/FormMail.pl" method="post">
    Why isn't the command from the button in the Flash swf file, being recognized by the html page?
    Thanks in advance for any help.
    Janis

    in version 6, case didn't count. after version 6, it counts.
    so, gotoandPlay(3), used to work but, not now.  you need to use gotoAndPlay(3).
    also, undefined numeric variables were assigned a default value of 0 with flash 6 and prior.  not now, they're undefined.  so, watch for code like
    while(var1<1){
    do something
    var1++;
    where var1 is never initialized.
    about policy files:  check the security class'es loadPolicyFile() method.

  • I need to append a random string to a loadVariablesNum file...

    i need a little help creating a random (2 digit?) string to
    append to this html call... if someone wouldn't mind helping me
    with this...
    url = "xxxxx";
    loadVariablesNum(url+"_main.html", 0);
    something like:
    string = "whatever()";
    url = "xxxxx";
    loadVariablesNum(url+"_main.html?"+string, 0);
    i'm guessing...?
    thanks much,
    GN

    will this work:
    end = "Math.floor(Math.random() * 10) + 1";
    loadVariablesNum(url+"_main.html?"+end, 0);
    ?

  • Proccess String from loadvariablesNum()

    my text:
    &q1=Question1.jpg
    &a1=Answer2.jpg
    &q10=Question10.jpg
    &a10=Answer10.jpg
    an variable is on a line
    so when i load them in to swf,
    loadvariableNum((Question.txt",0)
    for (i=0;i<=9;i++){
    Question_array
    =eval("q"+i+1)
    Answer_array=eval("a"+i+1)
    in my funtion, i use the 2 array to load images to stage
    var i:Number=0;
    var s:String=Question_array
    trace(s)//output is "Question1.jpg "
    trace(s.length)// out put is 14
    because there a visible char in the end of the string, it is
    "Enter", then now, i want to cut it
    how can i do this
    i've try many way, but it does not work

    Try this:
    void massiv_int(char *lv_ptr);
    void massiv_int_NextLine(char *lv_ptr);
    LVSTR_API void f_massiv(char hello[]) {
     //char lv_str[10];
     //char *lv_ptr;
     //lv_ptr = &lv_str[0];
     massiv_int(hello);
     //massiv_int(lv_ptr);
     //*hello = lv_str[1];
    void massiv_int(char *lv_ptr) {
     // make lv_local as long as needed (no extra characters)
     char lv_local[] = "abcdefg";
     // copy all characters in lv_local to lv_ptr
     strcpy(lv_ptr, lv_local);
     // add next line
     massiv_int_NextLine(lv_ptr + strlen(lv_ptr));
    void massiv_int_NextLine(char *lv_ptr){
     // make lv_local as long as needed (no extra characters, including LF)
     char lv_local[] = "\nqwerty";
     //  copy all characters in lv_local to lv_ptr
     strcpy(lv_ptr, lv_local);
     But make sure the external string buffer allocated by LV is long enough to hold all characters!!
    Best regards
    chris
    CL(A)Dly bending G-Force with LabVIEW
    famous last words: "oh my god, it is full of stars!"

  • How to get a value from php after some seconds?

    Hello,
    Does someone know how to do the following thing?
    I want to read a value from a php file with this method :
    request.method = URLRequestMethod.POST;
    But when you do this, the php file is excecuted and the
    variables will be read.
    But what if you have a check in your php and after a few
    seconds the php will send a value to flash.
    How do you retreive this value without executing the php file
    again? Or is it normal to execute this again?
    I really don't know.
    I remember in AS 2.0 you could do something with:
    onEnterFrame = function() {
    loadVariablesNum(mailform, 0);
    if(_root.action = "go") {
    gotoAndPlay(20);
    delete this.onEnterFrame;
    But in actionscript the are many eventhandlers, but i could
    not find something that will
    scan for the value ? Does anyone have an idea to do this in
    actionscript 3.0?

    You said:
    so when using the complete event listener, does it mean:
    a) It returns complete with loading the script of the php
    code from line 1 to
    50 (example) ..like loading an external text file.
    Actually that's not how the Flash Player works. Flash doesn't
    really know anything about your PHP code. What happens in a typical
    scenario is:
    1) Some user on some computer far away asks your server for a
    web page with your SWF page embedded. Your server sends the SWF
    file.
    2) The Flash Player starts executing on the user's computer.
    It loads the SWF file and starts executing the action script.
    3) The Flash Player on the user's computer comes to the AS
    code that loads a URL request. Over a new connection it sends a
    request to your server for a certain URL. It doesn't really care
    that it is PHP that will fulfill the request; as far as it is
    concerned, it's just asking for a URL.
    4) Your server receives the request, executes the program in
    PHP, and starts sending bytes to the Flash Player on the user's
    computer.
    5) Back in the Flash Player on the user's computer, if your
    actionscript code starts looking at the .data property of the
    URLLoader, it will see the response so far.
    6) Back on your server, eventually the PHP program finishes,
    sends the last of its data, and the web server closes the
    connection.
    7) The COMPLETE event fires on the URLLoader; if you have a
    listener defined, it executes.
    Hope this helps,
    Bob

  • Reading variables from a text file into a flash projector exe

    I am using Flash CS4 and my script is in ActionScript2.
    I am developing a flash projector file that runs when a user puts in a cd to guide them through the steps they need to install a program and then kicks off the installer.
    I use fscommand to run a utility that reads the users registry to determine the PCs regional settings and then writes this to a text file in the users %temp% directory.
    I then use the LoadVariablesNum command to read in the text file and get the variables.
    This was working fine when I had the text file stored in a different directory, but when I try and refer to the %temp% directory, I get an Error opening file message.
    Is there anyway to get flash to look in the %Temp% directory?
    Thanks in advance,
    Carol Lutz

    Code-tags sometimes cause wonders, I replaced # with *, as the code tags interprets # as comment, which looks odd:
    ******...*.........To your code: Did you test it step by step, to find out about what is read? You could either use a debugger (e.g., if you have an IDE) or system outs to get a clue. First thing to check would be, if the maze size is read correctly. Further, the following loops look odd:for(int i = 0; i < maze.length; i++) {
        for(int x = 0; x < maze.length; x++) {
            if (input.hasNextLine()) {
                String insert = input.nextLine();
                maze[x] = insert.charAt(x);
    }Shouldn't the nextLine test and assignment be in the outer loop? And assignment be to each maze's inner array? Like so:for(int i = 0; i < maze.length; i++) {
        if (input.hasNextLine()) {
            String insert = input.nextLine();
            for(int x = 0; x < insert.size(); x++) {
                maze[i][x] = insert.charAt(x);
    }Otherwise, only one character per line is read and storing a character actually should fail.

  • AS2 contact form and php - works fine but only sends half of the text in the comments field ???

    hi all - i have an AS2 contact form using php to send the info to my email address - it all works fine except this ..... rather than having an empty comments box in the flash movie i had added a whole bunch of feedback questions that the user can comment yes/no to in the comments box (my feedback questions were added into the input text box in cs3 so are there when the user opens the contact page .. i have set the maximum characters to 10000 so no worries that its that that is stopping it all coming through in the email ..... basically when i go to my form online and send it i get it through as an email but with only three quarters of the feedback text in it ...... i have tried a zillion ways a round this, tried other contact forms and php and always end up with the same problem ... any ideas any one ?
    this is the AS....
    stop();
    a =0;
    function validate () {
        if (from.length>=7) {
            if (from.indexOf("@")>0) {
                if ((from.indexOf("@")+2)<from.lastIndexOf(".")) {
                    if (from.lastIndexOf(".")<(from.length-2)) {
                        a = 1;
                        // email is fine
    function formcheck () {
        validate ();       
        trace(a);
        if (fname = "" or telno eq "" or comments eq "" or from eq "") {
            stop();
            error = "You have left blank fields, please fill in all fields, thank you";
        } else {
            emailcheck ();
    function emailcheck (){
        if (a != 1){
            stop();
            error = "Email address not valid";
            } else {
            loadVariablesNum("mail.php3", 0, "POST");
            gotoAndStop(2);
    ..........this is the php
    <?php
    $adminaddress = "[email protected]";
    $sitename = "Flash Site Form Mailer";
    mail("$adminaddress","Info Request",
    "A customer at $sitename has made the following enquiry\n
    First Name: $name
    Company Name: $company
    Telephone: $telno
    Email: $from\n
    The visitor commented:
    $comments
    Logged Info :
    Using: $HTTP_USER_AGENT
    Hostname: $ip
    IP address: $REMOTE_ADDR
    Date/Time:  $date","FROM:$adminaddress");
    ?>
    any help much appreciated

    i think you should not use $HTTP_USER_AGENT.
    and use loadvars instead of loadvariablesnum:
    stop();
    a =0;
    function validate () {
        if (from.length>=7) {
            if (from.indexOf("@")>0) {
                if ((from.indexOf("@")+2)<from.lastIndexOf(".")) {
                    if (from.lastIndexOf(".")<(from.length-2)) {
                        a = 1;
                        // email is fine
    function formcheck () {
        validate ();       
        trace(a);
        if (fname = "" or telno eq "" or comments eq "" or from eq "") {
            stop();
            error = "You have left blank fields, please fill in all fields, thank you";
        } else {
            emailcheck ();
    var sendLV:LoadVars=new LoadVars();
    function emailcheck (){
        if (a != 1){
            stop();
            error = "Email address not valid";
            } else {
    sendLV.name=fname;
    sendLV.telno=telno;
    sendLV.company=company;  //assuming company is a variable in your flash
    sendLV.comments=comments;
    sendLV.send("mail.php3", "POST");
            gotoAndStop(2);
    //..........this is the php
    <?php
    $adminaddress = "[email protected]";
    $sitename = "Flash Site Form Mailer";
    $from=?;//you need to define this variable
    $name=$_POST['name'];
    $telno=$_POST['telno'];
    $company=$_POST['company'];
    $comments=$_POST['comments'];
    $body=
    "A customer at $sitename has made the following enquiry\n
    First Name: $name
    Company Name: $company
    Telephone: $telno
    Email: $from\n
    The visitor commented:
    $comments";
    mail($adminaddress,"Info Request",$body);
    ?>

  • RE : Having troubles with a form

    Hi Guys,
    Its been a while since i posted here. The company I work for has a website designed by the former guy from marketing. So all upadtes and fix ups ar eup to me to fix. As I have said before, my skills in php/html/flash are a little above basic. I can understand coding and can work my way around a website.
    With that said, There is a form on the website to register as a VIP for our company. Now, It works fine, it sends to my email and all, so I assume the php code is ok. The problem is this, all the info that is typed in a input box shows up in the email, but all the info thats under a check box and radio button do not work. It shows up in the email as [object Object].
    Here is the email that sends out after clicking submit:
    Name: TEST21
    Telephone: 2890
    Email: [email protected]
    Address: 222
    Birthday (year month day): 1985 12 12
    Company: july 21 12 50pm
    Title: TEST
    No of kids: undefined
    Gender (True = Male): false
    Reward Selection: [object Object]
    Newsletter(True = yes): false
    Existing Cardholder: [object Object]
    Marital Status: [object Object]
    Interest:
    Age: [object Object]
    As you can see most of it sends through except for the radio buttons. I managed to fix (kind of) the GENDER and NEWSLETTER to send as true or false. But this won't do. I tried clicking both Male and Female for gender and it both shows up as false. I feel I'm so close to the answer, I managed to code something that the Gender sends as M or F. But I wasnt able to save the file. So I'm back to ground zero. Need help please.
    I can paste the code here from the submit button on the form and the PHP code for anyones reference. THANKS IN ADVANCE.
    on(release){
        allownewsleter=allownewsletter_yes.value
        gender=gender_male.value
        //db_year="2006;"
        //db_month="08";
        //db_day="30";
    _root.firstname=firstname;
    //_root.lastname=lastname;
    _root.phone=phone;
    _root.address=address;
    _root.email=email;
    _root.db_year=db_year;
    _root.db_month=db_month;
    _root.db_day=db_day;
    _root.company=companynames;
    _root.title=title;
    _root.kid_no=kid_no;   
    _root.gender=gender;
    _root.reward=reward;
    _root.allownewsleter=allownewsleter;
    _root.cardholder=cardholder;
    _root.marital=marital;
    _root.interest=interest;
    _root.age=age;
    //trace ("gender_male.value++++++++++" + gender_male.value);
    //trace ("gender_female.value++++++++++" + gender_female.value);
    if (gender_male.selected) {
    trace("gender is set to male");
      gender_male.value = "M";
    } else {
    trace("gender is set to female");
      gender_female.value = "F"; 
    if (reward_1.value==true)
      _root.reward="1"
    else if (reward_2.value==true)
    _root.reward="2"
    else
    _root.reward=""
    if (allownewsletter_yes.value==true)
    _root.allownewsleter="1"
    else if (allownewsletter_no.value==true)
    _root.allownewsleter="2"
    else
    _root.allownewsleter=""
    if (cardholder_yes.value==true)
      _root.cardholder="1"
    else if (cardholder_no.value==true)
    _root.cardholder="0"
    else
    _root.cardholder=""
    if ((marital_yes.value==false) and (marital_no.value==false))
    _root.marital=""
    else
    _root.marital=marital_yes.value
    if (marital_yes.value==true)
      _root.marital="M"
    else if (marital_no.value==true)
    _root.marital="S"
    else
    _root.marital=""
    if (interest_1.value==true)
      _root.interest_1="1"
    else
      _root.interest_1="0"
    if (interest_2.value==true)
    _root.interest_2="1"
    else
      _root.interest_2="0"
    if (interest_3.value==true)
      _root.interest_3="1"
    else
      _root.interest_3="0"
    if (interest_4.value==true)
      _root.interest_4="1"
    else
      _root.interest_4="0"
    if (interest_5.value==true)
      _root.interest_5="1"
    else
      _root.interest_5="0"
    if (interest_6.value==true)
      if (other_interest==undefined)
        _root.interest_6="" 
      else
        _root.interest_6=other_interest
    else
      _root.interest_6="0"
    //trace ("interest_1.value='''''''''''''''''''''''''''" +interest_1.value)
    if (age_1.value==true)
      _root.age="1"
    else if (age_2.value==true)
    _root.age="2"
    else if (age_3.value==true)
    _root.age="3"
    else if (age_4.value==true)
    _root.age="4"
    else
    _root.age=""
         message_movie._visible=false;
        trace ("_root.firstname=" + firstname)
        trace ("_root.lastname=" + lastname)
        trace ("_root.gender12345=" + _root.gender)
        trace ("_root.phone=" + phone)
        trace ("_root.address=" + address)
        trace ("_root.email=" + email)
        trace ("_root.db_year=" + db_year)
        trace ("_root.db_month=" + db_month)
        trace ("_root.db_day=" + db_day)
        trace ("_root.company=" + companynames)
        trace ("_root.title=" + title)
        trace ("_root.phone=" + phone)
        trace ("_root.kid_no=" + kid_no)
        trace ("_root.allownewsleter=" + _root.allownewsleter)
        //trace ("allownewsletter_yes=" + allownewsletter_yes.value)
        trace ("gender=" + _root.gender    )
        trace ("db_year=" + db_year.value )
        trace ("CARDHOLDER=====" + _root.cardholder )
        trace ("marital=====" + _root.marital )
        trace ("_root.interest========" + _root.interest )
        trace ("_root.age========" + _root.age )
        trace ("_root.reward========" + _root.reward )
        trace("//////////////")
        trace ("_root.firstname=" + _root.firstname)
        trace ("_root.gender=" + _root.gender)
        trace ("_root.phone=" + _root.phone)
        trace ("_root.address=" + _root.address)
        trace ("_root.email=" + _root.email)
        trace ("_root.db_year=" + _root.db_year)
        trace ("_root.db_month=" + _root.db_month)
        trace ("_root.db_day=" + _root.db_day)
        trace ("_root.company=" +_root.company)
        if (_root.kid_no==undefined)
            _root.kid_no=""
        if ((_root.firstname=="")  or (_root.gender=="") or (_root.phone=="")  or (_root.address=="")  or (_root.email=="")  or (_root.db_month=="")  or (_root.db_day=="")   or (_root.age=="") )
         message_movie.messagevalue=    "Please fill in all mandatory fields!"
          message_movie._visible=true;
        else
         LoginProgress.gotoAndPlay("StartLogin");
        URL = "email_vip.php?firstname=" + firstname + "&lastname=" + lastname + "&email=" + email + "&phone=" + phone   + "&area_id=" + area + "&address=" + address +
                "&db_year=" + db_year + "&db_month=" + db_month + "&db_day=" + db_day + "&companynames=" + companynames + "&titles=" + titles + "&kid_no=" + kid_no +
                "&gender=" + gender + "&reward=" + reward + "&allownewsleter=" + allownewsleter + "&cardholder=" + cardholder + "&marital=" + marital + "&interest" + interest +
                "&age=" + age ;
        loadVariablesNum(URL , 0, "GET");
            //getURL (URL);
        gotoAndStop("send_finished");
    PHP CODE
    <?php
    $area =array("","Hong Kong Island","Kowloon","New Territoris","Outlying Islands","Mainland China","Overseas");
    $gender =array("","Male","Female");
    $firstname=stripslashes($_GET['firstname']);
    $lastname=stripslashes($_GET['lastname']);
    $phone=stripslashes($_GET['phone']);
    $email=stripslashes($_GET['email']);
    $area_id=stripslashes($_GET['area_id']);
    $address=stripslashes($_GET['address']);
    $db_year=stripslashes($_GET['db_year']);
    $db_month=stripslashes($_GET['db_month']);
    $db_day=stripslashes($_GET['db_day']);
    $db_year=stripslashes($_GET['db_year']);
    $companynames=stripslashes($_GET['companynames']);
    $title=stripslashes($_GET['title']);
    $kid_no=stripslashes($_GET['kid_no']);
    $gender=stripslashes($_GET['gender']);
    $reward=stripslashes($_GET['reward']);
    $allownewsleter=stripslashes($_GET['allownewsleter']);
    $cardholder=stripslashes($_GET['cardholder']);
    $marital=stripslashes($_GET['marital']);
    $interest=stripslashes($_GET['interest']);
    $age=stripslashes($_GET['age']);
    //echo "firstname=$firstname";
        $smtp_server = "localhost";
        //$from        = "Igor's Group<[email protected]>";
        $from        = "Igor's Group<[email protected]>";
        $subject     = "Elite Card Registration";
        $to          = "[email protected]";
        //$to          = "[email protected]";
        $headers = "Content-type: text/html; charset=utf-8\nFrom: $from\r\nReply-To: $from";
        $body= "Name: $firstname<br>";
        $body=$body . "Telephone: $phone<br>";
        $body=$body . "Email: $email<br>";
        $body=$body . "Address: $address<br>";
        $body=$body . "Birthday (year month day): $db_year $db_month $db_day<br>";
        $body=$body . "Company: $companynames<br>";
        $body=$body . "Title: $title<br>";
        $body=$body . "No of kids: $kid_no<br>";
        $body=$body . "Gender (True = Male): $gender<br>";
        $body=$body . "Reward Selection: $reward<br>";
        $body=$body . "Newsletter(True = yes): $allownewsleter<br>";
        $body=$body . "Existing Cardholder: $cardholder<br>";
        $body=$body . "Marital Status: $marital<br>";
        $body=$body . "Interest: $interest<br>";
        $body=$body . "Age: $age";
        mail($to,$subject,$body,$headers);
    ?>
    Hope to hear from you guys.

    Hi,
    Your code is looking like AS2. Hence providing the AS2 code for your reference.
    First select your Male radio button, open component inspector and type "M" in the data field and press enter. Select your Female radio button, open component inspector and type "F" in the data field and press enter
    Just add the below code instead of your radio button code
    radio_button_listener = new Object();
    radio_button_listener.click = function (evt){
    _root.gender = evt.target.selection.data
    radioGroup.addEventListener("click", radio_button_listener);
    The above code gives you "M" or "F" in your php output.
    Thanks

  • Contact form not working :( Please Help...

    Hey guys,
    I am really in trouble with flash forms and need help please. Ive been trying to get a contact form working for a few weeks but have had no luck.
    Below is the code I am putting in to the flash form and php file.
    (this is the code I have put for the send Button)
    on (release) {
             if (name eq "" or subject eq "" or message eq "" or email eq "") {
                   stop();
             } else {
             loadVariablesNum("form.php", 0, "POST");
             gotoAndStop(2);
    (this is the code I have put for the clear Button)
    on (release) {
        name = "";
        subject="";
        message="";
        email="";
    (And this is the php file i created in dreamweaver and saved it as form.php)
    $to = "[email protected]";
       $msg = "$name\n\n";
       $msg .= "$message\n\n";
      mail($to, $subject, $msg, "Message From: Online client\nReply-To: $email\n");
    ?>
    I have uploaded the swf file and php file on the server but my form is still not working by sending the information to my email.
    This is the link where i got the code from http://www.flashvault.net/tutorial.asp?ID=103
    It would be really greatful if someone could help me please
    I look forward to your opinions and ideas.
    Thanks

    you should really check a tutorial using loadvars.
    and there's no hope for that php file.:
    try:
    $to = "youremailaddress @ yourserver.com"; // change this to your email address
      $email=$_POST["email"];
       $msg = $_POST["name"]."\n\n";
       $msg .= $_POST["message"]."\n\n";
      mail($to, $subject, $msg, "Message From: Online client\nReply-To: $email\n");
    ?>

  • Load external data into se-main-menu

    hi,
    i've tried to load external data (vars,files)into a selfmade
    sony-ericsson-flash-menu for the w810i.
    it is possible to load the data for the current active menu
    via loadVariablesNum("application://focused", 0);
    so i thought i could load some other stuff into the mainmenu.
    i tried to load an swf with loadMovie/loadMovieNum.
    i tried to load vars from a txt-file with
    loadVariables/loadVariablesNum.
    and i tried to open a webadress with getURL.
    but nothing happens ... :(
    the files (swf,txt) are in the same folder like the
    mainMenu.(tpa\preset\system\desktop\flash)
    maybe the w810 does not execute the swf in the same folder
    where it is at the moment?!
    is it possible to figure out where the swf is executed?
    the _url command is not supported by flash-lite-1.x ...
    some ideas?

    Hi Joanne,
    LSMW - Legacy System Migration Workbench is very user friendly tool provided by SAP for legacy data load.
    use link below for documentation
    http://www.scmexpertonline.com/downloads/SCM_LSMW_StepsOnWeb.doc
    You can also, use SAP best practice PCC Excel Template and load programs (delivered by SAP) for each Infotype PA / PD.
    Hope this helps.
    - Bharat

  • Email comes out as rendered html text

    Hi,
    I am using the DateField component in flash. I have to email
    the data once the user chooses the a specific date.( I am doing
    this because the DateField component is not a text field). So what
    I did is that that I posted the data to a input text, defined a
    variable on the text field and wrote a php script to email the text
    field. I have made sure that the text is in input format and
    "Render text as HTML" is turned off. But for some reason, the email
    sent out is still in HTML. i have tried every possible thing that I
    can think of, but it keeps emailing in HTML format. Can anyone
    please please please please help me. im putting the action script
    and the php script as well.
    Action Script Code:
    on (release)
    import mx.controls.Alert;
    myClickHandler = function (evt){
    if (evt.detail == Alert.OK){
    Alert.show("Thank you very much. Your message has been
    sent.", "Reservation Alert", Alert.OK);
    if (pickDateText1 != undefined && pickTimeText1 !=
    undefined && dropDateText1 != undefined &&
    dropTimeText1 != undefined && vehicleTypeText1 != undefined
    && pickLocationText1 != undefined &&
    dropLocationText1 != undefined) {
    loadVariablesNum ("reservation.php", 0, "POST");
    //name = "";
    //subject="";
    //message="";
    //email="";
    Php Script:
    <?
    $to = "[email protected]";
    $subject = "$_POST[pickLocationText1]";
    $msg = "Pick Date: $_POST[pickDateText1]\n\n";
    $msg .= "Pick Time: $_POST[pickTimeText1]\n\n";
    $msg .= "Drop Date: $_POST[dropDateText1]\n\n";
    $msg .= "Drop Time: $_POST[dropTimeText1]\n\n";
    $msg .= "Vehicle Type: $_POST[vehicleTypeText1]\n\n";
    $msg .= "Pick Up Location: $_POST[pickLocationText1]\n\n";
    $msg .= "Drop Location: $_POST[dropLocationText1]\n\n";
    $headers = "From: Titans Reservation
    <[email protected]>\r\n" .
    "Reply-To: [email protected]\r\n" .
    "X-Mailer: PHP/" . phpversion();
    mail($to, $subject, $msg, $headers);
    ?>
    Thanks

    Welcome to the Apple Community.
    If you don't receive a reset email or you don't have a rescue address, you should contact AppleCare who will initially try to assist you with a reset email or if unsuccessful will pass you to the security team to reset your security questions for you.
    If you are in a region that doesn't have international telephone support try contacting Apple through iTunes Store Support.

  • I need to "read" a string....

    Please, excuse my poor engilsh...
    I have one txt file with some variables. I want to choose
    dynamic what variable from them i want to use. Lets say that the
    txt file has the following:
    &t1=0&
    &t2=1&
    If I want to place the t2 into a textbox (calld textbox1) i
    can simply do:
    LoadvariablesNum ("file.txt", 0);
    this.tetxtbox1.text=_root.t2
    Now I'm creating a variable with some calculations to define
    what from t1or t2 i need .. f.e.
    var page=2
    var iwant="_root.t"+page
    the problem i have is that when now i'm trying
    this.textbox1.text=iwant
    instead to have the t2 result i'm getting "_root.t2"
    I need your help. How i can declare that the "iwant" is
    something that i want to read? not just write?
    Thank you very much for your timeText

    use:

  • Dynamic Text w/in a movieClip

    OK, so simple test I loaded a text file on the first frame of
    my movie:
    LoadVariableNum("Houston.txt", 0);
    This text file begins with Houston_txt="yadda, yadda..."
    Then I created a text field: rep_txt
    this text field is dynamic, variable is vRep_txt.
    First tests with button actions work:
    on (release) {
    vRep_txt = Houston_txt;
    Now, I want to publish this movie and load it into another
    movieClip.
    How would I properly target the text field variable to load
    my text?
    I have not gotten this to work once loaded into the
    movieClip, and I don't feel like targeting a textField variable
    works:
    _root.viewer_mc.vRep_txt = Houston_txt
    Should I load my text file on the main timeline & assign
    _global.variables for which my buttons can assign to the textField
    as such:
    _root.viewer_mc.rep_txt = _global.vHoustonVariable_txt
    I'm testing like a fiend, and struggling.

    I'm attempting the same thing. I can load variables and call
    text easily within one movie, but when I publish the movie and call
    it into another... No luck.
    //on the main timeline
    loadVariablesNum("textfile.txt", 0);
    //on button
    on (release) {
    variable_txt = StartText;
    with StartText=[at the beginning of my text file]
    I don't know how to make this work from the main timeline, if
    the textField and buttons are within a movie clip called:
    frame_mc
    help.

Maybe you are looking for