PDA

View Full Version : jquery mobile and swiffy



wwfc
10-14-2013, 07:23 AM
hi all... off to a mare of a start to the week!
does anyone know how i can make a swiffy conversion play only when the div it is in gets swiped to. or a workaround for it...
i am using jquery mobile swipe example for all of the pages and the user swipes through the pages in turn etc...
on the one page there is a simple animation that writes out some text - it does this only once and then stops. the animation begins straight away - and i can't realistically just add some blank frames to the start as there is no way of knowing how long it will take the user to get to said page/animation.
i have read about different ways of restarting a swiffy animation - or making it wait until the page/div is called - but i have no idea of how to implement this...
the code itself is very simplistic...
it calls the runtime file at the start of the doc... and then has this in the relevant place for the swiffy movie itself:

<li class="page">
<div id="apDiv2"></div>
<div id="swiffycontainer1" style="width: 1024px; height: 768px">
</div>
<script>
var stage = new swiffy.Stage(document.getElement...
swiffyobject1);
stage.start();
</script>

anyone know how i can refresh/restart or simply start the animation as it is swiped to?
:-(