# HELP me see dybamic variables

**URL:** <https://forum.kirupa.com/t/help-me-see-dybamic-variables/38714>\
**Category:** flash\
**Created:** [December 28, 2003, 9:16pm UTC](https://forum.kirupa.com/t/help-me-see-dybamic-variables/38714 "2003-12-28T21:16:56Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![SeaDigital](https://avatars.discourse-cdn.com/v4/letter/s/e95f7d/32.png) [@SeaDigital](https://forum.kirupa.com/u/SeaDigital)\
**Post date:** [December 28, 2003, 9:16pm UTC](https://forum.kirupa.com/t/help-me-see-dybamic-variables/38714/1 "2003-12-28T21:16:56Z")

</div>

My cfm script pulls the contents of database fine. (a cfoutput reveals variables) In flash however i cannot see my dynamic variables. I don’t know why?  
I am new so its probably simple.

What am I doing wrong in syntax?

// In the flash mainframe I have.  
loadVariables(“LoadVars.cfm”,0,“GET”);

// Ive also tried this:  
myLoadVars = new LoadVars();  
myLoadVars.load(“LoadVars.cfm”);

// In the LoadVars.cfm I have.  
\<CFQUERY NAME=“ElfVars” DATASOURCE=“ElfQuest”\>  
SELECT \* FROM Stats  
\</CFQUERY\>

I have a dynamic text field named “Name”. Why doesn’t it display the Name in the database.

I can see my variable hardcoding cfoutput in the page. SQL is working. Why can’t I see them in Flash?

Im new to flash. Thanks so much, been a problem 4 me.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 28, 2003, 10:34pm UTC](https://forum.kirupa.com/t/help-me-see-dybamic-variables/38714/2 "2003-12-28T22:34:06Z")

</div>

welcome to the forums (and flash).  
is your cfm page outputting a valid HTML query string? That’s how you send/recieve data from one page to another.

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

```

the string should look something like this (similar to a GET a string in an address bar)

```php
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.

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 28, 2003, 11:04pm UTC](https://forum.kirupa.com/t/help-me-see-dybamic-variables/38714/3 "2003-12-28T23:04:02Z")

</div>

Thank you so much for your reply.

“is your cfm page outputting a valid HTML query string? That’s how you send/recieve data from one page to another.”

by query string do you mean it has to be appended to the url or just a valid sql query that brings in the vars for that page.

Right now I only have the SELECT \* FROM TABLE

Should I be doing a javascript onload function to post the variables in the “GET string” post to itself?

Thanks!!!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 28, 2003, 11:28pm UTC](https://forum.kirupa.com/t/help-me-see-dybamic-variables/38714/4 "2003-12-28T23:28:27Z")

</div>

Just to let you know I’m trying what you typed & every combination.

my Var name for the Dynamic Text, properties window should be named the Variable name as it is in the database I believe, right?

myLoadVars.Name

Var name should be the variable name as listed in the sql select statement right?

arg, i havent seen my dynamic variables yet ☹ Thnx for help!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 28, 2003, 11:45pm UTC](https://forum.kirupa.com/t/help-me-see-dybamic-variables/38714/5 "2003-12-28T23:45:04Z")

</div>

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:

```php
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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 28, 2003, 11:49pm UTC](https://forum.kirupa.com/t/help-me-see-dybamic-variables/38714/6 "2003-12-28T23:49:01Z")

</div>

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](http://www.cfconf.org/cfsouth/talks/towes.ppt)

I’ll know if it works in a few. 😉

Thnx!!!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 29, 2003, 2:35am UTC](https://forum.kirupa.com/t/help-me-see-dybamic-variables/38714/7 "2003-12-29T02:35:04Z")

</div>

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 😛

You can see it here: [http://seadigital.anumina.com/LoadVars.cfm](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 ☹ grrr

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 29, 2003, 6:08am UTC](https://forum.kirupa.com/t/help-me-see-dybamic-variables/38714/8 "2003-12-29T06:08:36Z")

</div>

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

```

```auto

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 29, 2003, 6:46am UTC](https://forum.kirupa.com/t/help-me-see-dybamic-variables/38714/9 "2003-12-29T06:46:47Z")

</div>

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. \*\*

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 29, 2003, 7:16am UTC](https://forum.kirupa.com/t/help-me-see-dybamic-variables/38714/10 "2003-12-29T07:16:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 29, 2003, 8:20am UTC](https://forum.kirupa.com/t/help-me-see-dybamic-variables/38714/11 "2003-12-29T08:20:07Z")

</div>

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](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](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](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 !!!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 29, 2003, 8:26am UTC](https://forum.kirupa.com/t/help-me-see-dybamic-variables/38714/12 "2003-12-29T08:26:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 29, 2003, 9:08am UTC](https://forum.kirupa.com/t/help-me-see-dybamic-variables/38714/13 "2003-12-29T09:08:49Z")

</div>

“post your fla’s and code please”

Oh Jesus, I’d love too!!

[http://seadigital.anumina.com/ElfQuest.fla](http://seadigital.anumina.com/ElfQuest.fla)  
[http://seadigital.anumina.com/LoadVars.cfm](http://seadigital.anumina.com/LoadVars.cfm)

The code is throughout this thread. 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 29, 2003, 9:34am UTC](https://forum.kirupa.com/t/help-me-see-dybamic-variables/38714/14 "2003-12-29T09:34:04Z")

</div>

umm your fla is empty

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 29, 2003, 9:43am UTC](https://forum.kirupa.com/t/help-me-see-dybamic-variables/38714/15 "2003-12-29T09:43:47Z")

</div>

try now it had 0 byte count before. byte count fine now. 🙂

thx allot norie!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 29, 2003, 9:54am UTC](https://forum.kirupa.com/t/help-me-see-dybamic-variables/38714/16 "2003-12-29T09:54:19Z")

</div>

```auto

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 29, 2003, 10:04am UTC](https://forum.kirupa.com/t/help-me-see-dybamic-variables/38714/17 "2003-12-29T10:04:33Z")

</div>

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](http://seadigital.anumina.com/LoadVars.cfm)

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 29, 2003, 10:09am UTC](https://forum.kirupa.com/t/help-me-see-dybamic-variables/38714/18 "2003-12-29T10:09:47Z")

</div>

> \*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](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):

```auto

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.

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

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 29, 2003, 10:39am UTC](https://forum.kirupa.com/t/help-me-see-dybamic-variables/38714/19 "2003-12-29T10:39:33Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 29, 2003, 10:43am UTC](https://forum.kirupa.com/t/help-me-see-dybamic-variables/38714/20 "2003-12-29T10:43:47Z")

</div>

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

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

```auto

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](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.

[Next page](https://forum.kirupa.com/t/help-me-see-dybamic-variables/38714.md?page=2)
