<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" 
      xmlns:thr="http://purl.org/syndication/thread/1.0">
  <link rel="alternate" type="text/html" href="http://insideria.com/2009/08/facebook-app-case-study-admini.html" />
  <link rel="self" type="application/atom+xml" href="http://insideria.com/atom.xml" />
  <id>tag:insideria.com,2010://34/tag:www.insideria.com,2009://34.37590-</id>
  <updated>2010-07-16T16:01:39Z</updated>
  <title>Comments for Facebook App Case Study: Administration module (http://insideria.com/2009/08/facebook-app-case-study-admini.html)</title>
  <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.21-en</generator>
  <entry>
    <id>tag:www.insideria.com,2009://34.37590</id>
    <link rel="alternate" type="text/html" href="http://insideria.com/2009/08/facebook-app-case-study-admini.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://blogs.oreilly.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=34/entry_id=37590" title="Facebook App Case Study: Administration module" />
    <published>2009-08-04T13:00:00Z</published>
    <updated>2009-08-04T13:00:00Z</updated>
    <title>Facebook App Case Study: Administration module</title>
    <summary>Last time we talked about how to work with YouTube videos and how to implement those into our app. We worked hard to implement typical features that can be found on most video sites like play, pause, seek etc. As we already know, there is one external library used in our application that allows us to load videos into the swf and manipulate the video using ActionScript 3.0. Now it&#8217;s time to actually work on the admin part of the app and the  features that allow us and all our application users (players) to add their own videos along with mistakes. This way the application will much more extensible. There are lots of Facebook users who are movie fans and we will give them the ability to contribute.</summary>
    <author>
      <name>Mirza Hatipovic</name>
      
    </author>
    
    <category term="Adobe Feed" />
    
    <category term="Features" />
    
    <content type="html" xml:lang="en" xml:base="http://insideria.com/">
      <![CDATA[<div style="text-align: left;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Last time we talked about the way how to work with YouTube videos and how to implement those into our <a href="http://apps.facebook.com/movieexpert/">app</a>. We worked hard to implement typical features that can be found on most video sites like play, pause, seek etc. We even have the feature to seek through the video using the Seek Bar that we built from scratch. As we already know, there is one external library used in our application that allows us to load videos into the swf and manipulate the video using ActionScript 3.0. This is a huge advantage since the official YouTube library is written in AS2 and it does not fit our project requirements. Using the library, we were able to create video controls using pure ActionScript 3.0.</div> 

<div style="text-align: left;">Now it&#8217;s turn to actually work on the admin part of the app. What is meant with administration? With admin we talk about the feature to allow us and all our application users (players) to add their own videos along with mistakes. This way the application will much more extensible. There are lots of facebook users who are movie fans and we will give them the ability to contribute. </div>

<div style="text-align: left;">One important thing to note is that the videos sent by users will not be immediately available. There is the possibility that some user can submit crap videos that are not suitable for the application. As prevention against that we need to be able to check the videos being sent. We need to implement a mail() function that will notify us any time somebody has submitted the video. Then we will check the video, see if the user has added a valid movie clip with movie mistakes added to the clip, then we decide if the clip really deserves to be on the application database. </div>

<br/>
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.insideria.com/assets_c/2009/07/article18_img1.html" onclick="window.open('http://www.insideria.com/assets_c/2009/07/article18_img1.html','popup','width=715,height=531,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.insideria.com/assets_c/2009/07/article18_img1-thumb-400x297.png" width="400" height="297" alt="article18_img1.png" class="mt-image-none" style="" /></a></span>
<br/>

<div style="text-align: left;">
It looks a bit complicated but in fact it is not. If we examine the image in more detail, we will be able to develop the part of the app much easier because we already have the goal in our mind. On the image, we can see the familiar YouTube player we worked on in the last article. There are some small changes that can be observed. At the top of the video window, we can see the text field with the white border. On the middle of the screen, we see the yellow circle. First of all, there is the text field on the top. Let's say, the user wants to add a video to our application. He finds the video on YouTube and copies the URL directly into the upper text field. By pressing enter, the application loads the video from YouTube and starts playing the video. We are now in control of the video. Now that we have the video, we need a way to add mistakes to the video and this is where the magical yellow circle comes to play.  </div>

<div style="text-align: left;">The circle has a special purpose. When somebody comes to our app and adds a new video to the database, he will also be prompted to mark the mistakes from the movie. Let&#8217;s say, in the movie clip, the equipment is visible somewhere. The user will mark the location with the circle. Along with the location of mistake, he will also add hints about the mistake, so that the potential player uses the hints to find the goofs more easily. We can add hints like "Take a look at the head of Angelina Jolie", "The goof is somewhere in the beginning of the clip" etc. If you do not get the idea, here is the screenshot:</div>

<br/>
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.insideria.com/assets_c/2009/07/article18_img2.html" onclick="window.open('http://www.insideria.com/assets_c/2009/07/article18_img2.html','popup','width=433,height=195,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.insideria.com/assets_c/2009/07/article18_img2-thumb-400x180.png" width="400" height="180" alt="article18_img2.png" class="mt-image-none" style="" /></a></span>
<br/>

<div style="text-align: left;">Open main.fla. So far we loaded the YouTube video. Create a new MovieClip called &#8220;AddVideoClip&#8221;. </div>

<br/>
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.insideria.com/assets_c/2009/07/article18_img3.html" onclick="window.open('http://www.insideria.com/assets_c/2009/07/article18_img3.html','popup','width=428,height=534,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.insideria.com/assets_c/2009/07/article18_img3-thumb-400x499.png" width="400" height="499" alt="article18_img3.png" class="mt-image-none" style="" /></a></span>
<br/>

<div style="text-align: left;">In the linkage options, add &#8220;classes.AddVideoClip&#8221; as the class that the clip is linked to. We will create the class later. Let's check the clip in the edit mode:</div>

<br/>
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.insideria.com/assets_c/2009/07/article18_img4.html" onclick="window.open('http://www.insideria.com/assets_c/2009/07/article18_img4.html','popup','width=343,height=96,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.insideria.com/assets_c/2009/07/article18_img4-thumb-343x96.png" width="343" height="96" alt="article18_img4.png" class="mt-image-none" style="" /></a></span>
<br/>

<div style="text-align: left;">First we need to create 2 layers. Name the upper one &#8220;TextButton&#8221;, the lower one &#8220;Text&#8221;. </div>

<br/>
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.insideria.com/assets_c/2009/07/article18_img5.html" onclick="window.open('http://www.insideria.com/assets_c/2009/07/article18_img5.html','popup','width=168,height=81,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.insideria.com/assets_c/2009/07/article18_img5-thumb-168x81.png" width="168" height="81" alt="article18_img5.png" class="mt-image-none" style="" /></a></span>
<br/>

<div style="text-align: left;">Place an input text field on 0, 0 and name it "youTube_txt&#8221;. </div>

<br/>
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.insideria.com/assets_c/2009/07/article18_img6.html" onclick="window.open('http://www.insideria.com/assets_c/2009/07/article18_img6.html','popup','width=639,height=265,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.insideria.com/assets_c/2009/07/article18_img6-thumb-400x165.png" width="400" height="165" alt="article18_img6.png" class="mt-image-none" style="" /></a></span>
<br/>

<div style="text-align: left;">Right beside it, place a second text field. This time it needs to be dynamic. In the property inspector, name it &#8220;warning_txt". </div>

<br/>
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.insideria.com/assets_c/2009/07/article18_img7.html" onclick="window.open('http://www.insideria.com/assets_c/2009/07/article18_img7.html','popup','width=874,height=224,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.insideria.com/assets_c/2009/07/article18_img7-thumb-400x102.png" width="400" height="102" alt="article18_img7.png" class="mt-image-none" style="" /></a></span>
<br/>

<div style="text-align: left;">The upper controls are ok. Now we need to add some text at the bottom of the clip. At position x: 510 and y: 400, place a normal static text field that contains the following text "Do you want to add your own clip? Click here&#8221;. Mark the final word "here" blue. Now convert the static text field to a movieclip and name it "addVideoText_mc". </div>

<br/>
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.insideria.com/assets_c/2009/07/article18_img9.html" onclick="window.open('http://www.insideria.com/assets_c/2009/07/article18_img9.html','popup','width=389,height=255,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.insideria.com/assets_c/2009/07/article18_img9-thumb-389x255.png" width="389" height="255" alt="article18_img9.png" class="mt-image-none" style="" /></a></span>
<br/>

<div style="text-align: left;">Make sure the clip is at the right position like on the image. Now create a simple rectangular button with the alpha of the inner shape set to 0 and place it on the &#8220;TextButton&#8221; layer just above the word &#8220;here&#8221;, like in the image. </div>

<br/>
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.insideria.com/assets_c/2009/07/article18_img8.html" onclick="window.open('http://www.insideria.com/assets_c/2009/07/article18_img8.html','popup','width=326,height=75,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.insideria.com/assets_c/2009/07/article18_img8-thumb-326x75.png" width="326" height="75" alt="article18_img8.png" class="mt-image-none" style="" /></a></span>
<br/>

<div style="text-align: left;">Name the button &#8220;gotoAddClip_btn&#8221;. </div>

<br/>
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.insideria.com/assets_c/2009/07/article18_img11.html" onclick="window.open('http://www.insideria.com/assets_c/2009/07/article18_img11.html','popup','width=308,height=174,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.insideria.com/assets_c/2009/07/article18_img11-thumb-308x174.png" width="308" height="174" alt="article18_img11.png" class="mt-image-none" style="" /></a></span>
<br/>

<div style="text-align: left;">Now that we have all the elements ready for the clip, we need to review if they are really in place. Here is the "skeleton" of the clip we just created:</div>

<br/>
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.insideria.com/assets_c/2009/07/article18_img12.html" onclick="window.open('http://www.insideria.com/assets_c/2009/07/article18_img12.html','popup','width=473,height=279,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.insideria.com/assets_c/2009/07/article18_img12-thumb-400x235.png" width="400" height="235" alt="article18_img12.png" class="mt-image-none" style="" /></a></span>
<br/>

<div style="text-align: left;">So now that we are ready with the clip, lets see how the class looks like. Here is the code of the class:</div>

<div class="acode" style="overflow:auto;padding:10px;" ><div style="overflow-x: visible;">
<code language="perl">
<pre>

package classes{
 
 	<span class="category1">import</span> flash.events.*;
 	<span class="category1">import</span> flash.display.*;
 	<span class="category1">import</span> flash.<span class="category2">text</span>.*;
 	<span class="category1">import</span> classes.*;
 	<span class="category1">import</span> fl.controls.*;
 
 	<span class="category1">public</span> <span class="category1">class</span> AddVideoClip <span class="category1">extends</span> <span class="category2">MovieClip</span> {
  
  		<span class="category1">public</span> <span class="category1">static</span> <span class="category1">var</span> VIDEO_BEING_ADDED:<span class="category2">String</span> = "<span class="quote">videoBeingAdded</span>";
  		<span class="category1">public</span> <span class="category1">static</span> <span class="category1">var</span> VIDEO_ID_ADDED:<span class="category2">String</span> = "<span class="quote">videoIdAdded</span>";
  
  		<span class="category1">function</span> AddVideoClip() {
   			<span class="category1">super</span>();
   			youTube_txt.<span class="category2">visible</span> = <span class="category1">false</span>;
   			gotoAddClip_btn.buttonMode = <span class="category1">true</span>;
   			gotoAddClip_btn.addEventListener(MouseEvent.CLICK, showVideoFields);
   			youTube_txt.addEventListener(FocusEvent.FOCUS_IN, fieldFocused);
   			youTube_txt.addEventListener(FocusEvent.FOCUS_OUT, fieldFocusKilled);
   		}
  
  		<span class="category1">private</span> <span class="category1">function</span> fieldFocused(e:FocusEvent):<span class="category1">void</span> {
   			youTube_txt.<span class="category2">text</span> = "<span class="quote"></span>";
   			stage.addEventListener(KeyboardEvent.KEY_DOWN, keyIsDown);
   			warning_txt.<span class="category2">text</span> = "<span class="quote">Now press enter</span>";
   		}
  
  		<span class="category1">private</span> <span class="category1">function</span> fieldFocusKilled(e:FocusEvent) {
   			stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyIsDown);
   		}
  
  		<span class="category1">private</span> <span class="category1">function</span> keyIsDown(e:KeyboardEvent):<span class="category1">void</span> {
   			warning_txt.<span class="category2">text</span> = "<span class="quote"></span>";
   			<span class="category1">if</span>(e.keyCode == 13){
    				<span class="category1">var</span> link:<span class="category2">String</span> = youTube_txt.<span class="category2">text</span>;
    				<span class="category1">if</span>(!Tools.isEmpty(link)){
     					videoLinkAdded(Tools.trim(link));
     				} <span class="category1">else</span> {
     					warning_txt.<span class="category2">text</span> = "<span class="quote">Please add a valid YouTube link</span>";
     				}
    			}
   		}
  
  		<span class="category1">private</span> <span class="category1">function</span> videoLinkAdded(link:<span class="category2">String</span>):<span class="category1">void</span> {
   			warning_txt.<span class="category2">text</span> = "<span class="quote">Loading video...</span>";
   			<span class="category1">var</span> id = Tools.getYoutubeVideoID(link);
   			<span class="category1">var</span> e:SuperEvent = <span class="category1">new</span> SuperEvent(AddVideoClip.VIDEO_ID_ADDED, <span class="category1">true</span>, <span class="category1">true</span>);
   			e.<span class="category1">add</span>("<span class="quote">id</span>", id);
   			dispatchEvent(e);
   			stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyIsDown);
   			warning_txt.<span class="category2">text</span> = "<span class="quote">To cancel and add new video, paste link and press enter</span>";
   		}
  
  		<span class="category1">private</span> <span class="category1">function</span> showVideoFields(e:MouseEvent):<span class="category1">void</span> {
   			dispatchEvent(<span class="category1">new</span> Event(AddVideoClip.VIDEO_BEING_ADDED, <span class="category1">true</span>, <span class="category1">true</span>));
   			addVideoText_mc.<span class="category2">visible</span> = <span class="category1">false</span>;
   			youTube_txt.<span class="category2">visible</span> = <span class="category1">true</span>;
   			youTube_txt.<span class="category2">text</span> = "<span class="quote">Please paste a valid YouTube link here...</span>";
   			youTube_txt.addEventListener(FocusEvent.FOCUS_IN, fieldFocused);
   		}
  
  		override <span class="category1">public</span> <span class="category1">function</span> <span class="category1">set</span> <span class="category2">visible</span>(e:<span class="category2">Boolean</span>):<span class="category1">void</span> {
   			<span class="category1">if</span>(!e){
    				youTube_txt.<span class="category2">visible</span> = <span class="category1">false</span>;
    				warning_txt.<span class="category2">text</span> = "<span class="quote"></span>";
    				addVideoText_mc.<span class="category2">visible</span> = <span class="category1">true</span>;
    			} <span class="category1">else</span> {
    				youTube_txt.<span class="category2">visible</span> = <span class="category1">true</span>;
    				youTube_txt.<span class="category2">text</span> = "<span class="quote">Paste a valid YouTube link here.</span>";
    				addVideoText_mc.<span class="category2">visible</span> = <span class="category1">false</span>;
    			}
   		}
  	
  	};
 
};</pre>
</code>

</div></div>

<div style="text-align: left;">Save it as &#8220;AddVideoClip.as&#8221; in the classes folder of your project folder. Make sure you place the following code into the first frame of the clip:</div>

<div class="acode" style="overflow:auto;padding:10px;" ><div style="overflow-x: visible;">
<code language="perl">
<pre>


<span class="linecomment">//code from the previous article that loads the video</span>
<span class="category1">import</span> classes.*;
<span class="category1">import</span> classes.choppingblock.video.*;

<span class="category1">var</span> videoHolder = <span class="category1">new</span> YouTubeLoaderPlus(); 
videoHolder.create();
addChild(videoHolder);

videoHolder.addEventListener(YouTubeLoaderPlus.PLAYER_READY, ytPlayerReady);
videoHolder.addEventListener(YouTubeLoaderPlus.VIDEO_READY, ytVideoReady);

<span class="category1">function</span> ytPlayerReady(e:Event):<span class="category1">void</span>{
 	videoHolder.loadVideoById("<span class="quote">lPgxsGRpiuw</span>");
}

<span class="category1">function</span> ytVideoReady(e:Event):<span class="category1">void</span>{
 	videoHolder.<span class="category2">play</span>();
}

<span class="category1">var</span> addVideoClip_mc = <span class="category1">new</span> AddVideoClip();
addChild(addVideoClip_mc);

addVideoClip_mc.addEventListener(AddVideoClip.VIDEO_BEING_ADDED, videoBeingAdded);
addVideoClip_mc.addEventListener(AddVideoClip.VIDEO_ID_ADDED, videoAddedForEditing);

<span class="category1">function</span> videoBeingAdded(e:Event):<span class="category1">void</span>{
 
 
 	videoHolder.<span class="category2">stop</span>();
 	videoHolder.<span class="category2">visible</span> = <span class="category1">false</span>;
 	
 	<span class="linecomment">//</span>
 
}

<span class="category1">function</span> videoAddedForEditing(e:SuperEvent){
 
 	<span class="category1">var</span> id = e.<span class="category2">get</span>("<span class="quote">id</span>");
 	videoHolder.loadVideoById(id);
 
}</pre>
</code>

</div></div>

<div style="text-align: left;">So, ho does this look like in reality? Well, here is the sample displayed in the facebook application canvas. </div>

<br/>
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.insideria.com/assets_c/2009/07/article18_img13.html" onclick="window.open('http://www.insideria.com/assets_c/2009/07/article18_img13.html','popup','width=590,height=484,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.insideria.com/assets_c/2009/07/article18_img13-thumb-400x328.png" width="400" height="328" alt="article18_img13.png" class="mt-image-none" style="" /></a></span>
<br/>

<div style="text-align: left;">We see the familiar video that was loaded last time and we see below the initial state of the clip that will allow us to add clips. Now, when we click on the "here" link, the following application state should be visible:</div>

<br/>
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.insideria.com/assets_c/2009/07/article18_img14.html" onclick="window.open('http://www.insideria.com/assets_c/2009/07/article18_img14.html','popup','width=392,height=61,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.insideria.com/assets_c/2009/07/article18_img14-thumb-392x61.png" width="392" height="61" alt="article18_img14.png" class="mt-image-none" style="" /></a></span>
<br/>

<div style="text-align: left;">Now we need to search for clips that can be used as a dummy here. Now, here I found a good one (http://www.youtube.com/watch?v=StJ80M-B2v4) actually it&#8217;s a trailer but for the purpose of this article, it&#8217;s good enough. :-)</div>

<div style="text-align: left;">Now, let&#8217;s see if the video actually loads inside our frame. We go back to the application and paste the video link:</div>

<br/>
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.insideria.com/assets_c/2009/07/article18_img16.html" onclick="window.open('http://www.insideria.com/assets_c/2009/07/article18_img16.html','popup','width=525,height=446,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.insideria.com/assets_c/2009/07/article18_img16-thumb-400x339.png" width="400" height="339" alt="article18_img16.png" class="mt-image-none" style="" /></a></span>
<br/>

<div style="text-align: left;">Cool, this works! Basically it&#8217;s very simple to explain what happened. The AddVideoClip object simply fired an event notifying the application that a new video was added. Now, as soon as the id is available, the video is loaded and played back, nothing complicated here. Check out the video controls, like play, stop etc. and you will see that it works like a normal video. </div>

<div style="text-align: left;">With this, one important part is done. What is missing here is the ability to save this to database. Well, we will leave that until we have enough data. Beside the video id, we also need the data about the errors in the clip. Let's say the error is at 3:15 on some position, the sample data that we need to store would be: </div>

<div class="acode" style="overflow:auto;padding:10px;" ><div style="overflow-x: visible;">
<code language="perl">
<pre>

[0]:
<span class="category2">x</span>: 100px
<span class="category2">y</span>: 200px
startTime: 1.2343
endTime: 3.345
hint1: &amp;#8220;Hint about the error&amp;#133;&amp;#8221;
hint2: &amp;#8220;Hint about the error 2&amp;#133;&amp;#8221;
hint3: &amp;#8220;Hint about the error 3&amp;#133;&amp;#8221;

[1]:
<span class="category2">x</span>: 100px
<span class="category2">y</span>: 200px
startTime: 1.2343
endTime: 3.345
hint1: &amp;#8220;Hint about the error&amp;#133;&amp;#8221;
hint2: &amp;#8220;Hint about the error 2&amp;#133;&amp;#8221;
hint3: &amp;#8220;Hint about the error 3&amp;#133;&amp;#8221;

[3]:
<span class="category2">x</span>: 100px
<span class="category2">y</span>: 200px
startTime: 1.2343
endTime: 3.345
hint1: &amp;#8220;Hint about the error&amp;#133;&amp;#8221;
hint2: &amp;#8220;Hint about the error 2&amp;#133;&amp;#8221;
hint3: &amp;#8220;Hint about the error 3&amp;#133;&amp;#8221;</pre>
</code>

</div></div>

<div style="text-align: left;">Hope you get the idea. We need an array of of data about the errors and this array will be saved in the database along with the video id. </div>

<div style="text-align: left;">The next we need to implement here is the yellow circle that will serve as a pointer for mistakes. It will be added in the YouTubeLoaderPlus.as class. </div>

<div style="text-align: left;">First let&#8217;s create the circle that will serve as a clip. Create a MovieClip called "Circle". </div>

<br/>
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.insideria.com/assets_c/2009/07/article18_img17.html" onclick="window.open('http://www.insideria.com/assets_c/2009/07/article18_img17.html','popup','width=442,height=543,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.insideria.com/assets_c/2009/07/article18_img17-thumb-400x491.png" width="400" height="491" alt="article18_img17.png" class="mt-image-none" style="" /></a></span>
<br/>

<div style="text-align: left;">Make sure you have all the properties set like in the image above. Go to the editing of the clip. We need a circle width 126 and height 126 in yellow color, The circle also needs to be centered. 
</div>

<br/>
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.insideria.com/assets_c/2009/07/article18_img18.html" onclick="window.open('http://www.insideria.com/assets_c/2009/07/article18_img18.html','popup','width=163,height=166,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.insideria.com/assets_c/2009/07/article18_img18-thumb-163x166.png" width="163" height="166" alt="article18_img18.png" class="mt-image-none" style="" /></a></span>
<br/>

<div style="text-align: left;">We are almost there!</div>
<div style="text-align: left;">
The next we need is a clip that gives us the ability to enter hint1 about an error. Here is one the screenshot so you get the idea. </div>

<br/>
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.insideria.com/assets_c/2009/07/article18_img19.html" onclick="window.open('http://www.insideria.com/assets_c/2009/07/article18_img19.html','popup','width=614,height=458,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.insideria.com/assets_c/2009/07/article18_img19-thumb-400x298.png" width="400" height="298" alt="article18_img19.png" class="mt-image-none" style="" /></a></span>
<br/>

<div style="text-align: left;">Here is what needs to be done. Create an empty movieclip with the following options set:</div>

<br/>
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.insideria.com/assets_c/2009/07/article18_img20.html" onclick="window.open('http://www.insideria.com/assets_c/2009/07/article18_img20.html','popup','width=441,height=536,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.insideria.com/assets_c/2009/07/article18_img20-thumb-400x486.png" width="400" height="486" alt="article18_img20.png" class="mt-image-none" style="" /></a></span>
<br/>

<div style="text-align: left;">In the edit mode, make sure you place 4 text fields on the stage. </div>

<br/>
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.insideria.com/assets_c/2009/07/article18_img21.html" onclick="window.open('http://www.insideria.com/assets_c/2009/07/article18_img21.html','popup','width=450,height=180,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.insideria.com/assets_c/2009/07/article18_img21-thumb-400x160.png" width="400" height="160" alt="article18_img21.png" class="mt-image-none" style="" /></a></span>
<br/>

<div style="text-align: left;">The first 3 ones should be input text fields, the last ones should be a dynamic text field. From top to bottom, the instance names of the clips should be hint1_txt, hint2_txt, hint3_txt and warning_text. Make the font of the bottom field red because it will contain warning messages. </div>

<div style="text-align: left;">That&#8217;s it. But the HintClip does have a class assotiated with it. So create a class called HintClip.as inside the classes folder and add this code:</div>

<div class="acode" style="overflow:auto;padding:10px;" ><div style="overflow-x: visible;">
<code language="perl">
<pre>

package classes{
 
 	<span class="category1">import</span> flash.events.*;
 	<span class="category1">import</span> flash.display.*;
 	<span class="category1">import</span> flash.<span class="category2">text</span>.*;
 	<span class="category1">import</span> classes.*;
 	<span class="category1">import</span> fl.controls.*;
 
 	<span class="category1">public</span> <span class="category1">class</span> AddVideoClip <span class="category1">extends</span> <span class="category2">MovieClip</span> {
  
  		<span class="category1">public</span> <span class="category1">static</span> <span class="category1">var</span> VIDEO_BEING_ADDED:<span class="category2">String</span> = "<span class="quote">videoBeingAdded</span>";
  		<span class="category1">public</span> <span class="category1">static</span> <span class="category1">var</span> VIDEO_ID_ADDED:<span class="category2">String</span> = "<span class="quote">videoIdAdded</span>";
  
  		<span class="category1">function</span> AddVideoClip() {
   			<span class="category1">super</span>();
   			youTube_txt.<span class="category2">visible</span> = <span class="category1">false</span>;
   			gotoAddClip_btn.buttonMode = <span class="category1">true</span>;
   			gotoAddClip_btn.addEventListener(MouseEvent.CLICK, showVideoFields);
   			youTube_txt.addEventListener(FocusEvent.FOCUS_IN, fieldFocused);
   			youTube_txt.addEventListener(FocusEvent.FOCUS_OUT, fieldFocusKilled);
   		}
  
  		<span class="category1">private</span> <span class="category1">function</span> fieldFocused(e:FocusEvent):<span class="category1">void</span> {
   			youTube_txt.<span class="category2">text</span> = "<span class="quote"></span>";
   			stage.addEventListener(KeyboardEvent.KEY_DOWN, keyIsDown);
   			warning_txt.<span class="category2">text</span> = "<span class="quote">Now press enter</span>";
   		}
  
  		<span class="category1">private</span> <span class="category1">function</span> fieldFocusKilled(e:FocusEvent) {
   			stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyIsDown);
   		}
  
  		<span class="category1">private</span> <span class="category1">function</span> keyIsDown(e:KeyboardEvent):<span class="category1">void</span> {
   			warning_txt.<span class="category2">text</span> = "<span class="quote"></span>";
   			<span class="category1">if</span>(e.keyCode == 13){
    				<span class="category1">var</span> link:<span class="category2">String</span> = youTube_txt.<span class="category2">text</span>;
    				<span class="category1">if</span>(!Tools.isEmpty(link)){
     					videoLinkAdded(Tools.trim(link));
     				} <span class="category1">else</span> {
     					warning_txt.<span class="category2">text</span> = "<span class="quote">Please add a valid YouTube link</span>";
     				}
    			}
   		}
  
  		<span class="category1">private</span> <span class="category1">function</span> videoLinkAdded(link:<span class="category2">String</span>):<span class="category1">void</span> {
   			warning_txt.<span class="category2">text</span> = "<span class="quote">Loading video...</span>";
   			<span class="category1">var</span> id = Tools.getYoutubeVideoID(link);
   			<span class="category1">var</span> e:SuperEvent = <span class="category1">new</span> SuperEvent(AddVideoClip.VIDEO_ID_ADDED, <span class="category1">true</span>, <span class="category1">true</span>);
   			e.<span class="category1">add</span>("<span class="quote">id</span>", id);
   			dispatchEvent(e);
   			stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyIsDown);
   			warning_txt.<span class="category2">text</span> = "<span class="quote">To cancel and add new video, paste link and press enter</span>";
   		}
  
  		<span class="category1">private</span> <span class="category1">function</span> showVideoFields(e:MouseEvent):<span class="category1">void</span> {
   			dispatchEvent(<span class="category1">new</span> Event(AddVideoClip.VIDEO_BEING_ADDED, <span class="category1">true</span>, <span class="category1">true</span>));
   			addVideoText_mc.<span class="category2">visible</span> = <span class="category1">false</span>;
   			youTube_txt.<span class="category2">visible</span> = <span class="category1">true</span>;
   			youTube_txt.<span class="category2">text</span> = "<span class="quote">Please paste a valid YouTube link here...</span>";
   			youTube_txt.addEventListener(FocusEvent.FOCUS_IN, fieldFocused);
   		}
  
  		override <span class="category1">public</span> <span class="category1">function</span> <span class="category1">set</span> <span class="category2">visible</span>(e:<span class="category2">Boolean</span>):<span class="category1">void</span> {
   			<span class="category1">if</span>(!e){
    				youTube_txt.<span class="category2">visible</span> = <span class="category1">false</span>;
    				warning_txt.<span class="category2">text</span> = "<span class="quote"></span>";
    				addVideoText_mc.<span class="category2">visible</span> = <span class="category1">true</span>;
    			} <span class="category1">else</span> {
    				youTube_txt.<span class="category2">visible</span> = <span class="category1">true</span>;
    				youTube_txt.<span class="category2">text</span> = "<span class="quote">Paste a valid YouTube link here.</span>";
    				addVideoText_mc.<span class="category2">visible</span> = <span class="category1">false</span>;
    			}
   		}
  	
  	};
 
};</pre>
</code>

</div></div>

<div style="text-align: left;">Still we need to edit the YouTubeLoaderPlus.as class to display the new clips inside the video. Modify the code in the  YouTubeLoaderPlus.as  class so it matches this code:</div>

<div class="acode" style="overflow:auto;padding:10px;" ><div style="overflow-x: visible;">
<code language="perl">
<pre>

package classes.choppingblock.video{
 
 	<span class="category1">import</span> flash.events.*;
 	<span class="category1">import</span> flash.display.*;
 	<span class="category1">import</span> classes.*;
 
 	<span class="category1">public</span> <span class="category1">class</span> YouTubeLoaderPlus <span class="category1">extends</span> YouTubeLoader {
  
  		protected <span class="category1">var</span> _count:<span class="category2">Number</span> = 0;
  		protected <span class="category1">var</span> _controls:YouTubeControl = <span class="category1">new</span> YouTubeControl();
  		protected <span class="category1">var</span> _error:<span class="category2">Object</span> = <span class="category1">new</span> <span class="category2">Object</span>();
  		protected <span class="category1">var</span> _circle:Circle = <span class="category1">new</span> Circle();
  		protected <span class="category1">var</span> _hintClip:<span class="category2">MovieClip</span> = <span class="category1">new</span> HintClip();
  		protected <span class="category1">var</span> _editable:<span class="category2">Boolean</span> = <span class="category1">false</span>;
  		protected <span class="category1">var</span> _editing:<span class="category2">Boolean</span> = <span class="category1">false</span>;
  		protected <span class="category1">var</span> _currCounter:<span class="category2">Number</span> = 0;
  		protected <span class="category1">var</span> _errors:<span class="category2">Array</span>;
  		protected <span class="category1">var</span> _errNum:<span class="category2">Number</span>;
  		
  		
  		<span class="category1">public</span> <span class="category1">static</span> <span class="category1">var</span> PLAYER_READY:<span class="category2">String</span> = "<span class="quote">playerReady</span>";
  		<span class="category1">public</span> <span class="category1">static</span> <span class="category1">var</span> VIDEO_READY:<span class="category2">String</span> = "<span class="quote">videoReady</span>";
  		<span class="category1">public</span> <span class="category1">static</span> <span class="category1">var</span> ERROR_ADDED:<span class="category2">String</span> = "<span class="quote">errorAdded</span>";
  		
  
  		<span class="category1">function</span> YouTubeLoaderPlus() {
   
   			<span class="category1">super</span>();
   
   			<span class="category1">this</span>.<span class="category2">visible</span> = <span class="category1">false</span>;
   
   			<span class="category1">this</span>.addEventListener(Event.ENTER_FRAME, checkPlayerReady);
   			<span class="category1">this</span>.addEventListener(YouTubeLoaderPlus.PLAYER_READY, ytPlayerReady);
   			<span class="category1">this</span>.addEventListener(YouTubeLoaderPlus.VIDEO_READY, ytVideoReady);
   			
   			<span class="category1">this</span>.addChild(_controls);
   
   			_controls.addEventListener(YouTubeControl.PLAY_PRESSED, playPressed);
   			_controls.addEventListener(YouTubeControl.PAUSE_PRESSED, stopPressed);
   			<span class="category1">this</span>.addEventListener(SeekBar.BAR_CLICKED, seekBarClicked);
   
   			<span class="category1">if</span>(_editable){
    			
    				<span class="category1">this</span>.addEventListener(MouseEvent.MOUSE_DOWN, mouseIsDown);
    				<span class="category1">this</span>.addEventListener(MouseEvent.MOUSE_UP, mouseIsUp);
    				_controls.addEventListener(MouseEvent.ROLL_OVER, controlsRolledOver);
    				_controls.addEventListener(MouseEvent.ROLL_OUT, controlsRolledOut);
    
    			}
   
   		}
  
  
  		<span class="category1">private</span> <span class="category1">function</span> hintsAdded(e:SuperEvent):<span class="category1">void</span> {
   			
   			<span class="category1">var</span> ex:SuperEvent = <span class="category1">new</span> SuperEvent(YouTubeLoaderPlus.ERROR_ADDED, <span class="category1">true</span>, <span class="category1">true</span>);
   			_error.hint1 = e.<span class="category2">get</span>("<span class="quote">hint1</span>");
   			_error.hint2 = e.<span class="category2">get</span>("<span class="quote">hint2</span>");
   			_error.hint3 = e.<span class="category2">get</span>("<span class="quote">hint3</span>");
   
   			ex.<span class="category1">add</span>("<span class="quote">error</span>", _error);
   			dispatchEvent(ex);
   			
   			_circle.<span class="category2">startDrag</span>(<span class="category1">true</span>);
   			_circle.<span class="category2">visible</span> = <span class="category1">false</span>;
   			_hintClip.<span class="category2">visible</span> = <span class="category1">false</span>;
   
   			<span class="category1">this</span>.addEventListener(MouseEvent.MOUSE_DOWN, mouseIsDown);
   			<span class="category1">this</span>.addEventListener(MouseEvent.MOUSE_UP, mouseIsUp);
   			_controls.addEventListener(MouseEvent.ROLL_OVER, controlsRolledOver);
   			_controls.addEventListener(MouseEvent.ROLL_OUT, controlsRolledOut);
   			
   			<span class="category1">this</span>.<span class="category2">play</span>();
   			
   		}
  
  		
  		<span class="category1">private</span> <span class="category1">function</span> mouseIsDown(e:MouseEvent):<span class="category1">void</span> {
   
   			<span class="category1">if</span>(<span class="category1">this</span>.getPlayerState() == "<span class="quote">2</span>"){
    				<span class="category1">return</span>;
    			}
   
   			_error.<span class="category2">x</span> = <span class="category1">this</span>.mouseX;
   			_error.<span class="category2">y</span> = <span class="category1">this</span>.mouseY;
   			_error.startTime = <span class="category1">this</span>.getCurrentTime();
   			_circle.<span class="category2">visible</span> = <span class="category1">true</span>;
   			_circle.<span class="category2">stopDrag</span>();
   		}
  
  		<span class="category1">private</span> <span class="category1">function</span> mouseIsUp(e:MouseEvent):<span class="category1">void</span> {
   
   			<span class="category1">if</span>(<span class="category1">this</span>.getPlayerState() == "<span class="quote">2</span>"){
    				<span class="category1">return</span>;
    			}
   
   			_error.endTime = <span class="category1">this</span>.getCurrentTime();
   			_hintClip.<span class="category2">x</span> = _circle.<span class="category2">x</span>;
   			_hintClip.<span class="category2">y</span> = _circle.<span class="category2">y</span>;
   			_hintClip.<span class="category2">visible</span> = <span class="category1">true</span>;
   			<span class="category1">this</span>.removeEventListener(MouseEvent.MOUSE_DOWN, mouseIsDown);
   			<span class="category1">this</span>.removeEventListener(MouseEvent.MOUSE_UP, mouseIsUp);
   			_editing = <span class="category1">true</span>;
   			<span class="category1">this</span>.<span class="category2">pause</span>();
   		}
  
  		<span class="category1">private</span> <span class="category1">function</span> controlsRolledOut(e:MouseEvent):<span class="category1">void</span> {
   			<span class="category1">if</span>(_editable &amp;&amp; !_editing){
    				<span class="category1">this</span>.addEventListener(MouseEvent.MOUSE_DOWN, mouseIsDown);
    				<span class="category1">this</span>.addEventListener(MouseEvent.MOUSE_UP, mouseIsUp);
    			}
   		}
  
  		<span class="category1">private</span> <span class="category1">function</span> controlsRolledOver(e:MouseEvent):<span class="category1">void</span> {
   			<span class="category1">if</span>(_editable &amp;&amp; !_editing){
    				<span class="category1">this</span>.removeEventListener(MouseEvent.MOUSE_DOWN, mouseIsDown);
    				<span class="category1">this</span>.removeEventListener(MouseEvent.MOUSE_UP, mouseIsUp);
    			}
   		}
  
  		<span class="category1">private</span> <span class="category1">function</span> seekBarClicked(e:SuperEvent):<span class="category1">void</span> {
   			<span class="category1">var</span> prc = e.<span class="category2">get</span>("<span class="quote">prc</span>");
   			<span class="category1">this</span>.seekTo(prc * <span class="category1">this</span>.<span class="category2">getDuration</span>());
   		}
  
  		<span class="category1">private</span> <span class="category1">function</span> ytPlayerReady(e:Event) {
   
   			<span class="category1">this</span>.<span class="category2">setSize</span>(450, 370);
   			_controls.<span class="category2">y</span> = 380;
   
   			<span class="category1">this</span>.addChildAt(_circle, <span class="category1">this</span>.numChildren);
   			_circle.<span class="category2">startDrag</span>(<span class="category1">true</span>);
   			<span class="category1">this</span>.<span class="category2">visible</span> = <span class="category1">false</span>;
   
   			<span class="category1">this</span>.addChildAt(_hintClip, <span class="category1">this</span>.numChildren);
   			_hintClip.<span class="category2">visible</span> = <span class="category1">false</span>;
   			_circle.<span class="category2">visible</span> = editable;
   
   			_hintClip.addEventListener(HintClip.HINTS_ADDED, hintsAdded);
   
   
   		}
  
  		<span class="category1">private</span> <span class="category1">function</span> ytVideoReady(e:Event) {
   			<span class="category1">this</span>.<span class="category2">pause</span>();
   			<span class="category1">this</span>.addEventListener(Event.ENTER_FRAME, updatePreloadStatus);
   			<span class="category1">this</span>.<span class="category2">visible</span> = <span class="category1">true</span>;
   		}
  
  		<span class="category1">private</span> <span class="category1">function</span> updatePreloadStatus(e:Event) {
   			<span class="category1">var</span> l = <span class="category1">this</span>.<span class="category2">getBytesLoaded</span>();
   			<span class="category1">var</span> t = <span class="category1">this</span>.<span class="category2">getBytesTotal</span>();
   			_controls.<span class="category2">setProgress</span>(l, t);
   			<span class="category1">if</span>(l &gt;= t){
    				<span class="category1">this</span>.removeEventListener(Event.ENTER_FRAME, updatePreloadStatus);
    			}
   		}
  
  		<span class="category1">private</span> <span class="category1">function</span> updateSeekStatus(e:Event) {
   			
   			<span class="category1">var</span> curr:<span class="category2">Number</span> = <span class="category1">this</span>.getCurrentTime();
   			<span class="category1">var</span> dur:<span class="category2">Number</span> = <span class="category1">this</span>.<span class="category2">getDuration</span>();
   			
   			_controls.setSeekProgress(curr, dur);
   
   		}
  
  
  		<span class="category1">private</span> <span class="category1">function</span> checkPlayerReady(e:Event) {
   			_count++;
   			<span class="category1">if</span>(_count &gt;= 50){
    				<span class="category1">this</span>.removeEventListener(Event.ENTER_FRAME, checkPlayerReady);
    				dispatchEvent(<span class="category1">new</span> Event(YouTubeLoaderPlus.PLAYER_READY));
    			}
   		}
  
  		<span class="category1">private</span> <span class="category1">function</span> checkVideoReady(e:Event) {
   			<span class="category1">if</span>(<span class="category1">this</span>.<span class="category2">getDuration</span>() &gt; 0){
    				<span class="category1">this</span>.removeEventListener(Event.ENTER_FRAME, checkVideoReady);
    				dispatchEvent(<span class="category1">new</span> Event(YouTubeLoaderPlus.VIDEO_READY));
    			}
   		}
  
  		<span class="category1">private</span> <span class="category1">function</span> playPressed(e:Event):<span class="category1">void</span> {
   			<span class="category1">this</span>.<span class="category2">play</span>();
   		}
  
  		<span class="category1">private</span> <span class="category1">function</span> hideHintControls():<span class="category1">void</span> {
   			_circle.<span class="category2">visible</span> = <span class="category1">false</span>;
   			_hintClip.<span class="category2">visible</span> = <span class="category1">false</span>;
   			_circle.<span class="category2">startDrag</span>(<span class="category1">true</span>);
   		}
  
  		
  		<span class="category1">private</span> <span class="category1">function</span> stopPressed(e:Event):<span class="category1">void</span> {
   			<span class="category1">this</span>.<span class="category2">pause</span>();
   		}
  
  		override <span class="category1">public</span> <span class="category1">function</span> loadVideoById (id:<span class="category2">String</span>, startSeconds:<span class="category2">Number</span> = 0):<span class="category1">void</span>{
   			<span class="category1">super</span>.loadVideoById(id, startSeconds);
   			<span class="category1">this</span>.addEventListener(Event.ENTER_FRAME, checkVideoReady);
   			hideHintControls();
   		}
  
  		override <span class="category1">public</span> <span class="category1">function</span> <span class="category2">play</span>():<span class="category1">void</span>{
   			<span class="category1">super</span>.<span class="category2">play</span>();
   			<span class="category1">this</span>.addEventListener(Event.ENTER_FRAME, updateSeekStatus);
   			_editing = <span class="category1">false</span>;
   			hideHintControls();
   		}
  
  		<span class="category1">public</span> <span class="category1">function</span> <span class="category1">set</span> editable(e:<span class="category2">Boolean</span>):<span class="category1">void</span> {
   
   			_editable = e;
   			_circle.<span class="category2">visible</span> = e;
   
   			<span class="category1">if</span>(_editable){
    
    				<span class="category1">this</span>.addEventListener(MouseEvent.MOUSE_DOWN, mouseIsDown);
    				<span class="category1">this</span>.addEventListener(MouseEvent.MOUSE_UP, mouseIsUp);
    				_controls.addEventListener(MouseEvent.ROLL_OVER, controlsRolledOver);
    				_controls.addEventListener(MouseEvent.ROLL_OUT, controlsRolledOut);
    
    			} <span class="category1">else</span> {
    
    				<span class="category1">this</span>.removeEventListener(MouseEvent.MOUSE_DOWN, mouseIsDown);
    				<span class="category1">this</span>.removeEventListener(MouseEvent.MOUSE_UP, mouseIsUp);
    				_controls.removeEventListener(MouseEvent.ROLL_OVER, controlsRolledOver);
    				_controls.removeEventListener(MouseEvent.ROLL_OUT, controlsRolledOut);
    
    			}
   		}
  
  		<span class="category1">public</span> <span class="category1">function</span> <span class="category2">get</span> editable():<span class="category2">Boolean</span> {
   			<span class="category1">return</span> _editable;
   		}
  
  	
  	};
};</pre>
</code>

</div></div>

<div style="text-align: left;">When tested, the screen looks like this:</div>

<br/>
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.insideria.com/assets_c/2009/07/article18_img22.html" onclick="window.open('http://www.insideria.com/assets_c/2009/07/article18_img22.html','popup','width=698,height=451,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.insideria.com/assets_c/2009/07/article18_img22-thumb-400x258.png" width="400" height="258" alt="article18_img22.png" class="mt-image-none" style="" /></a></span>
<br/>

<div style="text-align: left;">The last thing we need here are two buttons. Place two buttons on the stage named save_btn and cancel_btn, respectively.</div>

<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.insideria.com/assets_c/2009/08/article18_img23.html" onclick="window.open('http://www.insideria.com/assets_c/2009/08/article18_img23.html','popup','width=292,height=69,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.insideria.com/assets_c/2009/08/article18_img23-thumb-292x69.png" width="292" height="69" alt="article18_img23.png" class="mt-image-none" style="" /></a></span>

<div style="text-align: left;">We will discuss the role of those two buttons in the next articles. </div>

<div style="text-align: left;">With this, the administration part is done! There are some things missing, like adding the results to database etc., but those are beyond the scope of this article. The last article of this series will deal with the issue how to insert those results into a mySQL database.</div> 

<div style="text-align: left;">In the next article, we will deal with the front end of the application that will display the videos stored in the database. We will also work on the main gameplay of the application. But in order for that to work, we need a working admin part that was described in this article. Stay tuned until the next article! </div>

<p><br/>To view the entire series please visit <a href="http://www.insideria.com/series-facebook-dev.html">http://www.insideria.com/series-facebook-dev.html</a></p>]]>
      
    </content>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2009://34.37590-comment:2070558</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2009://34.37590" type="text/html" href="http://insideria.com/2009/08/facebook-app-case-study-admini.html"/>
    <link rel="alternate" type="text/html" href="http://insideria.com/2009/08/facebook-app-case-study-admini.html#comment-2070558" />
    <title>Comment from Chris on 2009-08-17</title>
    <author>
        <name>Chris</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>got the following errors after creating the text fields and button:</p>

<p>1119: Access of possibly undefined property buttonMode through a reference with static type flash.display:SimpleButton.</p>]]>
    </content>
    <published>2009-08-17T19:19:22Z</published>
  </entry>

</feed
