Values for Options

 

- String
- Integer
- Number
- Boolean
- Element (HTML Element / HTML Object)
- JBEEB Object
- constructor

 

String

Used for URLs and texty type stuff.

String values must be wrapped in quotes. You may use either single quotes or double quotes to wrap the values.

NOTES
• URLs should only contain alpha-numeric values. If a URL has non-alpha-numeric characters, chances are quite high that the file will not load.
• If there is a single quote within the context of the value (e.g. Bob's song's), then use double quotes as the wrapper. If your value contains double quotes (e.g. Bob said "wha!?!?"), then use single quotes to wrap the value.

 

Integer

Used to represet whole numbers (either positive or negative).

Numbers should NOT be wrapped in quotes. While wrapping numbers in quotes may still work, we recommend just using bare numbers.

Good
foo=7

Not Recommended
foo="7"

 

Number

Used to represet floating point numbers.

Numbers should NOT be wrapped in quotes. While wrapping numbers in quotes may still work, we recommend just using bare numbers.

Good
foo=150.316

Not Recommended
foo="150.316"

 

Boolean

Used for two-state things, like true and false, on/off.

Boolean values can be either true or false and should NOT be wrapped in quotes. You may use upper or lower case for the value. You can also use the integer representation 1 (true) or 0 (false) in lieu of the text. The integer representation follows the "no wrap" policy (don't wrap with quotes).

Setting TRUE
foo=true
foo=1
foo (see note below)

Setting FALSE
foo=false
foo=0
[foo does not exist (see note below)]

Bad
foo="true"
foo="0"

NOTES
When defining boolean options on a Player Instance DIV , a value is not required, the option just needs to exist. The existance indicates that you wish to enable that particular option (e.g. set it to TRUE). However, you can include a value if you wish, which can be either TRUE or FALSE or 1 or 0. Including a value is your choice.

 

Element (HTML Element / HTML Object)

The HTML Element object within the DOM (Document Object Model).

The DOM is a list of nodes and everything within an HTML page is a node. Every <tag>, chunk of human readable text, comment, even the page itself is represented in the DOM as a node.

Each node can be refered to as an Element. (Think "it's an element on the page".)

Using Javascript, we can interact with Elements. But in order to do so we first need to get a handle on it so javascript knows waht we are talking about.

By getting a handle on it, we are bridging two languages (HTML and Javascript).

To get a handle on an Element within a player, so you can work with it in Javascript we do this:

<!-- Asume a Player Instance is defined on the page 
with the ID attribute set (so we can get a handle to it)
as follows -->
<div id="myPlayer" wimpyplayer></div>

<script>
// Get a handle to the player var p = wimpy.getPlayer("myPlayer");

// Get a handle to a control var control = p.getSkinElement("controlID");
// do something with the control
control.innerHTML = "Putting some text into the control";
</script>

 

 

JBEEB Object

JBEEB Objects can be:
- Box
- Container
- TextBox
- TextContainer
- Stage
- Rube
- [Widget]
- [Class]

See www.jbeeb.com for additional information on interacting with JBEEB objects.

In a nutshell, most jbeeb objects can be manipulated with the following javascript function calls (some jbeeb objects have more functionality):

setFill(color, alpha)
setStroke(weight, color, alpha, style)
setStrokeStyle(style)
setX(number)
setY(number)
setXY(x, y)
setXYWH(x, y, w, h)
setWidth(number)
setHeight(number)
setSize(w, h)
setTop(number)
setBottom(number)
setLeft(number)
setRight(number)
setZ(integer)
setScale(number)
setScaleX(number)
setScaleY(number)
stretch(pX, pY);
setPin(string)
setFlex(string)
setRotation(degree)
setSkew(x, y)
setOrigin(x, y, type)
center(kind)
setOverflow(string)
setVisible(boolean)
show()
hide()
setAlpha(number)
setRounded(percent)
setShadow(object)
setInset(object)
setBevel(object)
setOutline(object)
setMouseEnabled(boolean)
addMEL(evt, fn, scope, bubble, arg) (MEL = MouseEventListener)
removeMEL(evt, fn)
setFloat(cssFloatVal)
destroy()
getCSS()
toString()
toFront()
toBack()
setImage(theURL, sizing)
setImageSizing(sizing)
setCursor(cursor)
measure()

constructor

Short for "constructor function", which is a special kind of function that is designed to mimic a traditional Class in other programming languages. A contructor leverages the built-in "prototype" feature of the Javascript language to enable a function to be replicated -- so the function acts as a sort of template.

New instances of the function can be generated, and each instance contains its own "personal" set of variables, objects and functions as defined in the "template". So any changes to one instance does not affect any other instance.

 

new

Used create an instance of an object or constructor.