|
Justin Reference
Buttons of Justin can be linked to
user specific functions by using a
clickEvent, so you needn't to use
ButtonClicks to create links to other
websites. Another characteristic: Each
Button can be adjusted individually with
AS.
addMenu(label:String, href:String, target:String, icon:String)
label:Label, e.g. "myButton"
href, target:an url to open a website, e.g. "http://www.frogstyle.ch/en/", "new"
icon:name of a instance in your library to put an icon on your button, e.g. "myIcon"
if you just want to have a button with only label and icon, set the other values to undefined, e.g. myComponent.addMenu("1st button", undefined, undefined, "MyIcon");
Background:Color
bg color of each button ButtonHeight:Number
height of buttons ButtonRadius:Number
radius of buttons ButtonWidth:Number
width of buttons ColorScheme:Enumeration
change a set of settings; choose 'UserDefined' (or 'FlashStyle') to make changes in the properties panel (or component inspector) Font:Enumeration LabelColor:Color Space:Number
head space between buttons TextSize:Number
size of text labels Width:Number
width of justin component (important for masking) Y:Number
mouse sensitive space area below justin (height of justin)
further adjustments by using ActionScript see below
Justin Reference ActionScript
all parameters that can be changed are listened below. Make sure you've set UserDefined as ColorScheme
BackgroundColor:Color BackgroundAlpha:Number GlowingColor:Color
only for FlashStyle GlowingAlpha:Number
only for FlashStyle GlowingAlpha_border:Number
only for FlashStyle GlowingAlpha_press:Number
only for FlashStyle GapColor:Color
the 'gap' is a tiny stripe in the upper region of each button, (standard: 0xFFFFFF) GapAlpha:Number
(standard: 100) InnerBorderColor:Color
(standard: 0xC6CECE) InnerBorderAlpha:Number
(standard: 80) OuterBorderColor:Color
(standard: 0x919999) OuterBorderAlpha:Number
(standard: 90) Width:Number
(standard: 100) Height:Number
(standard: 22) Radius:Number
((standard: 5.5) BorderStrength:Number
(standard: 1) LabelText:String
(example: "MyButton") LabelColor:Color
(standard: 0x333333) LabelPlacementX:Enumeration
(any of: "right", "left", "center")
(example: "center") LabelPlacementY:Enumeration
(any of: "top", "middle", "bottom") Icon:String
(example: "MyIcon") IconPlacementX:Enumeration
(any of: "right", "left", "center") IconPlacementY:Enumeration
(any of: "above", "middle", "under") TextSize:Number LabelFont:String TextBold:Boolean TextItalic:Boolean Url:String
(example: "http://www.frogstyle.ch/en/") TargetWindow:String OverAllAreaColor:Color
glowColor
only UserDefined OverAllAreaAlphaBefore:Number
button alpha when inactive
only UserDefined OverAllAreaAlphaAfter:Number
button alpha while active
only UserDefined ColorScheme:Enumeration
(any of: "UserDefined", "FlashStyle",...)
|

drag the justin component from the components panel (frog style components) (Ctrl-F7) to your stage. 
name the instance in the properties panel, e.g. myComponent 
create a new layer in your timeline and name it actions (that's not neccessary, but nice to do) 
select the first frame of layer actions. Press F9 to open the Actions window 
add a menu by typing 'myComponent.addMenu("1st Button", "http//www.frogstyle.ch/en/", "new", "myIcon"); 
repeat step 5 as you please 
use the component inspector (Alt-F7) to set different parameters
User Functions
to execute your own function while pressing a button you have to
write the following AS code in a root frame.
The vars 'myObject' and 'x' and 'myComponent' can be named anyhow, the rest must not
be changed. Instead of 'trace("click");' write your own function.
An example is coming with the purchase of the component
var myObject:Object = new Object();
myObject.click = function() {
trace("click");
}
var x = myComponent.addMenu("MyButton");
x.addEventListener("click", myObject);
David Fürsinger is a Flash Programmer and is currently studying Biology at the ETH Zurich. david@frogstyle.ch
|