View Full Version : php file how to add it ..?
NancyK
06-17-2008, 07:25 AM
hi how can i add php file to my flash...?
i have a button and i want when i click will open for me the subscription
so..? any could help me
You want it to open a php page, or run a php script?
getURL() to open the php page, LoadVars() to send data to a php script
NancyK
06-18-2008, 08:02 AM
the point exactlly
i have three files ok (2 dreamweaver php and 1 notepad)
so these files are about a subscription form
all what i want to add it to my web
i did a button
and i put this as a script on the button ...
on(release){getURL("Subscribe.php","_self");}
so is it right or......
and u give exactly how should i put the script thanks
bilgenc
06-18-2008, 08:56 AM
veri = new LoadVars();
veri.load("dosyan.php");
veri.onLoad = function(durum:Boolean) {
if (durum)
{
trace("loaded");
}
pls try it..
NancyK
06-18-2008, 09:17 AM
veri = new LoadVars();
veri.load("dosyan.php");
veri.onLoad = function(durum:Boolean) {
if (durum)
{
trace("loaded");
}
what should i put instead of dosyan.php
the name of my subscribtion
and durum:boolean......
if durum ...?
mmm
:S what are those coule u tell m please
bilgenc
06-18-2008, 09:58 AM
ok.. (i cant speak english well. sorry for this reason.)
you should put an input text at first. and its instance name: "state"
then, click frame and paste to actions the codes:
veri = new LoadVars(); //the object of LoadVars class
veri.load("ex.php"); // file
veri.onLoad = function(durum:Boolean) { // if file loaded....
if (durum)
{
state.text=veri.variable1;
}
open the notepad and write this codes:
<?
echo"&variable1=hi its example&";
?>
then, save as this file, ex.php.
and run the files at your host.
NancyK
06-18-2008, 10:08 AM
**Error** Scene=Scene 1, layer=Submit Form, frame=1:Line 1: Statement must appear within on handler
veri = new LoadVars();
**Error** Scene=Scene 1, layer=Submit Form, frame=1:Line 2: Statement must appear within on handler
veri.load("20080613-b658a2cd8ae403ce093763538f6def86.lib.php");
**Error** Scene=Scene 1, layer=Submit Form, frame=1:Line 9: Syntax error.
open the notepad and write this codes:
**Error** Scene=Scene 1, layer=Submit Form, frame=1:Line 10: Operator '<' must be followed by an operand
<?
**Error** Scene=Scene 1, layer=Submit Form, frame=1:Line 11: Syntax error.
echo"&variable1=hi its example&";
**Error** Scene=Scene 1, layer=Submit Form, frame=1:Line 12: Unexpected '?' encountered
?>
**Error** Scene=Scene 1, layer=Submit Form, frame=1:Line 3: Statement must appear within on handler
veri.onLoad = function(durum:Boolean) {
Total ActionScript Errors: 7 Reported Errors: 7
bilgenc
06-18-2008, 10:15 AM
example files (http://blog.bilgenc.com/dosyalar/ex_nancyk.rar)
look it (http://blog.bilgenc.com/dosyalar/ex_nancyk.swf)
NancyK
06-18-2008, 10:29 AM
i couldn't open it could u try to send it again please
:)
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.