Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8195463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:08:50+00:00 2026-06-07T05:08:50+00:00

I have a HTML5 comic book for iPad only that I am making interactive.

  • 0

I have a HTML5 comic book for iPad only that I am making interactive. On Page 8 of the comic book (see link below), the scene I am referring to is in the bottom right and should appear dark because there is currently a with a dark version of what is underneath it, to make it look as though light has not been switched on.

Link to the comic

Here’s what I want to happen:

  1. On click, a sound plays (perfect)
  2. On click, the opacity of the dark background layer flickers on and off in sync with the short electricity sound effect heard at the beginning of the sound that plays. The opacity should end at 0, to show that the light is now on.

Here’s what currently happens:

  1. On click, a sound plays (perfect)
  2. On click, the opacity of the dark background layer sets to 0 but it returns to 1 once the user releases the click.

Basically, I to introduce a delay to the opacity and a ‘flicker’ between the opacity parameters to imitate a flickering light.

HTML

<a href="#" onclick="if(!playing) document.getElementById('player').play(); else document.getElementById('player').pause();">

    <div class="ibox" id="p8s5">

        <div id="flicker"></div>    

        <button id="playButt" class="animated flash" onclick="if(!playing) document.getElementById('player').play(); else document.getElementById('player').pause();">                
        </button>

    </div> 

</a>

CSS

div#flicker {
opacity: 1;
-transition-property: opacity;
-webkit-transition-duration: 0s;
-webkit-transition-delay: 0s;
position: absolute;
bottom: 1px; right: 1px;
width: 245px; height: 341px;
background: url('img/p8s5.jpg') no-repeat;
}

div#flicker:active, div#flicker:focus {
  opacity:0;
}

Hope you can help.

Many thanks,
Matt

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T05:08:53+00:00Added an answer on June 7, 2026 at 5:08 am

    This jsfiddle may solve your problem.

    First of all, it creates an animation with css3:

    .animateFlicker {
        -webkit-animation: flicker 17s;    
    }
    
    @-webkit-keyframes flicker{
        0% {opacity:1}
        3% {opacity:0}
        6% {opacity:0}
        7% {opacity:1}
        8% {opacity:0}
        9% {opacity:1}
        10% {opacity:0}
        99% {opacity:0}
        100% {opacity:1}
    }
    

    And then it listens to the click event with jQuery to execute the animation and stop it after the time is over.

    $('#flicker').click(function(){
        var $this = $(this);
        $this.addClass('animateFlicker');
        setTimeout(function() 
        {
            $this.removeClass('animateFlicker');
        }, 17000);    
    });​
    

    Note I have only used webkit, so you will need to change it to make it work properly in all browsers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an html5 video that should work on ipad. Controls must be hide
I have an HTML5 iPad app that works offline. The app essentially consists of
I have some html5 postMessage code: window.addEventListener(message, FA.recieveMessage, false); That listener invokes this function:
I have an HTML5 application that manipulates the browser history to show the proper
I have external html5 canvas that you can paint on some lines using your
I have an HTML5 Canvas on my page along with two text input fields.
I have an HTML5 form that uses JavaScript for the client side validation. If
I have an html5 page with a navbar. Completely scratch coded. I just recently
I have an HTML5 application that requires offline support. For running the application, I
I have an HTML5 page loaded on server along with a geolocation script. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.