'From Squeak3.1alpha of 28 February 2001 [latest update: #4149] on 12 June 2001 at 3:34:56 pm'! "Change Set: flashHolder-mir Date: 12 June 2001 Author: Michael Rueger Adds the ability to FlashPlayerMorph to act as an eToy scriptable holder."! !FlashPlayerMorph methodsFor: 'holder' stamp: 'mir 6/12/2001 12:07'! cursor ^self frameNumber ! ! !FlashPlayerMorph methodsFor: 'holder' stamp: 'mir 6/12/2001 12:08'! cursor: aNumber "for backward compatibility" self cursorWrapped: aNumber! ! !FlashPlayerMorph methodsFor: 'holder' stamp: 'mir 6/12/2001 15:05'! cursorWrapped: aNumber "Set the cursor to the given number, modulo the number of items I contain. Fractional cursor values are allowed." | nextFrame | nextFrame _ aNumber truncated abs. nextFrame >= self maxFrames ifTrue: [nextFrame _ 1]. self stepToFrame: nextFrame! ! !FlashPlayerMorph methodsFor: 'holder' stamp: 'mir 6/12/2001 12:30'! numberAtCursor "Answer the number represented by the object at my current cursor position" ^0! ! !FlashPlayerMorph methodsFor: 'holder' stamp: 'mir 6/12/2001 12:32'! selectedRect "Return a rectangle enclosing the morph at the current cursor. Note that the cursor may be a float and may be out of range, so pick the nearest morph. Assume there is at least one submorph." self transform localBoundsToGlobal: self localBounds! ! !FlashPlayerMorph methodsFor: 'holder' stamp: 'mir 6/12/2001 12:32'! valueAtCursor "Answer the submorph of mine indexed by the value of my 'cursor' slot" ^self! ! !FlashPlayerMorph methodsFor: 'holder' stamp: 'mir 6/12/2001 12:33'! valueAtCursor: aMorph self shouldNotImplement! ! !FlashPlayerMorph class methodsFor: 'scripting' stamp: 'mir 6/12/2001 14:53'! additionsToViewerCategories "Answer a list of ( ) pairs that characterize the phrases this kind of morph wishes to add to various Viewer categories." ^ # ( (collections ( (slot cursor 'The index of the chosen element' number readWrite player getCursor player setCursorWrapped:) (slot playerAtCursor 'the object currently at the cursor' player readWrite player getValueAtCursor unused unused) (slot firstElement 'The first object in my contents' player readWrite player getFirstElement player setFirstElement:) (slot graphicAtCursor 'the graphic worn by the object at the cursor' graphic readOnly player getGraphicAtCursor unused unused) )) ) ! ! !MatrixTransform2x3 methodsFor: 'objects from disk' stamp: 'mir 6/12/2001 15:32'! writeOn: aByteStream 1 to: self size do: [:each | aByteStream nextPut: each]! ! !MatrixTransform2x3 class methodsFor: 'instance creation' stamp: 'mir 6/12/2001 15:34'! newFromStream: s "Only meant for my subclasses that are raw bits and word-like. For quick unpack form the disk." self isPointers | self isWords not ifTrue: [^ super newFromStream: s]. "super may cause an error, but will not be called." ^ s nextWordsInto: (self new: 6)! ! !FlashPlayerMorph reorganize! ('initialize' downloadState downloadStateIn: initialize loadInitialFrame makeControls open openInMVC openInWorld sourceUrl:) ('accessing' activeMorphs addMorph: borderWidth borderWidth: deferred deferred: isStreaming loadedFrames: localBounds localBounds: loopFrames loopFrames: progressValue progressValue:) ('drawing' debugDraw drawOn: drawSubmorphsOn: imageFormOfSize:forFrame:) ('geometry' boundsChangedFrom:to: computeBounds containsPoint: fullBounds fullContainsPoint: privateFullMoveBy:) ('classification' isFlashPlayer) ('stepping' jump10 rewind stepToFrame: stepToFrameForward: stepToFrameSilently:) ('private' collectActivationKeys: noticeRemovalOf:) ('menu' addCustomMenuItems:hand: drawFastest drawMedium drawNicest openSorter toggleDeferred) ('copying' copyMovieFrom:to:) ('project transition' addFillForProjectTarget: beFullScreenTransition: beTransitionFrom: beTransitionFrom:to: beTransitionTo: playProjectTransitionFrom:to:entering: removeFillForProjectTarget: updateProjectFillsFrom:) ('object fileIn') ('disk i/o' compress decompress) ('holder' cursor cursor: cursorWrapped: numberAtCursor selectedRect valueAtCursor valueAtCursor:) !