giovedì, gennaio 29, 2009

Microsoft Office Labs - pptPlex

This seems like an interesting direction for PowerPoint! Microsoft Office labs is experimenting with a new plug-in for PowerPoint 2007 called pptPlex:

“pptPlex is a plug-in that explores an alternate method for presenting a PowerPoint slide deck. Using pptPlex, you can present your slides as a tour through a zoomable canvas instead of a series of linear slides.”

Here’s a video.

*

Microsoft actually has several experimental projects that can be perused at Microsoft Office Labs.

mercoledì, gennaio 28, 2009

Microsoft SharedView

Microsoft “Shared View” software seems to offer the same features that Adobe PDF Connect and WebEx provide. However, it seems you can get more users for free than either of those solutions.

“Microsoft SharedView is a fast, easy way to share documents and screen views with small groups of friends or coworkers; anytime, anywhere. Use SharedView to put your heads together and collaborate - create, convey, and communicate…across physical boundaries, through firewalls, and down to the smallest details.”

http://connect.microsoft.com/site/sitehome.aspx?SiteID=94

I’m especially amused by their very original “connect” subdomain name. J How original!

lunedì, gennaio 26, 2009

Adobe AIR: Monitoring Your Internet Connection

David Tucker has a great snippet of code on his blog on monitoring your Internet connection in Adobe AIR.

“AIR is meant to facilitate applications that work when online and offline. For example, if you developed an AIR application to manage your blog, you would want to be able to write blog posts whether you were online or offline. To accomplish this, the application would do one of two actions depending on whether it had an internet connection. If it were online, it would take your post and upload it. If it weren't online, it would store it (either in a file or in a local SQLite database).”

To make it work in Flash CS3:

Add the URL Monitor class. How, you might ask? Drag the ServiceMonitorShim component from the Components panel to the Library.

(This will be available to you if you’ve downloaded the AIR update for Flash CS3.)

 

cid:image002.png@01C945AD.633646D0

 

2. Add this import statement:

import air.net.*;

Note: if you don’t do step 1, you might get this annoying error: “1172: Definition air.net could not be found.”

SkyDrive and Rumors of GDrive

More free disk space in “the cloud!”

Windows Live SkyDrive: http://windowslive.com/online/skydrive/

Supposedly, Google will be following suit.

giovedì, gennaio 22, 2009

Detecting Mobile Devices

While exploring ways to detect for mobile devices, I ran across some useful sites:

·         HandsetDetection.com  is a (free) web service that offers the ability to detect which mobile devices are accessing your website.

·         Detecting Smartphones Using JavaScript

·         http://detectmobilebrowsers.mobi/ is a PHP script to detect mobile phones. (It’s $20 for commercial use, and free for private use).

·         There is also a great article at  “A List Apart” article that attempts to use CSS as the main way to detect mobile devices: “Return of the Mobile Style Sheet.” This is something to bookmark, as I think the technique will become more and more useful as more devices make use of implement CSS Media Queries.

·         List of User-Agents (Spiders, Robots, Browser)

Meanwhile, here are a few “quick and dirty” approaches:

JavaScript

if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {
      document.write ("iPhone/iPod detected from JavaScript.")
}

Classic ASP

strUA = LCase(Request.ServerVariables("HTTP_USER_AGENT"))
If InStr(strUA, "iphone") Then
      response.write ("iPhone detected from ASP")
End If

Mobile Awesomeness

This seems like a fun site for Mobile Web Design:

http://www.mobileawesomeness.com/

 

Basic Preloaders in ActionScript 3

SWF Example

 

import flash.net.URLRequest;

import flash.display.Stage;

import flash.display.Loader;

import flash.display.LoaderInfo;

import flash.events.Event;

import flash.events.ProgressEvent;

import flash.text.TextField;

 

var theLoader:Loader = new Loader();

var myRequest:URLRequest = new URLRequest("idx.swf");

theLoader.load(myRequest);

 

var loadProgress_txt:TextField = new TextField();

loadProgress_txt.width = 500;

 

theLoader.contentLoaderInfo.addEventListener(Event.INIT,initHandler);

theLoader.contentLoaderInfo.addEventListener(Event.OPEN,showPreloader);

theLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,showProgress);

theLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,doneLoading);

 

function initHandler(evt:Event):void {

                trace("Init");

                MovieClip(LoaderInfo(evt.target).content).stop();

}

 

function showPreloader(evt:Event):void {

                trace("Show preloader");

                addChild(loadProgress_txt);

}

 

function showProgress(evt:ProgressEvent):void {

                //trace("Show progress")

                loadProgress_txt.text = "loaded:"+evt.bytesLoaded+" from "+evt.bytesTotal;

                trace(loadProgress_txt.text);

}

 

function doneLoading(evt:Event):void {

                trace("Done loading")

                stop();

                removeChild(loadProgress_txt);

                addChild(theLoader);

                MovieClip(LoaderInfo(evt.target).content).play();

}

 

stop();

 

FLV Example

 

import fl.video.*;

import fl.controls.ProgressBarMode;

 

// FLV Playback Pro - http://www.communitymx.com/content/article.cfm?page=1&cid=88033

import com.flashsupport.video.FLVPlaybackPro;

var displayFLV:FLVPlaybackPro = new FLVPlaybackPro();

 

displayFLV.width = 500;

displayFLV.height = 500;

displayFLV.x = 0;

displayFLV.y = 0;

displayFLV.scaleMode = VideoScaleMode.EXACT_FIT;

 

// Prevent full screen takeover

displayFLV.fullScreenTakeOver = false;

 

// Set Variables

var flvSource = flvSourceFile.text; // Obtain FLV filename from parent

trace(flvSourceFile.text);

displayFLV.source = flvSource;

 

// Prevent the FLV from starting until we tell it to

displayFLV.autoPlay = false

 

displayFLV.align = StageAlign.TOP_LEFT;

 

displayFLV.addEventListener(VideoEvent.COMPLETE, goNext);

function goNext(e:VideoEvent):void {

                nextFrame();

}

 

// Create event handler functions to control the progressbar

function progressHandler(event:VideoProgressEvent):void

{

   var bl = Math.round(event.bytesLoaded/1000);

   var bt = Math.round(event.bytesTotal/1000);

 

   // Update progress...

   pb.setProgress(bl,bt);

  

   trace(bl + "/" + bt);

   stuff.text = bl.toString() + "/" + bt.toString();

 

   if (bl >= bt-5) {

                addChild(displayFLV);

                removeChild(pb)

                displayFLV.play()

   }

}

 

// Set progress bar state

pb.mode = ProgressBarMode.MANUAL;

pb.indeterminate = false;

 

// Add listeners and load the video

displayFLV.addEventListener(VideoProgressEvent.PROGRESS, progressHandler);

 

stop();

mercoledì, gennaio 21, 2009

Get URL Parameters Using JavaScript

This is really great! I ran across an article on netlobo.com that provides a short JavaScript function that allows one to access query string parameters the way you can in server-side programming.

“Most of the server-side programming languages that I know of like PHP, ASP, or JSP give you easy access to parameters in the query string of a URL. JavaScript does not give you easy access. With JavaScript you must write your own function to parse the window.location.href value to get the query string parameters you want. Here is a small function I wrote that will parse the window.location.href value and return the value for the parameter you specify. It does this using JavaScript’s built in regular expressions.”

Handy E-mail to SMS Addresses

AT&T: AreaCode+Mobile@mobile.att.net
Verizon: AreaCode+Mobile@vtext.com
Nextel: AreaCode+Mobile@page.nextel.com
T-Mobile: AreaCode+Mobile@tmomail.com
Sprint: AreaCode+Mobile@messaging.sprintpcs.com
Cingular: 1+AreaCode+Mobile@mobile.mycingular.com

Using the Same Video for Flash, QuickTime and the iPhone

Flash and QuickTime (which, unlike Flash [grrr], is supported by the iPhone) both support MP4 video. This means that it is now possible to use the same video file for use in Flash, QuickTime and the iPhone.  I first noticed this possibility while viewing Lee Brimelow’s new “Flasher” magazine. At the very bottom of the page he includes a direct link to the video file – and, it plays perfectly (albeit slowly) on the iPhone.

So…I think this has amazing potential! Apparently, the only trick is to make sure the video is compressed in a way supported by both formats.

One other limitation to keep in mind, is that this would only work for video portions of Flash presentations. Anything contained in the Flash container (player controls, for example) will not work.

One last bit of coolness. Bobby Vandersluis, of SWFObject 2 fame (among other things) has a great mockup that would allow  one to offer video content in a “cascaded manner.”

http://code.google.com/p/swfobject/wiki/iphone_mp4

So, to a prospective video viewer: if Flash is available use that. If Flash is not available, but a player that recognizes QuickTime is available, use that. If neither is available show a graphic. (The graphic, could say: “Really?!”)

lunedì, gennaio 19, 2009

The Newseum

This is a cool mash-up. The Newseum displays daily newspaper front pages every day (they claim to cover 647 front pages from 67 countries as of today). Predictably, I prefer the Flash-based map view. J

sabato, gennaio 17, 2009

Digsby

MC and MSF were telling me about Digsby. I'm just about to download it. :)
"Digsby = IM + Email + Social Networks"

venerdì, gennaio 16, 2009

8 AS3 Snippets

I was going to create a “top 10” list for 2008, but I’d like to make sure I remember to post this…so here are 8 snippets of simple ActionScript 3 code – nothing earth-shattering (especially to an expert), but items I find myself looking up all the time.

 

1.       Disable/enable a button component

myButton.enabled = true;

 

2.       Creating a mask
mc1.mask = mc2;

 

3.       Create a rounded rectangle

// http://www.kirupa.com/forum/showthread.php?p=1878656

var square:Sprite = new Sprite();

square.graphics.beginFill(0xFF);

square.graphics.drawRoundRect(0, 0, 100, 50, 10, 10);

square.graphics.endFill();

addChild(square);

 

4.       Custom cursor

// http://www.eclips3media.com/workshop/2007/12/11/custom-cursor-bug-in-actionscript3/

var hoverMagnify:mcMagnify = new mcMagnify();

hoverMagnify.mouseEnabled = false;

addChild(hoverMagnify)

function mouseMoveHandler(evt:MouseEvent):void {

                // whenever the mouse moves, place the cursor in the same spot

                hoverMagnify.x = mouseX + 1;

                hoverMagnify.y = mouseY + 1;

}

 

5.       Add a sound, and control its volume
var soundBg:Sound = new audioWinterWonderland();

var sc:SoundChannel = soundBg.play(0,999999); // repeat sound 999,999 times

var st:SoundTransform = sc.soundTransform;

st.volume = 1; // set to full volume

 

function changeVolume(): void {

Tweener.addTween(st, {volume:.1, onUpdate:updateChannel, time:1});

}

function updateChannel():void{

                sc.soundTransform = st;

}

 

6.       Loading an asset from a SWF

 [Embed(source="Assets.swf", symbol="MySymbol")]  

var mcClass:Class;

var myMC:MovieClip = new mcClass();

addChild(myMC);

// Note: Per this great blog entry, the default type will be a sprite unless there are two frames on the timeline.

 

7.       Create a timer

var timer:Timer = new Timer(1000, 2);

    timer.addEventListener(TimerEvent.TIMER, blah);

    timer.start();

 

function blah(e:TimerEvent):void{

     trace("Times Fired: " + e.currentTarget.currentCount);

     trace("Time Delayed: " + e.currentTarget.delay);

}

 

8.       Detect if one movieclip is over another

//As the D-mode blog nicely explains:

myMC1.hitTestObject(myMC2);

mercoledì, gennaio 14, 2009

The Virtual Earth Interactive SDK and Windows Live Search

I’m pretty impressed with Microsoft’s efforts on Virtual Earth.

The Interactive SDK makes it easy to generate code snippets. What about the data? It turns out a handy trick is to use Windows Live Search. You can create what they term “a collection.” (How Borg like!) Here’s mine. From there they allow you to export the data in different types of ways. Then you can plug that information into your VE instance.

So, in non-geek terms, this means you can easily use Windows Live Search to generate a list of places to label. Kind of neat! I think Microsoft got it right on this one.

 

martedì, gennaio 13, 2009

Humor: Apple Introduces Revolutionary New Laptop With No Keyboard

Pretty impressive mock newscast! It’s hilarious, too.

 

lunedì, gennaio 12, 2009

wonderfl

BH just told us about wonderfl. It’s a service that allows you can submit ActionScript code and it is compiled instantly.

Pretty Loaded - A preloader museum curated by Big Spaceship

BH pointed out that Big Spaceship has created an amazing archive of what they term “the vanishing art form” of preloaders. As bandwidth increases, I’m sure they are right…but on the other hand, the size of media keeps growing, too! This is an awesome museum in any case:

http://www.prettyloaded.com/

 

venerdì, gennaio 09, 2009

Linking a DIV

MB pointed out a quirky error: when if an image is contained within a <a><div><span> the image itself will not be clickable in IE7. Strange! He pointed me to this site, which mentions this and many other useful web tidbits:

http://bonrouge.com/br.php?page=faq#divlink

 

HAL (Hybrid Assistive Limb)

A cool find from BH! The company is named Cyberdyne…isn’t that the same name used by the creators of SkyNet in the Terminator movies?

“Robot Suit HAL is a cyborg-type robot that can expand and improve physical capability.”

NetDrive - The Network Drive for Windows

A useful (and free) utility!

http://www.netdrive.net/

“With NetDrive, managing your remote FTP and WebDAV servers will be as easy as any old file folders on your PC.”

mercoledì, gennaio 07, 2009

Google Analytics Tracking for Adobe Flash

I was just reading that Adobe and Google have created a “simplified solution for tracking Flash content…called Google Analytics Tracking For Adobe Flash.”

This might be very useful for adding another layer of tracking to our Flash-based projects. There is a nice overview on YouTube, as well as a blog entry on the Google Analytics site. Here’s an excerpt:

This feature is a translation of the current Google Analytics tracking code into the ActionScript 3 programming language that dramatically simplifies the ability to track Flash, Flex and AS3 content. This new Flash tracking code provides all the rich features of the current JavaScript-based version, including campaign, pageview and event tracking and can be used to track Flash content such as embedded videos, branded microsites and distributed widgets, such as online games.

Now it's simple for Flash content developers to answer questions like:

  • How many people have watched my video?
  • Are we developing the right creative that attracts new users?
  • How effective is my content at getting people to take action?

All the technical details and Flash components can be found here.

Augmented Reality with FLARToolKit

BH was pointing out a really great entry from the Papervision 3D blog:

Augmented Reality is a relatively new technology that blends real-world footage and computer-generated graphics in real time, blurring the line between reality and virtual by enhancing what we perceive. It opens a whole lot of possibilities in many fields, from medical to engineering, including entertainment.

Thanks to Japanese coder Saqoosha we can experience it in our browser. With FLARToolKit, an AS3 port of the Open Source library ARToolKit, you can detect a marker from an input image and calculate the camera position in 3D space. Combine it with your favourite 3D engine and you are ready to build your own Augmented Reality applications.”