HomeAutoM8
2008-May-12 17:28 UTC
??redirect to enter website after Effect.Puff or Effect.Scale/Effect.Opacity combo??
MON-05-12-08, 1:28pm US-EDT
Hello,
I''m trying to have a page redirect after an image''s puff
effect
finishes...(and trial and error since my last post has been mostly
error)
===>I''ve tried including it within the {options}section using
afterfinish callback.
===>tried to include window.location.href parameter, but then the puff
wouldn''t run.
===>tried to include the Effect.Puff for the image as part of an <a>
tag, but the onclick just changed the page immediately before the puff
could run.
===>tried div outside of div trigged by onmouseUp.
Also experimented with changing the defaults of the puff effect
itself...
===>tried to separate the two underlying effects so I could get the
scale portion to expand larger before the opacity effect starts, but I
never got the queue parameters set properly [and Effect.Puff doesn''t
seem to accept a scale% parameter, or a duration time directly]
===>tried to control scale so that it would expand evenly from the
center of the page.But couldn''t get the scale to expand upward above
the original div area that''s bumped down with linebreaks or <p>,
or
top-margin space.
<!-- cue violin music here -->
I''ve referred to so many javascript books & online tutorials, as
well
as books specific to Scriptatulous and Prototype that my head is now
swimming!
<!-- function(getPapertowels,{wipe-up HomeAutoM8''s tears here});
-->
This javascript is pushing me to the brink... please help if you have
any suggestions.
thanks-in-advance for your ideas and patience
HomeAutoM8
++++++++++++++++++++++++++++++++++++
CODE BELOW: [This works the onload Effect.Appear to display the image,
and succeeds with a mouseclick''s trigger to run the Effect.Puff. I
didn''t get as far as including a <noscript> page-changing link
yet,
and know it''s a necessary failsafe/backup, since this is the entry
page to the website]
<script type="text/javascript" src="taculousjavascripts/
prototype.js"></script>
<script type="text/javascript" src="taculousjavascripts/
scriptaculous.js?load=effects"></script>
<script type="text/javascript">
//<![CDATA[
window.onload = function() {
new Effect.Appear(''entryimage'',
{duration:3.0, from:0.001, to:1.0});
}
//]]>
</script>
</head>
<body><p/><p/><p/><p/>
<center>
<div id="entryimage" style="display:none;">
<img style="float: none; border-style: none;" width="180"
height="138"
src="images/home-explosion720x468entryPuff.jpg" alt="Click on
image
to enter";"
onclick="Effect.Puff(this)
">
</div>
</center>
</body>
</html>
+++++++++++++++++++++++++++++++
CODE for trying to use scale instead of puff: [as mentioned, when I
tried to append or insert Effect.Opacity, either the image would not
appear on first page onload or Effect.Scale wouldn''t run on
mouseclick]
<div id="entryimage" style="display:none;">
<img style="float: none; border-style: none; margin-top: 25%;"
width="180" height="117"
src="images/home-explosion720x468-uncomp.jpg"
alt="Click on image to enter";
onclick="new Effect.Scale(this, 518,{scaleFromCenter: true})">
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---