Fade effect applied to HTML panel plus onobtrusive JS

At first, I'm not a programmer, so sorry if I'm not clear as
desirable, and sorry for my English. I'm trying to make fade an
HTMLpanel one a user clicks any of the links I have on my page, I
have 2 sets of links, one one the top called
#tab
and another set
#links_one. My panel works
perfectly, also it has Spry regions, and everything loads
perfectly, I used unobtrusibe JS and it works, but i cant make the
same applying effects. This is some of my code: mainContent is the
div where the panel loads:
quote:
var mainPanel = null;
var Abrir = null;
function InitProductPage()
mainPanel = new Spry.Widget.HTMLPanel("mainContent");
var Abrir = new Spry.Effect.Fade('mainContent',
{toggle:true});
function Apear(){
var obs = {onPostUpdate: function(){Abrir.start();}};
mainPanel.addObserver(obs);
Spry.$$("#tab a").addEventListener("click", function(e)
mainPanel.loadContent(this.href, { id: "mainContent" });
return false;
}, false);
Spry.$$("#links_one a").addEventListener("click",
function(e)
mainPanel.loadContent(this.href);
runIt();
return false;
}, false);
Spry.$$("#links_one a").addEventListener("click",
function(e)
mainPanel.Apear();
return false
},false;
Spry.Utils.addLoadListener(InitProductPage);
Ending I used this samples to make my panel:
http://labs.adobe.com/technologies/spry/articles/best_practices/separating_behavior.html
L=http://labs.adobe.com/technologies/spry/samples/htmlpanel/html_panel_two.html
]http://labs.adobe.com/technologies/spry/samples/htmlpanel/html_panel_two.html
http://labs.adobe.com/technologies/spry/samples/htmlpanel/html_panel_two.html
[/L][
(the beahviour I try to get os when you click this
link--->
http://labs.adobe.com/technologies/spry/samples/htmlpanel/frag-0.htmlThanks
to all.
Florencia

Anthony,
As Arnout stated, this can help you smooth the fading action
You can change the sliding duration and the frames per second for your
sliding panel:
http://labs.adobe.com/technologies/spry/articles/data_api/apis/sliding_panels.ht ml#options
And as bonus, you can actually specify a transition (by adding the
option: "transition: " in the constructor as well, so you can use the
SpryEffect transitions:
http://labs.adobe.com/technologies/spry/samples/effects/transition_sample.html
Unless I am reading you incorrectly, which happens frequently at my age, the above should help.
Ben

Similar Messages

  • Tabbed Panel with Fade Effect

    Open my site, dg-ad.com, and the tabbed panel drop down menu has the first level visible.  Click on a menu item and the second level becomes visible.  The second level has a Spry fade effect so it fades into view nicely.  The class .TabbedPanelContent sets the visibilty of the second layer hidden, and there is no distracting flicker, good so far. 
    Besides clicking on menu item I often send clients a link with a string query which lands them on my site with the tabbed panel open to what I want them to see initially., I use a string query in the URL per Dave Powers technique often refered to in this forum titled'Spry: Opening Specific Tabs and Panels from Another Page". 
    Because the visibility is set to hidden in the CSS the second level of the tabbed panel is still invisible,  So I am looking for suggestions that may involve scripting the style or playing with the CSS to overide the CSS and make the second level visible when users arrive via the query string method.
    Thanks for taking a look!
    Daniel

    For Spry 1.0 widgets, each widget had one core file. Each of them had common things like addClassName(), removeClassname(), along with a bunch of basic functionality. So that adds up to a lot of redundant code.
    This way, all that common stuff is kept in a single file. That means that each widget base class just has what it needs to glue everything together.
    Many widgets are 'panel' based: accordions, tabbed panels, slideshows. So handling those panels is done via the PanelSet and PanelSelector files.
    You will find SpryTabbedPanels2.js much smaller than the first version.
    By components, for instance: SpryFadingPanels.js is only needed if you want to fade between panels. If you don't want that effect, you don't need to use it. WIth components and plugins, you or anyone else can write a different transition and make that available to all your Spry UI widgets.
    I don't like all the includes either but it's the right way to go with what we are doing.
    Thanks,
    Don

  • 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

  • Stuttering Fade Effect

    You can see what I am working on here:
    http://www.slimscents.com/newsite/
    (under development).
    What happens is this... Rolling over a div creates a fade
    effect on a target div, and it works. However (especially on IE 7)
    rolling over another div whilst the fade effect is ongoing, creates
    an odd "stuttering" of the effect.
    Help appreciated. I will be testing making the fade effect
    global, but not sure if there is a way of identifying or testing if
    the effect is is finished.
    Code Below:
    function UpdateInfo(infoType) {
    var destObj=document.getElementById("infoBox");
    //fadeIt.stop();
    destObj.style.visibility="hidden";
    destObj.style.textAlign="justify";
    destObj.style.fontFamily="Arial";
    var fadeIt = new Spry.Effect.Fade(destObj,{duration:
    2000,from: 0, to: 100,toggle: false});
    var inTxt="";
    switch (infoType) {
    case "whatIs":
    inTxt="<iframe height='100%' name='info' width='100%'
    src='sitedata/whatis.html'></iframe>";
    break;
    case "howDoes":
    inTxt="<iframe height='100%' name='info' width='100%'
    src='sitedata/howdoes.html'></iframe>";
    //alert('how does');
    break;
    }// end switch
    destObj.innerHTML=inTxt;
    fadeIt.start();
    }

    Override JPanel's paintComponent() method. Call super and then fill the panel with desired color. The color must have proper alpha to change transparency. Add a timer to call repaint() e.g. 10 times changing the alpha from transparent to opaque.
    Regards,
    Stas

  • 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 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.

  • Fade Effect Issue with table structure

    I have an existing HTML page with a table framework that uses
    CSS divs in some of the table rows. My SPRY data is currently
    wrapped in DIV tags within the table. I've discovered that the
    table is screwing up the fade effect in IE7. Is there any way I can
    get around this without removing the table and recoding the whole
    page in CSS? FYI...I using version 1.4. I'm not sure if 1.5 will
    fix this issue.

    Essentially the fade in fade out effect isn't working at all
    in IE. It's setup as a slideshow and uses the fade effect as a
    transition between the spry data. The slideshow works fine just
    without the fade effect. Everything works perfectly in Firefox
    though. I know this code will work as we have used it before, the
    only thing different is that I have my DIV with the SPRY content
    wrapped within a table cell and row. I've read that the TR tag
    cannot be used, but it's not exactly using the TR as an ID. Once I
    comment out the table, tr, and td tags, the effect works no problem
    so I know it is the table. I can't give you the URL because it's on
    our local network.

  • Rotating Image with Fade Effect

    Ok looking to rotate an image with a fade effect; below is a rotating image code.
    (Wanting this effect to be transitional and smooth. Transparency? Opacity?)
    <script language="JavaScript">
    <!--
    function adArray() {
    for (i=0; i*2<adArray.arguments.length; i++) {
    this[i] = new Object();
    this[i].src = adArray.arguments[i*2];
    this[i].href = adArray.arguments[i*2+1];
    this.length = i;
    function getAdNum() {
    dat = new Date();
    dat = (dat.getTime()+"").charAt(8);
    if (dat.length == 1)
    ad_num = dat%ads.length;
    else
    ad_num = 0;
    return ad_num;
    var ads = new adArray(
    "img1.jpg","http://www.domain.com",
    "img2.jpg","http://www.domain.com",
    "img3.jpg","http://www.domain.com");
    var ad_num = getAdNum();
    document.write('<div align="center"><A HREF="'+ads[ad_num].href+'" target="_blank"><IMG SRC="'+ads[ad_num].src+'" '
    +'BORDER=0 name=js_ad></A></div>');
    link_num = document.links.length-1;
    function rotateSponsor() {
    if (document.images) {
    ad_num = (ad_num+1)%ads.length;
    document.js_ad.src = ads[ad_num].src;
    document.links[link_num].href = ads[ad_num].href;
    setTimeout("rotateSponsor()",4000);
    setTimeout("rotateSponsor()",4000);
    // -->
    </script>
    Any ideas?

    Here is the script I finally got working! It would have not came to me without your help guys!
    <script>
    var pictureWebPartName="Pictures"; // name of the picture library web part
    var showThumbnails = true; //otherwise show full sized images
    var randomImg = true; //set to true to show in random order
    var useCustomLinks = false; //true to use second column as URL for picture clicks
    var RotatingPicturesLoopTime = 5000; //2000 = 2 seconds
    var imgToImgTransition = 1.0; //2 = 2 seconds
    // don't change these
    var selectedImg = 0;
    var imgCache = [];
    var imgTag;
    function RotatingPictures()
    imgTag = document.getElementById("RotatingImage");
    //Find the picture web part and hide it
    var Imgs = [];
    var x = document.getElementsByTagName("TD"); // find all of the table cells
    var LinkList;
    var i=0;
    for (i=0;i<x.length;i++)
    if (x[i].title == pictureWebPartName)
    // tables in tables in tables... ah SharePoint!
    LinkList = x[i].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;
    // hide the links list web part
    LinkList.style.display="none";
    break;
    if (!LinkList)
    document.all("RotatingImageMsg").innerHTML="Web Part '" + pictureWebPartName + "' not found!";
    //Copy all of the links from the web part to our array
    var links = LinkList.getElementsByTagName("TR") // find all of the rows
    var url;
    var len;
    for (i=0;i<links.length;i++)
    //if (links(i).id.match("row")!=null)
    if (links[i].childNodes[0].className=="ms-vb2")
    len=Imgs.length
    Imgs[len]=[]
    Imgs[len][0] = links[i].childNodes[0].childNodes[0].href;
    if (useCustomLinks)
    if (links[i].childNodes[1].childNodes.length>0)
    { Imgs[len][1] = links[i].childNodes[1].childNodes[0].href; }
    else
    { Imgs[len][1] = "" }
    if (Imgs.length==0)
    document.all("RotatingImageMsg").innerHTML="No images found in web part '" + pictureWebPartName + "'!";
    for (i = 0; i < Imgs.length; i++)
    imgCache[i] = new Image();
    imgCache[i].src = Imgs[i][0];
    if (useCustomLinks)
    imgCache[i].customlink=Imgs[i][1];
    RotatingPicturesLoop();
    // now show the pictures...
    function RotatingPicturesLoop()
    if (randomImg)
    selectedImg=Math.floor(Math.random()*imgCache.length);
    if (document.all){
    imgTag.style.filter="blendTrans(duration=" + imgToImgTransition + ")";
    imgTag.filters.blendTrans.Apply();
    url=imgCache[selectedImg].src
    if (useCustomLinks)
    { RotatingImageLnk.href=imgCache[selectedImg].customlink; }
    else
    { RotatingImageLnk.href = url; }
    if (showThumbnails)
    // convert URLs to point to the thumbnails...
    // from airshow%20pictures/helicopter.jpg
    // to airshow%20pictures/_t/helicopter_jpg.jpg
    url = revString(url);
    c = url.indexOf(".");
    url = url.substring(0,c) + "_" + url.substring(c+1,url.length);
    c = url.indexOf("/");
    url = url.substring(0,c) + "/t_" + url.substring(c,url.length);
    url = revString(url) + ".jpg";
    imgTag.src = url;
    if (document.all){
    imgTag.filters.blendTrans.Play();
    selectedImg += 1;
    if (selectedImg > (imgCache.length-1)) selectedImg=0;
    setTimeout(RotatingPicturesLoop, RotatingPicturesLoopTime);
    // utility function revString found here:
    // http://www.java2s.com/Code/JavaScript/Language-Basics/PlayingwithStrings.htm
    function revString(str) {
    var retStr = "";
    for (i=str.length - 1 ; i > - 1 ; i--){
    retStr += str.substr(i,1);
    return retStr;
    // add our function to the SharePoint OnLoad event
    _spBodyOnLoadFunctionNames.push("RotatingPictures");
    </script>
    <!-- add your own formatting here... -->
    <center>
    <table border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td id="VU" height="125" width="160" align="center" valign="middle">
    <a name="RotatingImageLnk" id="RotatingImageLnk" alt="click for larger picture">
    <img src="/_layouts/images/dot.gif" name="RotatingImage" id="RotatingImage" border=0>
    </a>
    <span name="RotatingImageMsg" id="RotatingImageMsg"></span>
    </td>
    </tr>
    </table>
    </center>
    Thanks again guys!

  • Sound clip level lowers when effect applied??

    Hi Everyone.
    Does anyone know why it is that the sound level contained within a clip lowers substantially after the clip has an effect applied to it (such as Brightness/Contrast?)
    Is there a fix???
    I think I asked this question about 2 years ago... and I believe the answer was sitting on Dansangle site. I just checked but I cannot find it!
    help?!?! please!?!
    Nick.

    A clip's volume is lower after you use an effect or title in iMovie 4
    http://docs.info.apple.com/article.html?artnum=107944
    (Two workarounds are in article)

  • How to add a fade effect to the Application object ?

    Hy,
    i want to add a fade effect to the Application object, but my code does not work, can you take a look please:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"                              
                                usePreloader="false"
                                mouseDown="stage.nativewindow.startMove()"
                                layout="absolute"
                                width="304"
                                height="527"
                                alpha="0"
                                creationComplete="init()">
            <mx:Script>
                    <![CDATA[
                            private function init():void
                                    application.setStyle("showEffect",fade)        
                    ]]>
            </mx:Script>
            <mx:Fade id="fade" duration="1000" />
    </mx:Application>
    Thanks

    Hi,
    Here is an example of how to add effect to a button: http://livedocs.adobe.com/flex/3/html/help.html?content=behaviors_06.html

Maybe you are looking for

  • Could I run Mac & PC, on the same screen, at the same time?

    I run my MacBook Pro on MacOSX and on Windows XP using BootCamp. The problem is that I cannot run both operating systems, on the same screen, at the same time . I need to shut one to be able to open the other one. Does one knows a software to install

  • ITunes 10 install failure (OS X 10.6.4)

    Tried iTunes 10 install (upgrade from 9.2.1) using Software Update and from local download of iTunes 10. Both failed with "The installation failed." While writing files, an installation script error briefly appeared.

  • Audio Video Content created in 10.6 Downloads instead of Plays Back

    I have a situation where all content created in 10.6 will download instead of playing back with a browsers plug-in. That includes, mp3s (mp3s created with Logic) and all types of common video formats - DivX avi's, mp4's, mov's. I have tested on Safar

  • Where do I get a copy of Visual Composer??

    Hi, Pls where can I get a copy of Visual Composer [VC]?? It is not available for download from the SAP website. I wanted to create an EAI solution for demonstration purposes using VC, but I read it is not possible to connect to non-SAP systems using

  • Lost my partition by using DiskUtility in Yosemite

    Hi Bro, I'm newbie in Mac, now using Macbook Pro Retina, with Yosemite Os. In my SSD hard drive, I have 3 partition that named: Macintosh HD, Data and Temp. This afternoon, I use DiskUtility to erase my Temp partition because I think this erase parti