Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

asp and flash hate each other

Status
Not open for further replies.

theocraticmind

Programmer
Apr 19, 2002
318
CA
All I need to do is import one variable into flash(5) from asp (mySQL database). if frame one

loadVariablesNum ("marquee-bar.asp", 0);
gotoAndPlay (2);

in frame 3:

if (marquee == ""){
gotoAndPlay (2);
}else{
gotoAndPlay (4);
}

and in frame 4:


if (marquee != ""){
_root.marquee.value = marquee
}
stop()

note: I name an MC with the instance name "marquee" and a dynamic text field in it named value

Ok, my database system is a little complicated, but it biols down to this:

marquee = "No information today."

response.write "&marquee=" & Server.URLEncode(marquee) & "&done=true"

in the flash file _root.marquee.value gets set to "

I've scowered the net, and this seems to be a reasonable method... what an I doing wrong?
 
I would definetly change the name of the textfield from value to something else... that could be screwing things up
 
if (marquee == undefined){
gotoAndPlay (2);
}else{
gotoAndPlay (4);
}
 
and I guess you should be saying:

_root.marquee.value.text = marquee

and again I would probably change value to something else
 
again _root.marquee.value.text == ""

.text being the important part
 
no

_root.marquee.value.text = marquee is mx. textbox can only have variable name in 5

has to be

_root.marquee.value = marquee;
 
Ok, I've made those changes. I desided to put a dynamic text field named marquee on the _root for now, so I can be sure thats nor the problem. now:
_root.marquee.text = marquee

After doing those things, the text field fills get " as a value. that is clearly not what teh ASP is passing...
 
I didn't get to read that when I posted... It's going to the right place anyway, because I'm passing a variable manes marquee.
 
for the record, I'm now using this asp file:

<% @Language = &quot;VBScript&quot; %>
<%

response.write &quot;&marquee=&quot; & URLEncode(&quot;This is the test marquee&quot;) & &quot;&quot;

%>
 
just incase you missed it nix the .text thing - that is for MX - the way you had it was right for 5:

_root.marquee.value = marquee;

sorry for the confusion

maybe try to use single quotes around your string (and one &quot; at the end:

response.write &quot;&marquee=&quot; & URLEncode('This is the test marquee') & &quot;


 
in VBscript a single quote means comment

And ya, I got the no .text thing. Right now I'm just letting the field fill itself, seeing as the variable I'm getting is called marquee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top