(function (cjs, an) {

var p; // shortcut to reference prototypes
var lib={};var ss={};var img={};
lib.webFontTxtInst = {}; 
var loadedTypekitCount = 0;
var loadedGoogleCount = 0;
var gFontsUpdateCacheList = [];
var tFontsUpdateCacheList = [];
lib.ssMetadata = [
		{name:"ptVeremeo_atlas_", frames: [[708,0,216,449],[352,0,354,449],[0,0,350,455],[0,457,113,114],[352,451,132,132],[486,451,132,132],[888,451,132,132],[754,451,132,132],[620,451,132,132]]}
];



lib.updateListCache = function (cacheList) {		
	for(var i = 0; i < cacheList.length; i++) {		
		if(cacheList[i].cacheCanvas)		
			cacheList[i].updateCache();		
	}		
};		

lib.addElementsToCache = function (textInst, cacheList) {		
	var cur = textInst;		
	while(cur != null && cur != exportRoot) {		
		if(cacheList.indexOf(cur) != -1)		
			break;		
		cur = cur.parent;		
	}		
	if(cur != exportRoot) {		
		var cur2 = textInst;		
		var index = cacheList.indexOf(cur);		
		while(cur2 != null && cur2 != cur) {		
			cacheList.splice(index, 0, cur2);		
			cur2 = cur2.parent;		
			index++;		
		}		
	}		
	else {		
		cur = textInst;		
		while(cur != null && cur != exportRoot) {		
			cacheList.push(cur);		
			cur = cur.parent;		
		}		
	}		
};		

lib.gfontAvailable = function(family, totalGoogleCount) {		
	lib.properties.webfonts[family] = true;		
	var txtInst = lib.webFontTxtInst && lib.webFontTxtInst[family] || [];		
	for(var f = 0; f < txtInst.length; ++f)		
		lib.addElementsToCache(txtInst[f], gFontsUpdateCacheList);		

	loadedGoogleCount++;		
	if(loadedGoogleCount == totalGoogleCount) {		
		lib.updateListCache(gFontsUpdateCacheList);		
	}		
};		

lib.tfontAvailable = function(family, totalTypekitCount) {		
	lib.properties.webfonts[family] = true;		
	var txtInst = lib.webFontTxtInst && lib.webFontTxtInst[family] || [];		
	for(var f = 0; f < txtInst.length; ++f)		
		lib.addElementsToCache(txtInst[f], tFontsUpdateCacheList);		

	loadedTypekitCount++;		
	if(loadedTypekitCount == totalTypekitCount) {		
		lib.updateListCache(tFontsUpdateCacheList);		
	}		
};
// symbols:



(lib.png_1 = function() {
	this.spriteSheet = ss["ptVeremeo_atlas_"];
	this.gotoAndStop(0);
}).prototype = p = new cjs.Sprite();



(lib.png_2 = function() {
	this.spriteSheet = ss["ptVeremeo_atlas_"];
	this.gotoAndStop(1);
}).prototype = p = new cjs.Sprite();



(lib.png_3 = function() {
	this.spriteSheet = ss["ptVeremeo_atlas_"];
	this.gotoAndStop(2);
}).prototype = p = new cjs.Sprite();



(lib.png_brazo_ola = function() {
	this.spriteSheet = ss["ptVeremeo_atlas_"];
	this.gotoAndStop(3);
}).prototype = p = new cjs.Sprite();



(lib.rebo_0 = function() {
	this.spriteSheet = ss["ptVeremeo_atlas_"];
	this.gotoAndStop(4);
}).prototype = p = new cjs.Sprite();



(lib.rebo_1 = function() {
	this.spriteSheet = ss["ptVeremeo_atlas_"];
	this.gotoAndStop(5);
}).prototype = p = new cjs.Sprite();



(lib.Repro_0 = function() {
	this.spriteSheet = ss["ptVeremeo_atlas_"];
	this.gotoAndStop(6);
}).prototype = p = new cjs.Sprite();



(lib.Repro_1 = function() {
	this.spriteSheet = ss["ptVeremeo_atlas_"];
	this.gotoAndStop(7);
}).prototype = p = new cjs.Sprite();



(lib.Repro_3 = function() {
	this.spriteSheet = ss["ptVeremeo_atlas_"];
	this.gotoAndStop(8);
}).prototype = p = new cjs.Sprite();
// helper functions:

function mc_symbol_clone() {
	var clone = this._cloneProps(new this.constructor(this.mode, this.startPosition, this.loop));
	clone.gotoAndStop(this.currentFrame);
	clone.paused = this.paused;
	clone.framerate = this.framerate;
	return clone;
}

function getMCSymbolPrototype(symbol, nominalBounds, frameBounds) {
	var prototype = cjs.extend(symbol, cjs.MovieClip);
	prototype.clone = mc_symbol_clone;
	prototype.nominalBounds = nominalBounds;
	prototype.frameBounds = frameBounds;
	return prototype;
	}


(lib.btn_rebobinar = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_2 = function() {
		playSound("rebobinar");
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).wait(2).call(this.frame_2).wait(1));

	// boton
	this.instance = new lib.rebo_0();
	this.instance.parent = this;
	this.instance.setTransform(-66,-66);

	this.instance_1 = new lib.rebo_1();
	this.instance_1.parent = this;
	this.instance_1.setTransform(-66,-66);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance}]}).to({state:[{t:this.instance_1}]},1).wait(2));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-66,-66,132,132);


(lib.btn_adiante = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_2 = function() {
		playSound("pop");
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).wait(2).call(this.frame_2).wait(1));

	// boton
	this.instance = new lib.Repro_0();
	this.instance.parent = this;
	this.instance.setTransform(-66,-66);

	this.instance_1 = new lib.Repro_1();
	this.instance_1.parent = this;
	this.instance_1.setTransform(-66,-66);

	this.instance_2 = new lib.Repro_3();
	this.instance_2.parent = this;
	this.instance_2.setTransform(-66,-66);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance}]}).to({state:[{t:this.instance_1}]},1).to({state:[{t:this.instance_2}]},1).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-66,-66,132,132);


(lib.Symbol1 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.instance = new lib.png_brazo_ola();
	this.instance.parent = this;

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = getMCSymbolPrototype(lib.Symbol1, new cjs.Rectangle(0,0,113,114), null);


(lib.ojo = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Capa 1
	this.shape = new cjs.Shape();
	this.shape.graphics.f("#000000").s().p("AlpHKQiWi9AAkNQAAkMCWi9QCWi9DTAAQDUAACWC9QCWC9AAEMQAAENiWC9QiWC9jUAAQjTAAiWi9g");
	this.shape.setTransform(51.2,68.4);

	this.shape_1 = new cjs.Shape();
	this.shape_1.graphics.f("#000000").s().p("AlpF2QiWibAAjbQAAjaCWibQCWibDTAAQDUAACWCbQCWCbAADaQAADbiWCbQiWCbjUAAQjTAAiWibg");
	this.shape_1.setTransform(51.2,68.4);

	this.shape_2 = new cjs.Shape();
	this.shape_2.graphics.f("#000000").s().p("AlpEjQiWh5AAiqQAAipCWh4QCWh5DTAAQDUAACWB5QCWB4AACpQAACqiWB5QiWB4jUAAQjTAAiWh4g");
	this.shape_2.setTransform(51.2,68.4);

	this.shape_3 = new cjs.Shape();
	this.shape_3.graphics.f("#000000").s().p("AlpDOQiWhVAAh5QAAh4CWhWQCWhWDTABQDUgBCWBWQCWBWAAB4QAAB5iWBVQiWBWjUABQjTgBiWhWg");
	this.shape_3.setTransform(51.2,68.5);

	this.shape_4 = new cjs.Shape();
	this.shape_4.graphics.f("#000000").s().p("AlpB7QiWgzAAhIQAAhHCWgzQCWgzDTAAQDUAACWAzQCWAzAABHQAABIiWAzQiWAzjUAAQjTAAiWgzg");
	this.shape_4.setTransform(51.2,68.5);

	this.shape_5 = new cjs.Shape();
	this.shape_5.graphics.f().s("#000000").ss(11.7,1,1).p("AHHAoQkEhPjDAAQjBAAkEBP");
	this.shape_5.setTransform(51.1,72.5);

	this.shape_6 = new cjs.Shape();
	this.shape_6.graphics.f("#000000").s().p("AlpDVQiWhYAAh9QAAh8CWhZQCWhXDTAAQDUAACWBXQCWBZAAB8QAAB9iWBYQiWBZjUAAQjTAAiWhZg");
	this.shape_6.setTransform(51.2,68.5);

	this.shape_7 = new cjs.Shape();
	this.shape_7.graphics.f("#000000").s().p("AlpEvQiWh9AAiyQAAixCWh+QCWh9DTAAQDUAACWB9QCWB+AACxQAACyiWB9QiWB+jUAAQjTAAiWh+g");
	this.shape_7.setTransform(51.2,68.5);

	this.shape_8 = new cjs.Shape();
	this.shape_8.graphics.f("#000000").s().p("AlpGJQiWiiAAjnQAAjlCWijQCWijDTAAQDUAACWCjQCWCjAADlQAADniWCiQiWCjjUAAQjTAAiWijg");
	this.shape_8.setTransform(51.2,68.4);

	this.shape_9 = new cjs.Shape();
	this.shape_9.graphics.f("#000000").s().p("AlpHjQiWjIAAkbQAAkbCWjIQCWjIDTAAQDUAACWDIQCWDIAAEbQAAEbiWDIQiWDJjUAAQjTAAiWjJg");
	this.shape_9.setTransform(51.2,68.4);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.shape}]}).to({state:[{t:this.shape}]},29).to({state:[{t:this.shape}]},1).to({state:[{t:this.shape_1}]},1).to({state:[{t:this.shape_2}]},1).to({state:[{t:this.shape_3}]},1).to({state:[{t:this.shape_4}]},1).to({state:[{t:this.shape_5}]},1).to({state:[{t:this.shape_4}]},3).to({state:[{t:this.shape_6}]},1).to({state:[{t:this.shape_7}]},1).to({state:[{t:this.shape_8}]},1).to({state:[{t:this.shape_9}]},1).to({state:[{t:this.shape}]},1).wait(47));
	this.timeline.addTween(cjs.Tween.get(this.shape).wait(30).to({_off:true},1).wait(12).to({_off:false},0).wait(47));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(0,3.7,102.4,129.5);


(lib.SaudoBrazo = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.instance = new lib.Symbol1();
	this.instance.parent = this;
	this.instance.setTransform(0,109.5,1,1,3.3,0,0,0.9,111.8);

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1).to({regX:56.5,regY:57,rotation:1.2,x:56.7,y:56},0).wait(1).to({rotation:-0.9,x:54.7,y:53.8},0).wait(1).to({rotation:-3.1,x:52.5,y:51.8},0).wait(1).to({rotation:-5.3,x:50.3,y:49.9},0).wait(1).to({rotation:-7.5,x:48,y:48},0).wait(1).to({rotation:-9.7,x:45.7,y:46.2},0).wait(1).to({rotation:-11.8,x:43.2,y:44.5},0).wait(1).to({rotation:-14,x:40.7,y:42.8},0).wait(1).to({rotation:-16.2,x:38.2,y:41.4},0).wait(1).to({rotation:-14.2,x:40.4,y:42.7},0).wait(1).to({rotation:-12.3,x:42.7,y:44.1},0).wait(1).to({rotation:-10.3,x:44.9,y:45.7},0).wait(1).to({rotation:-8.3,x:47.1,y:47.3},0).wait(1).to({rotation:-6.4,x:49.2,y:48.9},0).wait(1).to({rotation:-4.4,x:51.3,y:50.6},0).wait(1).to({rotation:-2.5,x:53.2,y:52.4},0).wait(1).to({rotation:-0.5,x:55.1,y:54.3},0).wait(1).to({rotation:1.5,x:57,y:56.2},0).wait(1).to({rotation:3.4,x:58.7,y:58.1},0).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-1.1,-2.1,119.4,120.3);


(lib.peli_veremeo = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{comezo:0});

	// timeline functions:
	this.frame_0 = function() {
		this.stop()
		
		this.btn_avanza.removeAllEventListeners("click");
		this.btn_rebobina.removeAllEventListeners("click");
		
		this.btn_avanza.addEventListener("click", fl_MouseClickHandler.bind(this));
		
		function fl_MouseClickHandler()
		{
			  if(this.currentFrame + 1 < this.totalFrames) {
		       
			  this.gotoAndStop(this.currentFrame + 1);
		  }
		}
	}
	this.frame_2 = function() {
		this.btn_rebobina.addEventListener("click", fl_MouseClickHandler_11.bind(this));
		
		function fl_MouseClickHandler_11()
		{
			this.gotoAndPlay("comezo");
		}
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(2).call(this.frame_2).wait(1));

	// btn_adiante
	this.btn_avanza = new lib.btn_adiante();
	this.btn_avanza.parent = this;
	this.btn_avanza.setTransform(400.1,-155.1,0.379,0.379,0,0,0,0.3,-0.3);
	new cjs.ButtonHelper(this.btn_avanza, 0, 1, 2);

	this.btn_rebobina = new lib.btn_rebobinar();
	this.btn_rebobina.parent = this;
	this.btn_rebobina.setTransform(400.1,-155.1,0.379,0.379,0,0,0,0.3,-0.3);
	new cjs.ButtonHelper(this.btn_rebobina, 0, 1, 2);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.btn_avanza}]}).to({state:[{t:this.btn_rebobina}]},2).wait(1));

	// ollos
	this.instance = new lib.ojo();
	this.instance.parent = this;
	this.instance.setTransform(-1.3,-120.4,0.194,0.194,0,0,0,51,68.3);

	this.instance_1 = new lib.ojo();
	this.instance_1.parent = this;
	this.instance_1.setTransform(-42.3,-120.4,0.194,0.194,0,0,0,51,68.3);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance_1,p:{x:-42.3}},{t:this.instance,p:{x:-1.3}}]}).to({state:[{t:this.instance_1,p:{x:-40.5}},{t:this.instance,p:{x:0.5}}]},1).to({state:[]},1).wait(1));

	// textos
	this.text = new cjs.Text("Ola que tal! Son Veremeo, un estudante coma ti e veño presentarme e saudar a todos e todas os que chegastes ata aquí. ", "16px 'Arial'");
	this.text.lineHeight = 18;
	this.text.lineWidth = 258;
	this.text.parent = this;
	this.text.setTransform(156.2,-286.6);

	this.timeline.addTween(cjs.Tween.get(this.text).wait(1).to({x:152,y:-288,text:"Para entender o funcionamento do corpo humano é necesario coñecer a estrutura das súas partes, o que fan e como funcionan xuntas. O meu obxectivo aquí é que aprendas, mentras xogas, o funcionamento do corpo humano.",lineWidth:265},0).wait(1).to({text:"Terás que sinalar, arrastrar, virar... En todas as pantallas hai cousas por descubrir ou por facer.\nCada un dos contidos foi desenvolvido para alumnos de primaria, a partir do cuarto curso da Educación Primaria.",lineWidth:258},0).wait(1));

	// neno
	this.instance_2 = new lib.png_1();
	this.instance_2.parent = this;
	this.instance_2.setTransform(-122,-225);

	this.instance_3 = new lib.png_2();
	this.instance_3.parent = this;
	this.instance_3.setTransform(-164,-225);

	this.instance_4 = new lib.png_3();
	this.instance_4.parent = this;
	this.instance_4.setTransform(-207,-230);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance_2}]}).to({state:[{t:this.instance_3}]},1).to({state:[{t:this.instance_4}]},1).wait(1));

	// brazoSaudando
	this.instance_5 = new lib.SaudoBrazo();
	this.instance_5.parent = this;
	this.instance_5.setTransform(80.5,-89,1,1,0,0,0,56.5,57);

	this.timeline.addTween(cjs.Tween.get(this.instance_5).to({_off:true},1).wait(2));

	// bocadillo
	this.shape = new cjs.Shape();
	this.shape.graphics.f("#FFFFCC").s().p("AuGN1QhgAAhEhEQhEhDAAhgIAAj7Ip2GZIJ2p2IAAtDQAAhgBEhEQBEhDBgAAMAmDAAAQBgAABEBDQBDBEAABgIAAUbQAABghDBDQhEBEhgAAg");
	this.shape.setTransform(251.9,-214.3);

	this.timeline.addTween(cjs.Tween.get(this.shape).wait(3));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-122,-302.8,550.4,526.8);


// stage content:
(lib.Presentacion_Veremeo = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Capa 1
	this.instance = new lib.peli_veremeo();
	this.instance.parent = this;
	this.instance.setTransform(267.2,379,1.061,1.061,0,0,0,120.7,-3.2);

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(309.7,371.2,583.8,558.8);
// library properties:
lib.properties = {
	id: 'AE31EB1FC8B6EB449B57F4B8B6E3DA69',
	width: 600,
	height: 620,
	fps: 24,
	color: "#FFFFFF",
	opacity: 0.00,
	webfonts: {},
	manifest: [
		{src:"images/ptVeremeo_atlas_.png", id:"ptVeremeo_atlas_"},
		{src:"sounds/pop.mp3", id:"pop"},
		{src:"sounds/rebobinar.mp3", id:"rebobinar"}
	],
	preloads: []
};



// bootstrap callback support:

(lib.Stage = function(canvas) {
	createjs.Stage.call(this, canvas);
}).prototype = p = new createjs.Stage();

p.setAutoPlay = function(autoPlay) {
	this.tickEnabled = autoPlay;
}
p.play = function() { this.tickEnabled = true; this.getChildAt(0).gotoAndPlay(this.getTimelinePosition()) }
p.stop = function(ms) { if(ms) this.seek(ms); this.tickEnabled = false; }
p.seek = function(ms) { this.tickEnabled = true; this.getChildAt(0).gotoAndStop(lib.properties.fps * ms / 1000); }
p.getDuration = function() { return this.getChildAt(0).totalFrames / lib.properties.fps * 1000; }

p.getTimelinePosition = function() { return this.getChildAt(0).currentFrame / lib.properties.fps * 1000; }

an.bootcompsLoaded = an.bootcompsLoaded || [];
if(!an.bootstrapListeners) {
	an.bootstrapListeners=[];
}

an.bootstrapCallback=function(fnCallback) {
	an.bootstrapListeners.push(fnCallback);
	if(an.bootcompsLoaded.length > 0) {
		for(var i=0; i<an.bootcompsLoaded.length; ++i) {
			fnCallback(an.bootcompsLoaded[i]);
		}
	}
};

an.compositions = an.compositions || {};
an.compositions['AE31EB1FC8B6EB449B57F4B8B6E3DA69'] = {
	getStage: function() { return exportRoot.getStage(); },
	getLibrary: function() { return lib; },
	getSpriteSheet: function() { return ss; },
	getImages: function() { return img; }
};

an.compositionLoaded = function(id) {
	an.bootcompsLoaded.push(id);
	for(var j=0; j<an.bootstrapListeners.length; j++) {
		an.bootstrapListeners[j](id);
	}
}

an.getComposition = function(id) {
	return an.compositions[id];
}



})(createjs = createjs||{}, AdobeAn = AdobeAn||{});
var createjs, AdobeAn;