Index: lams_flex/LamsAuthor/.actionScriptProperties =================================================================== RCS file: /usr/local/cvsroot/lams_flex/LamsAuthor/.actionScriptProperties,v diff -u -r1.2 -r1.3 --- lams_flex/LamsAuthor/.actionScriptProperties 22 Jan 2010 01:21:39 -0000 1.2 +++ lams_flex/LamsAuthor/.actionScriptProperties 23 Mar 2010 04:37:58 -0000 1.3 @@ -1,18 +1,9 @@ - + - - - - - - - - - - + Index: lams_flex/LamsAuthor/src/assets/test/default/sampleToolOutputDefinition.xml =================================================================== RCS file: /usr/local/cvsroot/lams_flex/LamsAuthor/src/assets/test/default/sampleToolOutputDefinition.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_flex/LamsAuthor/src/assets/test/default/sampleToolOutputDefinition.xml 23 Mar 2010 04:37:58 -0000 1.1 @@ -0,0 +1,86 @@ + +
+ + + + getToolOutputDefinitions + + + 3.0 + + + + + + + Number of attempts made by user + + + + + + + learner.number.of.attempts + + + + + + 0 + + + OUTPUT_LONG + + + + + Time taken + + + + + + learner.time.taken + + + + + + 0 + + + OUTPUT_LONG + + + + + User's total score + + + 0 + + + + + + learner.total.score + + + + + + 0 + + + OUTPUT_LONG + + + + + + + \ No newline at end of file Index: lams_flex/LamsAuthor/src/org/lamsfoundation/lams/author/components/Bin.mxml =================================================================== RCS file: /usr/local/cvsroot/lams_flex/LamsAuthor/src/org/lamsfoundation/lams/author/components/Bin.mxml,v diff -u -r1.1 -r1.2 --- lams_flex/LamsAuthor/src/org/lamsfoundation/lams/author/components/Bin.mxml 2 Feb 2010 00:41:52 -0000 1.1 +++ lams_flex/LamsAuthor/src/org/lamsfoundation/lams/author/components/Bin.mxml 23 Mar 2010 04:37:58 -0000 1.2 @@ -7,6 +7,7 @@ Index: lams_flex/LamsAuthor/src/org/lamsfoundation/lams/author/components/CanvasBox.mxml =================================================================== RCS file: /usr/local/cvsroot/lams_flex/LamsAuthor/src/org/lamsfoundation/lams/author/components/CanvasBox.mxml,v diff -u -r1.10 -r1.11 --- lams_flex/LamsAuthor/src/org/lamsfoundation/lams/author/components/CanvasBox.mxml 3 Feb 2010 04:04:40 -0000 1.10 +++ lams_flex/LamsAuthor/src/org/lamsfoundation/lams/author/components/CanvasBox.mxml 23 Mar 2010 04:37:58 -0000 1.11 @@ -12,6 +12,7 @@ + + + + + + + + + + + + + + Index: lams_flex/LamsAuthor/src/org/lamsfoundation/lams/author/components/activity/OptionalActivityComponent.mxml =================================================================== RCS file: /usr/local/cvsroot/lams_flex/LamsAuthor/src/org/lamsfoundation/lams/author/components/activity/OptionalActivityComponent.mxml,v diff -u -r1.4 -r1.5 --- lams_flex/LamsAuthor/src/org/lamsfoundation/lams/author/components/activity/OptionalActivityComponent.mxml 11 Feb 2010 05:07:37 -0000 1.4 +++ lams_flex/LamsAuthor/src/org/lamsfoundation/lams/author/components/activity/OptionalActivityComponent.mxml 23 Mar 2010 04:37:58 -0000 1.5 @@ -7,6 +7,7 @@ @@ -209,10 +209,11 @@ icon="@Embed(source='assets/icons/gate.png')" label="{Application.application.dictionary.getLabel('gate_btn')}" toolTip="{Application.application.dictionary.getLabel('gate_btn_tooltip')}"/> - + - - - - - - - - - - - - - - - - - - - - - - - - - - + Index: lams_flex/LamsAuthor/src/org/lamsfoundation/lams/author/util/AuthorUtil.as =================================================================== RCS file: /usr/local/cvsroot/lams_flex/LamsAuthor/src/org/lamsfoundation/lams/author/util/AuthorUtil.as,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_flex/LamsAuthor/src/org/lamsfoundation/lams/author/util/AuthorUtil.as 23 Mar 2010 04:37:58 -0000 1.1 @@ -0,0 +1,47 @@ +package org.lamsfoundation.lams.author.util +{ + import flash.display.BitmapData; + import flash.display.Bitmap; + import flash.display.DisplayObject; + import flash.geom.Matrix; + import flash.geom.Point; + + import mx.controls.Image; + + public class AuthorUtil + { + public function AuthorUtil(){} + + /** + * Gets the midpoint between the two points + * (x1 + x2)/2 , (y1 + y2)/2 + * + * @param point1 + * @param point2 + * @return + * + */ + public static function getMidpoint(point1:Point, point2:Point):Point { + var x:Number = (point1.x + point2.x) / 2; + var y:Number = (point1.y + point2.y) / 2; + return new Point(x,y); + } + + + public static function getBitmapData(target:DisplayObject):BitmapData + { + var bd:BitmapData = new BitmapData( target.width, target.height ); + var m:Matrix = new Matrix(); + bd.draw( target, m ); + return bd; + } + + public static function getImage(target:DisplayObject):Image + { + var image:Image = new Image(); + image.source = new Bitmap(getBitmapData(target)); + return image; + } + + } +} \ No newline at end of file