[Top] [All Lists]

Re: Couple of Scripting questions

Subject: Re: Couple of Scripting questions
From: Sean Wilson
Date: Thu, 28 Feb 2008 09:02:37 +1300
Newsgroups: macromedia.director.lingo

You can set the itemDelimiter and grab the last item:
tFilename = baGetFilename(...)
tDelim = the itemDelimiter
the itemDelimiter = the last char of the moviePath
tFile = the last item of tFilename
the itemDelimiter = "."
tName = tFile & ""
delete the last item of tName
the itemDelimiter = tDelim
-- tName = "myDoc"; tFile = "myDoc.txt"

#2: If I change the association of a video member, is there a way to have it 1)detect the size 2) resize the sprite 3)resize the projector window if neccesary? (I can probably just make the projector window big enough so there is no need to set the size)?
What do you mean by "change the association of a video member"? I'm
guessing you mean change its filename. If so, you can query member.width
and member.height after setting member.filename and use this to set
sprite.width and sprite.height and adjust your projector window size if
3: If I want to load a few files, and want them to be separate variables, e.g. file1, file2, etc., is there a way to use the variables with the same name, and have it go to the first available one - if file(#) > "" then use variable file(# + 1)?
I'm not understanding your question, but it looks/sounds like a list
might apply for the job.
4: Is there a way to load multiple video files to play in a row, and give the option to add a file to the existing list?
You can "load" multiple files to play in a row by monitoring the sprite
playing the current video for completion then swap the member.filename
and so forth until done.
As far as adding to an existing list, it can be done but details depend
on your implementation. That is, you need to provide more detail.

<Prev in Thread] Current Thread [Next in Thread>