Having problems with LoadVars and its variants in Flash 2004

  • mansoor777
  • Born
  • Born
  • mansoor777
  • Posts: 4

Post 3+ Months Ago

Hi Everyone,

I have tried everything I could think of and I still cannot get LoadVars or its variant LoadVarsNum to work. I even tried the new class LoadVars and still could not get the simplest things to work.

I am using Flash 2004 Professional. All I want to do right now is just see how the I can send a variable to PHP or receive one from PHP in FLASH. I have had no success in either direction. I have followed DevShed and Flashkit documentation to the dot and still no go. Maybe it is a bug in FLASH 2004 or something. Oh yes, I know that with the new Flash Player 7 there are higher security concerns and that flash will not match superdomains anymore. Therefore I have made sure I use the exact domain names and not superdomain.

1) Created three dynamic text boxes with instance name "load_status", “return_string” and “iteration” in flash.
2) Called LoadVars from within flash:

var myLV = new LoadVars();
load_status.text = "Unset";
for (i=1; i<10; i++) {
load_status.text = myLV.loaded;
return_string.text = myLV.toString();
iteration.text = i;

3) Created the test.php with code
<?php print "name=test" ?>
4) Placed both the test.swf and test.php file on the foo.com root webserver directory.

Nothing comes back.

Second attempt:

1) Created a bunch of vars on the main timeline with junk data in them.
2) Called LoadVars with POST.
3) In PHP queried for anything under POST, but nothing came across.

Third attempt:

Tried getURL method and still no go.

Can someone please help me out. One more thing, on the webserver end I have tried both, PHP with Apache and PHP on IIS.

Mansoor Lakhani.
  • Abelius
  • Proficient
  • Proficient
  • User avatar
  • Posts: 260
  • Loc: Miami Beach, FL, USA

Post 3+ Months Ago

I wouldn't even bother using LoadVars for that... Simply make a page in PHP with a form that requests the data, and see from there where you can go...

I made a little flash guestbook that relates to ASP pages, but the technique is similar between the two of them, so grab it here:


Just click on the little Flash icon and get yourself the zip file of the guestbook... Hope it helps... :)

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 5 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum

© 1998-2017. Ozzu® is a registered trademark of Unmelted, LLC.