[Pro] Mouse Evnt /roll over

Sorry I think I may of placed in wrong section before apologies

Hi all, this is driving me mad … so really i need some advise as maybe …most likely being to logical.

I have a button (which is a graphic) basic a rollover the same way as such as the below Have a look at http://conwayanderson.com/#

I.e the mouse over is as such a mouseevent or fade instead of a straight forward mouse over using Transition FX… but no joy So Transition FX on its own… can get it fade and appear i.e applying which item with an fx BUT the issue is that its not right when the mouse leaves

The mootools url is http://mootools.net/demos/?demo=MouseEnter

PLEASE NOTE conwayanderson.com has created it as one graphic as a mouse over so I can learn and understand

Please Please can someone help… its driving me NUTS thanks

Stu


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Can you post a link to your own example?

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Sure David
it will be rough example ok


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

The site you link to uses the ‘Sprites’ method.

Walter has an example here Home and there is this thread on the topic http://freewaytalk.net/thread/view/77569#m_77621

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Here’s another example with a file you can pick apart <http://www.xiiro.com/demo/css_graphic_menu/index.html

. It refers to building a menu but the Sprite concept is the same.

Todd

On May 22, 2011, at 12:37 PM, DeltaDave wrote:

The site you link to uses the ‘Sprites’ method.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

IM not after building a menu
its the issue on the mouse over effect and creating the effect

as like http://conwayanderson.com/#

the idea layout is http://www.web.nonfacture.co.uk/

its being able to create the effect of smooth mouse overs


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

http://scripty.walterdavisstudio.com/sprite/index.html

Really interesting thank you

But is there a way of applying the effect as a mouse over effect instead


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I thought there was some question as to how to use the Sprite
technique. Never mind, it was just a suggestion.

Todd

On May 22, 2011, at 1:00 PM, stuart wrote:

IM not after building a menu its the issue on the mouse over effect
and creating the effect


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Todd Thanks for the sprite technique …if you think thats the best way …great … I was wondering if a moo FX too could do the same … too

Stu


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Sprites are not useful for this sort of fading technique, because they
only have two states, and they are mutually-exclusive. You might
experiment with using the same sprite image as the background for two
different HTML boxes, with different background-position offsets –
you would still get the benefits of faster loading inherent in the
technique, but you would still have to fade two separate elements in
and out.

I had a quick look at Transition FX, and discovered that while it has
a mouseover event, it doesn’t have the equivalent mouseout event, so
you can’t stack these up and get the look you want. The Observer
Action (part of Protaculous) allows you to do this, but at the price
of writing code to make it work.

Try the following in a blank page, just to get the idea.

  1. Draw a graphics box on the page for your normal button. Give it a
    color. In the Inspector, call it ‘normal’ using the Title field (don’t
    include the quotes, naturally).

  2. Apply the Observer Action to it. Set the Library picker to
    scriptaculous-packed.

  3. Set the top Event field to mouseover and click the Function Body
    button to the right of that field.

  4. Enter this line of code: $('over').appear({duration:0.3});

  5. Duplicate the first box, name it ‘over’ and give the duplicate a
    different color. In the Actions palette, change the event name to
    mouseout, and change the code in the Function Body so it reads: $ ('over').fade({duration:0.3});

  6. Apply the Protaculous Action to the page, set the Library picker to
    scriptaculous-packed, and click the top Function Body button. Enter
    this code: $('over').hide();

Finally, position these two identical graphics so that the “over”
image is directly above the “normal” image. Preview, and you should
see the images fading in and out when you mouse over and out.

Things to realize: a) This uses Scriptaculous and Prototype, so
(unlike jQuery or MooTools) it is completely compatible with Freeway’s
built-in effects. b) The names of the boxes are super-important. If
you duplicate this stacked pair of images, you will need to check the
Title field for each one, change it to something meaningful (products
and productsOver, for example) and then change the Observer functions
to match.

In your Protaculous Action code, you could use a shortcut like this: $ $('#homeOver, #productsOver, #aboutOver, #contactOver').invoke('hide'); to hide all of the “over” images at
once (using CSS notation for a collection of IDs) or you could just
put a separate line for each, like $('homeOver').hide(); if that
makes more sense to you. All that this code does is force the over
images to hide before the page finishes loading. As above, the names
(and the case of the letters of the names) is critically important.

Walter

On May 22, 2011, at 2:02 PM, stuart wrote:

Home

Really interesting thank you

But is there a way of applying the effect as a mouse over effect
instead


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Walter
Thanks very much I will give it a go… still new to it all and all that so many thanks
Stu


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Walter …

Your a legend … Thank you that works perfect really nice function which looks better than a mouse over function
smoother and clearner and has multiple applications menus etc
just figuring about the text and linking which I guess if a link all the items before the action is applied it will work the same

But works a treat

Stu


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

The only problem now is sorting out vertical scrolls up and down which are smooth …as MOO wont work … which its an issue just have to find a different route

any thoughts ??

Stu


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Try the SmoothScroll Action, which wraps this up neatly for Freeway.
No code fiddling needed.

Walter

On May 23, 2011, at 7:01 AM, stuart wrote:

The only problem now is sorting out vertical scrolls up and down
which are smooth …as MOO wont work … which its an issue just
have to find a different route

any thoughts ??

Stu


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Sure. Apply your link to the “over” image only, because when your
mouse is over the image, that’s the one that will be at the top of the
stack, and will intercept any clicks. To get the button to have a
pointer-finger cursor when you initially mouse over it (for that
fraction of a second before the second image appears) you would modify
the Protaculous code to include this line:

$('normal').setStyle('cursor:pointer');

or, if you’re doing the big group,

$$('#homeNormal,  

#productsNormal, …').invoke(‘setStyle’,‘cursor:pointer’);

When I looked at the Web view of this thread, I noticed that my
earlier explanation for creating the group-invocation of the hide
effect had what appeared to be a typo – there was a space between the
two $ signs of the “double-dollar” function. Be sure if you follow
that example that you don’t do that. The line above is accurate.

Walter

On May 23, 2011, at 6:30 AM, stuart wrote:

Walter …

Your a legend … Thank you that works perfect really nice function
which looks better than a mouse over function
smoother and clearner and has multiple applications menus etc
just figuring about the text and linking which I guess if a link all
the items before the action is applied it will work the same

But works a treat

Stu


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

thanks.
so the Over graphic reads

$(‘normal’).setStyle(‘cursor:pointer’);$(‘over’).fade({duration:0.3});

Sorry this is were I get confused abit as I begin to get very confused over code…
Were would you apply the code for the link

Sorry to ask questions i tend to get confused

Stu


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

The setStyle part goes into Protaculous, not Observer (where your code
was coming from). You would put it on the next line after $
(‘over’).hide();.

If you name all your elements rigorously (always adding Over directly
to the end of the “over” element, then you can do all sorts of
shortcuts in Prototype when setting up the page. You could do this,
for example, to set up the hide and cursor at the same time:

$w('home products support about').each(function(link){
	$(link).setStyle('cursor:pointer');
	$(link + 'Over').hide();
});

You would change that space-separated list (home products support
about) to match the names of your “normal” images, and the rest of the
code wouldn’t need to change ever. As long as you always named your
files home and homeOver or whatever and whateverOver, you would get
the benefit of this technique. You could even stop using Observer
altogether, and bring everything into a single setup function in
Protaculous. This would cut down on the number of different Actions
you have to fiddle with. Let me know if you want to see an example of
that.

Walter

On May 23, 2011, at 11:11 AM, stuart wrote:

thanks.
so the Over graphic reads

$(‘normal’).setStyle(‘cursor:pointer’);$(‘over’).fade({duration:0.3});

Sorry this is were I get confused abit as I begin to get very
confused over code…
Were would you apply the code for the link

Sorry to ask questions i tend to get confused

Stu


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks for all your help

let me have a play and see if I can figure it out first and if I need an example i will post a thread … but prefer to try 1st

if thats ok

Stu


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Walter Hi thanks …its beginning …

the only issue i have is when it loads http://www.web.nonfacture.co.uk/index.html
the images dont load correctly …is that me

Stu


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

You have this code in there

document.observe('dom:loaded', function(evt){
$('over').hide();

But none of your elements are named ‘over’ they are ‘aover’ and ‘outover’ etc so you have to specifically name them.

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options