Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Remoting / February 2005



Tip: Looking for answers? Try searching our database.

loadVariablesNum calling .cfm

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
eyal453 - 19 Feb 2005 00:14 GMT
hey... I'm trying to do something simple here. i just want to import some text
from .cfm file... both the swf and the cfm files are on the same domain and in
the same folder. when i try to import text using loadVariablesNum from a .cfm
file it doesnt work.. but from a .txt file it does work... i used the code in
the help section of Flash MX...  it is a coldfusion server that i'm working
on... the cfm file looks exactly like the .txt file... except i changed the
extension... all it contains for now is  done=1&txt=blahblahblah  i just
want to get the txt variable... the done is used for the verifying loop... to
tell me when it is done loading. it imports the text into a textField...  i
tried using absolute path and relative path... still no go.. here's the code:
---------------------------- loadVariablesNum('feedback.cfm',2);   function
chk(){     if(_level2.done!=undefined){         _root.txt1.htmlText=_level2.txt;
        clearInterval(param_int);     } } var param_int=setInterval(chk,500);
------------------------- any ideas???  Eyal.
derobinson - 20 Feb 2005 19:01 GMT
I think it only works for .txt files, even if the content is the same. You
could have CF create the .txt file for Flash to consume. But since you have CF,
why not just use Remoting? You'd probably have a lot more control over things.

Good luck!
eyal453 - 20 Feb 2005 19:07 GMT
hey... thanks for replying...  in the description of the loadVariable or
loadVaraiblesNum functions it says that they're meant to retrieve information
from server side pages... as in ASP,PHP, coldFusion and so on...  my problem
is... the server i'm working on doesnt allow tags that write files on the
server... therefore i'm limited to using only databases with queries...
loadVariablesNum gives me the option to retrieve data from a database through
another CF page that calls the database...  for some reason it won't open the
.cfm file... only .txt file...  Eyal.
naz2003 - 21 Feb 2005 04:29 GMT
Hi  I think there is a problem in if condition and the level(2) u loads the var
, because i can get a value from cfm file using loadVariablesNum  
loadVariablesNum('feedback.cfm',2);  change to  
loadVariablesNum('feedback.cfm',0);  ald place text field in the name of 'txt'
an check  i hope this will work  function chk(){ if(_level2.done!=undefined){  
<---- _root.txt1.htmlText=_level2.txt; clearInterval(param_int); } } var
param_int=setInterval(chk,500);
eyal453 - 21 Feb 2005 04:41 GMT
hey...  still nothing... i took this script straight from the flash help
file...  and it worx fine with the .txt file... therefore i'm assuming there's
no problem with the script in the flash file... however, you think that CF5
server might cause problems like that? i dont see how it would be related but
maybe there is some sort of connection...  Eyal.
eyal453 - 22 Feb 2005 04:55 GMT
problem solved !!! aparently, for some reason... when writing a .cfm file for a
loadVaribales function... you must begin the variables list with &amp; ex:  
&amp;var1=123&amp;var2=34343 ... this is the only way the swf will read the cfm
file properly... when reading from txt files you can start without the &amp;
sign... ex: var1=12312&amp;var23434.... and it still reads them right...   tiny
details.. it's always about that...  Eyal.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.