Skip to content

Instantly share code, notes, and snippets.

@tzmartin
tzmartin / video.thumbnail.js
Created July 10, 2012 17:46
Create Thumbnail Image From Video File, Titanium Mobile
/**
Create Thumbnail of Video File
This snippet captures a thumbnail JPG image, based on a frame @ 2 second time-lapse.
Titanium Mobile
*/
var movie = Titanium.Media.createVideoPlayer({
contentURL:FILENAME,
var win = Ti.UI.createWindow({
backgroundColor:'white'
});
var v = Ti.UI.createScrollView();
win.add(v);
var v1 = Ti.UI.createView({
height:Ti.UI.SIZE,
backgroundColor:'red'
@skypanther
skypanther / app.js
Created September 1, 2011 21:48
Draw gridlines in a Titanium window
// implement like this:
var window = Ti.UI.createWindow({
backgroundColor:'#fff'
});
// draw the gridlines first so your other elements stack on top of them
// without requiring you to set the z-index property of each
var grid = require('gridlines');
grid.drawgrid(10,window);
@jonalter
jonalter / app.js
Created August 31, 2011 22:03
Ti.App.iOS.scheduleLocalNotification example
var win = Ti.UI.createWindow({
backgroundColor:'white'
});
win.open();
var label = Ti.UI.createLabel({
top: 20,
height: 200,
width: 200,
text: "Background the app"
});
@stereoket
stereoket / gpstest.js
Created June 4, 2011 21:45
GPS Lookup demo
var GO = {
init: function(){
// Delete the property data
Ti.API.debug('Removing properties');
Ti.App.Properties.removeProperty("latitude");
Ti.App.Properties.removeProperty("longitude");
Ti.App.Properties.removeProperty("geoAccuracy");
Ti.App.Properties.removeProperty("geoTimestamp");
var propTimestamp = Ti.App.Properties.getString("geoTimestamp");
@dawsontoth
dawsontoth / RecordingVideo.js
Created February 17, 2011 19:43
How to record video, then share or save it. Using Appcelerator Titanium!
/**
* This sample lets you record and share video with Appcelerator Titanium on Android.
* REQUIRES THE 1.6.0 RC OF TITANIUM MOBILE SDK
* http://developer.appcelerator.com/blog/2011/02/release-candidate-for-titanium-mobile-1-6-0.html
*/
/**
* First, create our UI. We'll have two buttons: record, and share.
*/
var win = Titanium.UI.createWindow({
@mschmulen
mschmulen / animate annotation
Created January 3, 2011 21:44
animate an annotation on a mapview
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
var win = Ti.UI.createWindow({
title: "Window Title",
exitOnClose: true
});
win.open();
// CREATE MAP VIEW