Mark Forums Read
  #1  
Old 08-15-2007, 05:50 PM
ample ample is offline
Junior Member
 
Join Date: Jul 2007
Posts: 4
ample is on a distinguished road
Default Script help required

this is driving me insane, and i can't figure out why its not working...

ok, basically, i've created a template fla file that will dynamically pull the contents from an XML file, and load the data from nodes that correspond to the file name

ie
<node>
<name>foo</name>
</node>
<node>
<name>bar</name>
</node>

if the file is named foo.swf, it will load "foo". got it? good.

i've got the script working like i want...only problem is, it either works locally, and not remotely, or remotely and not locally.

and the problem comes in from the file name. which is in the following convention... XXXXXXX_foo.swf (where X is a digit)
the exact problem is how the "_" is handled. locally, it is translated to "%5F", and remotely, it remains "_".

the way that i'm getting the name is from the _url property.
remotely it returns http://server/path/XXXXXXX_foo.swf
locally it returns file:///path/to/file/XXXXXXX%5Ffoo.swf

so, here is my code...
Code:

Quote:
swfName = _url;
swfName = String(swfName);
if (swfName.substring("_")){
swfName = swfName.split("_");
} else {
swfName = swfName.split("%5F");
}
both of the statements work, they just don't work in the if/else statement. basically its not recognizing the else condition.

the code, like it is written, will work for viewing the file remotely in a browser/webpage. but locally, it is not recognizing the else condition and splitting the file name at the "%5F"

any thoughts?
Reply With Quote
 #Add to Ads's Reputation  
OldSponsored Ads
Ads AdsPromoter is online
Member
 
Join Date: LongTime
Posts: 1100
Ads is on a distinguished road
Default New Sponsored Ads



This message will go away once you are registered. Also, by registering, you will have access to all post topics, communicate privately with other members (PM), respond to polls, upload graphics, and access other special features! Registration is fast, simple and absolutely free so please Click Here to join our Web Hosting community today!
Reply With Quote
  #2  
Old 04-10-2009, 09:19 AM
vks87 vks87 is offline
Member
 
Join Date: Mar 2009
Posts: 85
vks87 is on a distinguished road
Default

I am really confused with your request so give me some time to solve it..
Reply With Quote
 #Add to Ads's Reputation  
OldSponsored Ads
Ads AdsPromoter is online
Member
 
Join Date: LongTime
Posts: 1100
Ads is on a distinguished road
Default New Sponsored Ads



This message will go away once you are registered. Also, by registering, you will have access to all post topics, communicate privately with other members (PM), respond to polls, upload graphics, and access other special features! Registration is fast, simple and absolutely free so please Click Here to join our Web Hosting community today!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 01:55 PM.


Powered by vBulletin Version 3.6.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 2.4.0