There are two main types of Passage Transition links:
1. Markup based links.
[[Link Text->Target Passage Name]]
[[Target Passage Name<-Link Text]]
2. Macro based links.
This second type comes in two main sub-types:
2a. Those that include the Target Passage Name
(link-goto: "Link Text", "Target Passage Name")
2b. Those that require the usage of the (go-to:) macro to indicate the Target Passage Name.
(link: "Link Text")[
(go-to: "Target Passage Name")
]
or
|link>[Link Text]
(click: ?link)[
(go-to: "Target Passage Name")
]
The "to play a sound when you click on a link" example is an instance of 2b which also includes code to play a some audio.
To convert your [[link text->where link goes]] link example into one that also plays some audio you would do the following.
(link: "link text")[
<script>A.track('beep').play();</script>
(go-to: "where link goes")
]
note: I have added line-breaks & indentation to make the above more readable, these can be safely removed.
So an updated version of your (live:) macro based example might look something like the following.
|output>[]
(live: 3s)[\
(stop:)\
(append: ?output)[\
(t8n: "dissolve") + (t8n-time: 3s) + (colour: black)[\
not link text \
(link: "link text")[
<script>A.track('beep').play();</script>
(go-to: "where link goes")
] \
not link text"]\
]
]
You may of noticed that I have made some additional changes to you original example:
1. It is a good idea to stop the timers created by the (live:) macro as soon as possible, thus why I moved the (stop:) macro to the start of the associated hook.
2. It can be difficult to control the exact placement & layout of content generated by a (live:) macro, thus why I used an (append:) macro to inject the generated content into a named hook. This technique also has the added advantage of reducing the HTML structure depth of your page.
3. I used Escaped Link-break markup and line-breaks & indentation to make the code a little more readable.