[Flashcoders] Scrollpane Movement

2006-05-16 Thread Adrian Lynch
I'm knocking up a quick scrollpane(needs to be small filesize) and I'm
having a '20 minutes till home time moment'...

To work out the amount to move the content I have it as:

ratio = contentHeight - trackHeight;

theContent._y += pixelsMoved * ratio;

Where track is the slot the scroll bar moves up and down in and content is
the MC I'm putting in the scroll pane.

What haven't I thought of or what am I doing wrong.

Right now the content shoots off screen. I'm still debugging but I thought
I'd put this out there incase someone has the equation needed to hand.

Thanks.

Adrian Lynch

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Scrollpane Movement

2006-05-16 Thread Jim Robson
Don't you want...

ratio = contentHeight/trackHeight

Or am I missing something too?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Adrian Lynch
Sent: Tuesday, May 16, 2006 12:43 PM
To: Flashcoders
Subject: [Flashcoders] Scrollpane Movement

I'm knocking up a quick scrollpane(needs to be small filesize) and I'm
having a '20 minutes till home time moment'...

To work out the amount to move the content I have it as:

ratio = contentHeight - trackHeight;

theContent._y += pixelsMoved * ratio;

Where track is the slot the scroll bar moves up and down in and content is
the MC I'm putting in the scroll pane.

What haven't I thought of or what am I doing wrong.

Right now the content shoots off screen. I'm still debugging but I thought
I'd put this out there incase someone has the equation needed to hand.

Thanks.

Adrian Lynch

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Scrollpane Movement

2006-05-16 Thread Adrian Lynch
ratio = contentHeight - trackHeight;

should have been:

ratio = contentHeight / trackHeight;

Thanks for reading :O)

Adrian

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Adrian
Lynch
Sent: 16 May 2006 17:43
To: Flashcoders
Subject: [Flashcoders] Scrollpane Movement


I'm knocking up a quick scrollpane(needs to be small filesize) and I'm
having a '20 minutes till home time moment'...

To work out the amount to move the content I have it as:

ratio = contentHeight - trackHeight;

theContent._y += pixelsMoved * ratio;

Where track is the slot the scroll bar moves up and down in and content is
the MC I'm putting in the scroll pane.

What haven't I thought of or what am I doing wrong.

Right now the content shoots off screen. I'm still debugging but I thought
I'd put this out there incase someone has the equation needed to hand.

Thanks.

Adrian Lynch
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Scrollpane Movement

2006-05-16 Thread Adrian Lynch
Nope, that was it, cheers.

Adrian

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Jim
Robson
Sent: 16 May 2006 17:48
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Scrollpane Movement


Don't you want...

ratio = contentHeight/trackHeight

Or am I missing something too?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Adrian Lynch
Sent: Tuesday, May 16, 2006 12:43 PM
To: Flashcoders
Subject: [Flashcoders] Scrollpane Movement

I'm knocking up a quick scrollpane(needs to be small filesize) and I'm
having a '20 minutes till home time moment'...

To work out the amount to move the content I have it as:

ratio = contentHeight - trackHeight;

theContent._y += pixelsMoved * ratio;

Where track is the slot the scroll bar moves up and down in and content is
the MC I'm putting in the scroll pane.

What haven't I thought of or what am I doing wrong.

Right now the content shoots off screen. I'm still debugging but I thought
I'd put this out there incase someone has the equation needed to hand.

Thanks.

Adrian Lynch

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com