HELP me see dybamic variables

cfm is cold fusion right? Well, im not too familar with cold fusion, but i do know that you have to submit you data correctly no matter what SSL you use.

the my_lv.myVarName can be anything you want. and if i’m not mistaken a select query returns an ARRAY of data right? essentially all you should have printed on your page is the query string:

myfirstVar=this is what my first var is and i can put anything&mySecondVar=this is what my second var is notice the 'and' sign.

use php it’s easier/better

Thank you so much for your fast replies. I think your right, I am not passing the vars correctly. I think I may have found a possible helper here: http://www.cfconf.org/cfsouth/talks/towes.ppt

I’ll know if it works in a few. :wink:

Thnx!!!

Please help…

// This is my actionscript:

myLoadVars = new LoadVars();
myLoadVars.onLoad = function(success){
//your vars (if loaded correctly will
//be accessible via myLoadVars.myVarName
}
myLoadVars.load(“LoadVars.cfm”);

// This is my Coldfusion which seems to work

<CFQUERY NAME=“ElfVars” DATASOURCE=“ElfQuest”>
SELECT * FROM Stats
</CFQUERY>

<CFOUTPUT>
Name=
</CFOUTPUT>

<CFOUTPUT Query=“ElfVars”>
#URLENCODEDFORMAT(Trim(Name))#
</CFOUTPUT>

The contents of the variable Name in the database is Derek. It displays correctly when using cold fusion in the cfm template, BUT!! I can’t get it to display in flash. Im sure its my sytax or something stupid, obviously stupid cause i hate it :stuck_out_tongue:

You can see it here: http://seadigital.anumina.com/LoadVars.cfm

There is a white dynamic text field in the flash that does not display my contents of the variable Name. I tried naming it Name as well as myLoadVars.myVarName

The dynamic text is suppoed to apear, well it aint :frowning: grrr

Thanks for any help guys. Im sure this is a simple answer and I miss it.

<CFOUTPUT>
&Name=
</CFOUTPUT>
<CFOUTPUT Query="ElfVars">
#URLENCODEDFORMAT(Trim(Name))#
</CFOUTPUT>

myLoadVars = new LoadVars();
myLoadVars.onLoad = function(success){
if(success){
trace(this);
trace(this.name);
}else{
trace("the fusion wasn't cold enough");
}
}
myLoadVars.load("LoadVars.cfm");

tell me what that outputs

Sorry for a delay in posting, had to break… Thank you norie

Name=%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0ADerek%0D%0A%0D%0A%0D%0A%0D%0A%3C%21%2D%2D%20URL%27s%20used%20in%20the%20movie%2D%2D%3E%0D%0A%3C%21%2D%2D%20text%20used%20in%20the%20movie%2D%2D%3E%0D%0A%3C%21%2D%2DDeath%20Scene%2D%2D%3E%3COBJECT%20classid%3D%22clsid%3AD27CDB6E%2DAE6D%2D11cf%2D96B8%2D444553540000%22%0D%0A%20codebase%3D%22http%3A%2F%2Fdownload%2Emacromedia%2Ecom%2Fpub%2Fshockwave%2Fcabs%2Fflash%2Fswflash%2Ecab%23version%3D6%2C0%2C0%2C0%22%0D%0A%20WIDTH%3D%22550%22%20HEIGHT%3D%22300%22%20id%3D%22ElfQuest%22%20ALIGN%3D%22%22%3E%0D%0A%20%3CPARAM%20NAME%3Dmovie%20VALUE%3D%22ElfQuest%2Eswf%22%3E%20%3CPARAM%20NAME%3Dquality%20VALUE%3Dhigh%3E%20%3CPARAM%20NAME%3Dbgcolor%20VALUE%3D%23FFFFFF%3E%20%3CEMBED%20src%3D%22ElfQuest%2Eswf%22%20quality%3Dhigh%20bgcolor%3D%23FFFFFF%20%20WIDTH%3D%22550%22%20HEIGHT%3D%22300%22%20NAME%3D%22ElfQuest%22%20ALIGN%3D%22%22%0D%0A%20TYPE%3D%22application%2Fx%2Dshockwave%2Dflash%22%20PLUGINSPAGE%3D%22http%3A%2F%2Fwww%2Emacromedia%2Ecom%2Fgo%2Fgetflashplayer%22%3E%3C%2FEMBED%3E%0D%0A%3C%2FOBJECT%3E%0D%0A%0D%0A%0D%0ADerek%0D%0A%0D%0A%3C%2Fbody%3E%0D%0A%3C%2Fhtml%3E%0D%0A&%0D%0A%0D%0A%3C%21DOCTYPE%20HTML%20PUBLIC%20%22%2D%2F%2FW3C%2F%2FDTD%20HTML%204%2E0%20Transitional%2F%2FEN%22%3E%0D%0A%0D%0A%3Chtml%3E%0D%0A%3Chead%3E%0D%0A%09%3Ctitle%3EVars%3C%2Ftitle%3E%0D%0A%3C%2Fhead%3E%0D%0A%0D%0A%3Cbody%3E%0D%0A%0D%0A%0D%0A=&onLoad=%5Btype%20Function%5D

We can see Derek visable, so why doesn’t it magically appear in my dynamic text field. **

does your loadvars page have flash on it? Make your loadVars page a whole seperate page. ALL BY IT SELF

Ok now I have a cfm (like html) file that calls the swf like so:

<OBJECT classid=“clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase=“http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH=“550” HEIGHT=“300” id=“ElfQuest” ALIGN=””>
<PARAM NAME=movie VALUE=“ElfQuest.swf”> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src=“ElfQuest.swf” quality=high bgcolor=#FFFFFF WIDTH=“550” HEIGHT=“300” NAME=“ElfQuest” ALIGN=""
TYPE=“application/x-shockwave-flash” PLUGINSPAGE=“http://www.macromedia.com/go/getflashplayer”></EMBED>
</OBJECT>

The src=“ElfQuest.swf” has the action script like so:

myLoadVars = new LoadVars();
myLoadVars.onLoad = function(success){
//your vars (if loaded correctly will
//be accessible via myLoadVars.myVarName
}
myLoadVars.load(“http://seadigital.anumina.com/LoadVars.cfm”);

I then have the dynamic text field Var named (well just about everything, but…) myLoadVars.Name as well as Name

Now Name is werking with cfoutput as well as our trace we did. So, what am I not doing that should?

I need to display in dynamic text field. Ive even check if text was white on whie and i cannnot see text. i dont know why i dont see it. if i name a variable in the movie like Name = Derek
then Derek shows in dynamic font, but i thought with our trace it shows derek is dumped from access (the database) in flash. if its in flash why cant it show in dynamic text… im stumped atm
Thanks !!!

huh? this is how it should be:

html file (with swf only).
cfm file (with cold fusion only When you run this file by itself it should out put ‘&Name=derek’ ONLY)
the swf code should be like this:
myLoadVars.load(“LoadVars.cfm”);

post your fla’s and code please

“post your fla’s and code please”

Oh Jesus, I’d love too!!

http://seadigital.anumina.com/ElfQuest.fla
http://seadigital.anumina.com/LoadVars.cfm

The code is throughout this thread. :slight_smile:

umm your fla is empty

try now it had 0 byte count before. byte count fine now. :slight_smile:

thx allot norie!


myLoadVars = new LoadVars();
myLoadVars.onLoad = function(success){
	if(success){
		trace(this.Name);
	}else{
		trace("error");
	}
}
myLoadVars.load("LoadVars.cfm");

that works, just get ride of the extra spaces in the LoadVars page

hey norie,

can you please check the dynamic text field named myLoadVars.Name

This is the contents of LoadVars:
http://seadigital.anumina.com/LoadVars.cfm

Why isnt Name showing up in the dynamic field? Thx a whole lot!

*Originally posted by SeaDigital *
**hey norie,

can you please check the dynamic text field named myLoadVars.Name

This is the contents of LoadVars:
http://seadigital.anumina.com/LoadVars.cfm

Why isnt name showing up in the dynamic field? Thx a whole lot! **

delete the Var name and give it an instance name of ‘name1’ (without the quotes):


myLoadVars = new LoadVars();
myLoadVars.onLoad = function(success){
        if(success){
name1.text = this.Name;
        }else{
                name1.text = "error";
        }
}
myLoadVars.load("LoadVars.cfm");

put this loading code on the second frame.

<CFQUERY NAME="ElfVars" DATASOURCE="ElfQuest">SELECT * FROM Stats</CFQUERY><CFOUTPUT>&Name=</CFOUTPUT><CFOUTPUT Query="ElfVars">#URLENCODEDFORMAT(Trim(Name))#</CFOUTPUT>

Great news!! Ive got dynamic text with the error msg. name1.text does = “error”;

What are you saying to put the cfquery on the second frame? what where huh?

an error msg is good news? i’d hate to know what the bad news is :stuck_out_tongue: .

i meant put this on the second frame (instead of the first)


myLoadVars = new LoadVars();
myLoadVars.onLoad = function(success){
        if(success){
                name1.text = this.Name;
        }else{
                name1.text = "error";
        }
}
myLoadVars.load("LoadVars.cfm");

and run this: http://seadigital.anumina.com/LoadVars.cfm by itself. Right click on the page and view the source. See all that whitespace? get ride of it! i was suggesting putting all of your cold fusion tags on one line.

norie, thanks so much for your help! I was going bonkers and reeading, trial and error. I can finally see dynamic variables.
http://seadigital.anumina.com/ElfQuest.html

Thanks Allot

This will bring my creations to a whole new level :slight_smile: *not like ive been lingering at llevels, my 4th flash work.

im so happy!

One last thing…

what are dybamic variables? :stuck_out_tongue: lol

You have no idea how happy i am!! woohoo

i have dynamic variables

i had some posts on flashkit which went unanswered. norie if it wasnt for your help i would have not had been done by now, no tellin when haha :slight_smile: Thx!

i accept all major credit cards, money orders, and cashier’s checks :stuck_out_tongue: