FORUMS: list search recent posts

Scrolling Thumbnail Panel AS3

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Harrison Willett
Scrolling Thumbnail Panel AS3
on Aug 25, 2008 at 2:50:21 am

I am trying to add Lee Brimelow's Scrolling Panel to my site which is in AS3 but I ran in to some problems I have:



panel_mc.onRollOver = panelOver;

function panelOver()
{
this.onEnterFrame = scrollPanel;
delete this.onRollOver;
}

var b = stroke_mc.getBounds(_root);

function scrollPanel()
{
if(_xmouseb.xMax || _ymouseb.yMax)
this.onRollOver = panelOver;
delete this.onEnterFrame;
}

var ydist = _ymouse - 442;

panel_mc._y += ydist / 7;




And when I test the file I get a swarm of undefined Properties:

including _xmouse, _ymouse &, _root

What do I need to do to make AS3 happy

Thanks in advance


Return to posts index

Clint Milner
Re: Scrolling Thumbnail Panel AS3
on Aug 27, 2008 at 2:37:31 pm

That tutorial is in AS2.0

You could try switching the AS version in the publish settings window.

I'm trying to get my head around AS3.0 and finding that there's quite a few changes to learn.



Return to posts index

Harrison Willett
Re: Scrolling Thumbnail Panel AS3
on Aug 28, 2008 at 2:55:22 am

I actually figured it out... just took a while



Return to posts index


Ian Cooley
Re: Scrolling Thumbnail Panel AS3
on Oct 3, 2008 at 5:59:57 pm

how did you do it, if you don't mind me asking. I am having the same problem

thanks

ian



Return to posts index

Harrison Willett
Re: Scrolling Thumbnail Panel AS3
on Oct 6, 2008 at 12:45:26 am

panel_mc.addEventListener(MouseEvent.ROLL_OVER, panelOver);

function panelOver(event:MouseEvent):void
{
stage.addEventListener(MouseEvent.MOUSE_MOVE, panelMover);

function panelMover(event:MouseEvent):void
{
if(event.stageY > 171 && event.stageY < 711 && event.stageX > 61 && event.stageX < 248)
{
panel_mc.y -=(event.stageY - 441)/ 42;
}
if(panel_mc.y >= 191.3)
{
panel_mc.y = 191.3
}
if(panel_mc.y <= -676)
{
panel_mc.y = -676
}
}
}



Keep in mind I am using the actual position on the stage instead of the get bounds..... I did this as i was first learning as3

I bought a great book from lynda.com called ActionScript 3.0 for flash CS3 Professional check it out it helped me understand enough to make that scroll bar on my own :)




Return to posts index

Harrison Willett
Re: Scrolling Thumbnail Panel AS3
on Oct 6, 2008 at 2:44:09 am

if you want to call the mask mask_mc you can use:

var b = (mask_mc.getRect(this));

if(event.stageY > b.y && event.stageY < (b.y + b.height) && event.stageX > b.x && event.stageX < (b.x + b.width))

this allows you to not use specific points in space in case you want to move it down the line




Return to posts index


Greg Hollowell
Re: Scrolling Thumbnail Panel AS3
on Dec 12, 2008 at 4:47:28 pm

Hey all, I tried that same goToAndLearn tutorial to make a scrolling thumbnail panel, and found your posts very helpful. I tried the following (Flash CS4 w/ AS3):

panel.addEventListener(MouseEvent.ROLL_OVER, panelOver);

function panelOver(event:MouseEvent):void
{
stage.addEventListener(MouseEvent.MOUSE_MOVE, panelMover);

function panelMover(event:MouseEvent):void {
var b = (mask_mc.getRect(this));
if(event.stageY > b.y && event.stageY < (b.y + b.height) && event.stageX > b.x && event.stageX < (b.x + b.width));
}
}

//I definitely remembered to change the mask instance name to mask_mc, and I got the following error many many times:

TypeError: Error #1034: Type Coercion failed: cannot convert global@e2050f9 to flash.display.DisplayObject.
at MethodInfo-1()
TypeError: Error #1034: Type Coercion failed: cannot convert global@e2050f9 to flash.display.DisplayObject.
at MethodInfo-1()
TypeError: Error #1034: Type Coercion failed: cannot convert global@e2050f9 to flash.display.DisplayObject.
at MethodInfo-1()

I can't figure this one out on my own. Any thoughts? Thanks!



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]