XML PHOTO GALLERY

The action script for the simple XML photo gallery I created in Flash is a BEAST (see below along with two screen shots of the final project)!

Flash XML Photo GalleryFlash XML Photo Gallery Picture #2

import fl.controls.ProgressBar; import fl.transitions.Tween; import fl.transitions.easing.*; import fl.transitions.TweenEvent; var columns:Number; var my_x:Number; var my_y:Number; var my_thumb_width:Number; var my_thumb_height:Number; var my_images:XMLList; var my_total:Number; var container_mc:MovieClip; var preloaders_mc:MovieClip; var full_mc:MovieClip; var x_counter:Number = 0; var y_counter:Number = 0; var my_tweens:Array = []; var container_mc_tween:Tween; var full_tween:Tween; var myXMLLoader:URLLoader = new URLLoader(); myXMLLoader.load(new URLRequest(“gallery.xml”)); myXMLLoader.addEventListener(Event.COMPLETE, processXML); function processXML(e:Event):void { var myXML:XML = new XML(e.target.data); columns = myXML.@COLUMNS; my_x = myXML.@XPOSITION; my_y = myXML.@YPOSITION; my_thumb_width = myXML.@WIDTH; my_thumb_height = myXML.@HEIGHT; my_images = myXML.IMAGE; my_total = my_images.length(); createContainer(); callThumbs(); myXMLLoader.removeEventListener(Event.COMPLETE, processXML); myXMLLoader = null; } function createContainer():void { container_mc = new MovieClip(); container_mc.x = my_x; container_mc.y = my_y; addChild(container_mc); container_mc.addEventListener(MouseEvent.CLICK, callFull); container_mc.addEventListener(MouseEvent.MOUSE_OVER, onOver); container_mc.addEventListener(MouseEvent.MOUSE_OUT, onOut); container_mc.buttonMode = true; preloaders_mc = new MovieClip(); preloaders_mc.x = container_mc.x; preloaders_mc.y = container_mc.y; addChild(preloaders_mc); } function callThumbs():void { for (var i:Number = 0; i < my_total; i++) { var thumb_url = my_images[i].@THUMB; var thumb_loader = new Loader(); thumb_loader.load(new URLRequest(thumb_url)); thumb_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbLoaded); thumb_loader.name = i; thumb_loader.x = (my_thumb_width+10)*x_counter; thumb_loader.y = (my_thumb_height+10)*y_counter; if (x_counter+1 < columns) { x_counter++; } else { x_counter = 0; y_counter++; } var preloader_pb:ProgressBar = new ProgressBar(); preloader_pb.source = thumb_loader.contentLoaderInfo; preloader_pb.x = thumb_loader.x; preloader_pb.y = thumb_loader.y; preloader_pb.width = my_thumb_width; preloader_pb.height = my_thumb_height; preloaders_mc.addChild(preloader_pb); preloader_pb.addEventListener(Event.COMPLETE, donePb); } } function thumbLoaded(e:Event):void { var my_thumb:Loader = Loader(e.target.loader); container_mc.addChild(my_thumb); my_tweens[Number(my_thumb.name)]=new Tween(my_thumb, “alpha”, Strong.easeIn, 0,1,0.5, true); my_thumb.contentLoaderInfo.removeEventListener(Event.COMPLETE, thumbLoaded); } function callFull(e:MouseEvent):void { var full_loader:Loader = new Loader(); var full_url = my_images[e.target.name].@FULL; full_loader.load(new URLRequest(full_url)); full_loader.contentLoaderInfo.addEventListener(Event.INIT, fullLoaded); var full_pb:ProgressBar = new ProgressBar(); full_pb.source = full_loader.contentLoaderInfo; full_pb.x = (stage.stageWidth – full_pb.width)/2; full_pb.y = (stage.stageHeight – full_pb.height)/2; preloaders_mc.addChild(full_pb); full_pb.addEventListener(Event.COMPLETE, donePb); container_mc.removeEventListener(MouseEvent.CLICK, callFull); container_mc.buttonMode = false; container_mc.removeEventListener(MouseEvent.MOUSE_OVER, onOver); container_mc.removeEventListener(MouseEvent.MOUSE_OUT, onOut); container_mc_tween = new Tween(container_mc, “alpha”, Strong.easeIn, 1,0.5,0.5, true); } function fullLoaded(e:Event):void { full_mc = new MovieClip(); full_mc.buttonMode = true; addChild(full_mc); var my_loader:Loader = Loader(e.target.loader); full_mc.addChild(my_loader); full_tween = new Tween(my_loader, “alpha”, Strong.easeIn, 0,1,0.5, true); my_loader.x = (stage.stageWidth – my_loader.width)/2; my_loader.y = (stage.stageHeight – my_loader.height)/2; my_loader.addEventListener(MouseEvent.CLICK,removeFull); my_loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, fullLoaded); } function removeFull(e:MouseEvent):void { var my_loader:Loader = Loader (e.currentTarget); full_tween = new Tween(my_loader, “alpha”, Strong.easeOut, 1,0,0.5, true); full_tween.addEventListener(TweenEvent.MOTION_FINISH, tweenFinished); container_mc_tween = new Tween(container_mc, “alpha”, Strong.easeOut, 0.5,1,0.5, true); } function donePb(e:Event):void { var my_pb:ProgressBar = ProgressBar(e.target); preloaders_mc.removeChild(my_pb); my_pb.removeEventListener(Event.COMPLETE, donePb); } function tweenFinished(e:TweenEvent):void { var my_loader:Loader = Loader (e.target.obj); my_loader.unload(); full_mc.removeChild(my_loader);// This line was removeChid(my_loader), just add full_mc before it. removeChild(full_mc); full_mc = null; container_mc.addEventListener(MouseEvent.CLICK, callFull); container_mc.buttonMode = true; container_mc.addEventListener(MouseEvent.MOUSE_OVER, onOver); container_mc.addEventListener(MouseEvent.MOUSE_OUT, onOut); var my_tween:Tween = Tween(e.target); my_tween.removeEventListener(TweenEvent.MOTION_FINISH, tweenFinished); } function onOver(e:MouseEvent):void { var my_thumb:Loader = Loader(e.target); my_thumb.alpha = 0.5; } function onOut(e:MouseEvent):void { var my_thumb:Loader = Loader (e.target); my_thumb.alpha = 1; }

XML Photo Gallery Picture #2

ASSIGNMENT 14 XML PLAYLIST

So, below is my action script for assignment 14 along with a screen shot.

Detroit Lions XML Playlist

var my_songs:XMLList; var my_total:Number; var my_sound:Sound; var my_channel:SoundChannel; var current_song:Number = 0; var song_position:Number; var song_paused:Boolean; var myXMLLoader:URLLoader = new URLLoader(); myXMLLoader.load(new URLRequest(“audio/playlist.xml”)); myXMLLoader.addEventListener(Event.COMPLETE, processXML); function processXML (e:Event):void{ var myXML:XML = new XML(e.target.data); my_songs = myXML.SONG; my_total = my_songs.length(); myXMLLoader.removeEventListener(Event.COMPLETE, processXML); myXMLLoader = null; } function playSong(mySong:Number):void{ var myTitle = my_songs[mySong].@TITLE; var myArtist = my_songs[mySong].@ARTIST; var myURL = my_songs[mySong].@URL; title_txt.text = myTitle; artist_txt.text = myArtist; if (my_channel){ my_channel.stop(); } my_sound = new Sound(); my_sound.load(new URLRequest(myURL)); my_channel = my_sound.play(); my_channel.addEventListener(Event.SOUND_COMPLETE, onNext); } next_btn.addEventListener(MouseEvent.CLICK, onNext); function onNext(e:Event):void{ current_song++; if (current_song>=my_total){ current_song=0; } playSong(current_song); } prev_btn.addEventListener(MouseEvent.CLICK, onPrev); function onPrev(e:MouseEvent):void{ current_song–; if (current_song<0){ current_song = my_total-1; } playSong(current_song); } pause_btn.addEventListener(MouseEvent.CLICK, onPause); function onPause(e:MouseEvent):void{ if (my_channel){ song_position = my_channel.position; my_channel.stop(); song_paused=true; } } play_btn.addEventListener(MouseEvent.CLICK, onPlay); function onPlay(e:MouseEvent):void{ if (song_paused){ my_channel = my_sound.play(song_position); song_paused=false; } else if (!my_channel){ playSong(current_song); } }

INTERACTIVE THEORY RESEARCH

I went back and forth as to how I should tackle the interactive part of my research paper.  Finally, I decided on what seemed the most logical to me…a timeline.  My interactive project starts with the date and time Mark Duggan was killed and goes right on through to the end of the riots and sentencing.  I’ve included links to pdfs of my research paper along with pictures of the destruction in the United Kingdom.

The link is as follows:

http://student.elon.edu/mhayes10/Theory_interactive/uk_riots.swf

Interactive Timeline of the U.K. Riots

LIGHTBOX

I love photography!  I think taking pictures is a great way to capture that moment in time to keep and share with family and friends for a lifetime.  I especially enjoy looking at photos, of people, different places and different times.  It’s a nice way to reminisce about friends and loved ones that may no longer be with us.

This week’s assignment was quite different from our usually assignments.  Instead of creating something in Flash we actually created a lightbox using Java Script. Now, I am by no means a whiz kid when it comes to web development and design so I was not particularly fond of this assignment.  It was slightly difficult for me but I will say that I pulled it off. I now have a new respect for the “lightbox” effect and hope to become even better with executing Java Script.

Example of Lightbox

PROJECT # 2 – INTERACTIVE GAME

Our second project in Producing Interactive Media was to create a game.  I decided that I wanted to create an architecture game for children.  I thought it would be fun and I could add some educational elements into it as well.

Beat the Thunderstorm

I sketched out my design, and wrote out a brief background story.  The basic premise of my game was to assist Mrs. Rabbit with building a house for her family before the thunderstorm comes.  The player would have to add the number of carrots and heads of lettuce that appeared on the screen.  With every second correct answer a section of the house would go up.  Claps of thunder could be heard in the background and a timer counted down to the thunderstorm.  If the player did not succeed in beating the timer then Mrs. Rabbit and her family would be caught in the thunderstorm.

Augmented Reality

This week we had the option to do something FUN for our blog posts! Derek said that we had two options:

(a) identify and review a new AR app or project (from a critical, thoughtful, and rigorously theoretical perspective, or

(b) produce your own AR demo using a webcam and Flash and post to your blog.

Well, if you’ve ever read any of my blogs you know how much problems I have attempting to use Flash so you know what I chose.  Flash!! Yeah, I’m surprised as well but it was SO easy my dog could do it…no, really my dog could do it.  Below is what I came up with!  I want to experiment with other pictures and produce different projections.

Meka's AR

Cool right?!

Augmented Reality Apps

I looked at several Augmented Reality apps (or AR apps) such as TAT Augmented ID, Layar, TwitARound, Nearest Tube and Wikitude just to name a few.  Some of these AR apps I could see how they would be very useful, while some actually creeped me out! The following are a few questions I had regarding AR apps:

The AR app TAT uses facial recognition to pull up information about a person, i.e. contact and profile info. Why would someone want to use an app like TAT?

Can this type of technology lead to us giving out too much personal information?

Are AR apps becoming the new big trend over QR codes?

 

The Dark Side of Virtual Reality

I’ve never thought of playing or visiting (or whatever it would be called) Second Life before. It’s just something that never really interested me.  After this week’s reading now I know that it’s more than just a game to some people. I didn’t realize that people could become millionaires, date, get married, assaulted or even raped. This has been quite an educational read this week; who would have known that a video game could be so seedy and dangerous?

After reading “Copyright and You: 
Ethical Issues in Second Life”, by Hope R. Botterbusch and R. S. Talab, my eyes were really opened to what goes on in the under belly of Second Life. In this article we are introduced to Miss Avatar, who is new to Second Life and is visiting this virtual world because she was attending a professional conference (holding conferences in Second Life is something that companies have started doing.). Miss Avatar decides to explore a little bit when she meet another avatar who offers to take her to see the more “fun” side of Second Life, but instead exposes Miss Avatar to the other side of Second Life, the shady world. The article goes on to say how there is little research conducted on the exploitation of individuals of Second Life “and what does exist discusses how cyber- terrorists exploited Linden dollars from a target’s avatar, and also hacked his/her PC.” Who would have known that playing a virtual reality game could lead to someone hacking into your computer and possible stealing your identity along with your possessions in real life?

Miss Avatar decides to play around with her appearance and selects a leopard fur skin, which has some kind of double meaning in Second Life. In fact, according to the article it explains how, “[f]urries are very different than human forms in Second Life; they are very frisky and tricky creatures and attempt to engage other furries in “fun” activities alluded to in the first scenario. Thus, resulting in Miss Avatar receiving unwanted advances from many male furies.

Miss Avatar goes on to meet a friend , Mr. Avatar (who later turns out not be who he says he is) and her avatar gets vandalized and she is harassed. After a while of being on Second Life she sets up a retail store which later gets “robbed” by Copybots. She in turn had to file a notification of possible copyright infringement, thereafter “[s]he then had to wait until real-world lawyers stepped in and adjudicated her case.”

After reading this article I am definitely not interested in visiting/playing Second Life.

 

 

 

 

Why Virtual Worlds Can Matter

When Thomas says, “[w]hile the architecture of these worlds is distributed across the Internet, the activities within these virtual worlds create a sense 
of shared space and co-presence that make real-time coordination and interaction not only possible, but a necessary part of the world”, is he saying that these virtual worlds make people feel like they are connected, and these connections are a necessary part of the virtual world?

 

Is the strange and familiar acts of embodiment that Thomas talks about regarding virtual worlds, only experienced by experienced players of MMOG’s or is he saying that this is the experience of anyone who would play an MMOG?

 

Who are these problem solvers that Thomas speaks about?  Are they gamers or are they experts in a particular field? Or are they gamers who have an expertise in a particular field?

Citizen Journalism and Politics

The internet is a huge part of our daily lives We can search for jobs, recipes, nannies and conduct research searches for school along with all sorts of other things. Then along came social networking sites (SNS). Boom! Just when you thought you couldn’t get any more unfocused, you find yourself constantly checking your various accounts (not to mention how often you check your email!). But, SNS just isn’t for catching up with friends and/or family or sharing photos, it can be used as a sources for news as well.  Many media outlets are riding the social media wave. In fact, politicians are not getting onboard.

According to David Carr of the NY Times, social media played a big role in getting President Obama into office. “Like a lot of Web innovators, the Obama campaign did not invent anything completely new. Instead, by bolting together social networking applications under the banner of a movement, they created an unforeseen force to raise money, organize locally, fight smear campaigns and get out the vote that helped them topple the Clinton machine and then John McCain and the Republicans.”

So many people around the world use SNS and it can be a great way for politicians to promote their “brand” (themselves) and keep themselves in the public eye.  Plus, I think people feel like the know the candidate/politician because they may have their voice heard where it normally would not get heard. According to Dr. Darren G. Lilleker, a lecturer and researcher in political communication at Bournemouth University, “…online environment is becoming a key communicational tool for those who seek election, and potentially a key source of information for the voter; thus an important location to place strategic branded information.

But what happens when tweeting goes bad? Unfortunately, the days of making random comments and then back peddling back saying they were taken out of context are over when it comes to SNS. Everything you post (photos, comments, etc…) is displayed for the world to see any time they are ready to view it. With this fact in mind, you would think that it would make politicians stay on their toes, but this has not been the case.  Take for example, the situation with Democratic Congressman Anthony Weiner. Weiner sent sexually suggestive pictures and messages to women that were later posted on other sites. All of the scandals and bad press lead to Weiner finally resigning from office, on June 26, 2011.

White House hopefully, Herman Cain is now feeling the heat from social media. The former National Restaurant Association CEO has had sexual allegation scandals play out via Twitter.  In an article posted by abc NEWS it states, “Social media and the blogosphere are making it virtually impossible to respond to every source of criticism, said Arjen Boin,  an associate professor of public administration at Louisiana State University who studies crisis management. The Internet is creating a “democratization of the crisis process,” by expanding the number of people reporting and commenting on a possible scandal, he said.” It will be interesting to see how the election in 2012 will be affected by citizen journalism and in the years to come how citizen journalism will affect the media as we know it today.