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.
|
|
|
|
|
![]() |
||
Need some help with ScrollBar in AS 3
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
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 |
|
|
|
|||
|
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)
|
|
|||
|
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> |
![]() |
| Thread Tools | |
|
|
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 |