Skip navigation
adelessert
Currently Being Moderated

Javascript events when changing articles

Aug 20, 2012 8:07 AM

Tags: #html #dps #javascript #ipad #indesign #folio #interactive #digital_publishing_suite

I have an HTML article with some video content, developed only for iPad. I'm running into a problem when changing articles. We have a full screen video that plays through and some javascript bound to the video's 'ended' event to hide the video and load new content. The problem is, if the user switches articles (swipes left or right) during the video, the video is paused and stuck on the screen.

 

What I'm looking for is an event that triggers when the user enters or leaves an HTML article that was already loaded. Are there any such events? Anything I can listen for? I need a way to detect that the user has returned to the article so we can skip the video feature and show the remaining content.

 

Thanks for any help!

 
Replies
  • Currently Being Moderated
    Dec 13, 2012 6:49 AM   in reply to adelessert

    These functions sound like they are very usefull in my line of work but I can't get it to work.. When I execute this javascript on page 3:

     

    window.onAppear(alert("appeared!"));

    window.onDisappear(alert("disappeared!"));

     

    The alerts both come when opening the folio (on the first page)..

     

    Is there some kind of API where I can read more about these wonderful Adobe javascript implementations?

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points