Hi everyone!
Just learning some basics with script.aculo.us and prototype and
trying to use Effect.Prallel . Also, this is my first post so please
bear with me.
Basically, I want to have three boxes flown into the viewport from
three different angles and position them relative to viewport size. So
far so good.
I calculate flyin-positions and final-positions by multiplying with a
ratio based on 800x600 viewport and the actual viewport. Elements have
"display: none"-property and are activated by a link (so far) after
which Effect.Parallel takes care of Effect.Move, Effect.Appear,
Effect.Scale for each.
Objects are defined with e.g.
<div id="main_musik" style="display: none; height:80px; width:80px;
background:#300; border:1px solid #333; position: absolute;">Musik</
div>
Starting positions are set after the click onto "Start animation" by
e.g.
$('main_musik').setStyle({
top: topstartposition,
left: leftstartposition,
opacity: 0
});
Final position are given to Effects.Move of each element as in
new Effect.Move('main_musik', { sync: true, x: musik.stop.l, y:
musik.stop.t, mode: 'absolute' })
However: When i first load the page, the three elements will ALWAYS
fly in from the same spot (0,0) on the viewport. Running the animation
a second time by clicking on the link again will do what i wanted
namely a fly-in from the three different directions. Why?
Also: Removing the elements display-style (none) from the div's
defining style-tags shows them in the upper left corner when reloading
(of course) BUT THEN the animation works correctly as intended from
first loading it.
Btw: setting the positions w/i the div's style tag doesn't seem to
change things.
Am i missing anything?
Testsite is at http://mamutaku.de/splash.html .
On a sidenote: anyone got an idea howto remove the scrollingbars on
the windows when "flying in" objects from outside the vewport?
Thanks for your input!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---