Advertisement
Guest User

Director export code v3

a guest
Jun 20th, 2018
717
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. on exportImages
  2. mPath = _movie.path
  3. savePath = "your_path_here" --replace this with the folder you want to export to
  4. sx = xtra("SharpExport").new()
  5. if objectP(sx) = 0 then
  6. alert "SharpExport initialization failed"
  7. exit
  8. end if
  9. repeat with n = 2 to the number of castLibs
  10. nMembers = castLib(n).member.count
  11. cFileName = castLib(n).name
  12. repeat with m = 1 to nMembers
  13. tMember = member(m, n)
  14. if tMember.type = #bitmap then
  15. tName = tMember.name
  16. tNumS = string(m)
  17. mNumS = string(n)
  18. OK = sx.exportBMP(tMember, savePath & "\" & cFileName & "-" & tNumS & ".bmp")
  19. if OK <> 0 then put "Export msg code:", OK, n, m
  20. end if
  21. end repeat
  22. end repeat
  23. put "Done..."
  24. end
  25.  
  26. on exportAudio
  27. mPath = _movie.path
  28. savePath = "your_path_here" --replace this with the folder you want to export to
  29. repeat with n = 2 to the number of castLibs
  30. nMembers = castLib(n).member.count
  31. cFileName = castLib(n).name
  32. repeat with m = 1 to nMembers
  33. tMember = member(m, n)
  34. if tMember.type = #sound then
  35. tName = tMember.name
  36. if tName = EMPTY then tName = string(m)
  37. tNumS = string(m)
  38. mNumS = string(n)
  39. OK = axLoadSound(tNumS, "member", tMember)
  40. if OK <> 0 then put "axLoadSound failed:", OK, n, m
  41. OK = axConvertToFile(tNumS, savePath & "\" & cFileName & "-" & tNumS & ".wav", "WAVE")
  42. if OK <> 0 then put "Export msg code:", OK, n, m
  43. OK = axRemoveSound(tNumS)
  44. end if
  45. end repeat
  46. end repeat
  47. put "Done..."
  48. end
  49.  
  50. --end of code
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement