Skip to content

Instantly share code, notes, and snippets.

map = new Map();
map.key = API_KEY;
map.sensor = "false"; // sensor to determine the user's location(mobile)
map.setSize(new Point(stage.stageWidth, stage.stageHeight));
map.addEventListener(MapEvent.MAP_PREINITIALIZE, onPreInit);
map.addEventListener(MapEvent.MAP_READY, onMapReady);
addChild(map);
private function onMapReady(e:MapEvent):void
{
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>GooglePlusDemo</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="language" content="en" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<script src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js" type="text/javascript"></script>
@wwwins
wwwins / gist:1261273
Created October 4, 2011 09:55
away3d demo
package
{
import away3d.cameras.Camera3D;
import away3d.containers.ObjectContainer3D;
import away3d.containers.Scene3D;
import away3d.containers.View3D;
import away3d.materials.VideoMaterial;
import away3d.primitives.Cube;
import away3d.primitives.Trident;
import flash.display.Sprite;
@wwwins
wwwins / gist:1261286
Created October 4, 2011 10:05
away3d demo HoverCamera3D
package
{
import away3d.cameras.HoverCamera3D;
import away3d.containers.ObjectContainer3D;
import away3d.containers.Scene3D;
import away3d.containers.View3D;
import away3d.materials.VideoMaterial;
import away3d.primitives.Cube;
import away3d.primitives.Trident;
import flash.display.Sprite;
package
{
import away3d.animators.PathAnimator;
import away3d.cameras.Camera3D;
import away3d.containers.ObjectContainer3D;
import away3d.containers.Scene3D;
import away3d.containers.View3D;
import away3d.core.utils.Debug;
import away3d.materials.ColorMaterial;
import away3d.materials.VideoMaterial;
package
{
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.events.Event;
import flash.net.URLLoader;
import flash.net.URLLoaderDataFormat;
import flash.net.URLRequest;
import flash.utils.getTimer;
/**
* @mxmlc -debug -o=bin/ClassName.swf
* //@mxmlc -o=bin/ClassName.swf -l=GATracking.swc
*/
package
{
import flash.display.Sprite;
public class ClassName extends Sprite
{
package
{
import net.flashpunk.Entity;
import net.flashpunk.FP;
import net.flashpunk.graphics.BitmapFont;
import net.flashpunk.graphics.BitmapText;
import net.flashpunk.graphics.Text;
import net.flashpunk.Tween;
import net.flashpunk.tweens.motion.LinearMotion;
import net.flashpunk.utils.Ease;
@wwwins
wwwins / gist:1768242
Created February 8, 2012 11:15
PreloaderScaffold
package pages
{
import com.gaiaframework.templates.AbstractPreloader;
import com.gaiaframework.api.Gaia;
import com.gaiaframework.events.*;
import com.greensock.TweenMax;
import flash.display.*;
import flash.events.*;
import flash.text.*;
package
{
import flash.display.Sprite;
import flash.events.Event;
import flash.text.Font;
/**
* 注意 document main class 不要用 main 會跟 loader main class 打架
*/
public class MainFont extends Sprite