• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Sound in HTML banner

New Here ,
Feb 09, 2023 Feb 09, 2023

Copy link to clipboard

Copied

Hello, I need help:
I want to put a sound in the HTML5 banner, and have it play when the mouse passes over it.
I also want there to be a one-second delay before activation and also that when they click on the banner they will go to a landing page.
Thank you!

Views

69

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 09, 2023 Feb 09, 2023

Copy link to clipboard

Copied

Hi.

 

Create a Button instance and put the sound in the second frame like in the following pictures:

 

Button's timeline:

image.png

 

Frame's sound set in the Properties panel:

image.png

 

Sound in the Library:

image.png

 

Then write a script like this in the timeline in which the button lives:

this.yourSoundButton.on("click", function()
{
    window.open("https://www.adobe.com/", "_blank");
});

 

About the activation delay: do you want to delay the ability or the button to receive a click or the playback of the sound? Well... In any case, you can use a timeline to delay the action in both cases.

 

Please let us know..

 

Regards,

JC

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 09, 2023 Feb 09, 2023

Copy link to clipboard

Copied

LATEST

@JoãoCésar 

 

i'm not sure the sound button is the only click trigger:

 

this.addEventListener("click",ff);

 

function ff(){
setTimeout(f,1000);
}

 

function f(){

window.open("https://www.adobe.com/", "_blank");

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines