By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,747 Members | 1,328 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,747 IT Pros & Developers. It's quick & easy.

enhancing motion in scriptaculous

P: n/a
hi guys

is there an extension for scriptaculous (or another library) that
allows you to create more organic/natural looking movement?

for example when an image slides across the screen, it does at a
variable speed, increasing at first then decreasing at the end.

I feel it would need to be able to do this before it can become a
viable substitute for flash, which i would love to see!

thanks

marc

Feb 19 '07 #1
Share this Question
Share on Google+
7 Replies

P: n/a
libsfan01 wrote
<snip>
is there an extension for scriptaculous (or another library)
that allows you to create more organic/natural looking
movement?
<snip>

That is completely the wrong way to go. You get smooth animation out of a
web browser running javascript by writing lean, efficient code. You will
not get it by starting with inefficient and bloated code and adding to
it.

Richard.

Feb 19 '07 #2

P: n/a
Richard Cornford wrote:
libsfan01 wrote
>is there an extension for scriptaculous (or another library)
that allows you to create more organic/natural looking
movement?
That is completely the wrong way to go. You get smooth animation out
of a web browser running javascript by writing lean, efficient code.
You will not get it by starting with inefficient and bloated code and
adding to it.
Don't listen to Richard. He leaves in 2001, when everything was coded from
scratch.

I don't know what you mean by "organic" but I think jQuery is the best
framework available, and it's "Interface Elements" add-on has a lot of good
effects:
http://interface.eyecon.ro/

The code is already "lean" and "efficient" and if you run the examples
you'll see that they run perfectly fine in your test browsers.

Richard's attitude is one of "if it's built on a framework, it must not be
as efficient as writing it from scratch" and he holds to this view despite
evidence to the contrary.

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Feb 20 '07 #3

P: n/a
Matt Kruse wrote:
Don't listen to Richard. He leaves in 2001, when everything was coded
from scratch.
Lives.
He lives in 2001.
Not leaves.
Leaves would make no sense.
Lives.

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Feb 20 '07 #4

P: n/a
Pi
On Feb 20, 7:50 am, "Matt Kruse" <newsgro...@mattkruse.comwrote:
Matt Kruse wrote:
Don't listen to Richard. He leaves in 2001, when everything was coded
from scratch.

Lives.
He lives in 2001.
Not leaves.
Leaves would make no sense.
Lives.

--
Matt Krusehttp://www.JavascriptToolbox.comhttp://www.AjaxToolbox.com
He codes, scripts and leaves in 2001?

[chuckle]

Feb 20 '07 #5

P: n/a
Matt Kruse wrote:
Matt Kruse wrote:
>Don't listen to Richard. He leaves in 2001, when everything was coded
from scratch.

Lives.
He lives in 2001.
Not leaves.
Leaves would make no sense.
Lives.
I leaved a lot of times in 2001, and still my code doesn't make any sense.
Does that make sense?

Regards,
Erwin Moller

Feb 20 '07 #6

P: n/a
like this:

new Effect.MoveBy( 'prefooter', 400, 0 , {duration: 4, transition:
Effect.Transitions.slowstop});
there are other effect transitions available. Check the wiki. You may
need the latest scriptaculous version.

it's tricky to get scriptaculous (or any javascript image effects in
my very limited -- read: weeks -- experience to run quite as smoothly
as flash. It seems impossible to scale image smoothly.

Feb 20 '07 #7

P: n/a
Hi,

libsfan01 wrote:
hi guys

is there an extension for scriptaculous (or another library) that
allows you to create more organic/natural looking movement?

for example when an image slides across the screen, it does at a
variable speed, increasing at first then decreasing at the end.

I feel it would need to be able to do this before it can become a
viable substitute for flash, which i would love to see!

thanks

marc
The object I use for motion can be found here:
http://www.galasoft-lb.ch/myjavascri...oned-node.html

The default function used to calculate the motion is a deceleration only
(I use a function of the square of the distance to target), but it can
be easily replaced by your own function. Adding an effect like you
described should be easy enough.

HTH,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Feb 22 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.