This is the code that I'm using at the moment, I'm making an mp3 player as a 
college project and I have two drop down lists 1 for albums the other for 
tracks. I have a start movie script which is supposed to bring in the 
folders of albums and the track names, which is not working if you could 
give me any help I'd be thrilled.

This is the code for the album & track scripts.

property pMember, pText, pSelection, pPressed, pLastHilite

on beginsprite me
  pMember = sprite(me.spritenum).member.name
  pText = member(pMember).text
  pSelected = pText.line[1]
  pPressed = FALSE


  member(pMember).text = pSelected

  setMemberRect(me)

  hilite member(pMember).char[the maxInteger]
end


on mousedown me
  pPressed = TRUE
  openPopup(me)
end


on openPopup me
  member(pMember).text = pText
  setMemberRect(me)
  pLastHilite = 0
end

on setMemberRect me
  memRect = member(pMember).rect
  numlines = member(pMember).text.lines.count
  if member(pMember).text.line[numLines] = " " then numLines = numLines -1
  memRect.bottom = memRect.top + (numLines * member(pMember).lineHeight)
  member(pMember).rect = memRect
end

on exitframe me
  if pPressed then
    thisLine = the mouseline

    if (thisline <> pLastHilite) and (thisLine > 0) then
      selectLine(me,thisLine)
      pLastHilite= thisLine
      pSelection = pText.line[thisLine]
    end if
  end if
end


on mouseUp me
  pPressed = FALSE
  closePopup(me)
  makeSelection(me)
end

on mouseupOutside me
  mouseUp(me)
end

on closePopup me
  member(pMember).text = pSelection
  setMemberRect(me)
end


on selectLine me, clickedLine

  if clickedLine = 1 then
    startChar = 1
  else
    startChar = (member(pMember).text.line[1..clickedLine - 1]).length + 2
  end if

  endChar = (member(pMember).text.line[1..clickedLine]).length + 1

  hilite member(pMember).char[startChar..endChar]

end


on makeSelection me

  if pLastHilite > 0 then
    updateStage
    --    alert "You selected" &&(pLastHilite-1)
  end if

end


on endSprite me
  member(pMember).text = pText
end


This is the code for the start movie script

global gcurrentfolder, gfolderloc, gcurrentlocation,tracklisttext

on startmovie


  gcurrentfolder="hello"
  gfolderloc= the pathname & "mp3s"
  gcurrentlocation = gfolderloc & "\" & gcurrentfolder
  tracklisttext=""
  albumlisttext=""


  repeat with filenumber=1 to the maxinteger
    set filename=getNthFileNameinFolder(gfolderloc,filenumber)
    if filename=empty then exit repeat
    put filename after albumlisttext
    put return after albumlisttext
    set the text of member "albumlist" =albumlisttext
  end repeat

  repeat with filenumber=1 to the maxinteger
    set filename=getNthFileNameinFolder(gcurrentlocation,filenumber)
    if filename=empty then exit repeat
    put filename after tracklisttext
    put return after tracklisttext
    set the text of member "trackList" =tracklisttext
  end repeat

end

_____________________________________________________________________________________
Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/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