This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int oWidth = 20; | |
int oHeight = oWidth; | |
int oX; | |
int oY; | |
void setup() { | |
size(800,600); | |
background(0); | |
oX = floor(random(width/oWidth)) * oWidth; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int oWidth = 20; | |
int oHeight = oWidth; | |
int oX; | |
int oY; | |
void setup() { | |
size(800,600); | |
background(0); | |
oX = floor(random(width/oWidth)) * oWidth; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int oWidth = 20; | |
int oHeight = oWidth; | |
int oX; | |
int oY; | |
void setup() { | |
size(800,600); | |
background(0); | |
oX = floor(random(width/oWidth)) * oWidth; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// as of 1.4.2 the mobile safari reports wrong values on offset() | |
// http://dev.jquery.com/ticket/6446 | |
// remove once it's fixed | |
if ( /webkit.*mobile/i.test(navigator.userAgent)) { | |
(function($) { | |
$.fn.offsetOld = $.fn.offset; | |
$.fn.offset = function() { | |
var result = this.offsetOld(); | |
result.top -= window.scrollY; | |
result.left -= window.scrollX; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
$('a.sc-external-link').live('click', function(event) { | |
// simulate the click on the tracklist item | |
$('ol.sc-trackslist a[href=' + this.href +']').click(); | |
}); | |
</script> | |
<!-- HTML --> | |
<div class="sc-player"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="#" class="sc-remote-link">Toggle player</a> | |
<!-- add a customizable remote control button --> | |
<script type="text/javascript"> | |
$(function() { | |
// sc-player remote control simulates the click on the play/pause button | |
$('a.sc-remote-link').live('click', function(event) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.soundcloud.utils { | |
import flash.utils.ByteArray; | |
/** | |
* @author Matas Petrikas (SoundCloud) matas@soundcloud.com | |
* | |
* extract latest Git revision number for later use in AS3 | |
* based on SVNUtil class by Apt labs: | |
* http://labs.apt.no/2009/11/20/automatically-embedding-a-subversion-revision-number/ | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2. code: | |
[soundcloud]{url}[/soundcloud] | |
3.replacement: | |
<object height="81" width="100%"><param name="movie" value="http://player.soundcloud.com/player.swf?url={url}&g=bb"></param><param name="allowscriptaccess" value="always"></param><embed allowscriptaccess="always" height="81" src="http://player.soundcloud.com/player.swf?url={url}&g=bb" type="application/x-shockwave-flash" width="100%"></embed></object> <a href="{url}">{url}</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<object height="345" width="100%"> <param name="movie" value="http://player.soundcloud.com/player.swf?url=http://soundcloud.com/Fmatas/sets/remixes-128&start_track=2"></param> <param name="allowscriptaccess" value="always"></param> <embed allowscriptaccess="always" height="345" src="http://player.soundcloud.com/player.swf?url=http://soundcloud.com/Fmatas/sets/remixes-128&start_track=2" type="application/x-shockwave-flash" width="100%"></embed> </object> <span><a href="http://soundcloud.com/matas/sets/remixes-128">Remixes</a> by <a href="http://soundcloud.com/matas">matas</a></span> | |
this would load the 3rd track (first is 0) |