Posts Tagged ‘UWSP’

UWSP - XML Slide show

Friday, April 10th, 2009

This is a slide show that I made for a client that wanted a image gallery on their website. I used Flash and Actionscript 3 to make their photo gallery so their web users could see the images easier. They really liked it because it gave their users a more interactive experience with their photo galleries. I made this from scratch while learning AS3. This imports XML to find the image path and the caption for the picture.

menu_xml = XML(event.currentTarget.data);
var picList:XMLList = menu_xml.pic;
for(var i:Number = 0; i < picList.length(); i++) {
imageArray.push(picList.image[i]);
captionArray.push(picList.caption[i]);
}
caption.text = captionArray[index];
imageLoader.load(new URLRequest(imageArray[index]));

There is also a random function that uses the Math.random native function in flash.

index = Math.round(Math.random() * imageArray.length);
//if to catch the errors in the random function
if(index == playedArray[playedArray.length - 1] || index == imageArray.length) {
getImageIndex();
} else {
playedArray.push(index);
curNum += 1;
imageLoader.load(new URLRequest(imageArray[index]));
caption.text = captionArray[index];
}

Take a look

City University of London - Online Radio

Friday, April 10th, 2009

City University of London Online Radio Station

CUL Radio

CUL Radio

I was on the team to create and install an online radio station for the City University. I helped with the interface design and the middleware of the radio. Most of my work was connecting the database that had the songs on it to the radio flash application. I gained most of my XML and all of my FMS skills through this project

I used shared objects in the FMS for sharing states of each sidebar. I had a shared object for the chat toggle switch, poll numbers, song title that was currently playing, and the current song object sent to each radio listener.

poll_so = SharedObject.getRemote("Poll", _root.nc.uri, true);
my_so = SharedObject.getRemote("ChatToggler", _root.nc.uri);
songTitle_so = SharedObject.getRemote("SongTitle", _root.nc.uri);
curSong_so = SharedObject.getRemote("CurrentSongObject", _root.nc.uri);

When the DJ wants the chat to open he can click the toggle button and turn it on.

chatToggle_btn.onRelease = function () {
if (my_so.data.yes) {
chatToggle_btn.setLabel("Start Chat");
my_so.data.yes = false;
} else {
chatToggle_btn.setLabel("End Chat");
my_so.data.yes = true;
}
}

When the poll of the song is rated by each listener the poll updates for everyone.

poll_so.data.yes = songArray[songIndex1].voteYesCount;
poll_so.data.no = songArray[songIndex1].voteNoCount;

remember to connect the shared object to the FMS

my_so.connect(_root.nc);

UWSP - Omega Molecular

Thursday, April 9th, 2009

The Omega Molecular Project was done for a class where we learned the basics of the Flash programming environment. I was in a team of three who equally shared the work of the project. I did most of the keystoning for the green screen video intro we have to show the application layout.

The file is image heavy so it might take awhile to load.