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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Put the whole thing inside a DIV (sized properly to your screen) and give the DIV a style of "overflow:hidden" On May 30, 9:57 am, stebran <christophe.dan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> > On a sidenote: anyone got an idea howto remove the scrollingbars on > the windows when "flying in" objects from outside the vewport? >--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Sorry all, i didn''t check with all browsers. Appears it''s an opera problem (9.27 linux ) only(?), firefox displays it right (>2.0), don''t know about other browsers on mac/ windows and can''t check right know. I''m no css-expert so i''ll check for opera-id and fix it that way for the moment unless someone know it''s a known problm and know the fix. cheers On 30 Mai, 15:57, stebran <christophe.dan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> 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 athttp://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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Yes, that''s right. Now i remember, thanks Diodeus :) On 30 Mai, 16:16, Diodeus <diod...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Put the whole thing inside a DIV (sized properly to your screen) and > give the DIV a style of "overflow:hidden" > > On May 30, 9:57 am, stebran <christophe.dan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > > > > > On a sidenote: anyone got an idea howto remove the scrollingbars on > > the windows when "flying in" objects from outside the vewport?--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Hi again, I''ve changed the code and the link now leads to a version that does what it should under - Opera 9.27 Linux - Opera 9.0 Windows XP. - Opera 9.27 on Windows Vista - IE6/7: both work on windows (old page is at /splash_old.html , same server) However: - Opera 9.5beta2: document.viewport.getDimensions(); incorrectly reports height value (defaults to 0) (known bug, this http://dev.rubyonrails.org/attachment/ticket/11302/opera95_viewport_getdimensions.diff fixes it) - Firefox 2.0.0.14 under Vista and Linux: .setStyle-calls seem to get ignored. And i have no idea why as the old version worked only in ff2 and not much has changed. Just thought i''d let You know By & thanks again On 30 Mai, 17:50, stebran <christophe.dan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> Sorry all, > > i didn''t check with all browsers.--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Huhmm. Couldn''t slep, got up again, here it is:> - Firefox 2.0.0.14 under Vista and Linux: .setStyle-calls seem to get > ignored. And i have no idea why as the old version worked only in ff2 > and not much has changed.oh well. how about adding "px" to the css values of top && left? Opera and IE seem to default to that, FF2 not. FIXED. time to go to bed... Cheers --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---