Thanks very much for the comments, I know it seems basic (heck it is!)but I
can't seem to get it happening. I'm pretty new to Lingo and haven't had to
learn it before (mostly self taught, and FWIW I love the built in
behaviours, I study them, take them apart and build my own).

Pranav, I tried relinking the filename as I wasn't doing this before but it
still doesn't work.
I have included the code that deals with this ....can anyone see what I am
stupidly missing.

just to fill you in:
The user clicks on an area (pSecTitle)which starts downloading an external
linked cast (pSecTitle&&"thumbnails"), then gets a comma delimited text file
(pSecTitle&.txt) mainly to build new checkboxes ( the text part actually
works including having the check boxes appear)
It then changes over 20 dummy sprites to 10 thumbnails and 10 checkboxes
(and will set up some sort of paging)
The error I get is when it goes to assign the thumbnail, the cast member
can't be found, I don't get an error in the download.

I had used puppetsprite and parent script(just starting to learn this) to
generate these but I couldn't make the buggers go away so I opted for crude
but effective dummy sprites.


on mouseUp me
    if the runmode = "author" then
    set pExt = ".cst"
  else
    set pExt = ".cct"
  end if

  gInSection=TRUE
  pNetTextFlag=FALSE
  pNetCastFlag= FALSE
  Updated = FALSE

  -- preload thumbnails
   pCastURL=the moviepath & pSecTitle && "thumbnails" & pExt
    if pExt = ".cct" then
        pCastNetId =  preloadNetThing (pCastURL)
    end if


  -- get text file
  myTextURL= the moviepath & pSecTitle & ".txt"
  pTextNetID= GetNetText (myTextURL)
-- display loading feedback
  displaymember.text = loadtext
  SectionClicked=TRUE

end

on exitframe me

   if Updated =FALSE and SectionClicked=TRUE then
  -- check if text is loaded
    if netdone(pTextNetID) and  pNetTextFlag=FALSE  then
      error = NetError(pTextNetID)
      if error <> "OK" then
        displaymember.text = errortext
      else
        displaymember.text = ""
        -- create the internal text file from imported text
        hCREATELISTMEMBER
       -- create the new checkbox members based on the imported text file
information
          hCREATEMEMBERS pSecTitle
        pNetTextFlag=TRUE
     end if
    end if


       if netdone(pCastNetID) and pNetCastFlag= FALSE and pNetTextFlag=TRUE
then
       error = NetError(pCastNetID)
      if error <> "OK" then
        displaymember.text = errortext
      else
        castNumber= castLib(pSecTitle&&"thumbnails").number
        castLib(castNumber).filename = pCastURL
        pNetCastFlag=TRUE
      end if
    end if

    -- once we're all done downloadin
    if pNetCastFlag= TRUE and pNetTextFlag=TRUE then
     go to "thumbs"
    hASSIGNMEM 1, 10, 11  -- this calls with  first, last and chkbox sprite
channels
      Updated = TRUE
      SectionClicked=FALSE
    end if
  end if
end



on hASSIGNMEM firstchan, finalchan,ChkBoxChan
  thumbsCast=castLib(pSecTitle&&"thumbnails").number
  checkboxCast=castLib("checkbox").number
 -- dont call more sprites than there are items
  if finalChan>CurrListCount  then
    finalchan=CurrListCount
  end if

  repeat with Chan=firstchan to finalchan
    myCheckBox=gCurrNameList.getAt(Chan)
    mythumPic= myCheckBox&&"thum"

     sprite(Chan).member = member(mythumPic, thumbsCast)
     sprite(ChkBoxChan).member=member(myCheckBox, checkboxCast)

    ChkBoxChan=ChkBoxChan+1
    updatestage
  end repeat

  -- turn off any leftover dummy sprites
  if finalchan<20 then
    repeat with i = 1 to 20
      if Sprite(i).member.name contains "dummy" then
        Sprite(i).visible=FALSE
      end if
    end repeat
  end if

end hASSIGNMEM




Date: Mon, 12 Mar 2001 19:22:36 +0530
From: [EMAIL PROTECTED]
Subject: Re: <lingo-l> How do I use external casts in shockwave

Hi Brad,

Preloading a cast works like this:
When working locally your cast points to a file called "bigcast.cct"
So if you upload it to a url called............





[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