0 Replies Latest reply on Jan 9, 2008 4:11 AM by MughalShahzad

    Which Sprite

    MughalShahzad Level 1
      I have sound sprite in different segments on sound channel one, each segment is separate sound cost member and separated by markers, I want to know the name of playing sound member for this purpose I did the following code. The required information is being stored in this list successfully.

      set SoundMemList = [:]
      vMarkers=integer(the labelList.line.count)
      vMarkers = abs(vMarkers)-2
      repeat with i = 1 to vMarkers
      SoundMemList.addProp(#Markers, [#Marker: i, #Members: [#Member: member("s" & i).name, #Dur:member("s" & i).duration]])
      set vDuration = vDuration + member("s" & i).duration
      end repeat
      In the list I am keeping record of duration of each sound cost member and a separate variable to calculate the total duration to show the total playing time of the movie. Its being stored in the variable vDuration.
      I want to show running time in hours:minutes:seconds. what should I do here?
      following code segment tells me which sound cost member is being played and its currentTime
      property pSoundChannel
      property pSoundMember

      on beginSprite me
      pSoundMember = member("s1") --Only for one member
      pSoundChannel = sound(1)
      set vSplitCurrentTime = pSoundChannel.currentTime

      But you see I have to tell myself the cost member in line

      pSoundMember = member("s1")
      It should pick the name of cost member dynamically. what should I do here?
      another problem is, this works on begineSprite behavior only. I don't want this, what should I do here?

      to get the name of playing cost member I was keeping record of cost member's name in the list when I try to give this name to the above code it does not work and requires for object. I want to execute above code at enterframe movie script which is as follows

      if the framelabel <> 0 then
      set vFrameLabel = the frameLabel
      set vSplitDur = getAt(getAt(getAt(SoundMemList, abs(integer(vFrameLabel))),2),2)
      set vSplitMem = getAt(getAt(getAt(SoundMemList, abs(integer(vFrameLabel))),2),1)

      pSoundMember = member(vSplitMem )
      pSoundChannel = sound(1)
      set vSplitCurrentTime = pSoundChannel.currentTime
      end if
      here I want to know the currentTime of the segment of playing sound cost member, why, because if the user clicks the repeat button only a segment which is being played should rewind only and I am keeping running time, if user repeats a segment the running time also affects, what should I do HERE?

      Hope I you understand my problem, Please guide me.