This content has been marked as final. Show 4 replies
You'll find that a lot of xtras have problems concatenating file paths using variables. The solution is to put the whole path into a variable:
selectImg = _movie.path & "GA-VE4-IMG1.jpg"
it does'nt work, nothing happend. Don't forget that I'm in flash so if my variable is
selectImg = _movie.path & "GA-VE4-IMG1.jpg" the result is 0. And I cannot use the specific name cause it come to the point before. If I use direclty
getURL('lingo: baOpenFile(_movie.path & "GA-VE4-IMG1.jpg", "Normal")'); it's working but it has to be dynamic cause if I have 50 images, i don't want to use 50 line of script. Right now
_global.selectImg = etage + "-" + systeme + "-IMG1.jpg";
it use the floor (etage) variable and system (systeme) variable to define the name of the file to open. ex: GA-VE1-IMG1.jpg = (garage)-(VE1 system)-Image1.jpg. When I go to an other system i use the same code and the file change dynamicly to GA-A2-IMG2.jpg etc.. like that If i have 10-25 systems, i dont have to touche the code again. All i want to do is to lauch the jpg. I was using the getURL within flash but bacause it's in director getURL does'nt work anymore. BuddyAPI is a good xtra but if I can't use variable it's not that good.
Then the simple solution is to just pass the file name that you want to use and not the movie path. Just do this from your Flash movie:
and then in the Director movie use a getURL function to intercept the string that you send. Something like this:
on getURL me, string
fileToUse = _movie.path & string
Attach that to the Flash sprite and it should do the job
thanx for the help it's working :)