all groups > flash actionscript > november 2006 >
You're in the

flash actionscript

group:

load and send, event keyframe


Re: load and send, event keyframe Jose Guevara
11/18/2006 4:04:53 PM
flash actionscript:
You need to return something, anything with your script. Even if it's just
success=true

JG



[quoted text, click to view]

load and send, event keyframe gilco123
11/18/2006 7:58:12 PM
hi,

I am trying to send information to the PHP script that work fine without
getting any information back and not opening a explorar window.
I am using sendandload(), and my PHP script return nothing.
I want it to happen while the swf movie is running, in frame 3, (no pressing a
button)

I wrote the script :
var result_lv:LoadVars = new LoadVars();
result_lv.onLoad = function (success:Boolean) {
if (success) {
} else {
result_ta.text = "Error connecting to server.";
}
};
var my_lv:LoadVars = new LoadVars();
my_lv.fn = "example";

my_lv.sendAndLoad("http://www.bananafilm.com/stats/statsscript/stat_loger.php",
result_lv, "POST");

I know it is missing an object, but how I can refer it to the keyframe event.
please help
me.
Re: load and send, event keyframe gilco123
11/19/2006 2:48:52 PM
I added a return true to the PHP file, and it dont work.
It just look like the FLASH file dont even start the function to try
to send and load any parameters.
so I am still lost here.
Re: load and send, event keyframe Jose Guevara
11/19/2006 3:44:01 PM
Gilco,

I am not sure what's going on, the sendAndLoad you have looks fine, there is
nothing wrong with it, but I try your PHP script and nothing comes back.
Maybe you should go back to your PHP create a simple form and test it in
cases where you send empty variables, no variables at all to see how it
reacts, once your scripts works the way it should go back to flash.

Right now if I load your URL straight in the browser I get:

Notice: Undefined variable: fn in
/home/qwfkeff/public_html/stats/statsscript/stat_loger.php on line 4

Notice: Undefined variable: fn in
/home/qwfkeff/public_html/stats/statsscript/stat_loger.php on line 5

Notice: Undefined variable: handler in
/home/qwfkeff/public_html/stats/statsscript/stat_loger.php on line 19

Notice: Undefined variable: handler in
/home/qwfkeff/public_html/stats/statsscript/stat_loger.php on line 25

And if I create an HTML form, and POST to your PHP script, I get nothing
(blank page).

Try to deactivate all the error warnings, and notices and have it load
something. Or set up a text file, like
http://www.bananafilm.com/stats/statsscript/stat_loger.txt with success=true
inside of it, and see if you can at least load that in flash. If you can,
then focus on your PHP.

JG



[quoted text, click to view]

Re: load and send, event keyframe gilco123
11/22/2006 12:00:00 AM
FOUND THE PROBLEM, THE SITE DONT SUPPORT SWF Request from
some reason I dont know yet...

JG
Thanks for you time...
The PHP dont suppose to return anything except from TRUE, and it work fine
when u insert the 'example' variable to it...maybe I played with it while u
tried to run it, I was trying anything I could.
When I found it problem, after days, I went crazy.... I tried the PHP on a
freind
site (that use other hosting company) and it work fine... I had it wright
from the frist day ?!?!@$@#?!#!?@#?!@$?!$
So thanks again.
Gil



Re: load and send, event keyframe Jose Guevara
11/22/2006 9:07:11 AM
That's crazy.... Well, maybe you can switch your loadvars from POST to
GET. I mean, if your flash is able to load external SWF or jpeg from the
server then the server is allowing the SWF to make GET requests, so with
the loadvars you will just have a query string at the end of the GET...

JG


[quoted text, click to view]
AddThis Social Bookmark Button