Mike,


Thanx for the help.  I'm using MX2004 - LoadVars() and including that
extra field.  Unfortunatly I am not using Flash remoting...for some
reason my boss doesn't want me to go that route?  Everything seems like
it should work alright...but the variables are not getting passed to
flash.


To shed a little light on what I'm doing, flash gets its data from a
database.  The records retrieved are then converted to movieClips in
Flash so the user can drag the movie clips.  When finished, the user
clicks a 'save' button and the x and y fields are updated.

All data is inserted into flash ok, after dragging movieClips around the
user hits the save button:


save_btn. {
    saveObject = new LoadVars();
    saveObject.>         _root.gotoAndStop("EPS_lbl");
    };


    var step = 0;
    for (var mc in _root.list_mc) {
        if (typeof _root.list_mc[mc] == "movieclip") {
            step++;
            var tmpName = String(mc);
            dragNum = tmpName.substr(8);
            //variable dragNum is the number appended at the end of each
            //instance name and it is used to access other information
            var tmpProcStepID = eval("container.processStepId_" +
dragNum);
            //this is where I think the problem starts
            saveObject["procStepId" + step] = tmpProcStepID;
            saveObject["x" + step] = _root.list_mc[tmpName]._x
            saveObject["y" + step] = _root.list_mc[tmpName]._y;
        }
    }


    //passing that variable for the number of loops CF should execute
    saveObject.numSteps = step;
    saveResults = unescape(saveObject);
    //this trace shows that saveObject is sending what it should
    trace(saveResults);
    saveObject.sendAndLoad("sample.cfm",saveObject,"POST");
    //I'm using getURL to check that the correct data is being sent.
    //And none of the form fields that I am sending (via saveObject)
show up
    getURL("sample.cfm",blah,"POST");
    gotoAndStop("processing_lbl");
}

Thak you -
  Frank


________________________________

From: JediHomer [mailto:[EMAIL PROTECTED]
Sent: Monday, July 05, 2004 9:14 AM
To: CF-Talk
Subject: Re: variables with <cfquery>

How are you sending the variables to CF? via LoadVariables()
if so you could pass in an extra field that states how many fields
you have created and then use that as the number of loops for CF to
perform.

You could also potentially use Flash Remoting (if flash version is not
an issue and you are you MX+) and build up and object to pass to CF
which then treats it as a structure

HTH

Mike

----- Original Message -----
From: Frank Dewey <[EMAIL PROTECTED]>
Date: Mon, 5 Jul 2004 09:03:07 -0500
Subject: variables with <cfquery>
To: CF-Talk <[EMAIL PROTECTED]>

hello all,

I am sending a file from flash to CF.  The variables are getting

there...so that is no problem.  However, once they get there, then I am

not sure how to put them into action.  For example, I am sending many x

and y values, and some IDs.  So a basic query for sending flash

variables to CF looks like this:

assume I am sending these values from Flash to CF -

xValue;

yValue;

myID;

CFpage -

<cfquery ...>

UPDATE    tableName

SET           x = #form.xValue#,

                 y =  #form.yValue#

WHERE    ID = #form.myID#

</cfquery>

The problem is that I am sending several values and I don't know how

many until run-time.  I also have to create the variables and there

values at run-time...so this is what I have:

assume I am sending these values from Flash to CF -

x1 = 10;

y1 = 50;

myID1 = 1045;

x2 = 10;

y2 = 50;

myID = 2;

...

CFpage -

<cfloop from="1" to="#form.numberOfValues#" index="i">

    <cfset thisX = form.x#i#>

    <cfset thisY = form.y#i#>

    <cfset thisID = form.myID#i#>

    <cfquery ...>

        UPDATE    tableName

        SET           x = #thisX#,

                         y =  #thisY#

        WHERE    ID = #thisID#

    </cfquery>

</cfloop>

So I am asking how to create a dynamic variable...involving

concatenation?   Any help with this problem is greatly appreciated -

  Frank

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

The Preceeding Email Has Been Scanned

and Verified By QBOS Security Systems

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

QBOS, Inc.

14275 Midway Rd.  Suite 220

Addison, TX 75001

972.233.5066________________________________
________________________________
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to