Need some help with ScrollBar in AS 3

This is a discussion on "Need some help with ScrollBar in AS 3" within the Flash & Multimedia Forum section. This forum, and the thread "Need some help with ScrollBar in AS 3 are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Flash & Multimedia Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Sep 21st, 2007, 22:46
New Member
Join Date: Sep 2007
Location: usa
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Question Need some help with ScrollBar in AS 3

I am new to Flash and ActionScript 3.0 and am trying to get an external swf file that I have loaded into another flash file to scroll. Currently I am using a mask to show only that area that will fit.

Can anyone point me in a good location for tutorials, examples etc for this kind of stuff using AS 3?

Please help! I'm up against a deadline and need to get this done!

Thanks
Reply With Quote

  #2 (permalink)  
Old Sep 22nd, 2007, 16:10
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Sgaspar11
Re: Need some help with ScrollBar in AS 3

Is there a specific reason you have to use AS3? There still isn't a ton out there about AS3 regarding tutorials.

If you visit Adobe's online help section there is tons of documentation on how to do it.
Last Blog Entry: Yay!? (Oct 8th, 2007)
Reply With Quote
  #3 (permalink)  
Old Sep 22nd, 2007, 16:30
New Member
Join Date: Sep 2007
Location: usa
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Need some help with ScrollBar in AS 3

No specific reason I'm using AS3 other than that's what the rest of the site is scripted with. I've managed to get somewhere on the scrolling thing but not all the way. Perhaps someone could tell me how to collect the Delta Property of a scroll event. I think that's what I'm looking for but Adobe's online help doesn't get specific enough and doesn't show any example code.

I've used a rectangle shape to mask a portion of an external SWF file that I'm getting via URLRequest. I've also added a ScrollBar element and I can get the SWF to scroll by changing x and y coordinates but I can't determine when the UP arrow is clicked or the DOWN arrow is clicked so I can't move the SWF according to scroll bar actions.

Here is the code I have so far if anyone would like to add to it to show me what to do:

<pre>
var svcRect:Shape = new Shape();
svcRect.graphics.beginFill(0xFFFFFF);
svcRect.graphics.drawRect(242, 180, 500, 300);
svcRect.graphics.endFill();
addChild(svcRect);
var svcLdr:Loader = new Loader();
svcLdr.mask = svcRect;
var svcUrl:String = "stylistData.swf";
var svcUrlReq:URLRequest = new URLRequest(svcUrl);
svcLdr.load(svcUrlReq);
svcLdr.x = 242;
svcLdr.y = 180;
addChild(svcLdr);
var svcScroller:ScrollBar = new ScrollBar();
svcScroller.x = svcLdr.x + svcRect.width;
svcScroller.y = svcLdr.y;
svcScroller.height = svcRect.height;
svcScroller.maxScrollPosition = 600;
svcScroller.pageScrollSize = 20;
addChild(svcScroller);
</pre>
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Scrollbar menaka Web Page Design 3 Oct 2nd, 2006 11:39
Scrollbar help? spartak23 Web Page Design 7 Aug 3rd, 2006 19:03
CSS Scrollbar ??? j4mes_bond25 Web Page Design 1 May 10th, 2006 09:41
scrollbar in dreamweaver Alan Introduce Yourself 1 Sep 29th, 2005 19:38
Scrollbar jaffa Web Page Design 2 Sep 2nd, 2005 00:28


All times are GMT. The time now is 01:36.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43