Forum Topic: how to check if a string exists ext

(248 views • 7 replies)

This topic is 1 page long.

<< < > >>
None

Kevisazombie

Reply To Post Reply & Quote

Posted at: 12/19/05 10:11 PM

Kevisazombie LIGHT LEVEL 11

Sign-Up: 03/18/05

Posts: 12

I have a function that loads jpgs into a bunch of movie clips as thumbnails. Some of the sections of my site have more buttons than i do items to thumbnail and I want them to dissapear if there is no corresponding thumbnail to its number.

loading the pics
pics/Web Design4.jpg
pics/Web Design3.jpg
pics/Web Design2.jpg
pics/Web Design1.jpg
Error opening URL "file:///C|/Documents%20and%20Settings/Zet
tler/Desktop/Kevs%20Graphics%20folder/Flas
h%20sites/portfolio%20site/pics/Web Design1.jpg"

right now the output just gives me that error and the button still stays there
I tried putting an if(path == "") in to check against it but that didnt work
so i need some how to check if a string exists external as a path.


None

ssjskipp

Reply To Post Reply & Quote

Posted at: 12/19/05 10:56 PM

ssjskipp LIGHT LEVEL 14

Sign-Up: 10/16/03

Posts: 724

can't you convert it to a string, and use indexOf(); ?

"Give a man a match, and he'll be warm for a minute, but set him on fire, and he'll be warm for the rest of his life."


None

Kevisazombie

Reply To Post Reply & Quote

Posted at: 12/19/05 11:00 PM

Kevisazombie LIGHT LEVEL 11

Sign-Up: 03/18/05

Posts: 12

wait, what!? the location is in a compound string and i dont know how indexof would help me find if the external file exists


None

gorman2001

Reply To Post Reply & Quote

Posted at: 12/19/05 11:05 PM

gorman2001 NEUTRAL LEVEL 14

Sign-Up: 08/18/02

Posts: 1,879

mmm indexOf is for checking of a entry exists in a array...

i suggest PHP with arrays, file_exists(), loops, and variable parsing for your flash.


None

cook

Reply To Post Reply & Quote

Posted at: 12/19/05 11:08 PM

cook EVIL LEVEL 13

Sign-Up: 03/21/04

Posts: 1,930

At 12/19/05 11:05 PM, gorman2001 wrote: mmm indexOf is for checking of a entry exists in a array...

i suggest PHP with arrays, file_exists(), loops, and variable parsing for your flash.

I actually just made one of those today. I made an html version, and a flash version. Loads resized images - or thumbnails - into duplicated movieclips and shows the full image on click. A half decent application.

Wind 'er Up Bill

BBS Signature

None

Kevisazombie

Reply To Post Reply & Quote

Posted at: 12/19/05 11:13 PM

Kevisazombie LIGHT LEVEL 11

Sign-Up: 03/18/05

Posts: 12

KickAss, Thanks guys! i have no freaking idea what you are talking about!


None

shazwoogle

Reply To Post Reply & Quote

Posted at: 12/19/05 11:51 PM

shazwoogle NEUTRAL LEVEL 10

Sign-Up: 09/27/04

Posts: 2,661

At 12/19/05 10:11 PM, Kevisazombie wrote: if(path == "")

try

if(path == undefined)


None

shazwoogle

Reply To Post Reply & Quote

Posted at: 12/19/05 11:52 PM

shazwoogle NEUTRAL LEVEL 10

Sign-Up: 09/27/04

Posts: 2,661

At 12/19/05 11:51 PM, shazwoogle wrote: if(path == undefined)

oops!
this is better

if(path != undefined)


All times are Eastern Standard Time (GMT -5) | Current Time: 12:17 PM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!