all groups > flash actionscript > march 2006 >
You're in the

flash actionscript

group:

ScrollBar disapears in scrollPane....arrgghhh...


Re: ScrollBar disapears in scrollPane....arrgghhh... Ken Fine
3/11/2006 4:42:40 PM
flash actionscript: Having played around with it, my advice is: the scrollbar component sucks.
It will make your Flash movie larger than it needs to be, and it disguises
the concepts you need to understand to make scrollbars work the way you need
them to work. You often will not be able to make the scrollbar behave in the
ways that you want it to behave, or to react in any "custom" manner. If your
scrollbar breaks, you'll have no idea why.

Why not dispense of crappy component-based solutions and learn some simple
code? You'll be able to implement a scrollbar in just 1 or 2k of space, and
if you decide to get tricky with easing or inertial effects later on, you'll
have a rational framework with which to proceed. Read this tutorial:
http://www.kirupa.com/developer/flash8/scrollbar.htm

I was able to implement my own horizontal version of the scrollbar by
following the tutorial and messing around for an hour or so.

If you appreciated this advice (or are just feeling nice) please do a site
check for me:
http://www.washington.edu/index-flash

Tell me if anything looks broken. Note this targets the F8 player only. Note
also this link differs from a link I was distributing earlier.

-KF

[quoted text, click to view]

ScrollBar disapears in scrollPane....arrgghhh... scotsman
3/11/2006 4:43:39 PM
I am using the flash 8 component:

I'm loading a "linkage" instance from the library called namely
"menuListing".

inside "menuListing" mc, (deleted from the stage) I am duplicating another
mc namely "menuList", 'x' amount of times...
('x' being the number of menuItem nodes from my XML)
[the xml will change often, hence so will the number of menuItem nodes]

The scrollPane populates all fine and dandy, though.... it'd seem I can not
get the scrollBar to re-initialize (despite setting the vertical bar to
true) when the population of all items has completed.

Can anyone assist me here....?

the code I have at present is below for your reference....
------------------------
_root.controls.outline.menuSP = scrollPane component
------------------------
frame1 actionscript:

menuSP.setStyle("backgroundColor", "none");
menuSP.contentPath = "menuListing";

------------------------
menuListing mc
------------------------
frame1 actionscript:

function loadMenu(load_xml) {
var items = load_xml.firstChild.firstChild.childNodes;
for (var i=0; i < items.length; i++) {
if (items[i].attributes.type == "menuItem") {
var menuTitle = items[i].firstChild.childNodes;
_root.menBut[i] = menuTitle;
}
}
for (i=0; i < items.length; i++) { // xml # of nodes length
duplicateMovieClip("menuList", "bmenu"+i, i);
// menu button text (menBut array declared on root timeline)
this["bmenu"+i].mmenu = _root.menBut[i];
this["bmenu"+i]._y = 20 * i;

this["bmenu"+i].onRollOver = function() {
this.immenu.textColor = 0xFF0000;
this.mShadow._visible = true;
}
this["bmenu"+i].onRollOut = function() {
this.immenu.textColor = 0x000000;
this.mShadow._visible = false;
}
}
}
var config_xml = new XML();
config_xml.ignoreWhite = true;
config_xml.onLoad = function(success) {
if (success) loadMenu(this);
//else trace("Error loading XML file");
}
config_xml.load("config1.xml");



Re: ScrollBar disapears in scrollPane....arrgghhh... Ken Fine
3/11/2006 5:18:36 PM
Great, thank you, this is exactly the kind of feedback I'm looking for. I
will follow your preloader advice. The final version will stash a lot of
required resources in LSOs on the user machine, which should cut the
download way down, but a preloader is a good idea nontheless.

-KF
[quoted text, click to view]

Re: ScrollBar disapears in scrollPane....arrgghhh... scotsman
3/11/2006 7:12:36 PM
I fully appreciate where your coming from - I already have my own scrollbar
(scroll anything) actionscript but was being lazy upon implementing it and
thought why the hell not...lets try these components. .. your right regards
the kb sizes though guess i will need to go back to plan one..

regards your link.. initial thoughts were why you utilized flash for such a
large area at the top of he page however then noticed the flv vid'... odd
design concept imho.... but thats not to say its not correct... design is
that of the beholders' eye....

big gripe though... despite being on a 27kbps dsl connection.... there was a
breif pause before the flash movie appeared... where the preloader? For a
uni site i'd guess that there will be some still accessing the site on a 56k
connection and they may think the site is broken before the flash loads...
show the user something is happening basically. build a generic preloader
for your movies...

personally i think i would have used alot of divs though and coded for
netscape and ie on both the mac and windows.... but thats just me...

cheers for your comments.....

R


[quoted text, click to view]

AddThis Social Bookmark Button