Go Back   CodingForums.com > :: Client side development > Flash & ActionScript

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-17-2009, 08:57 PM   PM User | #1
abhishek_c2
New to the CF scene

 
Join Date: Apr 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
abhishek_c2 is an unknown quantity at this point
Dynamic text disappears in localhost

Hi,
I have a rather strange issue here. My flash contains a dynamic text field, which is populated from a PHP file using LoadVars. Here is how my ActionScript looks like:
Code:
//=================================
// INIT
//=================================
path = "";//declare path to php files
lvOut = new LoadVars();//create lv object
lvIn = new LoadVars();//create lv object
lvIn.onLoad = function(success) {
	if (success) {
		//PHP variable value to textbox
		//trace("success");
		_level0.menu1.menu1 = "<a href='" + lvIn.url1 + "'>" + lvIn.title1 + "</a>";
	}
};

//get results returned to lvIn
lvOut.sendAndLoad(path + "createMenu.php",lvIn,"POST");
When I publish this flash and keep the php file at the same location as the swf, everything works fine. However the moment I add this flash to the website that I am developing in my localhost, the text disappears, although the background animation works fine. I doubly checked the location of the php file and its path in flash, but with no luck.

Any help would be fantastic

Thanks in advance,

Abi.

Last edited by abhishek_c2; 04-17-2009 at 08:59 PM.. Reason: Spelling mistake in title
abhishek_c2 is offline   Reply With Quote
Old 04-19-2009, 08:32 PM   PM User | #2
gnomeontherun
Senior Coder

 
gnomeontherun's Avatar
 
Join Date: Sep 2007
Location: Houston
Posts: 2,846
Thanks: 10
Thanked 238 Times in 229 Posts
gnomeontherun will become famous soon enoughgnomeontherun will become famous soon enough
If you are on a localhost, then try putting http://localhost/phpfile.php instead of relative. It has something to do with the file's location, possibly not in the root folder.
__________________
jeremy - gnomeontherun
Educated questions often get educated answers, and simple questions often get simple answers.
gnomeontherun is offline   Reply With Quote
Reply

Bookmarks

Tags
dynamic, loadvars, php, text

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:15 PM.


Advertisement
Log in to turn off these ads.