
| Author |
Message |
< Demos / Instruction ~ Option Advanced Actionscript (Methods / Events / Properties) |
| c4design |
Posted: Mon Aug 27, 2007 9:46 am |
|
|
|
Site Admin
Joined: 02 Dec 2005
Posts: 20
|
This instruction guide may be very useful as an advanced reference guide, but for C4D Scrollbar beginners we recommend viewing the Simple Instruction and Example page and the
Simple Instruction [ Text ] page. This guide includes only option functionality for skilled Actionscript programmers.
[b]Public Methods:
scrollTo(position ,allowEase=false)
Return Value: None
Parameters
position:Number - numeric value that signifies _y position (or _x for horizontal) to move the Content MC Instance to
position:String - setting position to "Top" (case sensitive) will move the Content MC Instance to the Mask MC Instance
allowEase:Boolean - When set true scrolls content to position at the Easing property specified movement speed.
addAnchor(position)
Return Value: None
Parameters
position:Number - adds a numeric value to the anchor array. For more details see Anchor Positions in component parameters.
Public Properties
_anchors - array of anchor positions. For more details see Anchor Positions in component parameters.
Events:
Events are listener functions.
Component events should be used if available instead of events associated with scrollbar elements.
Example of use:
componentInstanceName.onEventName = function(parameter1, parameter2,...){
//event code
}
onUpPress() - Up scroller element onPress event
onUpRelease() - Up scroller element onRelease event
onUpRollOver() - Up scroller element onRollOver event
onUpRollOut() - Up scroller element onRollOut event
onUpReleaseOutside() - Up scroller element onReleaseOutside event
onDownPress() - Down scroller element onPress event
onDownRelease() - Down scroller element onRelease event
onDownRollOver() - Down scroller element onRollOver event
onDownRollOut() - Down scroller element onRollOut event
onDownReleaseOutside() - Down scroller element onReleaseOutside event
onTrackPress() - Track scroller element onPress event
onTrackRelease() - Track scroller element onRelease event
onTrackRollOver() - Track scroller element onRollOver event
onTrackRollOut() - Track scroller element onRollOut event
onTrackReleaseOutside() - Track scroller element onReleaseOutside event
onScrollMouseWheel(delta:Number) - Event triggered by Mousewheel change by numeric value delta
onScrollContentChanged() - Event triggered when Content MC Instance _height (or _width for horizontal) changes
onScrollThumbResized(newThumbSize:Number)
- if Resizeable Thumb component parameter is set true this event will trigger when the thumbsize changes.
newThumbSize is the new numeric value of the _height (or _width for horizontal) of the Thumb scrollbar element
onScrollUpdate() - triggered every enterFrame if the Content MC Instance _height (or _width for horizontal) is larger than that of the Mask MC Instance.
Advanced Properties
_cursor - This private variable is accessable from within the component events. It reflects a number n: 1>=n<=10000 that is represents the percentage of scrolling n=1 being the content is at the top of the scrollwindow n=10000 being the content is at the bottom of the scrollwindow. Using _cursor in combination with onScrollUpdate() could be useful to scroll other objects, trigger animations, or run any other actionscript. |
|
|
| Back to top |
|
|
|
|
|
All times are GMT - 6 Hours
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|