Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Custom Scroller Script Problem



Good day all,

I've created a custom scroller which works perfect however I have a small problem. When the user uses the scroll bar, they can only scroll and see half of the text. The scrolling continues but doesn't show the rest of the text, can anyone explain to me why this is.

The position of my text box is x: 420 y:2084 with a height of 3155

Below is my script:

const scrollUpperbase:int = 240;
const scrollLowerbase:int = 605;
const scrollRangebase:int = scrollLowerbase - scrollUpperbase;
var dragBoundsbase:Rectangle = new Rectangle(basescroller_mc.x, scrollUpperbase, 0, scrollRangebase);

var viewableHeightbase:int = 400;
var textUpperbase:int = basetext_mc.y;
var textLowerbase:int = textUpperbase + basetext_mc.height;
var textRangebase:int = basetext_mc.height - viewableHeightbase;

basescroller_mc.addEventListener(MouseEvent.MOUSE_ DOWN, basestartScrolling);
stage.addEventListener(MouseEvent.MOUSE_UP, basestopScrolling);
stage.addEventListener(Event.MOUSE_LEAVE, basestopScrolling);
stage.addEventListener(Event.DEACTIVATE, basestopScrolling);

function scrollbase(e:Event = null){
const pctMovedbase:Number = 1 - (dragBoundsbase.bottom - basescroller_mc.y) / dragBoundsbase.height;
basetext_mc.y = textUpperbase - (pctMovedbase * textRangebase);
}

function basestartScrolling(event:MouseEvent):void{
addEventListener(Event.ENTER_FRAME, scrollbase);
basescroller_mc.startDrag(true, dragBoundsbase);
}

function basestopScrolling(event:Event = null):void{
removeEventListener(Event.ENTER_FRAME, scrollbase);
basescroller_mc.stopDrag();
}

Your help would be greatly appreciated.

Thanks,
Alan



FlashKit > Flash Help > Actionscript 3.0
Posted on: 06-20-2008, 11:36 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Custom Scroller?
Im just curious how to create a nice clean (small) custom scroller, preferrably with inertia, here is an example of a really nice one, but without inertia http://www.adamskitchens.com/main.html please look in the OUR COMPANY link Ive tried a couple of tutorials but have been unsuccessfull, if any one knows how to create a scroller such as the one found on this link, with inerta if possible, could you please post a FLA, or expalin in detail how i go about creating one


thns in advance

sean

Custom Scroller
Hey...Ive been looking for a tutorial online to which goes through how to make a custom scroller - however most of them are about using the flash scrollbar and the others were very vague.

I want to produce a scrollbar similar to the one on the charlie and the chocolate factory site
http://pdl.warnerbros.com/wbmovies/c...ite/index.html
in the 'about dvd' section.

Does anyone know how I would be able to do this, it looks quite simple, however i cant find any tutorials relevant to this?

Thanks alot!

Help With Custom Scroller
I have a news section that is populated from an XML file. For each "story" node in the XML file I attach an instance from the library and position them vertically. I have a mask area so that only a few show and scroll bar to obviously scroll through them. Problem is that my scroll bar is only scrolling through a portion of them and not all of them. You can view the example here. Just click on the "Press" button at the bottom of the page. Below I've attached my source code. Any help with this would be awesome as I'm currently stumped.

code:
var pressXML:XML;
var rootNode:XMLNode;
var totalNodes:Number;

pressXML = new XML();
pressXML.ignoreWhite = true;
pressXML.onLoad = loadPress;
pressXML.load("data/press.xml");

function loadPress(success:Boolean) {
if (success) {
rootNode = this.firstChild;
totalNodes = rootNode.childNodes.length;
for (var i:Number = 0; i < totalNodes; i++) {
loadStory(i);
}
checkScroll();
} else {
trace("crap!");
}
}

function loadStory(_i:Number) {
var clipName:String = "story_" + _i + "_mc";
var clipY:Number = 130 * _i;
holder_mc.attachMovie("story_mc", clipName, _i);
holder_mc[clipName]._y = clipY;
holder_mc[clipName].header_txt.text = rootNode.childNodes[_i].attributes.header;
holder_mc[clipName].short_txt.text = rootNode.childNodes[_i].attributes.short;
holder_mc[clipName].pdf_btn.onRelease = function() {
getURL(rootNode.childNodes[_i].attributes.link, "_blank");
}
}

function checkScroll() {
holder_mc._y = 0;
dragger_mc._y = 0;

if (holder_mc._height > mask_mc._height){
_root.text_mc.dragger_mc.enabled = true;

var targY:Number = 0;

dragger_mc.onPress = function(){
startDrag(this, false, this._x, mask_mc._y, this._x, mask_mc._height - this._height);
}
dragger_mc.onRelease = dragger_mc.onReleaseOutside = function(){
stopDrag();
}

holder_mc.setMask(mask_mc);

holder_mc.onEnterFrame = function(){
scrollAmount = ((this._height - (mask_mc._height)) / (this._height - dragger_mc._height));
targY =- dragger_mc._y * scrollAmount;
this._y -= ((this._y - targY) / 3);
}
} else {
holder_mc._y = 0;
dragger_mc.enabled = false;
}
}

stop();

Custom Scroller?
I was wondering how to do those scrollers in textboxes that do not have the arrows, but just like a grey rectangle so to speak that you can drag along up or down.

If anyone has any ideas on how to do this, it would be greatly appreciated.

And by the way, how do you make the grey retangle not display the "hand" symbol on the mouse when rolling over it?

Thanks

Custom Scroller Help
I want to be able to load an external image into a scrolling text field and customize the look of it (up and down arrows, scroll bar, etc). Can anyone point me in the direction of where I may find one for use.

Many Thanks In Advance.

Custom Scroller
hi,

I'm new to flash and use mx 2004. My problem is i want to make a cusomised text / image scroller like in the link below.

http://www.kirupa.com/developer/flash8/scrollbar.htm

Trouble is its a flash 8 tutorial and i cant get the fla to open in my version of flash. I really like the design and its exactly what I want to produce.

Can some tell me how to make one in flash mx 2004 please.

Thanks.

Custom Scroller?
I was wondering how to do those scrollers in textboxes that do not have the arrows, but just like a grey rectangle so to speak that you can drag along up or down.

If anyone has any ideas on how to do this, it would be greatly appreciated.

And by the way, how do you make the grey retangle not display the "hand" symbol on the mouse when rolling over it?

Thanks

Custom Scroller Help
I want to be able to load an external image into a scrolling text field and customize the look of it (up and down arrows, scroll bar, etc). Can anyone point me in the direction of where I may find one for use.

Many Thanks In Advance.

Custom Scroller
this is probably beyond basic, but is there a good tutorial, either book or online, for making a custom scroller? something like the one driftlab uses in his news section. something like that and maybe also one with some enertia so that the text being scrolled rolls just a bit once you stop moving the scroller.

thanks for any help

Help For My Custom Scroller...it Works... Just Want It To Look Better
so I built a custom scroller but there is one problem with it... when the mouse button is pressed, you can move the bar up and down depending on direction of mouse movement(this is great) but, you can also move the mouse so quickly that the pointer is no longer over the scroller... this doesnt look very good... what I am asking is if anyone knows how to keep the pointer over my button when I am moving... at slow speeds it works... at high speeds the pointer just goes... I tried _root._ymouse = mybtn_btn._y; but it didnt work...

here is the code and an attached .fla (they do not have the dynamic main_txt field physically in them...I have also left out a lot of other things... just want to focus on the mouse pointer position over the button) thanks...also, I am new to flash so if there is a better way to code or my code is garbage feel free to tell me. thanks

s_btn.onPress = function () {
Mouse.addListener(s_btn);
trace("listener added");
};

s_btn.onMouseUp = function () {
Mouse.removeListener(s_btn);
trace("listener removed");
};

s_btn.onMouseMove = function () {
if(_root._ymouse > s_btn._y) {
s_btn._y += 2;
if (main_txt.scroll < main_txt.maxscroll) {
main_txt.scroll++;
}
trace("listener down drag");
}
else if(_root._ymouse < s_btn._y) {
s_btn._y -= 2;
if (main_txt.scroll > 1) {
main_txt.scroll--;
}
trace(" listener up drag");
}
};

[F8]custom Scroller Needs To Scroll A Mc
The custom scroller worked fine scrolling a text box but now I need it to scroll a movie clip (as I want seperate boxes pulling in a picture, text, etc. from an xml file).

Any help in what I need to change is appreciated.

Here's the scroller actionscript:
#initclip 1

/*
FScrollBarClass
EXTENDS FUIComponentClass

*/


FScrollBarClass = function()
{
if (this._height==4) {
return;
}
this.init();

this.minPos = this.maxPos = this.pageSize = this.largeScroll = 0;
this.smallScroll = 1;


this.width = (this.horizontal) ? this._width : this._height;
this._xscale = this._yscale = 100;
this.setScrollPosition(0);
this.tabEnabled = false;
if ( this._targetInstanceName.length > 0 ) {
this.setScrollTarget(this._parent[this._targetInstanceName]);
}
this.tabChildren = false;
this.setSize(this.width);
}

FScrollBarClass.prototype = new FUIComponentClass();



// ::: PUBLIC METHODS

FScrollBarClass.prototype.setHorizontal = function(flag)
{
if (this.horizontal && !flag) {
this._xscale = 100;
this._rotation = 0;
} else if (flag && !this.horizontal) {
this._xscale = -100;
this._rotation = -90;
}

this.horizontal = flag;
}

// updates the thumb, turns the bar on and off
FScrollBarClass.prototype.setScrollProperties = function(pSize, mnPos, mxPos)
{
if (!this.enable) {
return ;
}
this.pageSize = pSize;
this.minPos = Math.max(mnPos, 0);
this.maxPos = Math.max(mxPos,0);
this.scrollPosition = Math.max(this.minPos, this.scrollPosition);
this.scrollPosition = Math.min(this.maxPos, this.scrollPosition);

if (this.maxPos-this.minPos<=0) { // turn it off
this.scrollThumb_mc.removeMovieClip();
this.upArrow_mc.gotoAndStop(3);
this.downArrow_mc.gotoAndStop(3);
this.downArrow_mc.onPress = this.downArrow_mc.onRelease = this.downArrow_mc.onDragOut = null;
this.upArrow_mc.onPress = this.upArrow_mc.onRelease = this.upArrow_mc.onDragOut = null;
this.scrollTrack_mc.onPress = this.scrollTrack_mc.onRelease = null;
this.scrollTrack_mc.onDragOut = this.scrollTrack_mc.onRollOut = null;
this.scrollTrack_mc.useHandCursor = false;
} else { // turn it on
var tmp = this.getScrollPosition();
this.upArrow_mc.gotoAndStop(1);
this.downArrow_mc.gotoAndStop(1);
this.upArrow_mc.onPress = this.upArrow_mc.onDragOver = this.startUpScroller;
this.upArrow_mc.onRelease = this.upArrow_mc.onDragOut = this.stopScrolling;
this.downArrow_mc.onPress = this.downArrow_mc.onDragOver = this.startDownScroller;
this.downArrow_mc.onRelease = this.downArrow_mc.onDragOut = this.stopScrolling;
this.scrollTrack_mc.onPress = this.scrollTrack_mc.onDragOver = this.startTrackScroller;
this.scrollTrack_mc.onRelease = this.stopScrolling;
this.scrollTrack_mc.onDragOut = this.stopScrolling;
this.scrollTrack_mc.onRollOut = this.stopScrolling;
this.scrollTrack_mc.useHandCursor = false;
this.attachMovie("ScrollThumb", "scrollThumb_mc", 3);
this.scrollThumb_mc._x = 0;
this.scrollThumb_mc._y = this.upArrow_mc._height;
this.scrollThumb_mc.onPress = this.startDragThumb;
this.scrollThumb_mc.controller = this;
this.scrollThumb_mc.onRelease = this.scrollThumb_mc.onReleaseOutside = this.stopDragThumb;
this.scrollThumb_mc.useHandCursor=false;
this.thumbHeight = this.pageSize / (this.maxPos-this.minPos+this.pageSize) * this.trackSize;
this.thumbMid_mc = this.scrollThumb_mc.mc_sliderMid;
this.thumbTop_mc = this.scrollThumb_mc.mc_sliderTop;
this.thumbBot_mc = this.scrollThumb_mc.mc_sliderBot;
this.thumbHeight = Math.max (this.thumbHeight, 6); // 6 is the smallest a thumb should be
this.midHeight = this.thumbHeight - this.thumbTop_mc._height - this.thumbBot_mc._height;
this.thumbMid_mc._yScale = this.midHeight * 100 / this.thumbMid_mc._height;
this.thumbMid_mc._y = this.thumbTop_mc._height;
this.thumbBot_mc._y = this.thumbTop_mc._height + this.midHeight;
this.scrollTop = this.scrollThumb_mc._y;
this.trackHeight = this.trackSize - this.thumbHeight;
this.scrollBot = this.trackHeight + this.scrollTop;
tmp = Math.min(tmp, this.maxPos);
this.setScrollPosition(Math.max(tmp, this.minPos));
}
}

FScrollBarClass.prototype.getScrollPosition = function ()
{
return this.scrollPosition;
}

FScrollBarClass.prototype.setScrollPosition = function(pos)
{
this.scrollPosition = pos;
if (this.scrollThumb_mc!=undefined) {
pos = Math.min(pos, this.maxPos);
pos = Math.max(pos, this.minPos);
}
this.scrollThumb_mc._y = ((pos-this.minPos) * this.trackHeight / (this.maxPos-this.minPos)) + this.scrollTop;
this.executeCallBack();
}

FScrollBarClass.prototype.setLargeScroll = function(lScroll)
{
this.largeScroll = lScroll;
}

FScrollBarClass.prototype.setSmallScroll = function(sScroll)
{
this.smallScroll = sScroll;
}

FScrollBarClass.prototype.setEnabled = function(enabledFlag)
{
var wasEnabled = this.enable;
if (enabledFlag && !wasEnabled) {
this.enable = enabledFlag;
//if (this.textField!=undefined) {
//this.setScrollTarget(this.textField);

} else {
this.setScrollProperties(this.pageSize,
this.cachedMinPos, this.cachedMaxPos);
this.setScrollPosition(this.cachedPos);
}
this.clickFilter = undefined;
} else if (!enabledFlag && wasEnabled) {
this.textField.removeListener(this);
this.cachedPos = this.getScrollPosition();
this.cachedMinPos = this.minPos;
this.cachedMaxPos = this.maxPos;
if (this.clickFilter==undefined) {
this.setScrollProperties(this.pageSize,0,0);
} else {
this.clickFilter=true;
}
this.enable = enabledFlag;
}
}


// stretches the track, creates + positions arrows
FScrollBarClass.prototype.setSize = function(hgt)
{
if (this._height==1) return;
this.width = hgt;
this.scrollTrack_mc._yscale = 100;
this.scrollTrack_mc._yscale = 100 * this.width / this.scrollTrack_mc._height;
if (this.upArrow_mc==undefined) {
this.attachMovie("UpArrow", "upArrow_mc", 1); //1 is arbitrary
this.attachMovie("DownArrow", "downArrow_mc", 2); //2 is arbitrary
this.downArrow_mc.controller = this.upArrow_mc.controller = this;
this.upArrow_mc.useHandCursor = this.downArrow_mc.useHandCursor = false;
this.upArrow_mc._x = this.upArrow_mc._y = 0;
this.downArrow_mc._x = 0;
}
this.scrollTrack_mc.controller = this;
this.downArrow_mc._y = this.width - this.downArrow_mc._height;
this.trackSize = this.width - (2 * this.downArrow_mc._height);
if (this.textField!=undefined) {
this.onTextChanged();
} else {
this.setScrollProperties(this.pageSize, this.minPos, this.maxPos);
}
}


// ::: PRIVATE METHODS

FScrollBarClass.prototype.scrollIt = function (inc, mode)
{
var delt = this.smallScroll;
if (inc!="one") {
delt = (this.largeScroll==0) ? this.pageSize : this.largeScroll;
}
var newPos = this.getScrollPosition() + (mode*delt);
if (newPos>this.maxPos) {
newPos = this.maxPos;
} else if (newPos<this.minPos) {
newPos = this.minPos;
}
this.setScrollPosition(newPos);
}

FScrollBarClass.prototype.startDragThumb = function()
{
this.lastY = this._ymouse;
this.onMouseMove = this.controller.dragThumb;
}

FScrollBarClass.prototype.dragThumb = function()
{
this.scrollMove = this._ymouse - this.lastY;
this.scrollMove += this._y;
if (this.scrollMove<this.controller.scrollTop) {
this.scrollMove = this.controller.scrollTop;
}
else if (this.scrollMove>this.controller.scrollBot) {
this.scrollMove = this.controller.scrollBot;
}
this._y = this.scrollMove;
var c = this.controller;
c.scrollPosition = Math.round( (c.maxPos-c.minPos) * (this._y - c.scrollTop) / c.trackHeight) + c.minPos;

this.controller.isScrolling = true;
updateAfterEvent();
this.controller.executeCallBack();
}

FScrollBarClass.prototype.stopDragThumb = function()
{
this.controller.isScrolling = false;
this.onMouseMove = null;
}

FScrollBarClass.prototype.startTrackScroller = function()
{
this.controller.trackScroller();
this.controller.scrolling = setInterval(this.controller, "scrollInterval", 500, "page", -1);
}

FScrollBarClass.prototype.scrollInterval = function(inc,mode)
{
clearInterval(this.scrolling);
if (inc=="page") {
this.trackScroller();
} else {
this.scrollIt(inc,mode);
}
this.scrolling = setInterval(this, "scrollInterval", 35, inc, mode);
}

FScrollBarClass.prototype.trackScroller = function()
{
if (this.scrollThumb_mc._y+this.thumbHeight<this._ymo use) {
this.scrollIt("page",1);
} else if (this.scrollThumb_mc._y>this._ymouse) {
this.scrollIt("page",-1);
}
}

FScrollBarClass.prototype.stopScrolling = function()
{
this.controller.downArrow_mc.gotoAndStop(1);
this.controller.upArrow_mc.gotoAndStop(1);
clearInterval(this.controller.scrolling);
}

FScrollBarClass.prototype.startUpScroller = function()
{
this.controller.upArrow_mc.gotoAndStop(2);
this.controller.scrollIt("one",-1);
this.controller.scrolling = setInterval(this.controller, "scrollInterval",500, "one", -1);
}

FScrollBarClass.prototype.startDownScroller = function()
{
this.controller.downArrow_mc.gotoAndStop(2);
this.controller.scrollIt("one",1);
this.controller.scrolling = setInterval(this.controller, "scrollInterval", 500, "one", 1);
}


//
// Begin Special text scroller functions
//


FScrollBarClass.prototype.setScrollTarget = function(tF)
{
if (tF == undefined) {
this.textField.removeListener(this);
delete this.textField[ (this.horizontal) ? "hScroller" : "vScroller" ];
if (!(this.textField.hScroller==undefined) && !(this.textField.vScroller==undefined)) {
this.textField.unwatch("text");
this.textField.unwatch("htmltext");
}
}
this.textField = undefined;
if (!(tF instanceof TextField)) return;
this.textField = tF;
this.textField[ (this.horizontal) ? "hScroller" : "vScroller" ] = this;
this.onTextChanged();
this.onChanged = function()
{
this.onTextChanged();
}
this.onScroller = function()
{
if (!this.isScrolling) {
if (!this.horizontal) {
this.setScrollPosition(this.textField.scroll);
} else {
this.setScrollPosition(this.textField.hscroll);
}
}
}
this.textField.addListener(this);
this.textField.watch("text", this.callback);
this.textField.watch("htmlText", this.callback);
}

FScrollBarClass.prototype.callback = function(prop, oldVal, newVal)
{
clearInterval(this.hScroller.synchScroll);
clearInterval(this.vScroller.synchScroll);
this.hScroller.synchScroll = setInterval(this.hScroller, "onTextChanged", 50);
this.vScroller.synchScroll = setInterval(this.vScroller, "onTextChanged", 50);
return newVal;
}


FScrollBarClass.prototype.onTextChanged = function()
{
if (!this.enable || this.textField==undefined) return;
clearInterval(this.synchScroll);
if (this.horizontal) {
var pos = this.textField.hscroll;
this.setScrollProperties(this.textField._width, 0, this.textField.maxhscroll);
this.setScrollPosition(Math.min(pos, this.textField.maxhscroll));
} else {
var pos = this.textField.scroll;
var pageSize = this.textField.bottomScroll - this.textField.scroll;
this.setScrollProperties(pageSize, 1, this.textField.maxscroll);
this.setScrollPosition(Math.min(pos, this.textField.maxscroll));
}
}

FScrollBarClass.prototype.executeCallBack = function()
{
if (this.textField==undefined) {
super.executeCallBack();
} else {
if ( this.horizontal ) {
this.textField.hscroll = this.getScrollPosition();
} else {
this.textField.scroll = this.getScrollPosition();
}
}
}





Object.registerClass("FScrollBarSymbol", FScrollBarClass);

#endinitclip

Custom Scroller Problem
Good day All,

I'm having some problems with my custom scroller script. I've created a custom scroller in Flash CS3 using Actionscript 3.0. I have the scroller and it's script on its own layer, the scoller and script would perfect. Script below:

const scrollUpper:int = 268;
const scrollLower:int = 580;
const scrollRange:int = scrollLower - scrollUpper;
var dragBounds:Rectangle = new Rectangle(scroller_mc.x, scrollUpper, 0, scrollRange);

var viewableHeight:int = 325;
var textUpper:int = text_mc.y;
var textLower:int = textUpper + text_mc.height;
var textRange:int = text_mc.height - viewableHeight;

scroller_mc.addEventListener(MouseEvent.MOUSE_DOWN , startScrolling);
stage.addEventListener(MouseEvent.MOUSE_UP, stopScrolling);
stage.addEventListener(Event.MOUSE_LEAVE, stopScrolling);
stage.addEventListener(Event.DEACTIVATE, stopScrolling);

function scroll(e:Event = null){
const pctMoved:Number = 1 - (dragBounds.bottom - scroller_mc.y) / dragBounds.height;
text_mc.y = textUpper - (pctMoved * textRange);
}

function startScrolling(event:MouseEvent):void{
addEventListener(Event.ENTER_FRAME, scroll);
scroller_mc.startDrag(true, dragBounds);
}

function stopScrolling(event:Event = null):void{
removeEventListener(Event.ENTER_FRAME, scroll);
scroller_mc.stopDrag();
}

The problem I'm having is when I'm on a different page which contains 2 buttons when the buttons are clicked I receive the following error message, can someone please help me understand why I'm getting the error message and how to remove the error. Below is the error message I'm receiving:

TypeError: Error #1009: Cannot access a property or method of a null object reference.

Any help would be greatly appreciated.
Thanks a lot,
ALAN

ps. have yourself a wonderful July 1st & July 4th weekend

Custom Side Bar Scroller
Does anyone know how to make a custom text scroll bar or know of a good tutorial for one? I want create a scroll bar that looks like a slider that will match the theme of my website, however I'm not sure how to impliment the code.

Custom Scroller Problems
I'm having trouble with a custom scroller. I want it to go left to right and NOT up and down as it currently does. I thought I could just switch the x and y coordinates and letters and it would work but it still scrolls upand down. Thanks for any help.

stop();
var scrollLeft:Number = 107.5;
var scrollRight:Number = 666.8;

var imageLeft:Number = 23;
var imageRight:Number = -639;

var scrollRange:Number = scrollRight - scrollLeft;
var imageRange:Number = imageRight - imageLeft;

function scroll() {
var moved:Number = scroller._y - scrollLeft;
var pctMoved:Number = moved/scrollRange;
var imageMove:Number = pctMoved*imageRange;
images._y = imageRight - imageMove;
}

scroller.onPress = function() {
this.startDrag(false,this._x,scrollLeft,this._x,scrollRight);
this.onMouseMove = scroll;
}

scroller.onRelease = scroller.onReleaseOutside = function() {
this.stopDrag();
}

Custom Scroller Issues
I've just run into a snag with my scrolling window.

I followed this tutorial and got my own scroller to work. Then I placed a dynamic textfield in the content section. It loads an external news.txt file into the field. I have the font embedded. When I run the movie the text loads fine and the scrolling works.

My first problem is the text length. The news.txt file (currently just a bunch of random placeholder text) is rather lenghty. The problem is I can only make the dynamic textfield so long because once implemented in the website I'm making, the length of the news will vary. If the news is short on a particular day, there will be a bunch of blank space after the text but it will still scroll on the blank space. If the news is really long, the textfield isn't long enough to load all of it and it gets cut off. So I need the length of the textfield to change dynamically with the length of the content in the news.txt file.

The second problem is, I want to use HTML in my news text so I can use more formatting options. But when I enable "Render text as HTML" the text disappears. But the font is embedded so I have no idea why it does this.

- BOB!

[MX] Custom Scroller - External Source?
Hey everybody!

Here's my question... I wanna design a custom scroller kinda like the on... http://www.driftlab.com/ (right below the word welcome) I don't want to use the dull custom built in version MX provides cause lets face it, its ugly! and I'd like it to be linked to an external text document. I see this all over the place, so I'm pretty sure this is possible! If anyone could help out that would be great! Point me towards a tutorial or post an .fla with an example or something, I'd really appreciate it! I'm guessing a few other people may be interested too!

Thanks
Brad

Custom Scroller - Dynamic Text
Okay - I know that this has been asked several times and I apologize in advance for being a pest. About a week ago, Oldnewbie helped me out by providing an FLA file.

I still cannot get this thing to work. Is there anyone willing to have a peek and see what I am doing wrong?

Here are the specifics:

1. Please look at the "credentialscontentMC" movie clip. Here you will see what I am trying to do by using a custom made scroller where you can drag the heart shape down and see the text scroll.

2. The text does not even show up but the scroll bar does. I want the text to fade in when the user clicks on "Credentials" which is located in the drop down menu under "About Us."

3. Pleae note that this client was very adamant about using the horrific font - against my suggestion not to use it. I think it look ridiculous and is hard to read. But Whatever! I am so over it at this point.

4. I have only done About Us and Services as far as the drop down menu and content goes.

As always, any help is greatly appreciated!!

Denise

Custom Scroller Using Flash MX 2004
I don't really have any idea what I'm doing as I have adapted this (or at least tried) from a flash tutorial I found here on flash kit that was created using flash 5.

Anyway I'm doing something seriously wrong this much is clear.

Well the long and the short of it is I have created this custom scrollbar which isn't scrolling like it should. I have a big deadline soon and am feeling very behind and WAY out of my depth!

I'm still using MX 2004 (would flash 8 be any better?)
Can anyboy recommend any good flash tutorial programs that are video based (and cheap!) as I obviously need to improve my basic knowledge!

Thanks for looking

Please help me!

Very desperate.

Custom Text Scroller (bug & Revision)
Hi all.

I finally made a scroller. Except one feature, it works fine like the UIScrollBar component. That one feature is what happens when you press onto the "passive" area where scroll bar moves. Anyway...

Two bugs I could find:

1. In removing the up and down buttons located over and under the scroll bar.. I don't know how and why I can't do that while in contrary I can remove the bar and the background of it.

2. In the flash player (standalone program) while unloading these buttons and the scroll bar, it seems to be taking an action that is actually located below the removing line in actions, that is, it modifies its size. Interestingly this does not happen in "test movie" mode of flash.

My script may not be either practical or economic, I know. I haven't checked any tutorials or files on the net, that's probably why. Any suggestion is more than welcome. I'll be glad to learn what you think.

Custom Scroller With Bitmap Text
Hi, I've tried searching but keep on getting the same strange error. My scripting know-how is extremely limited so please bare with me.

I've created a custom text scroller and the scrolling text is bitmap text. The problem i'm having is that I need to have the scroller scroll in full pixel increments because the text ends up blurring if the clip doesn't end up on a whole number. Essentially what I need is: if text scrolls 0-0.5, text scrolls 0. if text scrolls 0.5-0.99, text scrolls 1 (I need it to round off to a whole pixel.).

Here's my script:

var scrollUpper:Number = 0;
var scrollLower:Number = 532;

var textLower:Number = 0;
var textUpper:Number = -256;

var scrollRange:Number = scrollLower - scrollUpper;
var textRange:Number = textLower - textUpper;

function scroll() {
var moved:Number = scroller_mc._y - scrollUpper;
var pctMoved:Number = moved/scrollRange;
var textMove:Number = pctMoved*textRange;
textClip._y = textLower - textMove;
}


scroller_mc.onPress = function() {
this.startDrag(false,this._x,scrollUpper,this._x,scrollLower);
this.onMouseMove = scroll;
}

scroller_mc.onRelease = scroller_mc.onReleaseOutside = function() {
this.stopDrag();
this.onMouseMove = null;

Any help would be much appreciated. This is driving me insane.

[MX] Custom Scroller - External Source?
Hey everybody! Here's my question... I wanna design a custom scroller kinda like the on... http://www.driftlab.com/index2.html (right below the word welcome) I don't want to use the dull custom built in version MX provides cause lets face it, its ugly! and I'd like it to be linked to an external text document. I see this all over the place, so I'm pretty sure this is possible! If anyone could help out that would be great! Point me towards a tutorial or post an .fla with an example or something, I'd really appreciate it! I'm guessing a few other people may be interested too!

Thanks
Brad

Using Pixel Font With Custom Scroller?
Hi Peeps,

Havent posted in a while here. Anyhoo, I paid money to use my damb "FFF Professional" Pixel Font and I'm stressing trying to get it working with a scroller I used. It works wen I preview it on my pc, but on others it doesnt work, and shows up as one of the main fonts. You know, Veranda, Times New Roman, Arial; one of those. Heres the Tutorial I used to do it:

http://www.actionscripts.org/tutoria...ox/index.shtml

Basically, The font ONLY shows up correctly on my pc, offline and when I upload it online. I figure that's, because I have the font installed. But it should still work for others right? What am I doing wrong? How do you use my paid for Pixel Font with a custom scroller. And Dont recommend me those damb $35 scrolling thingys, I've spent enough money already. There must be a way to do it without Spend Spend Spend.

Please if you can help me, asap please. Thanks guys

Kirupa Custom Scroller Help (set Content ._y)
http://www.kirupa.com/developer/flash8/scrollbar.htm

trying to move to a certain point in my content without actually usually the scrollFace or arrow buttons. I can move the content easily enough by just setting the _y position of the content MC, but figuring out the placement of the scrollFace is driving me nuts. Any suggestions?

Hoping for something like this:

Code:
function moveMyContent(ypos) {
contentMain._y = ypos;
scrollFace._y = ????
}

I'm sure it's something like ypos*(contentHeight-maskHeight)/(scrollHeight-scrollFaceHeight) but I can't get it.

Custom Dynamic Text Scroller
Hello everyone,

I, may be asking for to much, but I need to create a custom scrollbar with easing capabilities, which loads dynamic text from an external file or files. it does not sound like much to ask, but i am just a designer and I am trying to break my way into site development. Can some one please help me with this issue.

No Dynamic Text In Custom Scroller?
Using this tutorial :
http://www.kirupa.com/developer/flash8/scrollbar3.htm

From what I have been working with, dynamic text field do not show up all, but dynamically loaded pictures and static text is showing up?

Anyone have a solution? I figure it has something to do with the masking, but I cant seem to
get it to work.

Regards.

Text Scroller W/ CSS Custom Links Help?
Hi All,
I have been following kirupa's great tutorials but I am just stumped at why I am unable to get my CSS to work with my links. I want to have a background on my links you know like a colored background on rollover (hover). My links are underlined but it ignores some of my CSS like the background on the hover link. Any suggestions?

However, here is what i want it to do.

1.) On rollover (hover) of a link it has a background color and it is underlined. The underline works just not the light background color.

2.) I want my headers to be bold.

Custom Scroller With External File
Yesterday i tried to made a custom scroller (got the tutorial from kirupa, flash8) I modified it by load the text from external file(.txt). I used dynamic text for that purpose. But i couldn't get the text._height variable correctly, since the text._height variable equal to the height of the dynamic text's box i have made before. So even the loaded text was longer than the box, the variable wouldn't change and the scroller didn't work correctly. Is there any way i could get the variable correctly? Sorry for my creepy english...

[MX] Custom Scroller - External Source?
Hey everybody! Here's my question... I wanna design a custom scroller kinda like the on... http://www.driftlab.com/index2.html (right below the word welcome) I don't want to use the dull custom built in version MX provides cause lets face it, its ugly! and I'd like it to be linked to an external text document. I see this all over the place, so I'm pretty sure this is possible! If anyone could help out that would be great! Point me towards a tutorial or post an .fla with an example or something, I'd really appreciate it! I'm guessing a few other people may be interested too!

Thanks
Brad

Custom Text Scroller In Flash Mx
http://www.christopherlawrence.com/

anyone know how to make these type of text scrollers ??

Problem With Custom Ease Scroller Code...
Hi, I'm having trouble with my scroller code. The problem is that the drag button does not stay attached to the scrollbar track. The dragger floats around the page with the mouse....any info is greatly appreciated. Thanks! Here is the file...

[F8] Text Scroller W/ CSS Custom Fonts And Links - HELP PLEASE
Hi all,
So with the help of a ton of Flash tutorials I created a text scroller. And, the CSS works for a few things but not everything. I have seen CSS work well with text scrollers before so I know i am doing something miserablly wrong. Can someone please review my example and give me advice on how to fix my issue. I have managed to get my active links to work with the CSS.

However, here is what i want it to do.

1.) On rollover (hover) of a link it has a background color and it is underlined. The underline works just not the light background color.

2.) I want my headers to be bold.

Perhaps I am using the wrong approach ABSOLUTELY ANY SUGGESTIONS are welcome

Custom Scroller With Dynamically Loaded Text
Hi there,
I really can't find a tutorial for a custom vertical scroller with dynamically loaded text and/or images from xml. Do you know some? I really need this. Thank you in advance guys. Keep up the good work!

Movieclip Scroller With Custom Skin And Tween
Check the movie clip scroller which I developed,
www.lostinscript.com/Downloads.htm

Advantages:
1. Component skin can be easily changed from properties window.
2. User defined shapes can be used as scrollers.
3. Scroller rollOver indication for custom rollOver animations.
3. Different copys of same component can carry different scrollers.
4. 'Ease-In' tween option for scrolling content.
5. Scroller can be on right or left side of component.
6. Extra space can be given between clip and scroller
4. Scroller doesn't shrinks according to content length, so that user defined shapes

Thankyou,
Karthik CK

Custom Scroller With Dynamically Loaded Text
Hi there,
I really can't find a tutorial for a custom vertical scroller with dynamically loaded text and/or images from xml. Do you know some? I really need this. Thank you in advance guys. Keep up the good work!

Help With Custom Scroller With Externally Loaded Text File
Basically, my problem is that the dragger will not scroll all the way down and I have no clue how to fix it. It works well when there is a lot of text in the text file but when there isn't, the dragger does not behave as it should.

Here is my file so hopefully someone can help me out here.

Thanks a lot,
Prich...

Its done with mx 2004 btw

Problem Adding Custom Scroller Button On External Loaded Text (help)
Hello,
I have been following all the wonderful tutorials in this forum to learn about AS and flash.
This time I tried to combine 2 tutorials and make a text field with external loaded text and custom scroller button, but I failed.....

I tried to look for different tutorials to find the answer, but It didn't work out either...

So If anyone can spare a min to look at the file, please help !!!

Thanks
Getata
problem_scroller.zip

Are There Any Tutorials About Creating A Live Preview And Custom Icon For Custom Flash Components
Hi
I need tutorials about the custom components and how to make a live preview for them and also custom Icons,
basically I want to know if we can put an swf in the live preview field and when we are in the design view of the component that I can interact with the swf like click it and show a copyright message (all at design time not run time of the component)?

and about the custom Icons, flash asks for Fireworks PNG and when I put mine it does not show in the library???

thanks.

Convert Movieclip Scroller To Dynamic Text Scroller
I have code I borrowed that is set up to scroll a movie clip image. However, it doesn't work well if I replace the graphics with a text box as the scrolling becomes "jerky" as I think there is too much information for it to process with the complexity of the text. So I was hoping to change the scrolling content from a movie clip image with text to a dynamic textbox. But it will not function when I do that change. In this currrent setup, the movieclip instance name is "contentmain". I tried naming the instance of the dynamic textbox with that name, but no text shows up next to the scroller when I play the movie.

Here's the code:
scrolling = function () {

var scrollHeight:Number = scrollTrac._height;
var contentHeight:Number = contentMain._height;
var scrollFaceHeight:Number = scrollFace._height;
var maskHeight:Number = maskedView._height;
var initPosition:Number = scrollFace._y=scrollTrac._y;
var initContentPos:Number = contentMain._y;
var finalContentPos:Number = maskHeight-contentHeight+initContentPos;
var left:Number = scrollTrac._x;
var top:Number = scrollTrac._y;
var right:Number = scrollTrac._x;
var bottom:Number = scrollTrac._height-scrollFaceHeight+scrollTrac._y;
var dy:Number = 0;
var speed:Number = 10;
var moveVal:Number = (contentHeight-maskHeight)/(scrollHeight-scrollFaceHeight);

// Setup easing event
contentMain.desiredX = contentMain._y;
contentMain.onEnterFrame = function() {
this._y -= (this._y - this.desiredX) / 3;
};

scrollFace.onPress = function() {
var currPos:Number = this._y;
startDrag(this, false, left, top, right, bottom);
this.onMouseMove = function() {
dy = Math.abs(initPosition-this._y);
contentMain.desiredX = Math.round(dy*-1*moveVal+initContentPos);
};
};
scrollFace.onMouseUp = function() {
stopDrag();
delete this.onMouseMove;
};


btnUp.onPress = function() {
this.onEnterFrame = function() {
if (contentMain._x+speed<maskedView._x) {
if (scrollFace._x<=left) {
scrollFace._x = left;
} else {
scrollFace._x -= speed/moveVal;
}
contentMain._x += speed;
} else {
scrollFace._x = left;
contentMain._x = maskedView._x;
delete this.onEnterFrame;
}
};
};
btnUp.onDragOut = function() {
delete this.onEnterFrame;
};
btnUp.onRelease = function() {
delete this.onEnterFrame;
};
btnDown.onPress = function() {
this.onEnterFrame = function() {
if (contentMain._x-speed>finalContentPos) {
if (scrollFace._x>=right) {
scrollFace._x = right;
} else {
scrollFace._x += speed/moveVal;
}
contentMain._x -= speed;
} else {
scrollFace._x = right;
contentMain._x = finalContentPos;
delete this.onEnterFrame;
}
};
};
btnDown.onRelease = function() {
delete this.onEnterFrame;
};
btnDown.onDragOut = function() {
delete this.onEnterFrame;
};

if (contentHeight<maskHeight) {
scrollFace._visible = false;
btnUp.enabled = false;
btnDown.enabled = false;
} else {
scrollFace._visible = true;
btnUp.enabled = true;
btnDown.enabled = true;
}
};
scrolling();

Any ideas?

Thanks,
Dave

Convert Movieclip Scroller To Dynamic Text Scroller
I have code I borrowed that is set up to scroll a movie clip image. However, it doesn't work well if I replace the graphics with a text box as the scrolling becomes "jerky" as I think there is too much information for it to process with the complexity of the text. So I was hoping to change the scrolling content from a movie clip image with text to a dynamic textbox. But it will not function when I do that change. In this currrent setup, the movieclip instance name is "contentmain". I tried naming the instance of the dynamic textbox with that name, but no text shows up next to the scroller when I play the movie.

Here's the code:
scrolling = function () {

var scrollHeight:Number = scrollTrac._height;
var contentHeight:Number = contentMain._height;
var scrollFaceHeight:Number = scrollFace._height;
var maskHeight:Number = maskedView._height;
var initPosition:Number = scrollFace._y=scrollTrac._y;
var initContentPos:Number = contentMain._y;
var finalContentPos:Number = maskHeight-contentHeight+initContentPos;
var left:Number = scrollTrac._x;
var top:Number = scrollTrac._y;
var right:Number = scrollTrac._x;
var bottom:Number = scrollTrac._height-scrollFaceHeight+scrollTrac._y;
var dy:Number = 0;
var speed:Number = 10;
var moveVal:Number = (contentHeight-maskHeight)/(scrollHeight-scrollFaceHeight);

// Setup easing event
contentMain.desiredX = contentMain._y;
contentMain.onEnterFrame = function() {
this._y -= (this._y - this.desiredX) / 3;
};

scrollFace.onPress = function() {
var currPos:Number = this._y;
startDrag(this, false, left, top, right, bottom);
this.onMouseMove = function() {
dy = Math.abs(initPosition-this._y);
contentMain.desiredX = Math.round(dy*-1*moveVal+initContentPos);
};
};
scrollFace.onMouseUp = function() {
stopDrag();
delete this.onMouseMove;
};


btnUp.onPress = function() {
this.onEnterFrame = function() {
if (contentMain._x+speed<maskedView._x) {
if (scrollFace._x<=left) {
scrollFace._x = left;
} else {
scrollFace._x -= speed/moveVal;
}
contentMain._x += speed;
} else {
scrollFace._x = left;
contentMain._x = maskedView._x;
delete this.onEnterFrame;
}
};
};
btnUp.onDragOut = function() {
delete this.onEnterFrame;
};
btnUp.onRelease = function() {
delete this.onEnterFrame;
};
btnDown.onPress = function() {
this.onEnterFrame = function() {
if (contentMain._x-speed>finalContentPos) {
if (scrollFace._x>=right) {
scrollFace._x = right;
} else {
scrollFace._x += speed/moveVal;
}
contentMain._x -= speed;
} else {
scrollFace._x = right;
contentMain._x = finalContentPos;
delete this.onEnterFrame;
}
};
};
btnDown.onRelease = function() {
delete this.onEnterFrame;
};
btnDown.onDragOut = function() {
delete this.onEnterFrame;
};

if (contentHeight<maskHeight) {
scrollFace._visible = false;
btnUp.enabled = false;
btnDown.enabled = false;
} else {
scrollFace._visible = true;
btnUp.enabled = true;
btnDown.enabled = true;
}
};
scrolling();

Any ideas?

Thanks,
Dave

Custom Tabbed Menu Needing Custom Event?
Hi everyone,

I managed to solve my flash asset problem I was having last week and successfully created a for loop to loop through an array and make me my animated tabbed menu.

A brief explanation of what's happening... I have built an animated tab (animated with AS3 tweening) so when a user rolls mouse over it makes the tab image pop up from below the text then on roll out it makes the tab image drop back down again.

What I'm trying to achieve is when user clicks on tab it will keep the tab image behind it, but when the user clicks another tab it runs the animation that drops the currently selected and maintains the one just clicked.

current creation code is below.


Code:
// create main menu tab components
for (var i:int = 0; i < menuArray.length; i++)
{
var menuTab:MainMenuTab = new MainMenuTab();

tabContainer.addChild(menuTab);
menuTab.x = i * 106;
menuTab.setLabelText(menuArray[i]);

// event listeners
menuTab.addEventListener(MouseEvent.CLICK, tabClickHandler);
What is happening is I make an instance of menuTab then add it to the 'tabContainer' which is a standard flex canvas on the stage, it then obviously assigns the spacing, sets the label (public function inside flash swc). The click handler is then added which runs a public function inside the flash symbol to get the tab to stick to the top and not drop down.

Now I really can't get my head around how to get the tabs I'm not clicking on to respond to the click. I can obviously get the one I am clicking on to repond no problem by going through 'event.currentTarget' but I need to also tell the rest of them to check to see if they are currently selected, if they are then to drop down so I don't have more than one tab selected at a time.

I have tried having a public var that acts as the selectedIndex and sending that to the flash component, but again the problem is getting the other tabs that aren't being clicked the data and to do something and I have no idea how to reference them?!

Anyone please help? Is there some way I can loop through the children of the flex canvas or something?

Custom Cloting Design (Custom Tailor Store)
Hello ,
i want to develop a project for designing custom Dress Shirts.
like there will be different objects (buttons, half sleeve , full sleeve , etc)
clicking the objects or drag them to working Area , will make the full shirt ,

Like custom Tailor Store ,

Is there any thing similar any body has seen ? (any open source)
if not then how can i make it .

Any help will be really Appreciated ,

Regards.

Text Scroller With Image With Mouse Scroller
Hi to all,
I have problem with flash. that i want to creat dynamic text & image scroller in scroller by creating custom scroller (not inbuilt component) That scroller i can scroll with help of mouse's scroller. (the mouse's scroller & image must be include in to the scroller box)
Help me !
Help me !
Reply me fast if u have solution for it!!!!

Regards,
Samual

Convert Vertical Scroller To Horizontal Scroller
Hi have a cool vertical scroller that I did try to convert to horizontal, but I could not make it work.
Can someone help ??
Below is the code for vertical scroller:
Thanks to anyone who can help.

//code by Billy T

//set a variable
targY=0;
//set the x position of the dragger
dragger._x = 370;
line._x = 370;
//set the drag action of the dragger
//drag is restricted to the height of the mask
dragger.onPress=function(){
startDrag(this,false,this._x,0,this._x,theMask._he ight-this._height);
}
//stop the drag
dragger.onRelease=dragger.onReleaseOutside=functio n(){
stopDrag();
}
//set the mask for the text
theText.setMask(theMask);
//the scrolling animation
theText.onEnterFrame=function(){
/*set a variable
this variable basically stores info regarding what fraction of the total text
is being displayed through the mask and ensures that dragging the dragger
from top to bottom will reveal all the text.
this allows you to change the amount of text and the scroller will update itself
*/
scrollAmount=(this._height-(theMask._height/1.3))/(theMask._height-dragger._height);
//set a new target y position
targY=-dragger._y*scrollAmount;
//set the y of the text to 1/5 of the distance between its current y and the target y

//change the 5 to a lower number for faster scrolling or a higher number for slower scrolling
this._y-=(this._y-targY)/5;
}

Custom Lines Like Custom Brushes In Pshop?
Is it possible to create custom lines in mx04 in much the same way you can setup a custom brush in photoshop?

Custom Cursor + Custom Scrollbar = Problem
Ok, this is the thing: I made a scrollbar in flash, just like I made a cursor. the cursor only works when I set the settings to flash < 6 and as soon as I use the scrollbar while also using the cursor, it stops working. i suck at AS-ing and any help would be greatly appreciated.

~YF220

PS: .fla included.

Custom TreeItemRenderer Removes Custom Component
Hello,
I have created custom TreeItemRenderer in which i am trying to draw colored Hbox bar at each node except root. Intially when i click on root node it opens first child node with bar but when i open leaf node it does not showing bar and removing existing bard from other few child nodes. Its calling itemrenderer on mouseonver eventhough i have disabled. I am attaching code would please any one help me to resolve this issue.
Attaching Code here

package Adodbe.renderers
{
import flash.display.DisplayObject;
import flash.events.Event;
import flash.events.MouseEvent;

import mx.collections.*;
import mx.containers.HBox;
import mx.controls.Label;
import mx.controls.TextInput;
import mx.controls.treeClasses.*;
import mx.core.UITextField;

public class PercentCorrectTreeRenderer extends TreeItemRenderer
{

private var hBox:HBox;
private var barHBox:HBox;
private var itemLabel:Label;
private var textBar:Label;
private var fillBar:TextInput;

// Define the constructor.
public function PercentCorrectTreeRenderer()
{
super();
}

override public function set data(value:Object):void
{
super.data = value;

var treeItem:Object = TreeListData(super.listData).item;
if(!treeItem) return;
if(treeItem.Element && treeItem.Element == "Root")
{
this.setStyle("styleName", "percentCorrectTreeSection");
}
else
{
this.setStyle("styleName", "percentCorrectTreeSectionItem");
}
}

override protected function createChildren():void
{
super.createChildren();

label.addEventListener(MouseEvent.CLICK, onLabelClick);
label.addEventListener(MouseEvent.MOUSE_OVER, onLabelMouseOver);


barHBox = new HBox();
fillBar = new TextInput();
textBar = new Label();

fillBar.editable = false;
fillBar.styleName = "barStrengths";

barHBox.addChild(fillBar);
barHBox.addChild(textBar);
barHBox.setStyle("paddingLeft",200)

this.addChild(barHBox);
}

override protected function measure():void
{
super.measure();

var w:Number = data ? ( listData as TreeListData ).indent : 0;

if ( disclosureIcon )
w += disclosureIcon.width;

if ( icon )
w += icon.measuredWidth;

if ( label.width < 4 || label.height < 4 )
{
label.width = 4;
label.height = 16;
}

if ( isNaN( explicitWidth ) )
{
w += label.getExplicitOrMeasuredWidth( );
w += barHBox.getExplicitOrMeasuredWidth( );
measuredWidth = w;
measuredHeight = Math.max( barHBox.getExplicitOrMeasuredHeight( ), label.getExplicitOrMeasuredHeight( ) );
}
else
{
label.width = Math.max(explicitWidth - ( w + barHBox.getExplicitOrMeasuredWidth( ) ), 4 );
measuredHeight = Math.max( barHBox.getExplicitOrMeasuredHeight( ), label.getExplicitOrMeasuredHeight( ) );

if ( icon && icon.measuredHeight > measuredHeight )
measuredHeight = icon.measuredHeight;
}
}

override protected function commitProperties( ): void
{
super.commitProperties( );
}


override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
{
super.updateDisplayList(unscaledWidth, unscaledHeight);
barHBox.setActualSize(barHBox.getExplicitOrMeasure dWidth(),barHBox.getExplicitOrMeasuredHeight());

if (icon)
icon.y = (unscaledHeight - icon.height) / 2;
if (disclosureIcon)
disclosureIcon.y = (unscaledHeight - disclosureIcon.height) / 2;

var treeItem:Object = TreeListData(super.listData).item;
if(!treeItem) return;

if(treeItem.Element && treeItem.Element == "Root")
{
this.label.text = treeItem.Title +" - "+treeItem.NumberCorrect +" correct ("+treeItem.PercentCorrect+"%)";
barHBox.visible = false;
fillBar.setStyle("borderStyle","none");
}
else
{
if(treeItem.children.length > 0)
{
this.label.text = treeItem.Title +" "+treeItem.NumberCorrect;
fillBar.width = Math.round((200 * Number(treeItem.PercentCorrect))/100);
fillBar.height = 15;
textBar.text = treeItem.PercentCorrect + "%";
fillBar.styleName = "barStrengths";
barHBox.y = disclosureIcon.y - 5
}
else if(treeItem.children.length == 0)
{
disclosureIcon.visible = false;
this.label.text = treeItem.Title +" "+treeItem.NumberCorrect;
fillBar.width = Math.round((200 * Number(treeItem.PercentCorrect))/100);
fillBar.height = 15;
textBar.text = treeItem.PercentCorrect + "%";
fillBar.styleName = "barStrengths";
barHBox.y = disclosureIcon.y - 5

}
}
}
private function onLabelClick(event:Event):void
{
var obj:Object = event.target;
}
private function onLabelMouseOver(event:Event):void
{
var obj:Object = event.target;
}



}
}

Any help would much appriciated.
Thanks

Horizontal Scroller...NOT Vertical Scroller
Hi all:

I was just curious if anyone knows of a good tutorial for a horizontal scroller ... I want to use arrows not a bar, and I can find the vertical tutorials, but I was curious if anyone knew of a horizontal one.

THanks in advance

Image+text Scroller, Form Scroller, And Loading External Text Files - Urgent
Hi everybody!

Does anybody know how to do the following things in Flash MX?

1.Make a scroller with text + images in it;
2.Make a scroller with text + a form in it;
3.I followed the tutorial entitled "Scrolling Dynamically Loaded Text", but the text that I tried to load has over 160 lines, and I can only scroll down to about half way of the total lines. Why is that?
4.I also tried to load xml files using the code <?xml version="1.0" encoding="utf-8"?> on the first line of each xml file, but the ', &, and " " don't work.

Can anybody help me, please? This is urgent!

Thanks in advance!

animind

Image+text Scroller, Form Scroller, And Loading External Text Files - Urgent
Hi everybody!

Does anybody know how to do the following things in Flash MX?

1.Make a scroller with text + images in it;
2.Make a scroller with text + a form in it;
3.I followed the tutorial entitled "Scrolling Dynamically Loaded Text", but the text that I tried to load has over 160 lines, and I can only scroll down to about half way of the total lines. Why is that?
4.I also tried to load xml files using the code <?xml version="1.0" encoding="utf-8"?> on the first line of each xml file, but the ', &, and " " don't work.

Can anybody help me, please? This is urgent!

Thanks in advance!

animind

Copyright © 2005-08 www.BigResource.com, All rights reserved