package clases{
	import flash.display.MovieClip;
	import fl.text.TLFTextField;
	import flash.events.Event;
	import clases.randomicoN
	
	public class restas extends MovieClip {

		public var sa1:Number 
		public var sa2:Number 
		public var sb1:Number
		public var sb2:Number
		public var r1:Number
		public var r2:Number
		public var rt1:TLFTextField
		public var clip:MovieClip
		public var clip2:MovieClip
		
		public function restas (clipPasado:MovieClip,clip2Pasado:MovieClip) {
			clip = clipPasado
			clip2 = clip2Pasado
			
			sa1 = randomicoN.randomizar(1,9)
			sa2 = randomicoN.randomizar(1,9)
						
			sb1 = randomicoN.randomizar(0,sa1)
			sb2 = randomicoN.randomizar(0,sa2)
			
			trace(sb1,sb2)
			r1 = sa1-sb1
			r2 = sa2-sb2
			
			clip.s1.text = String(sa1)+String(sa2)
			clip.s2.text = String(sb1)+String(sb2)
			clip2.rt1.text = String(r1)+String(r2)
		}
	}
}