Particular behavior
Geoff Canyon
gcanyon at gmail.com
Wed Jan 24 14:14:58 EST 2018
If I'm understanding correctly, then sure, given the caveat that only
buttons and script-only stacks (and maybe regular stacks?) can be
behaviors. So either:
Put the callback handler(s) that are currently in card “CardFoo" of stack
“StackFoo” into a button. Set the button as the behavior of the player.
or:
Create a script-only stack. Put the callback handler(s) that are currently
in card “CardFoo" of stack “StackFoo” into the script of that stack. Save
the stack someplace relevant to your project, for example, right next to
your project, or in a folder called something like "behaviors" that is
right next to your project. Then set the stack as the behavior for your
player, and remember to set the stackfiles property of the stack the player
is in to include a reference to the new script-only stack.
Work on a copy, or just be careful to document exactly what you do so you
can roll it back if needed.
On Tue, Jan 23, 2018 at 1:25 PM, Peter Bogdanoff via use-livecode <
use-livecode at lists.runrev.com> wrote:
> Hi,
>
> With all the discussion of behaviors… I haven’t used behaviors yet, but am
> wondering if that will work in this scenario:
>
> I have a stack “PlayerFoo” containing a player, the player has callbacks
> set.
> When the player plays, I want the callbacks to be handled by a card script
> in another stack.
>
> I could have a card script in the same card that has the player. This card
> script could have a handler doCallback containing the command:
>
> send “doCallback” to card “CardFoo" of stack “StackFoo” with
> tCallback
>
> where the callback is then acted on.
>
> Is there a way to apply behaviors to this scenario?
>
> Peter Bogdanoff
> ArtsInteractive
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list