Starting a player from another card
Posted: Mon May 12, 2014 1:59 pm
I'm using LiveCode Community Edition 6.6.0 build 4003 on a MacBook Air running Mac OS 10.7.5
I have a audio player called "playerNote" on card "cardA" that plays a WAV file lasting about 2 sec.
Player "playerNote" plays fine when invoked by buttons or other calls from card "cardA", as in first example below.
Now I want to play "playerNote" when I click a button on card "cardB" or I make calls from card "cardB", as in the second example below.
However in the second case, where the player is being started from a card other than the one it is on, the player is not sounding
/*Script and player are both on card "cardA" */
on mouseUp
start player "playerNote"
end mouseUp
/*Script is on card "cardB" but player is still on card "cardA" */
on mouseUp
start player "playerNote" of card "cardA" of stack "myStack"
end mouseUp
I can't see what is probably an obvious problem, so thanks for any suggestions!
I have a audio player called "playerNote" on card "cardA" that plays a WAV file lasting about 2 sec.
Player "playerNote" plays fine when invoked by buttons or other calls from card "cardA", as in first example below.
Now I want to play "playerNote" when I click a button on card "cardB" or I make calls from card "cardB", as in the second example below.
However in the second case, where the player is being started from a card other than the one it is on, the player is not sounding
/*Script and player are both on card "cardA" */
on mouseUp
start player "playerNote"
end mouseUp
/*Script is on card "cardB" but player is still on card "cardA" */
on mouseUp
start player "playerNote" of card "cardA" of stack "myStack"
end mouseUp
I can't see what is probably an obvious problem, so thanks for any suggestions!