PDA

View Full Version : AxisScroller Class



mprzybylski
December 1st, 2006, 12:48 PM
My first official class release. Blog post below cuz I don't want to retype:

This is my first release in the new category to the right, Flash Source > Classes. It’s a scrollbar class that allows you to scroll at the X or Y axis, different ease types, speeds, etc. Take a look at the documentation for details. Enjoy.

Blog Post (http://blog.reintroducing.com/index.php/01/12/2006/371)
Example (http://blog.reintroducing.com/classes/AxisScroller/AxisScrollerExample.html)
Documentation (http://blog.reintroducing.com/classes/AxisScroller/AxisScroller.html)
Download (http://blog.reintroducing.com/classes/AxisScroller/AxisScroller.zip)

Oh, and, excuse the ugly example, its the functionality that counts, not the ugly example file :P

tpspoons
December 1st, 2006, 02:23 PM
Thats really nice and easy to use :D

Thanks.

chisel
December 3rd, 2006, 09:25 AM
One of the best scrollers I've seen so far. One question though, do I just put com folder into Flash 8\en\First Run\Classes or what?

mprzybylski
December 3rd, 2006, 01:51 PM
Thanks guys!

chisel: No, you can just put my com folder in the same directory where your FLA files lay and it should work, or you can put it anywhere you'd like and define the class path within flash by going to publish settings > flash > AS 2.0 settings

dezamp
December 20th, 2006, 11:35 AM
Can you post a version for MX 2004 please? Sorry for the inconvenience!

mprzybylski
December 20th, 2006, 11:49 AM
the class should be usable in mx2004, the usage code is in the class, if you still need me to post one then let me know and i'll do it when i get home.

dezamp
December 20th, 2006, 12:54 PM
the class should be usable in mx2004, the usage code is in the class, if you still need me to post one then let me know and i'll do it when i get home.

Sorry it appears that i definetly can't open the fla file. Everything else works though!

If you can do it at home that would be great! It looks really cool and unique!

mprzybylski
December 20th, 2006, 03:00 PM
right, i meant the class is usable in mx2004, not the fla. if you open the class (or the documentation) it'll show the usage example code.

mprzybylski
December 20th, 2006, 03:10 PM
here is an mx2004 version.

dezamp
December 20th, 2006, 03:52 PM
here is an mx2004 version.

Thanks!

mprzybylski
December 20th, 2006, 04:15 PM
no problem

bigcy
December 21st, 2006, 05:44 AM
hi
mprzybylski (http://www.kirupa.com/forum/member.php?u=15316)
Its really nice scroller i've ever seen. Just A question though.
Could u plz tell me how to incorporate the external xml file to this scroller ?
thanks in advance
regards

mprzybylski
December 21st, 2006, 11:21 AM
all you have to do for external XML is load the xml and lay it out however you'd like in the movie clip that holds the content, then AFTER the xml has loaded and parsed, create the call to the AxisScroller constructor that makes the instance of the scroller.

tpspoons
December 21st, 2006, 12:20 PM
all you have to do for external XML is load the xml and lay it out however you'd like in the movie clip that holds the content, then AFTER the xml has loaded and parsed, create the call to the AxisScroller constructor that makes the instance of the scroller.

You don't even need to do that. It doesn't make any difference if you make the call before or after the XML loaded and parsed, as long as the text field is embeded.

arn
December 21st, 2006, 12:24 PM
Best mprzybylski,


This is a very nice scroller you've build..thanx..:)
I have a few questions...

How do I use it horizontally...

How do I use it horizontally with only the "up" "down" buttons visible aka left/right buttons...


I did some tests, by changing Y to x values in the actionscript but that didn't do the trick..:)



Some help appreciated!


Thanx

arn

mprzybylski
December 21st, 2006, 12:55 PM
tpspoons: yes it does, because the height of the content clip is indicative of how far the scrollbar goes, so if you call the scrollbar before the xml loads and sets up the content clip, then it won't scroll properly because you didn't know what the final height was going to be.

arn: you don't have to change x/y values in the code, you simply pass "x" as the parameter when you call the scrollbar for the axis parameter. then, for the buttons, you would specify useArrows = true and then the movie clips for the buttons that you want to use (this is part of the optional parameters object that you can pass into the constructor).

hope that helps.

arn
December 22nd, 2006, 05:31 AM
-Great..:)

Also a very nice PullOutMenuClass at your blog...:)
added to my favorites list..for a regular check-up

Keep up the good work!

Best

arn

tpspoons
December 22nd, 2006, 06:01 AM
tpspoons: yes it does, because the height of the content clip is indicative of how far the scrollbar goes, so if you call the scrollbar before the xml loads and sets up the content clip, then it won't scroll properly because you didn't know what the final height was going to be.


I don't want to argue because this is a great scroller and you made it so your almost definately right :P, but Ive tested it and it does work. If you change the height of the movie_mc after the scroller has loaded and set up, it seems to change automatically to fit. Although it does seem to be a few pixels off.

mprzybylski
December 22nd, 2006, 10:49 AM
thanks arn!

tpspoons, i dont want to argue either and to be honest i never tested it, but i assumed that because the height is used in the equation that it had to load first. if it doesn't then thats great, i didn't know it would adjust itself :P just to be safe though i would always call the scroller after the load, and thats what i do in my code usually. thanks for testing it out though!

onoitzalvin
December 23rd, 2006, 11:35 AM
hey matt.

nice site!
nice scroller too...but nice site.

hey if u dont mind...
what do you use for your rss reader on reintroducing?
i've been trying to figure out how to parse rss into flash, or more specifically
how to truck on a blog into an mc via some xml-ing...but i havent dug up any answers yet...

mprzybylski
December 23rd, 2006, 12:54 PM
Hey Alvin,
Thanks for the compliments.

As for the news, i made my own parser. I used RSS 2.0 standards to write out the XML, then just parsed it using the XML object in Flash. For the date, I had to write a function to convert the UTC date into a readable format that i use on my site, which you can find a post about here: http://blog.reintroducing.com/index.php/06/07/2005/4

hope that helps.

onoitzalvin
December 24th, 2006, 12:20 PM
aw man. sorry to sound like a boob...but
i'm still defogging the cloud i have over xml with reading some tutorials back and forth...

i found on golden-means's site a lengthy explaination on how to build your own rss reader for flash...where its a summarized news reader (i know.. im getting the "duhh" thats what its supposed to do" face) based on parsing only some nodes...

but i was wondering if its possible to parse the full content of a current blog...specifically wordpress... into an mc in flash...

it would be sweet if you had time to throw up a quick intro on how to build an rss-reader !:rock: ...i'm still trying to figure out how to use html in CDATA and combine that with CSS styles via flash :sigh:

anyway...time to browse like a racoon through all the cool classes on your site...

o crap. one more blurb... (sorry)
the axis scroller class... can it handle dynamic text ?
with all the parameters in the classes function... i realized you had to create an mc for each piece of the scroller... i was all spoiled and giggly thinking it would create this magical-auto scroller if my dynamic text got long-winded and excessive...

anway thanks for the reply!
everyone...give santa a shot in the nuts and see if a nintendo wii pops out!
(its sold out everywhere including tokyo)

lucid212
December 24th, 2006, 05:32 PM
Best scrolller ever seen,

Can i make some buttons inside scroller content and when click it load it in mc at the right of the scroller.

as this http://www.2inside.com

need help please

wahtever
December 24th, 2006, 10:16 PM
Great scollbar! Just one question, what exactly are the two boxes located on the bottom left corner for? I tried deleting them, but the scrollbar wouln't function anymore. Is there a way to not have them, and yet still have everything else work, along with the arrows on the right?

mprzybylski
December 26th, 2006, 12:07 AM
alvin, sorry but taking a wordpress rss feed and putting it into flash is a bit of a time consuming process. it's really all about trying to figure out how to capture the xml that it produces.

lucid212: the scroller on the site (in their portfolio section) basically scrolls one movie clip then loads the content into another movie clip and its definitely doable.

wahtever: those buttons were just for me for testing. if you open up the FLA, you will see by the instance names what those buttons do. if you delete them, it should be fine and nothing should break. they are just to clear the scrollbar and then reset it (to test those functions within the class). i should have taken them out of the example i suppose but i just wanted to leave them in to show how its done if someone is working off of the FLA.

lucid212
December 27th, 2006, 02:50 AM
Thanks mprzybylski for aid, but

I can make mc but into scroller. the problem is when up or down scroller
also two mc move together. what the code to load info in mc out scroller mc.

for moving each mc separately as portfolio at http://www.2inside.com/

any aid please...:jail:

mprzybylski
December 27th, 2006, 10:10 AM
i apologize but i don't really understand what you are trying to do...?

lucid212
December 30th, 2006, 04:28 PM
i hope this manifest
view pic here http://geocities.com/script_mj/scroller.gif

note: i want to help me how to write the code to loading buttons1,2,3,4,..etc in
mc_number2

waiting you :thumb2:

mprzybylski
December 30th, 2006, 06:10 PM
All you have to do is put your buttons inside of the content movie clip in the scrolled (toBeScrolled parameter). then make another movie clip on a different timeline and target those buttons to load a movie into that movie clip. i don't really have the time right now to write it for you but its just about that simple.

lucid212
December 31st, 2006, 04:01 PM
I will try but i know it's difficult for me. in general i don't need to idleness you for work,
but i want one demand (realy)...
any time this week, next week, any time you are not working please send me it. ok
my email: khalidgaffer@yahoo.com if you have yahoo messenger please send it to me
if you not opposed. i can remember you after some days...

any way i thank you many many thanks :}

mprzybylski
January 1st, 2007, 01:49 PM
here you go. i put this together really quickly but it should give you an idea of what you want to do.

just put the com folder from the original post to wherever you unzip this file.

lucid212
January 1st, 2007, 04:48 PM
appreciation mprzybylski,

um trying now, see you later ;) :thumb2: :thumb2: :thumb2:

mummra1
January 11th, 2007, 09:53 AM
real cool and real easy to understand. Way to go!

tarusky
January 20th, 2007, 08:14 AM
COOOOOOOOOOOOOOOOOOOOOOOL
Nice work!

miradordesign
January 22nd, 2007, 07:52 PM
Lovely class development, mprzybylski, you should be proud of yourself.
I have been looking for a really solid way to handle this type of UI along the x and kept finding all sorts of wacky concoctions that didn't seem to work beyond the tutorial (though I did like your custom scrollbar Kirupa). The class is the smart play here as it keeps the fiddling to a minimum. Thank you!

mprzybylski
January 22nd, 2007, 07:55 PM
Thanks for the kind words. I'm glad you got use out of the class.

I'm actually working on a project which will require a modified version of this class (it'll handle sizing the scroller to the content size) and will post it upon completion.

onoitzalvin
February 25th, 2007, 08:47 PM
wooot woot! auto size scroller...man i'll be waiting. thanks mprzybyski!

mattvisk
February 27th, 2007, 09:14 PM
Does the imported actionscript for the scroller have to be located in all those folders or can you give me a code that can import the code if it were to be sitting in the same folder in the .swf

right now the code is

import com.reintroducing.ui.AxisScroller;
cant you make it somthing like this

import AxisScroller;

if i were to incorporate this in a site, i dont know if i can tell the swf to access the code through different folders. if it was in the same folder as the swf that would help me so much.

mprzybylski
February 27th, 2007, 09:58 PM
well I prefer that you keep the code in my folder structure (what's called a package in OOP) since I was the one who wrote it, but you can make it AxisScroller and in the class make it say class AxisScroller instead of the whole thing. Also, you don't put the class where the swf is rather the fla.

Last but not least, by using the full import path that you first stated, you are essentially telling the swf to access the code in that folder structure so i'm not sure what you're talking about not being albe to access the code through different folders.

mattvisk
February 27th, 2007, 11:49 PM
thanks a bunch, im new to the whole having a hosted site on the internet, and it was more a problem with me not knowing everything about the host program im using.

That is an amazing scroller and im hoping to use it in a site im doing for a friend. Thank you so much. Heres the site im working on (http://www.parrilli.com/mysite) Go to the reviews section to see your scroller in action.

mprzybylski
March 6th, 2007, 03:06 PM
I've updated the AxisScroller to version 1.5. This version includes the autoHideControls and scaleScroller options. You can read the details and download the new class here:

http://blog.reintroducing.com/index.php/06/03/2007/400

reds
November 19th, 2007, 11:18 PM
thank you very much for this!

mprzybylski
November 20th, 2007, 01:00 AM
You should actually download the newest version which can be found at http://evolve.reintroducing.com.