Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Modifying a loaded variable to make it a URL

Status
Not open for further replies.

Flashgordon

Technical User
Apr 5, 2001
52
GB
Hi all

I'm sure this can be done but I'm a bit rusty...
I have loaded a variable from a text file and I need to convert it into a path and filename so I can use it as a name for a loadmovie action.

Example:
variable loaded: 709545400
what I need to convert it to:
images\mouldings\709_545_400.swf

Here's what I've done so far, but the first variable is coming up as 0, what am I doing wrong?

loadm = substring(item, 1, 3) + "_" + substring(item, 4, 3) + "_" + substring(item, 7, 3) + ".swf";
loadmurl = "images\\mouldings\\"+loadm;
loadMovie (loadmurl, "picture");

thanks in advance

Andy.
 
Bugger me, I've done it now, but I'll leave the thread here for others to see.

What I've done:

loadm = String (substring(item, 1, 3) + "_" + substring(item, 4, 3) + "_" + substring(item, 7, 3) + ".swf");
loadmurl = "images\\mouldings\\"+loadm;
loadMovie (loadmurl, "picture");
stop ();


Andy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top