Hover and fade effect

Hello,
I am creating a photo gallery with thumbnails of the images
and would like the thumbs to fade in when hovered over. I can get
the fade in to work mostly except that rather than fading each
image in individually, all images fade in when I hover over one. In
addition, I am unable to make the thumbnails display faded to 50%
when the page first loads. I'm afraid I'm not terribly familiar
with JavaScript so any help would be greatly appreciated.
Here is a link to the draft site:
http://www.cas.umt.edu/draft/bruce%5Fcosta/keith.htm
And here is my relevant code as it is now:
<script type="text/javascript">
var dsBrenan = new Spry.Data.XMLDataSet("data/galleries.xml",
"galleries/brenan/photo");
</script>
<script type="text/javascript">
var gEffectInProgress = null;
var gPendingSetRowIDRequest = -1;
function fadeInContent(notificationType, notifier, data)
if (notificationType != "onPostUpdate")
return;
var effect = new Spry.Effect.Fade('main_image', { to: 100,
from: 0, duration: 1000, finish: function() {
// The region is now showing. Process any pending row change
request.
gEffectInProgress = null;
if (gPendingSetRowIDRequest >= 0)
var id = gPendingSetRowIDRequest;
gPendingSetRowIDRequest = -1;
fadeOutContentThenSetRow(id);
effect.start();
Spry.Data.Region.addObserver('main_image', fadeInContent);
function fadeOutContentThenSetRow(rowID)
if (gEffectInProgress)
gPendingSetRowIDRequest = rowID;
return;
if (rowID == dsBrenan.getCurrentRowID())
return;
gEffectInProgress = new Spry.Effect.Fade('main_image', { to:
0, from: 100, duration: 1000, finish: function() {
dsBrenan.setCurrentRow(rowID);
gEffectInProgress.start();
</script>
<!--detail region for main image-->
<div id="main_image"
spry:detailregion="dsBrenan"><img
src="images/keith_brenan_wave/{dsBrenan::@path}"
class="image"/></div>
</div>
<!--master region for thumbnails-->
<div id="wrapper">
<div id="thumbs" spry:region="dsBrenan"><img
src="images/keith_brenan_wave/{dsBrenan::@thumbpath}"
spry:repeat="dsBrenan" width="100" height="100" onclick=
"fadeOutContentThenSetRow('{ds_RowID}');"
onmouseover="hfade.start();"
onmouseout="hfadeout.start();"/></div>
</div>
</div><!--end content div-->
<!--defines fade in and out for thumbnails-->
<script type="text/javascript">
var hfade = new Spry.Effect.Fade("thumbs", {duration:500,
from:50, to:100});
var hfadeout = new Spry.Effect.Fade("thumbs", {duration:500,
from:100, to:50});
</script>

Hi,
I've moved the definition lines inside the "thumbs" div and
am still unable to get functionality from the hover effects.
Here's my code:
<div id="thumbs" spry:region="dsBrenan">
<img spry:repeat="dsBrenan" id="tn{dsBrenan::ds_RowID}"
src="images/keith_brenan_wave/{dsBrenan::@thumbpath}" width="100"
height="100" onclick= "fadeOutContentThenSetRow('{ds_RowID}');"
onmouseover="hfade.start();" onmouseout="hfadeout.start();" />
<script type="text/javascript">
var hfade = new Spry.Effect.Fade("tn{dsBrenan::ds_RowID}",
{duration:500, from:50, to:100});
var hfadeout = new
Spry.Effect.Fade("tn{dsBrenan::ds_RowID}", {duration:500, from:100,
to:50});
</script>
</div>
Could my code for the fade in and out on the main image be
causing issues with the thumbs? Here is that code:
<script type="text/javascript"> <!--causes large
image in detail region to fade in and out-->
var gEffectInProgress = null;
var gPendingSetRowIDRequest = -1;
function fadeInContent(notificationType, notifier, data)
if (notificationType != "onPostUpdate")
return;
var effect = new Spry.Effect.Fade('main_image', { to: 100,
from: 0, duration: 1000, finish: function() {
// The region is now showing. Process any pending row change
request.
gEffectInProgress = null;
if (gPendingSetRowIDRequest >= 0)
var id = gPendingSetRowIDRequest;
gPendingSetRowIDRequest = -1;
fadeOutContentThenSetRow(id);
effect.start();
Spry.Data.Region.addObserver('main_image', fadeInContent);
function fadeOutContentThenSetRow(rowID)
if (gEffectInProgress)
gPendingSetRowIDRequest = rowID;
return;
if (rowID == dsBrenan.getCurrentRowID())
return;
gEffectInProgress = new Spry.Effect.Fade('main_image', { to:
0, from: 100, duration: 1000, finish: function() {
dsBrenan.setCurrentRow(rowID);
gEffectInProgress.start();
</script>
Thank you for your patience and time.

Similar Messages

  • Problem with uploading scripts and fade effects

    I am a new user of Dreamweaver,I made a simple page with a
    jpg and added fade in effect and a flash intro song,,it shows all
    in firefox off line but when I upload the files to my hosting
    server I only see the background color?Any help please?

    Thanks,the files that are in the web folder are the
    html,jpg,fls music and fade in effects,all have been uploaded,but
    something is wrong?I am using a trial of dreamweaver is this the
    problem?I had the folders removed for now from the hoster server
    till I fix this.

  • Edge animate - How to hover and active effect in CSS ?

    Hi
    I have facing some problem in adding hover/active effect in css.
    For examples - i have two text button - (home & about us)
    i want to add functionality that, when i hover on button, it will show underline, when click it, it will active with different color
    & when i click anther button active button should be deactive & clicked button should be active.
    Plz help...
    Regards
    Susanta Kumar Muduli

    Hi there,
      The easiest way to achieve this would be to specify the properties with code since there is no animated transition that you're looking for.
      Start by opening Edge Animate and making two text fields with "home" and "about us". Then, name the text fields with a <div> ID by changing the name in the Properties panel. Click in the top text area and change the name <div> ID to something that's easy to identify with. I chose "homeText":
    Repeat this step for the "about" text field. Next, click the Open Actions icon next to your home text field object in the Timeline area:
    Choose "click" in the pop up menu that appears:
    Copy and paste this code below (this is CSS code styling the color property). Make sure to change "homeText" to whatever you chose to call the home text field object:
    sym.$("homeText").css("color", "#650097");
    sym.$("aboutText").css("color", "#000");
    In this example I made the home link's active color #650097 (purple). This code tells Edge Animate to make the home link purple and to make sure that the about link is the default black (#000).
    Next, click the plus button in the Open Actions window. This time choose "mouseover". This is where we will add the code for the hover functionality.
    Copy and paste the following code into the code window:
    sym.$("homeText").css("text-decoration", "underline");
    Finally, hit the plus button again to add one more event to the buton. This time choose "mouseout". This code will add funtionality to the button to make the underline disappear after the user is not hovering over it anymore. Copy and past the following code into the code window:
    sym.$("homeText").css("text-decoration", "none");
    Repeat these steps for the aboutText button. The code for the about button is below.
    Click:
    sym.$("aboutText").css("color", "#650097");
    sym.$("homeText").css("color", "#000");
    Mouseover:
    sym.$("aboutText").css("text-decoration", "underline");
    Mouseout:
    sym.$("aboutText").css("text-decoration", "none");
    If you need additional clarification / instruction, let me know. I hope this helps!

  • Flash and fade effect on table cell

    is there any website that shows an example of this?
    basically i want to have the cell flash when it gets updated
    and color fades away
    i tried setting backgrounds to different alpha of the color
    but i guess computer are too fast, so i only see the last color =)

    yeah, you have to change the color and then delay and change the color, then delay.
    For this, you'd have a thread to change the color, call repaint, sleep,etc til done.

  • Image rotation with fade effect

    I am new to the spry framework and have just started going
    through the examples to see if I could create an image rotator that
    fades the images into each other when changing. I have taken
    snippets from different places to do this and think I have the
    answer but really wanted some feedback to sanity check and let me
    know if this is the best way of doing it. If it is, then I hope
    others will find it useful.
    Here is the url to the example:
    Image
    rotation example
    And here is the code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml"
    xmlns:spry="
    http://ns.adobe.com/spry">
    <head>
    <title>Sample Image Rotation</title>
    <meta http-equiv="content-type" content="text/html;
    charset=iso-8859-1" />
    <meta http-equiv="X-UA-Compatible"
    content="IE=7;FF=3;OtherUA=4" />
    <meta name="author" content="www.baytree-cs.com - Peter
    Barkway"/>
    <meta name="copyright" content="(C)2006 Baytree Computer
    Services, All right reserved."/>
    <meta name="abstract" content="ISM Homepage" />
    <meta name="description" content="ISM Homepage" />
    <meta name="keywords" content="ISM Homepage"/>
    <meta name="robots" content="all,index,follow"/>
    <meta name="distribution" content="global"/>
    <meta name="mssmarttagspreventparsing"
    content="true"/>
    <meta name="rating" content="general"/>
    <style type="text/css">
    .element{
    float:left;
    position: relative;
    width: 350px;
    text-align: center;
    #display{
    opacity: 0;
    filter: alpha(opacity=0);
    #animate{
    left: -350px;
    opacity: 1;
    filter: alpha(opacity=100);
    </style>
    </head>
    <body>
    <noscript><h1>This page requires JavaScript.
    Please enable JavaScript in your browser and reload this
    page.</h1></noscript>
    <div id="container">
    <div id="display" class="element"
    spry:detailregion="dsImg"><img src="<?php echo
    $rootDir.$baseDir;?>/{@base}{@path}"/></div>
    <div id="animate" class="element"
    spry:detailregion="dsImg2"><img src="<?php echo
    $rootDir.$baseDir;?>/{@base}{@path}"/></div>
    <p class="clear"></p>
    </div>
    <script type="text/javascript"
    src="js/xpath.js"></script>
    <script type="text/javascript"
    src="js/SpryData.js"></script>
    <script type="text/javascript"
    src="js/SpryEffects.js"></script>
    <script type="text/javascript">
    var dsGalleries = new Spry.Data.XMLDataSet("spry.php",
    "galleries/gallery", { method: "POST", postData:
    "c=1&d=<?php echo $baseDir;?>", headers: {
    "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
    var dsImg = new Spry.Data.XMLDataSet("spry.php",
    "gallery/photos/photo", { method: "POST", postData:
    "c=2&d=<?php echo
    $baseDir;?>/{dsGalleries::@base}&s={dsGalleries::sitename}",
    headers: { "Content-Type": "application/x-www-form-urlencoded;
    charset=UTF-8" } });
    var dsImg2 = new Spry.Data.XMLDataSet("spry.php",
    "gallery/photos/photo", { method: "POST", postData:
    "c=2&d=<?php echo
    $baseDir;?>/{dsGalleries::@base}&s={dsGalleries::sitename}",
    headers: { "Content-Type": "application/x-www-form-urlencoded;
    charset=UTF-8" } });
    var imageInterval = 8000; // 8 seconds
    var imageFadeInterval = 4000; // 4 seconds
    var image2Loaded = null;
    var effect = new Spry.Effect.Fade('animate', {from: 100, to:
    0, toggle: true, duration: imageFadeInterval});
    // Prepare an observer that will change the opacity of the
    initially
    // hidden element in oposition with the initially visible
    element
    var obs1 = new Object;
    // On each effect step we calculate the complementary
    opacity for the other image container.
    obs1.onStep = function(ef){
    if (typeof otherEl == 'undefined')
    otherEl = document.getElementById('display');
    var opacity = 0;
    if(/MSIE/.test(navigator.userAgent)){
    opacity = Spry.Effect.getStyleProp(ef.element,
    'filter').replace(/alpha\(opacity([0-9]{1,3})\)/, '$1');
    otherEl.style.filter = "alpha(opacity=" + parseInt(100 * (1
    - opacity), 10) + ")";
    }else{
    opacity = Spry.Effect.getStyleProp(ef.element, 'opacity');
    otherEl.style.opacity = (1 - opacity);
    // Attach the observer to the Fade effect
    effect.addObserver(obs1);
    function fadeInContent() {
    // 1st time in so set the current rows so that the 'animate'
    set is 1 ahead of the 'display' set
    if(image2Loaded == null) {
    dsImg.setCurrentRowNumber((dsImg.getCurrentRowNumber() + 1)
    % dsImg.getData().length);
    dsImg2.setCurrentRowNumber((dsImg.getCurrentRowNumber() + 2)
    % dsImg.getData().length);
    image2Loaded = 0;
    } else {
    if(image2Loaded) {
    dsImg.setCurrentRowNumber((dsImg.getCurrentRowNumber() + 1)
    % dsImg.getData().length);
    image2Loaded = 0;
    } else {
    dsImg2.setCurrentRowNumber((dsImg.getCurrentRowNumber() + 1)
    % dsImg.getData().length);
    image2Loaded = 1;
    effect.start();
    var obs2 = {
    onPostLoad: function() {
    setInterval("fadeInContent()", imageInterval);
    dsImg.addObserver(obs2);
    </script>
    </body>
    </html>

    I think that I might have got this going now. Here is the
    code if anyone wants to use it.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml"
    xmlns:spry="
    http://ns.adobe.com/spry">
    <head>
    <title>Sample Image Rotation</title>
    <meta http-equiv="content-type" content="text/html;
    charset=iso-8859-1" />
    <meta http-equiv="X-UA-Compatible"
    content="IE=7;FF=3;OtherUA=4" />
    <meta name="author" content="www.baytree-cs.com - Peter
    Barkway"/>
    <meta name="copyright" content="(C)2006 Baytree Computer
    Services, All right reserved."/>
    <meta name="abstract" content="ISM Homepage" />
    <meta name="description" content="ISM Homepage" />
    <meta name="keywords" content="ISM Homepage"/>
    <meta name="robots" content="all,index,follow"/>
    <meta name="distribution" content="global"/>
    <meta name="mssmarttagspreventparsing"
    content="true"/>
    <meta name="rating" content="general"/>
    <style type="text/css">
    .element{
    float:left;
    position: relative;
    width: 350px;
    text-align: center;
    #display{
    opacity: 0;
    filter: alpha(opacity=0);
    #animate{
    left: -350px;
    opacity: 1;
    filter: alpha(opacity=100);
    </style>
    </head>
    <body>
    <noscript><h1>This page requires JavaScript.
    Please enable JavaScript in your browser and reload this
    page.</h1></noscript>
    <div id="container">
    <div id="display" class="element"
    spry:detailregion="dsImg"><img src="<?php echo
    $rootDir.$baseDir;?>/{@path}"/></div>
    <div id="animate" class="element"
    spry:detailregion="dsImg2"><img src="<?php echo
    $rootDir.$baseDir;?>/{@path}"/></div>
    <p class="clear"></p>
    </div>
    <script type="text/javascript"
    src="js/xpath.js"></script>
    <script type="text/javascript"
    src="js/SpryData.js"></script>
    <script type="text/javascript"
    src="js/SpryEffects.js"></script>
    <script type="text/javascript">
    var dsGalleries = new Spry.Data.XMLDataSet("spry.php",
    "galleries/gallery", { method: "POST", postData:
    "c=1&d=<?php echo $baseDir;?>", headers: {
    "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
    var dsImg = new Spry.Data.XMLDataSet("spry.php",
    "gallery/photos/photo", { method: "POST", postData:
    "c=2&d=<?php echo
    $baseDir;?>/{dsGalleries::@base}&s={dsGalleries::sitename}",
    headers: { "Content-Type": "application/x-www-form-urlencoded;
    charset=UTF-8" } });
    var dsImg2 = new Spry.Data.XMLDataSet("spry.php",
    "gallery/photos/photo", { method: "POST", postData:
    "c=2&d=<?php echo
    $baseDir;?>/{dsGalleries::@base}&s={dsGalleries::sitename}",
    headers: { "Content-Type": "application/x-www-form-urlencoded;
    charset=UTF-8" } });
    var imageInterval = 4000; // 8 seconds
    var imageFadeInterval = 2000; // 4 seconds
    var effect = new Spry.Effect.Fade('animate', {from: 100, to:
    0, toggle: true, duration: imageFadeInterval});
    // Prepare an observer that will change the opacity of the
    initially
    // hidden element in oposition with the initially visible
    element
    var obs1 = new Object;
    // On each effect step we calculate the complementary
    opacity for the other image container.
    obs1.onStep = function(ef){
    if (typeof otherEl == 'undefined')
    otherEl = document.getElementById('display');
    var opacity = 0;
    if(/MSIE/.test(navigator.userAgent)){
    opacity = Spry.Effect.getStyleProp(ef.element,
    'filter').replace(/alpha\(opacity([0-9]{1,3})\)/, '$1');
    otherEl.style.filter = "alpha(opacity=" + parseInt(100 * (1
    - opacity), 10) + ")";
    }else{
    opacity = Spry.Effect.getStyleProp(ef.element, 'opacity');
    otherEl.style.opacity = (1 - opacity);
    // Attach the observer to the Fade effect
    effect.addObserver(obs1);
    function fadeInContent() {
    // 1st time in so set the current rows so that the 'animate'
    set is 1 ahead of the 'display' set
    //use this flag to avoid the effect running on load
    if (typeof image2Loaded == 'undefined') {
    dsImg.setCurrentRowNumber((dsImg.getCurrentRowNumber() + 1)
    % dsImg.getData().length);
    dsImg2.setCurrentRowNumber((dsImg.getCurrentRowNumber() + 2)
    % dsImg.getData().length);
    var curRow = dsImg.getCurrentRow();
    image2Loaded = 0;
    } else {
    if(image2Loaded) {
    var img = document.getElementById('display');
    dsImg.setCurrentRowNumber((dsImg.getCurrentRowNumber() + 1)
    % dsImg.getData().length);
    var curRow = dsImg.getCurrentRow();
    image2Loaded = 0;
    } else {
    var img = document.getElementById('animate');
    dsImg2.setCurrentRowNumber((dsImg.getCurrentRowNumber() + 1)
    % dsImg.getData().length);
    var curRow = dsImg2.getCurrentRow();
    image2Loaded = 1;
    var imgPath = '<?php echo $rootDir.$baseDir;?>/' +
    curRow["@path"];
    var gImageLoader = new Image();
    gImageLoader.onload = function()
    effect.start();
    gImageLoader.src = imgPath;
    var obs2 = {
    onPostLoad: function() {
    setInterval("fadeInContent()", imageInterval);
    dsImg2.addObserver(obs2);
    </script>
    </body>
    </html>

  • Fade effect question

    I can implement a fade in effect with a single image, but I
    cannot get the same code to work with the arrayed images generated
    in the "photoDemo" tutorial on the Adobe site. Sho Kuwamoto has a
    fade in working in his tutorial (
    http://labs.adobe.com/technologies/flexbuilder2/tutorials/#)
    though with different syntax (that I can't make work either), so I
    know the array isn't the issue. Why does this work in one, but not
    the other, example?
    Any help would be greatly appreciated. I'm using the FB3
    Beta for the moment.
    Thanks in advance.
    1) In this example, the fade out works fine ...
    <?xml version="1.0"?>
    <!-- Simple example to demonstrate the Fade effect. -->
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml">
    <mx:Fade id="fadeOut" duration="1000" alphaFrom="1.0"
    alphaTo="0.0"/>
    <mx:Fade id="fadeIn" duration="1000" alphaFrom="0.0"
    alphaTo="1.0"/>
    <mx:Panel title="Fade Effect Example" width="95%"
    height="95%"
    paddingTop="5" paddingLeft="10" paddingRight="10"
    paddingBottom="5">
    <mx:Text width="100%" color="blue"
    text="Use the Fade effect to show or hide the text and
    image. Use an embedded font when applying the Fade effect to
    text."/>
    <mx:Image source="photo.png"
    visible="{cb1.selected}"
    hideEffect="{fadeOut}" showEffect="{fadeIn}"/>
    <mx:CheckBox id="cb1" label="visible"
    selected="true"/>
    </mx:Panel>
    </mx:Application>
    2) In the itemRenderer ("thumbnails" here) of the "photoDemo"
    tutorial on the Adobe site (
    http://learn.adobe.com/wiki/display/Flex/1b.+Code+Files),
    it does not. It compiles and runs, but seems to ignore the effect
    call. Why?
    "thumbnails" ...
    <?xml version="1.0" encoding="utf-8"?>
    <mx:VBox xmlns:mx="
    http://www.adobe.com/2006/mxml"
    width="125" height="125"
    horizontalAlign="center"
    paddingBottom="5" paddingLeft="5" paddingRight="5"
    paddingTop="5">
    <mx:Fade id="fadeIn" duration="1000" alphaFrom="0.0"
    alphaTo="1.0"/>
    <mx:Image source="{data.thumbnail.url}"
    showEffect="{fadeIn}" />
    </mx:VBox>
    main ...
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    import mx.rpc.events.ResultEvent;
    [Bindable]
    private var photoFeed:ArrayCollection;
    private function requestPhotos():void {
    photoService.cancel();
    var params:Object = new Object();
    params.format = 'rss_200_enc';
    params.tags = keywords.text;
    photoService.send(params);
    private function photoHandler(event:ResultEvent):void {
    photoFeed = event.result.rss.channel.item as
    ArrayCollection;
    ]]>
    </mx:Script>
    <mx:HTTPService id="photoService" url="
    http://api.flickr.com/services/feeds/photos_public.gne"
    result="photoHandler(event)" />
    <mx:states>
    <mx:State name="panel1Zoomed">
    <mx:SetProperty target="{panel1}" name="width"
    value="831"/>
    <mx:SetProperty target="{panel1}" name="height"
    value="455"/>
    <mx:AddChild relativeTo="{panel1}"
    position="lastChild">
    <mx:TileList x="9" y="55" width="791" height="353"
    dataProvider="{photoFeed}"
    itemRenderer="thumbnails"></mx:TileList>
    </mx:AddChild>
    </mx:State>
    </mx:states>
    <mx:Panel x="10" y="10" width="542" height="75"
    layout="absolute" id="panel1" resizeEffect="Resize">
    <mx:Label x="10" y="10" text="Keyword:" width="63"/>
    <mx:TextInput x="116" y="8" id="keywords"/>
    <mx:Button x="307" y="8" label="search"
    id="keywordButton"
    click="requestPhotos();currentState='panel1Zoomed'"/>
    </mx:Panel>
    </mx:Application>

    I've never used this effect.  Maybe if you preload the image(s)...
    Go to Behaviors panel.
    Click the plus sign (+).
    From the drop menu, select Preload Images.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com

  • Fade Effect working weird.

    My little app is driven by a TabNavigator with each tab
    showing a different "page" with DataGrids/Form/TabNavs etc. I am
    trying to fade from "page" to "page" and all looks fine except Text
    types on the "page". They don't fade, just abruptly disappear once
    the fadeOut alpha reaches some number. Am I missing something? All
    help is appreciated.

    "rtalton" <[email protected]> wrote in
    message
    news:gjp0v7$1r7$[email protected]..
    > In order to use Fade effects on text, the font must
    first be embedded.
    Or, if you can get direct access to the text objects, you can
    set the
    blendMode of the text to "layer", and then Fade effects will
    work on them
    properly.

  • Fade Effect from Spry Table

    In the tutorial provided by Adobe it shows one how to create
    a dynamic link list that triggers an events region. I want to know
    is can you insert a fade in Spry effect on a Spry region detail
    that is triggered from a Spry table repeat object? I placed an
    onClick function on the Div that houses the Spry region but the
    image in the Spry Detail region fades in only after it blinks in at
    100%. So the effect is only working a split second after the image
    appears at 100% then snaps to 0% and fades to 100%. What is the
    correct method for using spry effects from Spry Region Table Links
    to a targeted DIV or Spry region detail?

    So this example is exactly what I am looking for, however,
    when one uses images instead of simple text I think it fouls up the
    smoothness of the code presented here. My problem is it works,
    however, if you click through the images back and forth eventually
    the image fades out to 0%. I am guessing this it could be related
    to a preloading and cache issue? Or does this code handle spry
    details that load in images differently?
    http://www.megalomedia-inc.com/clients/bob/print.html
    Click print item 1 and 2 back and forth to create the error.
    Any insight on how to make this run smoothly would be greatly
    appreciated and when I am done with this AJAX application I will
    share it with the SPRY community.

  • Fade Effect

    I have a code on my buttons, which makes a blank image
    currently on stage get replaced with a different one when a button
    is rolled over.
    The code I am using is this:
    on mouseenter me
    sprite(3).member="a"
    on mouseleave me
    sprite(3).member="blank"
    end
    Very simple lingo. Is there a way that when the new image
    comes to view, it fades in when the mouse rolls over the button,
    instead of just popping in, and fade out once the mouse leaves the
    button, so that I end up with a smooth transition.
    Thank you.

    Guys:
    Thanks for taking your time to help me with the issue.
    I actually got an answer from another member that solved my
    problem. The code that was posted here was making the button sprite
    do the fade effect.
    My friend did some tweaking to that code to achieve what I
    needed.
    Here is the code:
    property fadeSprite
    property totalSteps
    property eachStep
    property animateMe
    on getPropertyDescriptionList
    myPropList = [:]
    myPropList.addProp(#totalSteps,[#comment:"select the number
    of steps for the
    fade:",#format:#integer,#range:[#min:5,#max:20],#default:10])
    myPropList.addProp(#fadeSprite,[#comment:"enter the sprite
    to fade:",#format:#integer,#default:1])
    return myPropList
    end
    on beginSprite me
    sprite(fadeSprite).blend = 0
    animateMe = true
    eachStep = 100/totalSteps
    end
    on mouseEnter me
    animateMe = false
    end
    on mouseLeave me
    animateMe = true
    end
    on enterFrame me
    if animateMe then
    if sprite(fadeSprite).blend > 0 then
    sprite(fadeSprite).blend = sprite(fadeSprite).blend -
    eachStep
    end if
    else
    if sprite(fadeSprite).blend < 100 then
    sprite(fadeSprite).blend = sprite(fadeSprite).blend +
    eachStep
    end if
    end if
    end
    With this one, I am able to select which sprite is fading in
    and out. Again, thanks for your help.

  • Fade Effect problem in IE

    hi everyone,
    I'm having problems with a fade out/in transition in IE8.  The area I am changing has a white background (actually there are a few nested divs that all have a white background), and the fade effect triggers on a click in the navigation area and fades everything into the body background color (dark brown) and back.  The effect works fine in firefox and safari.  Anyone know how to fix this problem? I want the content that is fading to maintain the white background and not fade to brown and back.  you can view the page here to see whats going on.
    http://www.prometheusbusiness.com/testarea/NoelRose/home.html
    also, (and this is a really small issue, so I'm not too concerned if I can't fix it) after the page loads, the first fade out transition doesnt seem to fire, it just disappears, and the new page fades in.  after the first time, everything works as I expect, but it would be great if every click worked exactly the same every time.
    any help is appreciated, thanks.
    -Dan

    hi everyone,
    I'm having problems with a fade out/in transition in IE8.  The area I am changing has a white background (actually there are a few nested divs that all have a white background), and the fade effect triggers on a click in the navigation area and fades everything into the body background color (dark brown) and back.  The effect works fine in firefox and safari.  Anyone know how to fix this problem? I want the content that is fading to maintain the white background and not fade to brown and back.  you can view the page here to see whats going on.
    http://www.prometheusbusiness.com/testarea/NoelRose/home.html
    also, (and this is a really small issue, so I'm not too concerned if I can't fix it) after the page loads, the first fade out transition doesnt seem to fire, it just disappears, and the new page fades in.  after the first time, everything works as I expect, but it would be great if every click worked exactly the same every time.
    any help is appreciated, thanks.
    -Dan

  • Fade effect bold text in all IEs

    I have created the following page
    Cnet about
    and used the spry fade effect on the section of text at the bottom
    below the "A Sampling of what we offer" graphic.
    It works fine but in IE6 and IE7 when viewed on an LCD
    monitor, the bold blue text looks very choppy. I assume this has to
    do with bad handling of opacity in IE. Does anyone know a hack to
    fix this?

    Hi artdoggy,
    That is an IE bug with several workarounds. The first
    workaround which is much simpler, is to specify a background color
    or font on the element that you are fading in. This somehow
    triggers IE to avoid this behavior.
    The other workaround is to use an effect onPostEffect
    observer or finish function to unset the filter function on the
    element. You can see sample of how to use an observer here:
    http://labs.adobe.com/technologies/spry/samples/effects/observers_sample.html
    You'll have to do something like this in your observer:
    effect.element.style.filter = "";
    --== Kin ==--

  • Fade effect after inactivity in ADF 11.1.1.6 application

    Hello everyone,
    after a period of inactivity (about 10-15 minutes) in my ADF application (v. 11.1.1.6) the page is shown in semi-transparency mode with a little icon of warning on the bottom of the page. This fade effect disappears after a mouse move.
    How can we disable this behaviour?
    Please note that this effect is related only on the af:table component.
    Thanks in advance,
    Baduel

    Here the testcase: https://dl.dropboxusercontent.com/u/3932597/TestFade.rar
    After some test I notice that this kind of issue happens if there is an af:poll in the page. Is it possible that is raleted to the new property (timeout)? http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_poll.html
    For the test case. Use HR schema, run index.jspx and click on Section tab (or also Section box). Wait about 15 minutes (with no page interaction) and the glass pane will appear with the warning icon on the bottom of the page.
    Thanks everyone.
    Baduel

  • Fade Effect Query

    I am looking for assistance with the spry fade effect. i have
    a number of divs all with the same class currently being output via
    coldfusion on the page.
    the plan is that when i mouse over one div, all the other
    divs with the same class fade down slightly so the focused div
    stands out. the class for the divs is called "box1" for example and
    there are 15-17 "boxes" per page. Im fairly sure i have seen this
    effect somewhere just cant seem to find it.
    can anyone help out with this or point me in the direction of
    someone you can? i appreciate spry may not be the best way to
    tackle this so any suggestions or advice relating to other libaries
    would be great too. (currently using jquery elsewhere in the site)
    any assistance will be greatly appreciated,
    Cheers, Sean

    I'm guessing those boxes are the only one with that
    className.
    So the best and ideal solution would be to include
    SpryDOMUtils.js (is included in the labs download package folder
    "includes")
    Add it to your page.
    And do a little change to that File. We are going to extent
    the base funtionality of the results so we can apply fade to each
    of those elements.
    At the bottom of your SpryDOMUtils.js add this:
    Spry.$$.Results.fade = function(from,to)
    return this.forEach(function(n) {
    Spry.Effect.DoFade(n,{from:from, to:
    to});});
    Now you can do in your js
    Spry.$$('.box1').fade(100,60);
    And it should fade all boxes with the classname .box1 to 60%
    O wait. you wanted it on mouse over.. Still include the
    SpryDOMUtils.js
    but now do:
    Spry.$$('.box1').addEventListener('mouseover',function(){Spry.Effect.DoFade(this,{from:100 ,
    to:
    60});})

  • Fade Effect transparency IE/Firefox

    Hi,
    I am using the Spry:Fade effect with the image to be faded
    constructed in Fireworks. The image has a transparent background
    and a rectangle with a feathered edge effect.
    The fade works well using Firefox however in Internet
    Explorer a substantial part of the feathered edge effect turns
    black. This occurs whether the image is either a gif or a png
    format.
    Any suggestions on what causes this and a fix/workaround.
    Thanks,

    Hi artdoggy,
    That is an IE bug with several workarounds. The first
    workaround which is much simpler, is to specify a background color
    or font on the element that you are fading in. This somehow
    triggers IE to avoid this behavior.
    The other workaround is to use an effect onPostEffect
    observer or finish function to unset the filter function on the
    element. You can see sample of how to use an observer here:
    http://labs.adobe.com/technologies/spry/samples/effects/observers_sample.html
    You'll have to do something like this in your observer:
    effect.element.style.filter = "";
    --== Kin ==--

  • Fade effect: how to do with "onEnterFrame"?

    Hi,
    I have a map with each city represented as a dot (MC). When
    you mouse over the dot, another MC with more city details/text
    quickly fades in, and fades out when you roll out. But I can't get
    the full fade effect working. Need your advice...
    In the dot MC, I put:
    on (rollOver) {
    _root.showCity();
    on (rollOut) {
    _root.hideCity();
    In the root, showCity() and hideCity() are functions to fade
    in and out the city details MC (city_sanfrancisco). I figured they
    should be at the root level so they can be used by other city dots
    (city_sandiego, city_boston, etc.) as well:
    //this lets me change the speed for fading in and another
    speed for fading out
    var speedIn;
    speedIn = 20;
    var speedOut;
    speedOut = 20;
    //hard-coded city for now; set city to invisible when movie
    starts
    var city = city_sanfrancisco;
    city._alpha = 0;
    //this shows the city details by fading in
    function showCity(){
    city._alpha += _root.speedIn;
    if (city._alpha > 100){
    city._alpha = 100;
    function hideCity(){
    city._alpha -= _root.speedOut;
    if (city._alpha < 0){
    city._alpha = 0;
    What this doesn't do is the full fade effect, because the
    function only executes once, so city._alpha doesn't reach 100 when
    it fades in. I've seen in other fade effect scripts, that they use
    the enterFrame event, but I don't now how to use it here... or what
    is the right syntax to make the city details MC fade in to 100% on
    rollOver, and fade out to 0 on rollOut... and still be able to
    apply a speed setting.
    Any help would be appreciated.

    you could try something like this:
    on(rollOver){
    onEnterFrame = showCity;
    then modify your showCity function slightly:
    function showCity(){
    city._alpha += _root.speedIn;
    if (city._alpha > 100){
    city._alpha = 100;
    delete onEnterFrame;
    .. with similar adjustments to you on rollOut code.
    Hope this helps,
    Sinead.

Maybe you are looking for