Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ibutton



Are you sure you need three separate info buttons? If you wrap the three interchangeable front divs in a parent div, then you can also put the info button in this parent div:

<div id="parent" onmousemove="mousemove(event);" onmouseout="mouseexit (event);">
<div id="div1"></div>
<div id="div2"></div>
<div id="div3"></div>


<div class="flip" id="fliprollie"></div>
<div class="flip" id="flip" onclick="exitflip(event);showPrefs (event);" onmouseover="enterflip(event);" onmouseout="exitflip (event)";></div>
</div>


Then you need only one set of info button functions.

Ben

On Nov 17, 2005, at 10:00 AM, Ludwig Villiger wrote:

Hello

The ibuttons of my widget doesnt work properly. In one case the rollie behind the flip doesnt disappear when you exit with the mouse and in the other case the flip doesnt appear after flipping the widget over.
The problem is perhaps that I have three front div's, which you can change on the backside. And for each div I have another flip and rollie and also different functions. For each function I use different variables. But somewhere is a problem. When I test the widget in Safari, then there is no problem with the flip. Here is the code of the function for mousemove event:


function mousemove (event)
{
if (!flipShown) // if the preferences flipper is not already showing...
{
if (animation.timer != null) // reset the animation timer value, in case a value was left behind
{
clearInterval (animation.timer);
animation.timer = null;
}

var starttime = (new Date).getTime() - 13; // set it back one frame

animation.duration = 500; // animation time, in ms
animation.starttime = starttime; // specify the start time
animation.firstElement = document.getElementById ('flip'); // specify the element to fade
animation.timer = setInterval ('animate();', 13); // set the animation function
animation.from = animation.now; // beginning opacity (not ness. 0)
animation.to = 1.0; // final opacity
animate(); // begin animation
flipShown = true; // mark the flipper as animated
}
}


// mouseexit() is the opposite of mousemove() in that it preps the preferences flipper
// to disappear. It adds the appropriate values to the animation data structure and sets the animation in motion.


function mousemo (event)
{
if (!flipiShown) // if the preferences flipper is not already showing...
{
if (animatio.timer != null) // reset the animation timer value, in case a value was left behind
{
clearInterval (animatio.timer);
animatio.timer = null;
}

var starttime = (new Date).getTime() - 13; // set it back one frame

animatio.duration = 500; // animation time, in ms
animatio.starttime = starttime; // specify the start time
animatio.firstElement = document.getElementById ('flipo'); // specify the element to fade
animatio.timer = setInterval ('animatl();', 13); // set the animation function
animatio.from = animatio.now; // beginning opacity (not ness. 0)
animatio.to = 1.0; // final opacity
animatl(); // begin animation
flipiShown = true; // mark the flipper as animated
}
}


function mousemoto (event)
{
if (!flipoShown) // if the preferences flipper is not already showing...
{
if (animati.timer != null) // reset the animation timer value, in case a value was left behind
{
clearInterval (animati.timer);
animati.timer = null;
}

var starttime = (new Date).getTime() - 13; // set it back one frame

animati.duration = 500; // animation time, in ms
animati.starttime = starttime; // specify the start time
animati.firstElement = document.getElementById ('fliper'); // specify the element to fade
animati.timer = setInterval ('animater();', 13); // set the animation function
animati.from = animati.now; // beginning opacity (not ness. 0)
animati.to = 1.0; // final opacity
animater(); // begin animation
flipoShown = true; // mark the flipper as animated
}
}


It is three times the same thing, only the names are changed. And the code for the rollie is:

// these functions are called when the info button itself receives onmouseover and onmouseout events
function enterflip(event)
{
document.getElementById('fliprollie').style.display = 'block';
}


function exitflip(event)
{
	document.getElementById('fliprollie').style.display = 'none';
}


function enterflipo(event) { document.getElementById('fliproll').style.display = 'block'; }

function exitflipo(event)
{
	document.getElementById('fliproll').style.display = 'none';
}

function enterfliper(event)
{
	document.getElementById('fliprollo').style.display = 'block';
}

function exitfliper(event)
{
	document.getElementById('fliprollo').style.display = 'none';
}

Where is the problem?

Greetings
Ludwig
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Dashboard-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/dashboard-dev/kazezb% 40carleton.edu


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Dashboard-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/dashboard-dev/email@hidden

This email sent to email@hidden
References: 
 >ibutton (From: Ludwig Villiger <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.