Programming Final
//
/////////////////////////////////////////////////////
//Programming Concepts and Applications
//for Artists and Designers
//Keith Kelley/Final
/////////////////////////////////////////////////
//all clips invisible at start
FullBodyClip._alpha = 0;
ArmsMarkerClip._alpha = 0;
HeadMarkersClip._alpha = 0;
TorsoMarkersClip._alpha = 0;
LegsMarkersClip._alpha = 0;
placeShade = torsoShade;
FullBodyShade._alpha = 0;
torsoShade._alpha = 0;
//variable for place clip
var placeClip = marker;
stop();
//head markers
markerHead.onPress = function() {
placeClip = HeadMarkersClip;
FullBodyClip._alpha = 0;
ArmsMarkerClip._alpha = 0;
HeadMarkersClip._alpha = 100;
TorsoMarkersClip._alpha = 0;
LegsMarkersClip._alpha = 0;
//shaded regions clips
placeShade = torsoShade;
FullBodyShade._alpha = 0;
torsoShade._alpha = 60;
};
//torso clip
markerTorso.onPress = function() {
placeClip = TorsoMarkersClip;
FullBodyClip._alpha = 0;
ArmsMarkerClip._alpha = 0;
HeadMarkersClip._alpha = 0;
TorsoMarkersClip._alpha = 100;
LegsMarkersClip._alpha = 0;
//torso regions clips
placeShade = torsoShade;
FullBodyShade._alpha = 0;
torsoShade._alpha = 60;
};
//arms clip
markerArms.onPress = function() {
placeClip = ArmsMarkerClip;
FullBodyClip._alpha = 0;
HeadMarkersClip._alpha = 0;
TorsoMarkersClip._alpha = 0;
LegsMarkersClip._alpha = 0;
ArmsMarkerClip._alpha = 100;
//shaded regions clip
placeShade = torsoShade;
FullBodyShade._alpha = 0;
torsoShade._alpha = 60;
};
//legs clip
markerLegs.onPress = function() {
placeClip = LegsMarkersClip;
FullBodyClip._alpha = 0;
ArmsMarkerClip._alpha = 0;
HeadMarkersClip._alpha = 0;
TorsoMarkersClip._alpha = 0;
LegsMarkersClip._alpha = 100;
//shaded regions clip
placeShade = torsoShade;
FullBodyShade._alpha = 0;
torsoShade._alpha = 60;
};
//full body clip
fullBody.onPress = function() {
placeClip = FullBodyClip;
FullBodyClip._alpha = 100;
ArmsMarkerClip._alpha = 0;
HeadMarkersClip._alpha = 0;
TorsoMarkersClip._alpha = 0;
LegsMarkersClip._alpha = 0;
//shaded regions clip
placeShade = FullBodyShade;
FullBodyShade._alpha = 60;
torsoShade._alpha = 0;
};
//stop button
stopButton2.onPress = function() {
ArmsMarkerClip.stop();
HeadMarkersClip.stop();
TorsoMarkersClip.stop();
LegsMarkersClip.stop();
FullBodyClip.stop();
placeShade.stop();
playing = false;
};
//play button
playButton2.onPress = function() {
placeClip.gotoAndPlay(2);
placeShade.gotoAndPlay(2);
};
//slider alpha control; regions need to be added for rest of body
this.onEnterFrame = function() {
placeShade._alpha = (vectorSlider.drag._x+195)/3.95*.6;
};
//advance one frame
fwd.onPress = function() {
ArmsMarkerClip.nextFrame();
HeadMarkersClip.nextFrame();
TorsoMarkersClip.nextFrame();
LegsMarkersClip.nextFrame();
FullBodyClip.nextFrame();
placeShade.nextFrame();
};
//reverse one frame
rwd.onPress = function() {
ArmsMarkerClip.prevFrame();
HeadMarkersClip.prevFrame();
TorsoMarkersClip.prevFrame();
LegsMarkersClip.prevFrame();
FullBodyClip.prevFrame();
placeShade.prevFrame();
FullBodyClip.prevFrame();
};
Programming Final Proposal
Student:
Keith Kelley
Concept:
Create a visual display for thesis data
Description: Develop a program that can take skeletal animation in two different states (such as walking & running), and smoothly transition between them utilizing a slider. The possibility of adding multiple sliders representing different attributes.
Goals
• Utilize animations produced in Maya or motion capture data
• Transition from two states using a slider
• Develop simple interface
• Limit visibility on parts of skeleton or marker points (e.g. spine)
Skills to review
• Tasks 12 gestures
• Task 13 Key related events
Upcoming concepts
Mel scripting
Progress Report
Update November 26, 20021. Motion Capture Text file acquired
Motion Capture Text File
2. Designed basic interface

Here's the reference for the slider
www.cs.uic.edu/~reed/Papers/ KBS%20Paper%202.htm
Projected Next Due Date Tuesday, December 3
• Slider functioning
• Marker Removal Buttons (MRB); have feature functioning
• Dots on screen that reacts to MRB
XML Code: This code represents the motion
capture text file displayed in flash.
The use of XML was abandoned because of two reasons: Time constraints and the
goals of the thesis project (the thesis display required modeling to be shown,
thus clips became suitable for the task).
//
var xmlFile = "mocap3.xml";
//
//
this.onLoad = function() {
// when movie loads, initiate parsing of xml file
// XmlHandler will call _root.xmlReady() when done
XmlHandler.loadFile(xmlFile);
};
//
//
function xmlReady(rootNode) {
// xml parsed and ready, so time to display
var dataString = "";
var frame = XmlHandler.getChildrenByName(rootNode, "frame");
//creates an array for frame
for (var f = 0; f<frame.length; f++) {
var marker = XmlHandler.getChildrenByName(frame[f], "marker");
for (var m = 0; m<marker.length; m++) {
var markerName = marker[m].attributes.name;
//marker name is node
var MarkerX = marker[m].attributes.x;
var MarkerY = marker[m].attributes.y;
var markerString = markerName+" ("+MarkerX+")"+"\r"+MarkerY+"\r";
dataString += markerString+"\r";
}
}
textField.text = dataString;
}