Wrox Programmer Forums
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Flash (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 8th, 2005, 01:15 PM
Authorized User
 
Join Date: Nov 2004
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to IP076
Default action script question

Here is some code I'm using to pass variables to PHP and back to flash:

stop();

//=================================
// INIT
//=================================
path = "http://www.geft-online.org/CommandSchedule/"; //declare path to php files
lvOut = new LoadVars(); //create lv object
lvIn = new LoadVars(); //create lv object
lvIn.onLoad = function (success) {
        if(success){
                //PHP variable value to textbox

                output.text = lvIn.message;
            if (lvIn.message == 0) {
                this.gotoAndStop("success");
            }
            else {
                this.gotoAndStop("3");
            }
        }else{
                //...or notify of failure
                //this.gotoAndStop("2");
                output.text = "fail";
                        }
}
//=================================
// BTN CODE
//=================================
submit.onRelease = function(){
        //assign user-input value to lv property called years
        lvOut.studentname = studentname.text;
        lvOut.ipinfo = ipinfo.text;
        lvOut.ipemail = ipemail.text;
        lvOut.modchange = modchange.text;
        lvOut.scheddate = scheddate.text;
        lvOut.modreq = modreq.text;
        lvOut.reqdate = reqdate.text;
        lvOut.reqtime = reqtime.text;
        lvOut.course = course.text;
        lvOut.team = team.text;
        lvOut.reason = reason.text;
        lvOut.notes = notes.text;
        lvOut.what = "Submit";

        //get results returned to lvIn
        lvOut.sendAndLoad(path + "changeform.php", lvIn, "GET");
        };

reset.onRelease = function() {
        studentname.text = "";
        ipinfo.text = "";
        ipemail.text = "";
        modchange.text = "";
        scheddate.text = "";
        modreq.text = "";
        reqdate.text = "";
        reqtime.text = "";
        course.text = "132T";
        team.text = "1";
        reason.text = "Cancelled";
        notes.text = "";
};

It is successfully returning the variable message(number). I want it to evaluate that number, and then go to the appropriate frame. I'm pretty new to actionscripting, but it seems like this shouldnt be too difficult. I'd appreciate anyones pointers. I'm sure it might be something minor...Thank you in advance!

 
Old January 10th, 2005, 07:55 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Quote:
quote:I want it to evaluate that number, and then go to the appropriate frame.
What exacty do you mean? You want to go to frame number [retrieved number]?

Please explain what you mean by "evaluate."

-Snib - http://www.snibworks.com
Where will you be in 100 years?





Similar Threads
Thread Thread Starter Forum Replies Last Post
action script sanjay_yadavhhh4 ActionScript 0 October 22nd, 2008 12:07 AM
anyone can explain the action script below to me?? fattat Flash (all versions) 0 June 24th, 2008 06:03 PM
Question in login script zone8567 Classic ASP Basics 1 May 25th, 2008 06:57 PM
Request action on change and get no action. Help crussell Ajax 0 September 12th, 2007 11:11 AM
Action Script based Charts (bar, pie, etc). robprell Flash (all versions) 0 March 30th, 2007 08:17 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.