Welcome, Guest. Please login or register.
Did you miss your activation email?
05/22/12, 07:36
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  General
| |-+  Flash 8 (Moderators: Jorge Solis, ..:: Mazhar Hasan ::.., Andresss)
| | |-+  Loading Vars into other scopes - Simple question
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: Loading Vars into other scopes - Simple question  (Read 1201 times)
MrEd
Seasoned Programmer
***
Posts: 103



View Profile WWW Email
« on: 01/07/10, 19:25 »

The below code works great... but if I load the swf with this code in it into another movie the code breaks. I thought LoadVars was universal and just know where to send the info back to. How do I send the info back to the LoadVars in the variable scope?

Thanks

-------------------------------------

Actionscript

    var EdsVars:LoadVars = new LoadVars();
    EdsVars.onLoad = function():Void{

    trace(EdsVars.FirstName);
    trace(EdsVars.MiddleName);
    trace(EdsVars.LastName);


    };
    EdsVars.fn = "Edward";
    EdsVars.ln = "Vizenor";
    EdsVars.sendAndLoad("http://www.massmediamail.com/loadvars.php", EdsVars,"POST");
    trace(EdsVars.LastName)

    

 

PHP

    <?

    $fn = $_POST[fn]; // These are the vars from the flash. To get them use must use $_POST[fn]
    $ln = $_POST['ln']; // Can be with the ' or without.

    echo "&FirstName=$fn";
    echo "&MiddleName=Mary John";
    echo "&LastName=$ln";

    ?>
« Last Edit: 01/08/10, 01:53 by MrEd » Logged
MrEd
Seasoned Programmer
***
Posts: 103



View Profile WWW Email
« Reply #1 on: 01/08/10, 01:52 »

NEVERMIND... The above code works. It was just a slow server I guess. This code works on any level.

YES TO LOAD VARS! !!!
Logged
Pages: [1] Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
anything