CLIPS+Technical+Discoveries+Log

=FLASH Discoveries (things we wished were in an FAQ)=

CodeSnippets KempenFlash Discoveries Adding CLIPS uberCalc to existing activity [|Adobe's Opensource Flex Coding Conventions]

Not Flash but Mounting a Windows Shared Folder on your Mac

 * see [|article]

Scaling lines and other shapes

 * There is a scale property for objects. For example to create a line that does not grow in thickness as it is made wider, set its scale property to "none" - choosing "none" is safer and more reliable than using "vertical" or "horizontal"

Creating an Audio/Video Movie and Placing it in a Scene
Create the movie using software like Camtasia (the movie can be created in small 'clips' then joined to form a longer video from within Camstasia) __Using Camtasia to create the audio/video movie__ Choose 'Start a new project by recording the screen Follow Recording Wizard instructions At the end of the recording choose "Edit my recording' __Using Camtasia to create .flv file__ Choose 'Produce video as' from Task List > Custom production settings > Flash Choose FLV format and set Target Flash Version as '8' (These settings were automatically set: Frame rate: 24, Max Bitrate: 1000, Bitrate Control: Variabe 1-Pass, Video Codec: H.263, Key Frame Rate 1 second, Video Quality: High 100%) (I chose white for a background colour) Choose size 320x240 (to get movies sized as shown in CL002_C02_C01) No options were selected on the Video Options screen Find the file in the folder you created, rename appropriately and place in the same folder as the .swf for the activity that will call the file __Importing to Flash__ Under File choose Import>Import to Stage Select the .flv file created above Choose 'Progressive download from a web server' Choose a skin (we are currently using ArcticExternalPlaySeekMute.swf) ... or no skin The skin .swf needs to be in the same folder as the activity as well as in the lib/common folder __Creating a scene with a movie within a CLIPs activity__ Use scene 2 from Ross's Movie template Select the movie - which is actually an FLVPlayback component - choose the component's parameters and change the contentPath In the template, the movie is called introMovie, if you wish to rename the instance you need to change several references in the code on frames 2 and 3 of the Actions and Initialize layer - you also need to change the path - look for this line: .contentPath = _parent.activity_path+"";

Hex Code for Colours
http://html-color-codes.com/ http://en.wikipedia.org/wiki/Web_colors

Special characters embedded in external text files
> (Flash does not seem to support the ones tagged "NEW")
 * for "+" use hex code %2B
 * %21 is ", %27 is ', %25 is %
 * a list of all these codes can be found at http://www.neurophys.wisc.edu/comp/docs/ascii.html
 * a more extensive list is found at http://www.miswebdesign.com/resources/articles/xhtml-symbol-character-references.html which includes the following (and much more):


 * ~ Entity Reference ||~ Test ||~ Character Reference ||~ Test ||~ Description ||
 * ||  ||   ||   || no-break space = non-breaking space, U+00A0 ISOnum ||
 * ¢ || ¢ || ¢ || ¢ || cent sign, U+00A2 ISOnum ||
 * © || © || © || © || copyright sign, U+00A9 ISOnum ||
 * ® || ® || ® || ® || registered sign = registered trade mark sign, U+00AE ISOnum ||
 * ° || ° || ° || ° || degree sign, U+00B0 ISOnum, 176 ||
 * ± || ± || ± || ± || plus-minus sign = plus-or-minus sign, U+00B1 ISOnum ||
 * ² || ² || ² || ² || superscript two, squared, U+00B2 ISOnum ||
 * ³ || ³ || ³ || ³ || superscript three, cubed, U+00B3 ISOnum ||
 * ´ || ´ || ´ || ´ || acute accent = spacing acute, U+00B4 ISOdia ||
 * · || · || · || · || Greek middle dot, U+00B7 ISOnum ||
 * ÷ || ÷ || ÷ || ÷ || division sign, U+00F7 ISOnum ||
 * ~ Latin Extended-B ||
 * ƒ || ƒ || ƒ || ƒ || latin small letter f with hook, florin, U+0192 ISOtech ||
 * ~ Greek ||
 * Δ || Δ || Δ || Δ || greek capital letter delta, U+0394 ISOgrk3 ||
 * α || α || α || α || greek small letter alpha, U+03B1 ISOgrk3 ||
 * β || β || β || β || greek small letter beta, U+03B2 ISOgrk3 ||
 * θ || θ || θ || θ || greek small letter theta, U+03B8 ISOgrk3, 952 ||
 * π || π || π || π || greek small letter pi, U+03C0 ISOgrk3 ||
 * ϑ || ϑ || ϑ || ϑ || greek theta symbol, U+03D1 NEW ||
 * ~ General Punctuation ||
 * • || • || • || • || bullet = black small circle, U+2022 ISOpub ||
 * bullet is NOT the same as bullet operator, U+2219 ||
 * … || … || … || … || horizontal ellipsis = three dot leader, U+2026 ISOpub ||
 * ′ || ′ || ′ || ′ || prime, minutes, feet, U+2032 ISOtech ||
 * ″ || ″ || ″ || ″ || double prime, seconds, inches, U+2033 ISOtech ||
 * ⁄ || ⁄ || ⁄ || ⁄ || fraction slash, U+2044 NEW ||
 * Letterlike Symbols ||
 * ™ || ™ || ™ || ™ || trade mark sign, U+2122 ISOnum ||
 * ~ C0 Controls and Basic Latin ||
 * " || " || " || " || quotation mark, U+0022 ISOnum ||
 * & || & || & || & || ampersand, U+0026 ISOnum ||
 * < || < || < || < || less-than sign, U+003C ISOnum ||
 * > || > || > || > || greater-than sign, U+003E ISOnum ||
 * ' || ' || ' || ' || apostrophe = APL quote, U+0027 ISOnum ||
 * ~ Spacing Modifier Letters ||
 * ˆ || ˆ || ˆ || ˆ || modifier letter circumflex accent, U+02C6 ISOpub ||
 * ˜ || ˜ || ˜ || ˜ || small tilde, U+02DC ISOdia ||
 * ~ General Punctuation ||
 * ||  ||   ||   || en space, U+2002 ISOpub ||
 * ||  ||   ||   || em space, U+2003 ISOpub ||
 * – || – || – || – || en dash, U+2013 ISOpub ||
 * — || — || — || — || em dash, U+2014 ISOpub ||
 * ‘ || ‘ || ‘ || ‘ || left single quotation mark, U+2018 ISOnum ||
 * ’ || ’ || ’ || ’ || right single quotation mark, U+2019 ISOnum ||
 * “ || “ || “ || “ || left double quotation mark, U+201C ISOnum ||
 * ” || ” || ” || ” || right double quotation mark, U+201D ISOnum ||
 * ~ Mathematical Operators ||
 * ∅ || ∅ || ∅ || ∅ || empty set = null set, U+2205 ISOamso ||
 * ∈ || ∈ || ∈ || ∈ || element of, U+2208 ISOtech ||
 * ∑ || ∑ || ∑ || ∑ || n-ary summation, U+2211 ISOamsb ||
 * sum is NOT the same character as U+03A3 'greek capital letter sigma' though the same glyph might be used for both ||
 * − || − || − || − || minus sign, U+2212 ISOtech ||
 * √ || √ || √ || √ || square root = radical sign, U+221A ISOtech ||
 * ∞ || ∞ || ∞ || ∞ || infinity, U+221E ISOtech ||
 * ∠ || ∠ || ∠ || ∠ || angle, U+2220 ISOamso ||
 * ∴ || ∴ || ∴ || ∴ || therefore, U+2234 ISOtech ||
 * ∼ || ∼ || ∼ || ∼ || tilde operator, varies with, similar to, U+223C ISOtech ||
 * tilde operator is NOT the same character as the tilde, U+007E, although the same glyph might be used to represent both ||
 * ≅ || ≅ || ≅ || ≅ || approximately equal to, U+2245 ISOtech ||
 * ≈ || ≈ || ≈ || ≈ || almost equal to = asymptotic to, U+2248 ISOamsr ||
 * ≠ || ≠ || ≠ || ≠ || not equal to, U+2260 ISOtech ||
 * ≡ || ≡ || ≡ || ≡ || identical to, U+2261 ISOtech ||
 * ≤ || ≤ || ≤ || ≤ || less-than or equal to, U+2264 ISOtech ||
 * ≥ || ≥ || ≥ || ≥ || greater-than or equal to, U+2265 ISOtech ||
 * ⊥ || ⊥ || ⊥ || ⊥ || up tack, orthogonal to, perpendicular, U+22A5 ISOtech ||
 * ⋅ || ⋅ || ⋅ || ⋅ || dot operator, U+22C5 ISOamsb ||
 * dot operator is NOT the same character as U+00B7 middle dot ||
 * ~ Miscellaneous Technical ||
 * 〈 || 〈 || 〈 || 〈 || left-pointing angle bracket = bra, U+2329 ISOtech ||
 * lang is NOT the same character as U+003C 'less than sign' or U+2039 'single left-pointing angle quotation mark' ||
 * 〉 || 〉 || 〉 || 〉 || right-pointing angle bracket = ket, U+232A ISOtech ||
 * rang is NOT the same character as U+003E 'greater than sign' or U+203A 'single right-pointing angle quotation mark' ||
 * ~ Miscellaneous Symbols ||
 * ♠ || ♠ || ♠ || ♠ || black spade suit, U+2660 ISOpub ||
 * black here seems to mean filled as opposed to hollow ||
 * ♣ || ♣ || ♣ || ♣ || black club suit = shamrock, U+2663 ISOpub ||
 * ♥ || ♥ || ♥ || ♥ || black heart suit = valentine, U+2665 ISOpub ||
 * ♦ || ♦ || ♦ || ♦ || black diamond suit, U+2666 ISOpub ||

linking to external files / PDFs and GSP files etc.

 * method 1 * - use static text, and use the URL field (start with lib and use / not \ - no / in front of lib) and use target _blank (e.g. URL lib/CL001_KC_FractionsParWhole/CL001_Resources/FractionStrips.pdf
 * , target=_blank )
 * method 2 * - use button (one designed in Show template - invisible button with a blue underline to simulate live link) - with an on (release) function in the button definition that calls getURL
 * eg. on (release) { getURL( "lib/CL001_KC_FractionsParWhole/CL001_Resources/FractionStrips.pdf", "_blank"); }
 * NOTE: Key: start with lib and use forward slashes - no slash BEFORE the word lib ... this will ensure the path is relative to where the original HTML and SWF are called, whether on a local drive, network drive or WWW.

getting an ENTER key pressed when a text input box has had a number typed in it

 * use onKeyDown (instead of onKeyUp) in a function to test for the input

Focus Order

 * when you perform an event, the mouse and key events get handled first, followed by the focus event, followed by a button event

'this' and button event handlers

 * this.inputboxname.text="3" was not changing the text becasue 'this' in a button event handler refers to the button instance; with 'this' removed the problem was resolved
 * also, to refer to something on the timeline you need to use this._parent.

Sound and setVolume
> code format="actionscript" country= new Sound(this); country.attachSound('countrytune'); country.start(0,100); country.setVolume(30); code
 * setVolume acts as a global controller and reduces volume of all sound clips
 * the following code creates a sound called country but its setVolume can change volume of other sounds

> code format="actionscript" this.createEmptyMovieClip("countrysound",1000); country= new Sound(this.countrysound); country.attachSound('countrytune'); country.start(0,100); country.setVolume(30); code
 * to ensure that setVolume controls only one the "country" sound do not use "this" as the target, create an empty movie clip instead

Exporting a Sound from the Library for editing
Drag the sound from the Library onto the stage of a new .fla Extend the timeline to last for at least as long as the sound File | Export | as Movie | Type: WAV or MOV and then take that file and use your favourite editor.