Thanks Tab and Jeremy for your responses.  I have a question, tho...
doesn't Jeremy's code below, and the concept submitted by Tab require that a sprite be 
present in the frame channel before it will work?  I was looking for a way to create a 
sprite instance at runtime, assign that instance to the same image( folder icon) and 
so on.  But further research on the web tells me that creating a sprite instance and 
placing it in a specific spot at runtime can't be done, apparently.

  Jeremy asked how the list was obtained, so here's the code called from a 
"beginSprite" behavior in the frame.  I'm excluding two files in the count, btw as you 
can see below.  After the count is done, the remainder of the behavior establishes the 
position for each image. However, I have put 10 sprites off stage, as you can tell, 
plus 10 more for the image icons, and I'm just calling them on stage as neeeded.  The 
loch is already lined up off stage, btw.

on countFiles
  fileList = [ ]
  i = 1
  repeat while TRUE
    filename = getNthFileNameInFolder(the moviePath&"\"&"Links"&"\", i)
    if filename = EMPTY then exit repeat
    if fileName = "MyPrefs.txt" or filename = "myPaper.htm" then
      i = i+1
      next repeat
    else
      fileList.append(filename)
    end if
    i = i+1
  end repeat
  
  vLOC = 125
  i = 1
  repeat while fileList <> []
    sprite(i+10).member.text = getAt(fileList,1) --put a name in a field sprite
    deleteAt(fileList,1) --del one from the list
    sprite(i+3).locv = vLOC -- move the folder icon's locv on stage
    sprite(i+10).locv = vLOC-5 -- move the title on stage
    vLOC = vLOC + 24 -- add 24 pixels for the next round
    i = i + 1 -- increment var i
  end repeat
  return fileList
end countFiles

Thanks again, guys...and I like the new look and feel of the list. Haven't been on for 
awhile, and the new organizational feel is great.

John Hart

>Message: 9
>From: "Jeremy" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Subject: RE: <lingo-l> create multiple sprite instances during runtime
>Date: Tue, 4 Mar 2003 08:43:04 -0500
>Reply-To: [EMAIL PROTECTED]
>
>This might help
>
>-- Find a free sprite channel to puppet
>-- Choose a range of numbers you arent using for other sprites
>-- and a range large enough to accommodate however many of them you are
>anticipating
>repeat with i = 100 to 200
>    if sprite(i).puppet = FALSE then exit repeat
>end repeat   
>sp = sprite(i)
>-- puppet it
>sp.puppet = true
>-- set the member.
>sp.member = member("folder")
>sp.loc = point(x,y)
>sp.ink = whatever inkmode you need
>sp.blend = whatever other properties you need
>
>
>J
John Hart
Send email, get paid! 
Sign up with my id, please:
http://www.zwallet.com/join.html?user=johnhart


______________________________________________________
Get Paid... With Your Free Email at
http://www.zwallet.com/index.html?user=johnhart
[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email [EMAIL 
PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping 
with programming Lingo.  Thanks!]

Reply via email to