Archive for the ‘Portfolio’ Category

MIV - Comment Viewer Analyzer

Friday, April 10th, 2009

I web application was for a client to see all of their comments at on time and then start to figure out what to do with the comments that are ‘opportunities’ for them to fix. This application is a fix to one of our current applications that only lets the use look at comments whereas the Comment Viewer Analyzer (CVA) runs the comments through an engine that triggers focus areas that are labeled ‘positive’, ‘neutral’, or ‘negative’. This lets us chart out the data that is labeled to each of the comments.

Full screen of CVA

Full screen of CVA

To do all of the charting we used AnyChart. A charting component that took a XML file to do all of the charting. To do most of this I had to insert the XML into another XML that had the format that Anychart wanted to receive.

I send for a an http service to get the data that fills the chart.


id="anyChartFAService"
url="php/services/MiV2MessageFocusAreaDisposition.Summary.php"
method="POST"
fault="handleError(event)"
resultFormat="text"
result="initFAChart(event);"
useProxy="false"

When that service returns I take that and stick it into a format that AnyChart can display.

var dataXML:XML = new XML( dataChartXML);
dataXML.charts.chart.appendChild(event.result);
anyChartData.anychartXML = dataXML;

Full screen of CVA

Full screen of CVA

There are a few exceptions that I need to bring more than one variable into the application. For that I use bindings to communicate when to another part of the application. This shows how I bring in the xml and put the data into bindings for the variables.

private function initAnyChart(event:ResultEvent):void
var eventXML:XML = new XML(event.result);
var mainXML:XML = new XML( mainChartXML);
if(eventXML.data.series.point.length() > 15)
{
mainXML.charts.chart.chart_settings.axes.x_axis.appendChild('');
}
facIDs = eventXML.facilityId;
var dataXML:XML = new XML(eventXML.data);
mainXML.charts.chart.appendChild(dataXML);
this.anyChartMain.anychartXML = XML(mainXML);

updateBottomGraphs();
}

UWSP - Campus Tour

Friday, April 10th, 2009

Campus Virtual Tour

The Campus Virtual Tour was a project done for incoming students of UWSP to show them the campus. With this project I worked a lot on the XML driven menus. These menus were made from XML so that they could change the data or pictures later if any building was renovated.

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 - Flash Game

Friday, April 10th, 2009

I took a Flash game development class at UW - Stevens Point. We made a game that you would walk around an old haunted hospital to find the ghosts that haunt it. Our game was 3D and you had to dodge flying bats that were inside the hospital. There were also ghost nurses that walked around you. We used a multidemonsional array to keep track of the trees, hospital beds, and walls that you could not walk into. This project really helped with my use of arrays.

This snippet shows how I looked for the keyboard events. Each key event had the character changing a direction so I also changed the direction the character was looking. During this process I also had to check when the character hit a wall so they wouldn’t go out of the playing field. You can throw cans with the mouse so when the character moved around the screen I also had to move the gun object around the screen so that the mouse would have cans thrown from the correct spots.

function moveCharacter() {
if(Key.isDown(39)) {//right
if(outScreen.player._currentframe > 11 && outScreen.player._currentframe < 22) {
outScreen.player.play();
} else {
outScreen.player.gotoAndPlay("Side");
}
outScreen.player._xscale = -9;
outScreen.player._x += walkSpeed;
dx += .9;
}else if(Key.isDown(37)) {//left
if(outScreen.player._currentframe > 11 && outScreen.player._currentframe < 22) {
outScreen.player.play();
} else {
outScreen.player.gotoAndPlay("Side");
}
outScreen.player._xscale = 9;
outScreen.player._x -= walkSpeed;
dx -= .5;
}else if(Key.isDown(38)) {//up
if(outScreen.player._currentframe > 23 && outScreen.player._currentframe < 32) {
outScreen.player.play();
} else {
outScreen.player.gotoAndPlay("Up");
}
outScreen.player._y -= walkSpeed;
dy -= .5;
} else if(Key.isDown(40)) {//down
if(outScreen.player._currentframe > 0 && outScreen.player._currentframe < 10) {
outScreen.player.play();
} else {
outScreen.player.gotoAndPlay("Down");
}
outScreen.player._y += walkSpeed;
dy += .5;
}
outScreen.gun._x = outScreen.player._x + 110 + (outScreen.player._x / 4);
outScreen.gun._y = outScreen.player._y + 14 + (outScreen.player._y / 4);;
}

You can try it out if you would like.

A simple RSS reader with the NSXMLParser for Objective - C.

Friday, April 10th, 2009

I made my first iPhone app that shows a RSS feed from this blog and used the NSXMLParser in Objective C to do it. It was pretty easy to find RSS nodes I needed to to create the labels for the app.

The XML feed given back by the RSS for my blog has a couple of nodes I have to dig through to get to the items I need. The first is the channel node, this node holds all of the RSS info. The second is the item node, that holds each post of my blog. This is the node we need to get each link and title for the app. This function is what is called when the feed comes back from the web.

- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)fName attributes:(NSDictionary *)attributeDict
{
if (fName) {
elementName = fName;
}

if (parsedFeedsCounter >= MAX_FEEDS) {
[parser abortParsing];
}

These next if statements look for the element string to further dig into the XML nodes and puts that data into the the currentFeedObject so that the next if statements can use this node to get the title and link info.

if ([elementName isEqualToString:@"item"]) {
parsedFeedsCounter++;
self.currentFeedObject = [[Feed alloc] init];
[(id)[[UIApplication sharedApplication] delegate] performSelectorOnMainThread:@selector(addToFeedList:) withObject:self.currentFeedObject waitUntilDone:YES];
return;
}
if ([elementName isEqualToString:@"title"]) {
self.contentOfCurrentFeedProperty = [NSMutableString string];
} else if ([elementName isEqualToString:@"link"]) {
self.contentOfCurrentFeedProperty = [NSMutableString string];
} else {
// The element isn’t one that we care about, so set the property that holds the
// character content of the current element to nil. That way, in the parser:foundCharacters:
// callback, the string that the parser reports will be ignored.
self.contentOfCurrentFeedProperty = nil;
}
}

Next I call a function when the parser is finished with each node to put each title and link objects into an array that will then be used for my app list.

- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)fName
{
if (fName) {
elementName = fName;
}

if ([elementName isEqualToString:@"title"]) {
self.currentFeedObject.title = self.contentOfCurrentFeedProperty;
}
if ([elementName isEqualToString:@"link"]) {
self.currentFeedObject.webLink = [NSString stringWithFormat:@"%@", self.contentOfCurrentFeedProperty];
}
}

And that’s pretty much it for the XML parsing. It’s pretty simple to use the NSXMLParser in Objective C. I don’t have this app on the App Store but maybe if I get enough comments I’ll think about putting it up there.

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.