Skip to content

Instantly share code, notes, and snippets.

/*
* AppleWidgetController.js
* Copyright (c) 2010-2011 Apple, Inc.
* All rights reserved.
*
* Responsibility: drb
*/
//
// Class: AppleWidgetController
window.onload = function() {
setTimeout(function() {
document.getElementById('Stage_bear_sym_bear').click();
}, 1000);
};
$(document).ready(function() {
var index = $("#player").data("value");
var container = $("#playlist");
var scrollTo = $('#playlist a:nth-child(' + index + ')');
container.scrollTop(scrollTo.offset().top - container.offset().top + container.scrollTop());
});
// compositionReady
// http://forums.adobe.com/message/5534162
var div =sym.lookupSelector("pizza");
$("body").append($(div).css("position", "fixed"));
$(document).ready(function(){
$.ajaxSetup({
url: "/process/",
cache: false
});
$("#topbar .search input[title!=]").hint();
$("#navigation").navigation();
@cacheleocode
cacheleocode / adobe_edge_animate_sound.js
Last active August 29, 2015 13:56
add sound to compositions
// libraries
// http://www.edgedocks.com/edgecommos
// http://buzz.jaysalvat.com
// creationComplete
yepnope({
load: ["edge_includes/EdgeCommons.js","edge_includes/buzz.min.js"]
});
@cacheleocode
cacheleocode / ibooks.js
Last active June 10, 2019 13:49
In iBookstore Asset Guide is a documented javascript library for interactivity in ebooks. After logging in, Select Deliver Your Content Module, Download the iBookstore Fixed Layout EPUB Example, Open the ePub with an editor or Unzip the ePub (I used Textwrangler). Open the JS Folder. There it is! From Textwrangler, I just copied and pasted the c…
/**
* iBooks JS Framework
* Compatibility: iBooks 1.5+
* Copyright © 2009-2011 Apple Inc. All rights reserved.
*
**/
/**
* @name iBooks
* @namespace
//this code converts touch events to mouse events
function touchHandler(event) {
var touches = event.changedTouches,
first = touches[0],
type = "";
switch (event.type) {
case "touchstart": type = "mousedown"; break;
case "touchmove": type = "mousemove"; break;
case "touchend": type = "mouseup"; break;
// extra_finish.touchend
if (e.pageY == undefined)
{
var touch = e.originalEvent.touches [0] || e.originalEvent.changedTouches [0];
this.swipeEndY = touch.pageY;
if(this.swipeEndY < this.swipeStartY - 60) // swipe up
{
// for use in stage action creationComplete
this.swipeStartX;
this.swipeEndX;
this.swipeStartY;
this.swipeEndY;
this.swipePadding = 60; // prevent swipe when clicking
this.onSwipeLeft = function()
{