pkm82
08-10-2007, 06:47 PM
I have two question.
1. How to pass string argument to creationcomplete ?
I am using following code and value of upload_photo_url is always null.
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:mynetwork="com.mynetwork.*" layout="absolute" creationComplete="init();">
<mynetwork:FileUpload id="fileUpload" creationComplete="fileUpload.init(uploadProgress, upload_photo_url) ;" />
public var baseURL:String;
[Bindable]
private var upload_photo_url : String;
public function init():void{
baseURL = "http://localhost/MyNetwork/";
[B]upload_photo_url = baseURL + "scripts/uploadphoto.php";
}
Can someone tell me how to pass the url string value to creationcomplete function above?
2. How to find base url.
My html or swf url is going to be http://localhost/MyNetwork/network.swf or network.html
I want base url out put is http://localhost/MyNetwork/
and when i run from flex2 then will i have to change some settings?
I can not use context root perhaps because I am using simple flex php project.
I also can not use Application.application.url as it returns complete url , not the base url.
Please let me know if you have some insights.
Pradeep
1. How to pass string argument to creationcomplete ?
I am using following code and value of upload_photo_url is always null.
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:mynetwork="com.mynetwork.*" layout="absolute" creationComplete="init();">
<mynetwork:FileUpload id="fileUpload" creationComplete="fileUpload.init(uploadProgress, upload_photo_url) ;" />
public var baseURL:String;
[Bindable]
private var upload_photo_url : String;
public function init():void{
baseURL = "http://localhost/MyNetwork/";
[B]upload_photo_url = baseURL + "scripts/uploadphoto.php";
}
Can someone tell me how to pass the url string value to creationcomplete function above?
2. How to find base url.
My html or swf url is going to be http://localhost/MyNetwork/network.swf or network.html
I want base url out put is http://localhost/MyNetwork/
and when i run from flex2 then will i have to change some settings?
I can not use context root perhaps because I am using simple flex php project.
I also can not use Application.application.url as it returns complete url , not the base url.
Please let me know if you have some insights.
Pradeep