Groups | Blog | Home
all groups > flash actionscript > july 2004 >

flash actionscript : path?


yofof
7/31/2004 11:28:08 PM
hi there,
i asked a question about php script (PHP - email with no text ). the question
has been well answerd by Jack( thanks again). everythig works fine if i put the
order.swf and order.php in separate dictionary on my web. I use the script:
------------------------
function sendMail(){
lv = new LoadVars();
sv = new LoadVars();
sv.firstName = fields_mc.firstName_txt;
sv.familyName = fields_mc.familyName_txt;
sv.address = fields_mc.address_txt;
sv.suite = fields_mc.suite_txt;
sv.postalCode = fields_mc.postalCode_txt;
sv.town = fields_mc.town_txt;
sv.telephone = fields_mc.telephone_txt;
sv.email = fields_mc.email_txt;
sv.date = fields_mc.date_txt;
sv.time = fields_mc.time_txt;
sv.delivery = fields_mc.delivery_txt;
lv.onLoad = function(){
trace(unescape(this)); // catch any returned variables
};
sv.sendAndLoad("order.php", lv, "POST");
};
stop();
-----------------------


than i call it by a button:
-----------------------
on (press) {
_root.sendMail();
}
-----------------------

however when i put the order.swf and order.php in dictionary (where i want it)
where i have all my swfs and another email.php it doesn't work. i checked that
2 times. i uploaded the same files in separate dictionary (works) in my root
dictionary(doesn't work)

i think the path can be wrong.....any idea what it can be?

i tried to put the php in separated dictionary(/php) but don't know how to set
the path in action script.

sv.sendAndLoad("/php/order.php", lv, "POST"); ????/php/
christophe.herreman
8/1/2004 7:51:46 AM
HI yofof,

When you link to another page from an swf, note that the path should start
from the page the swf in embedded in and not from the swf itself.

say you have this structure
- index.html
- swf/files.swf
- php/files.php

then you should use "php/files.php" to link to that page.

Christophe
AddThis Social Bookmark Button