<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>zedia flash blog &#187; TubeLoc</title>
	<atom:link href="http://www.zedia.net/tag/tubeloc/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zedia.net</link>
	<description>Flash, ActionScript, SEO and everything in between</description>
	<lastBuildDate>Wed, 21 Jul 2010 17:07:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Using the ActionScript 3 YouTube Api</title>
		<link>http://www.zedia.net/2010/using-the-actionscript-3-youtube-api/</link>
		<comments>http://www.zedia.net/2010/using-the-actionscript-3-youtube-api/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 20:33:37 +0000</pubDate>
		<dc:creator>zedia.net</dc:creator>
				<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[HD]]></category>
		<category><![CDATA[TubeLoc]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[YouTube]]></category>

		<guid isPermaLink="false">http://www.zedia.net/?p=572</guid>
		<description><![CDATA[On October 14th YouTube released a new version of it&#8217;s API for Flash. This version would support ActionScript 3. Previously discussed on here was the library TubeLoc which was basically an AS3 wrapper around the ActionScript 2 API. Now the new API does all TubeLoc pertmitted us to do and even more. Well loading a [...]]]></description>
			<content:encoded><![CDATA[<p>On October 14th YouTube released a new version of it&#8217;s API for Flash. This version would support ActionScript 3. Previously discussed on <a href="http://www.zedia.net/2009/how-to-load-a-youtube-movie-into-flash-using-tubeloc/" target="_self">here was the library TubeLoc</a> which was basically an AS3 wrapper around the ActionScript 2 API. Now the new API does all TubeLoc pertmitted us to do and even more.</p>
<p>Well loading a YouTube video in ActionScript 3 has never been easier and there is nothing to download (which has its downside in some way)to get started.</p>
<p>Here is all the code needed to load a YouTube movie:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package <span style="color: #66cc66;">&#123;</span>
 <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">DisplayObject</span>;
 <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Loader</span>;
 <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
 <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
 <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLRequest</span>;
&nbsp;
 <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Main <span style="color: #0066CC;">extends</span> Sprite <span style="color: #66cc66;">&#123;</span>
  <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _loader : Loader;
  <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _player : <span style="color: #0066CC;">Object</span>;
&nbsp;
  <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Main<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> 
  _loader = <span style="color: #000000; font-weight: bold;">new</span> Loader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
  _loader.<span style="color: #006600;">contentLoaderInfo</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">INIT</span>, _onLoaderInit, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
  _loader.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;http://www.youtube.com/apiplayer?version=3&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
  <span style="color: #66cc66;">&#125;</span>
&nbsp;
  <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> _onLoaderInit<span style="color: #66cc66;">&#40;</span>event : Event<span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
  _player = _loader.<span style="color: #006600;">content</span>; 
  _player.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;onReady&quot;</span>, _onPlayerReady, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
  addChild <span style="color: #66cc66;">&#40;</span>DisplayObject<span style="color: #66cc66;">&#40;</span>_player<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
  _loader.<span style="color: #006600;">contentLoaderInfo</span>.<span style="color: #006600;">removeEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">INIT</span>, _onLoaderInit<span style="color: #66cc66;">&#41;</span>;
  _loader = <span style="color: #000000; font-weight: bold;">null</span>;
  <span style="color: #66cc66;">&#125;</span>
&nbsp;
  <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> _onPlayerReady<span style="color: #66cc66;">&#40;</span>event : Event<span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
  _player.<span style="color: #006600;">removeEventListener</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;onReady&quot;</span>, _onPlayerReady<span style="color: #66cc66;">&#41;</span>;
  <span style="color: #808080; font-style: italic;">// Once this event has been dispatched by the player, we can use</span>
  <span style="color: #808080; font-style: italic;">// cueVideoById, loadVideoById, cueVideoByUrl and loadVideoByUrl</span>
  <span style="color: #808080; font-style: italic;">// to load a particular YouTube video.  </span>
  _player.<span style="color: #006600;">setSize</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">640</span>, <span style="color: #cc66cc;">360</span><span style="color: #66cc66;">&#41;</span>;
  _player.<span style="color: #006600;">loadVideoById</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;D2gqThOfHu4&quot;</span><span style="color: #66cc66;">&#41;</span>;
  <span style="color: #66cc66;">&#125;</span>
 <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>You can compile this code as an ActionScript project or make it the Document class of an fla in the Flash IDE to make it work.</p>
<p>So you start by loading the player using a normal Loader. Once the player is loaded you have to wait for it to send the onReady event before you can interact with it. Once this is done you can call all of the function from the API.</p>
<p>The previous code would load the chromeless YouTube player; but if you wanted to use the controls from YouTube you would only have to replace one line:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">//_loader.load(new URLRequest(&quot;http://www.youtube.com/apiplayer?version=3&quot;));//replace this line with the following</span>
_loader.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;http://www.youtube.com/v/VIDEO_ID?version=3&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;<span style="color: #808080; font-style: italic;">//replace VIDEO_ID with the id of the video you want to load in the previous case :&quot;D2gqThOfHu4&quot;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">//also you can comment the following line if you don't want the video to start automatically:</span>
_player.<span style="color: #006600;">loadVideoById</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;D2gqThOfHu4&quot;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>All the functionalities that where accessible with TubeLoc are also accessible with the AS3 API and there are some more. Those are methods to control the quality setting of the loaded movie. You can set the quality to small, medium, large and hd720. To do so you have 3 methods on the player. getPlaybackQuality():String will return the quality of the video currently playing. setPlaybackQuality(suggestedQuality:String) enables you to set the quality. Finally, getAvailableQualityLevels():Array will return you all the possibilities of quality that you can set the current video to.</p>
<p>For more information on the topic, refer to the API : <a href="http://code.google.com/apis/youtube/flash_api_reference.html" target="_blank">http://code.google.com/apis/youtube/flash_api_reference.html</a></p>
<div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.zedia.net%2F2010%2Fusing-the-actionscript-3-youtube-api%2F&amp;layout=standard&amp;show-faces=false&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:550px; height:70px;"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://www.zedia.net/2010/using-the-actionscript-3-youtube-api/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to load a YouTube movie into Flash using TubeLoc</title>
		<link>http://www.zedia.net/2009/how-to-load-a-youtube-movie-into-flash-using-tubeloc/</link>
		<comments>http://www.zedia.net/2009/how-to-load-a-youtube-movie-into-flash-using-tubeloc/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 17:04:07 +0000</pubDate>
		<dc:creator>zedia.net</dc:creator>
				<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[FFDMag]]></category>
		<category><![CDATA[TubeLoc]]></category>
		<category><![CDATA[Video Player]]></category>
		<category><![CDATA[YouTube]]></category>

		<guid isPermaLink="false">http://www.zedia.net/?p=491</guid>
		<description><![CDATA[I have written this article a while back for FFDMag, but I thought I would put it here also. It lost a bit of relevance because YouTube now has an AS3 API for its player, but if you work on a project that uses TubeLoc, I think this article can be useful. What you should [...]]]></description>
			<content:encoded><![CDATA[<p><em>I have written this article a while back for <a title="FFDMag" href="http://ffdmag.com/magazine/881-branding-for-developers" target="_blank">FFDMag</a>, but I thought I would put it here also. It lost a bit of relevance because YouTube now has an <a title="YouTube AS3 API" href="http://code.google.com/apis/youtube/flash_api_reference.html" target="_blank">AS3 API</a> for its player, but if you work on a project that uses TubeLoc, I think this article can be useful.</em></p>
<p><strong>What you should know:</strong><br />
- Basic knowledge of ActionScript<br />
- Basic knowledge of YouTube</p>
<p><strong>What you will learn:</strong><br />
- How to load YouTube videos into Flash<br />
- How to use the TubeLoc library to control those videos</p>
<p>Embedding a YouTube movie in an HTML page is an easy task, but we can&#8217;t say the same about embedding a YouTube clip in a Flash/Flex website. TubeLoc, an opensource library, is there to make that easier.</p>
<p>Before TubeLoc, you could always go and try to find the address of the FLV the YouTube player is loading and load that FLV directly into your Flash application, but YouTube changes the address almost every night, so it wasn&#8217;t a very long term solution. Another problem that TubeLoc solves is the fact that the YouTube player is made in ActionScript 2 and most projects now are using ActionScript 3, so it was hard interfacing with the player. TubeLoc is a wrapper around the the AS2 player and show us an AS3 API, but behind the scene it handles the YouTube player using local connection.</p>
<p>To get started with TubeLoc you will first need to download the library at this address:</p>
<p><a title="TubeLoc" href="http://code.google.com/p/tubeloc/" target="_blank">http://code.google.com/p/tubeloc/</a></p>
<p>There you will also find a great demo showing you what you can do with the library. You can pause, stop, play, mute, seek, change the volume, change the the size of the video and even load the video without the YouTube player chrome (so you won&#8217;t see the play button from YouTube the only thing that will be there is the YouTube logo at the bottom right of the video).</p>
<p>In the zip file that you download from the previous url, copy the &#8220;com&#8221; folder located in the &#8220;as3/src&#8221; folder in the same directory where your FLA will be. Also copy there the file as2_tubeloc.swf from the folder &#8220;as3/lib&#8221;. Now we can get coding. Here is all that is needed to load a YouTube movie into Flash:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">enefekt</span>.<span style="color: #006600;">tubeloc</span>.<span style="color: #006600;">MovieSprite</span>;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">enefekt</span>.<span style="color: #006600;">tubeloc</span>.<span style="color: #006600;">event</span>.<span style="color: #66cc66;">*</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> youtubeMovie:MovieSprite = <span style="color: #000000; font-weight: bold;">new</span> MovieSprite<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">null</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
youtubeMovie.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>PlayerReadyEvent.<span style="color: #006600;">PLAYER_READY</span>, onPlayerReady<span style="color: #66cc66;">&#41;</span>;
addChild<span style="color: #66cc66;">&#40;</span>youtubeMovie<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onPlayerReady<span style="color: #66cc66;">&#40;</span>event_p:PlayerReadyEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
<span style="color: #808080; font-style: italic;">//it's just cleaner to remove listener that won't be used again</span>
youtubeMovie.<span style="color: #006600;">removeEventListener</span><span style="color: #66cc66;">&#40;</span>PlayerReadyEvent.<span style="color: #006600;">PLAYER_READY</span>, onPlayerReady<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">//you can set the size of the movie this way</span>
youtubeMovie.<span style="color: #0066CC;">width</span> = <span style="color: #cc66cc;">370</span>;
youtubeMovie.<span style="color: #0066CC;">height</span> = <span style="color: #cc66cc;">276</span>;
&nbsp;
youtubeMovie.<span style="color: #006600;">loadVideoById</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;tprMEs-zfQA&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>The first lines import the library from the &#8220;com&#8221; folder we copied. After that it creates the MovieSprite. The first parameter is the id of the YouTube movie, since I will set that later I can just pass null to it. The second parameter is if I want to use the chromeless player, in this case I set it to true. The chromeless player is usefull when you want the video player to have control that are similar to the rest of your application. It is also usefull when you want to put your video under a mask to escape the traditonnal square look of videos. If we continue with the code, after we created the MovieSprite, we have to wait for the player to be initialized to go on that&#8217;s why we put an event listener on the MovieSprite(youtubeMovie). Once the listener function is called, all that is left to do is call the loadVideoById method. Finding a video id from YouTube is really easy; if the url of the video you want to load looks like this:</p>
<p><a title="Youtube video" href="http://www.youtube.com/watch?v=tprMEs-zfQA">http://www.youtube.com/watch?v=tprMEs-zfQA</a></p>
<p>Than your id is only the last part : &#8220;tprMEs-zfQA&#8221;.</p>
<p>Now if you want to control your video all you have to do is :</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">//this will pause the video</span>
youtubeMovie.<span style="color: #006600;">pauseVideo</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">//this will make it play again</span>
youtubeMovie.<span style="color: #006600;">playVideo</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">//to mute the video</span>
youtubeMovie.<span style="color: #006600;">mute</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">//to set the volume to half of maximum</span>
youtubeMovie.<span style="color: #0066CC;">setVolume</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">50</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">//to seek in the video to 20 seconds</span>
youtubeMovie.<span style="color: #006600;">seekTo</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">20</span><span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>Well that is all it take to load a YouTube movie into Flash. I should warn you of some pitfalls; by reading the issues on the google code page, there seems to be problems with loading multiple videos at the same time. Also, destroying an instance of a MovieSprite seems to inhibit you from creating another one after so you should always keep an instance of you MovieSprite alive. Aside from that TubeLoc is an awesome library and I hope to see the proliferation of YouTube videos inside of Flash!</p>
<div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.zedia.net%2F2009%2Fhow-to-load-a-youtube-movie-into-flash-using-tubeloc%2F&amp;layout=standard&amp;show-faces=false&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:550px; height:70px;"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://www.zedia.net/2009/how-to-load-a-youtube-movie-into-flash-using-tubeloc/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>My Google Analytics For Flash presentation slides</title>
		<link>http://www.zedia.net/2009/my-google-analytics-for-flash-presentation-slides/</link>
		<comments>http://www.zedia.net/2009/my-google-analytics-for-flash-presentation-slides/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 13:58:07 +0000</pubDate>
		<dc:creator>zedia.net</dc:creator>
				<category><![CDATA[Google Analytics]]></category>
		<category><![CDATA[Flash & Flex developer magazine]]></category>
		<category><![CDATA[Google Analytics for Flash]]></category>
		<category><![CDATA[SWFMontreal]]></category>
		<category><![CDATA[TubeLoc]]></category>

		<guid isPermaLink="false">http://www.zedia.net/?p=420</guid>
		<description><![CDATA[Last Thursday I did my presentation on Google Analytics for Flash for SWFMontreal and it went really well. I learned 2 things while doing it. First that I should practice presenting out loud before doing my real presentation because it just better than practicing in my head. Secondly that a bomb threat in the Montreal [...]]]></description>
			<content:encoded><![CDATA[<p>Last Thursday I did my presentation on Google Analytics for Flash for <a title="SWFMontreal" href="http://www.swfmontreal.com" target="_blank">SWFMontreal</a> and it went really well. I learned 2 things while doing it. First that I should practice presenting out loud before doing my real presentation because it just better than practicing in my head. Secondly that a bomb threat in the Montreal metro can really decimate the audience. As a matter of fact, since there was the previously mentioned threat, the attendance to the user group was greatly reduced (15 people instead of 50). That was sad, but there was nothing I could do. I still wanted to post my slides so here they are.</p>
<div style="width:425px;text-align:left" id="__ss_1513213"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/zedia/google-analytics-for-flash?type=powerpoint" title="Google Analytics  For Flash">Google Analytics  For Flash</a><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=googleanalyticspresentation-090531123947-phpapp02&#038;stripped_title=google-analytics-for-flash" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=googleanalyticspresentation-090531123947-phpapp02&#038;stripped_title=google-analytics-for-flash" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">OpenOffice presentations</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/zedia">Dominic Gelineau</a>.</div>
</div>
<p>On the same note, I received my copy of the <a title="Flash and Flex developer magazine" href="http://www.ffdmag.com" target="_blank">Flash &amp; Flex developer&#8217;s magazine</a> where my article on Google Analytics For Flash was published and it feels very nice to see my own work in paper. They forgot to put my bio where I mention this blog, but I think they will fix this on my next article on <a title="TubeLoc" href="http://code.google.com/p/tubeloc/" target="_blank">TubeLoc</a>. Can&#8217;t wait to see it.</p>
<p>Here is the verbatim from my slides</p>
<p>Google Analytics For Flash &#8211; Presentation Transcript</p>
<p>1. Google Analytics for Flash<br />
2. Dominic Gélineau Flash developer Analytics, Animation, SEO dgelineau@gmail.com Blog: www.zedia.net Twitter: http://www.twitter.com/zedia WE ARE HIRING aubrey@twistimage.com<br />
3. Why care about analytics? Because it’s cool To provide data to your clients on the impact of what you are doing To give you feedback on the effectivness of your work<br />
4. Why Google Analytics? It’s free It’s widely used It has a concept called event It now has a library just for Flash<br />
5. Basic concepts about web analytics PageViews Events<br />
6. PageViews The PageViews model is based on the HTML version of a web page The real idea behind a pageView is NAVIGATION In HTML this is sent automaticaly every time the user changes or refresh the pageIn Flash we have to do this manually We should try and keep the same syntax as HTML for consistency<br />
7. Events The real idea behind events is INTERACTION Whenever you want to track something that is not related to navigation you should use an event. In Google Analytics Events are not enabled for all profiles http://code.google.com/p/gaforflash/wiki/EventTrackingRequ est<br />
8. Google Analytics for Flash Library http://code.google.com/p/gaforflash/ Just search Google for «Google Analytics for Flash»<br />
9. How to install it Flex and Flash CS4 can import SWC Flash CS3 can’t Download the library from SVN Put the SWC file in this folder: C:\\Program Files\\Adobe\\Adobe Flash CS3\\language\\Configuration\\Components Macintosh HD:Applications:Adobe Flash CS3:Configuration:Components<br />
10. Sample Code import com.google.analytics.AnalyticsTracker; import com.google.analytics.GATracker; var _tracker:AnalyticsTracker = new GATracker ( main, “UA-7777777-7”, “AS3”); _tracker.trackPageview(yourSectionName + “/”);<br />
11. More on Events _tracker.trackEvent(“English”, “Client Quiz”, “Question 3”, value); Category, Action, Label, valueOnly the two first are mandatory Value is an integer No standards, no real guidelines<br />
12. 2 Modes: AS3 vs Bridge The library can work in two modes, AS3 or Bridge. Each of them has there advantages.<br />
13. AS3 Mode Stand Alone mode Doesn’t require javascript Usefull for full Flash website Usefull when you don’t control the HTML that wraps the swf like for widgets or games<br />
14. Bridge Mode var _tracker:AnalyticsTracker = new GATracker (main, “window.PageTracker”, “Bridge”); Integrates better when the Flash part of a website is minor Enables more of the Google Analytics API like E-commerce allowScriptAccess = always<br />
15. Visual Debug var _tracker:AnalyticsTracker = new GATracker (main, “UA-7777777-7”, “AS3”, true);   One of the coolest features of GA for Flash Permits you to see in real time what is being sent to Google Clear advantage over the old way, which was to wait 3 hours and check to see if everything worked<br />
16. Visual Debug Screenshot<br />
17. What should you track Too much is like not enough Tracking errors is really helpful<br />
18. One draw back The library will add 40k to your project Might not be the best thing for all project Like banners<br />
19. Links  Google Code – http://code.google.com/p/gaforflash/  Developer group – http://groups.google.com/group/ga-for- flash?pli= 1  Adobe Max presentation on GA for Flash – http://tv.adobe.com/#vi+f15385v1040<br />
20. Questions?<br />
21. Thank you Dominic Gélineau dgelineau@gmail.com www.zedia.net http://www.twitter.com/zedia</p>
<div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.zedia.net%2F2009%2Fmy-google-analytics-for-flash-presentation-slides%2F&amp;layout=standard&amp;show-faces=false&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:550px; height:70px;"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://www.zedia.net/2009/my-google-analytics-for-flash-presentation-slides/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Show Your Pride: Just Moo</title>
		<link>http://www.zedia.net/2009/show-your-pride-just-moo/</link>
		<comments>http://www.zedia.net/2009/show-your-pride-just-moo/#comments</comments>
		<pubDate>Fri, 27 Mar 2009 20:16:14 +0000</pubDate>
		<dc:creator>zedia.net</dc:creator>
				<category><![CDATA[Twist Image]]></category>
		<category><![CDATA[Dairy Farmers of Canada]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Just Moo]]></category>
		<category><![CDATA[PureMVC]]></category>
		<category><![CDATA[The Great Canadian Moo]]></category>
		<category><![CDATA[TubeLoc]]></category>
		<category><![CDATA[TweenMax]]></category>

		<guid isPermaLink="false">http://www.zedia.net/?p=387</guid>
		<description><![CDATA[I&#8217;m happy to announce that we just lanched today a campaign for the Dairy Farmers of Canada. My part in this was to do develop the microsite, but their was an entire team working on the facebook application, the banners, the widget. We worked really hard on this and I think this is going to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m happy to announce that we just lanched today a campaign for the <a title="Dairy Farmers of Canada" href="http://www.dairygoodness.ca" target="_blank">Dairy Farmers of Canada</a>. My part in this was to do develop the microsite, but their was an entire team working on the <a title="The Great Canadian Moo facebook app" href="http://www.facebook.com/apps/application.php?id=53961987571" target="_blank">facebook application</a>, the banners, the widget. We worked really hard on this and I think this is going to be a sucessfull campaign. I went on again using <a title="PureMVC" href="http://puremvc.org" target="_blank">PureMVC</a> even if this was more a website than an application and I can say that I really don&#8217;t regret it. Even if we kept adding features, the project grew correctly and I could go back in the code in a month and I would still be a happy developper and understand where everything is. Here is a list of the features / libraries used in the project:</p>
<ul>
<li><a title="PureMVC" href="http://puremvc.org" target="_blank">PureMVC</a></li>
<li><a title="SWFObject" href="http://code.google.com/p/swfobject/wiki/hosted_library" target="_blank">SWFObject</a> from Google hosted libraries API</li>
<li><a title="TubeLoc" href="http://code.google.com/p/tubeloc/" target="_blank">TubeLoc</a> (I had a few problems using it at first, but I could do it way faster now)</li>
<li>The microsite resizes to fit smaller resolutions</li>
<li><a title="TweenMax" href="http://blog.greensock.com/tweenmaxas3/" target="_blank">TweenMax</a> (I am going to use the colorMatrixFilters everywhere now)</li>
</ul>
<p>One of the goal of the campaign is to get the most people clicking on a button on June 3rd to make a world record. You can click on the button from <a title="The Great Canadian Moo Facebook app" href="http://www.facebook.com/apps/application.php?id=53961987571" target="_blank">facebook</a>, banners, the microsite and a widget like this one:</p>
<p><script src='http://www.thegreatcanadianmoo.ca/js/widget.js'></script></p>
<p>Congrats to the entire team at <a title="Twist Image" href="http://www.twistimage.com" target="_blank">Twist Image</a> who worked on this. So check it out: <a title="The Great Canadian Moo" href="http://www.thegreatcanadianmoo.ca" target="_blank">The Great Canadian Moo</a>.</p>
<p>And I forgot on June 3rd, go back to the microsite and go beserk on the moo button!</p>
<div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.zedia.net%2F2009%2Fshow-your-pride-just-moo%2F&amp;layout=standard&amp;show-faces=false&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:550px; height:70px;"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://www.zedia.net/2009/show-your-pride-just-moo/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
