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!

Similar Messages

  • Firefox is hanging when the page scrolls down to a html5 video or the page to a slideshow with fade effect

    Every time a page has a html5 video or a slideshow with fade effect Firefox 3.6 becomes terriblely slow. It freezes with this test: http://demos.hacks.mozilla.org/openweb/HWACCEL/
    I have Fedora 14 and before that Fedora 13 and the problem happens with both.
    The same doesn't happen on Opera or Google Chrome.
    '''UPDATE 1''': I have already tryed the Safe Mode and the problem happens the same.
    '''UPDATE 2:''' This page full of videos scroll smothly without any problemas: http://brettgaylor.tumblr.com/tagged/webmademovies

    I forgot to say that I did tryed the Safe Mode just to see if the slow was not being caused by some extension or plugin. However the result was all the same. By the way, the slow happens even if there is only one page opened. I am not thinking it is something related to the ATI video card or even Fedora because the same slow does't happen in Chrome and Opera...

  • Rotating Image With Reflections

    A few years back I bought a manual for Director 6.0. In the
    back of the manual there was a demo disc showing some samples of
    other people's work. One of the samples was called Big Top. It was
    a totating logo in shinny gold, and as it rotated, you would see
    reflections of objects and light on the surface. At one Time I
    asked how it was done, and was told that an ap called RayDream
    Designer could do it. I was told that in that ap, you could draw a
    3D room, with the four walls, floor and ceiling, and when you
    placed an object in the center of the room and rotated it, you
    would end up with a rotating image with the reflection from the
    walls. I never tried it, and long ago RayDream Designer stopped
    being supported. Recently, I was told that the same thing could be
    done with Photoshop or Flash, but I have not figured out how it is
    done. What I want to do, is create a 3D image of a logo in gold,
    chrome, or somethign reflective, and have it rotate with the
    reflections as it rotates. I have seen similar thing on TV
    commercials, but I think I need a little help on figuring out how
    this is done.

    A few years back I bought a manual for Director 6.0. In the
    back of the manual there was a demo disc showing some samples of
    other people's work. One of the samples was called Big Top. It was
    a totating logo in shinny gold, and as it rotated, you would see
    reflections of objects and light on the surface. At one Time I
    asked how it was done, and was told that an ap called RayDream
    Designer could do it. I was told that in that ap, you could draw a
    3D room, with the four walls, floor and ceiling, and when you
    placed an object in the center of the room and rotated it, you
    would end up with a rotating image with the reflection from the
    walls. I never tried it, and long ago RayDream Designer stopped
    being supported. Recently, I was told that the same thing could be
    done with Photoshop or Flash, but I have not figured out how it is
    done. What I want to do, is create a 3D image of a logo in gold,
    chrome, or somethign reflective, and have it rotate with the
    reflections as it rotates. I have seen similar thing on TV
    commercials, but I think I need a little help on figuring out how
    this is done.

  • Can I create a rotating image with sevaral images in  Photoshop?

    I was wondering if I can  create   a rotating image with sevaral images in  Photoshop?    Much like a gif? Would this improve my page load time or would it be the same as loading a slideshow?  Here is an example of what we wanna do vacationsalabama

    Yes you can create a gif in PS to do this but it would be much easier to accomplish with some simple JQuery Image slider.
    Several examples here
    and here
    The benefit is they load faster, have speed options, and switching images out is a breeze. They can also have links asigned to the images as they appear.

  • Load images with some effects

    Hi, I wanted to load java images with some effects like we have in power point like blinds or appear in Java swing when user clicks on the image.
    I have these specific questions in mind:
    1.Is there a way to do this in Java?
    2.Also how will this behave when the image to load is huge like 25 Mega Pixel?
    3.If we are dealing with large images being switched, what mechanism should be used for incorporating images in the application?
    4. Can there be a provision of displaying an image over another one with the one on the top having some transparency?
    Thanks,
    Sandeep

    Kayaman wrote:
    835085 wrote:
    how can this be done? do you have any pointers. i have played with swing earlier but did not know about the effects thingy.Well I didn't mean that you'd have ready made powerpoint-like effects (unless someone has created a library for that kind of stuff). I mean Java is a programming language, Powerpoint is a crime against nature.
    You'd need to program those effects (or find a library that does).OK, i think i will have to try this out first.
    The point is that i wanted to confirm to go with java or choose python.
    I need to track user inputs and display really large images. Now the interaction is really on graphical side like have moving images in the application which are transparent. I know Java but havent played with images yet and was not sure whether it will be worth spending days on this and then switch to python.
    >
    well my scenario will be 2x2 matrix of screens. it will be a 25 MP screen. so wont this work now in this context?Sure, if you have the resolution.
    i was thinking in terms of response time. any inputs?And I was answering in terms of response time. The Fullscreen API. Of course you'll need to keep all the images in memory (or at least a certain range if you want to show them fast enough).
    4. Can there be a provision of displaying an image over another one with the one on the top having some transparency?Sure.any pointers?Well, Java does support transparency and alpha channel. But you'll need to go through the APIs to find ways to do those.
    Is there a reason why you want to do this in Java?I mentioned that I have worked on swing before but was not sure to do it in a totally new prog. language like python.

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

  • Image with entrance effect

    Using Captivate 5.5, I've inserted an image on the slide that is wider than the slide itself. The right edge of the image lines up with the right edge of the slide. I want to add an effect to the image so that when the slide appears, the image appears immediately. Then the image moves from left to right until the left edge of the image lines up with the left edge of the slide. None of the white slide background should be showing at any time.
    I've tried various settings with the effects, but each time, some of the white slide background shows at the beginning and/or end of the effect, so that the image is not covering the whole slide.
    Can anyone help me?

    Hi Jay,
    Just tried it out and cannot get your issue
    I inserted an image, set it to No transition in the Properties panel (did you do that?), aligned it to the right of the stage and added the effect LeftToRight. Then I changed the motion path so that at the end the image was aligned with the left border of the stage, extended the effect till the end of the slide. This seemed to work as expected, I never did see the background when previewing in Browser or from this slide. I did not publish.
    Lilybiri
    PS sometimes I set the effect not to start when the image appears but 0,1sec later.

  • Image with a Effect flicker

    How I can create a Image with Effect flicker
    Thanks

    The nearest behaviour I can think of that you can achieve
    inside RH is with the Rock n Roll DHTML effect. You can try adding
    this and playing settings to see if this will give you what you
    want. If it doesn't I suspect the answer will be to use something
    outside of RH to produce the required effect and then import
    it.

  • Opening a popup window with fade effect

    Hi,
    I have a scenario where I want to open a pop up title window with some nice effect.
    Can you please suggest how do I achieve it?
    I have a repeater that repeats set of Text UI comps and I want to show a pop up window on MouseOver or MouseClick of each of these Text UI comps.
    Please help.
    Thank you,
    Amey

    if you want to open an title Window with a smooth fade effect there are more than one possible ways.
    1. Declare Fade Effect
         <s:Fade id="windowFade" target="{_titleWindow}" alphaFrom="0.0" alphaTo="1.0" />
    2. Execute the fade effect on openening
         2.1 start the effect after the PopUpManager.addPopUp
         PopUpManager.addPopUp(_titleWindow, this);
         windowFade.play();
         2.2 start the effect on added-Event
         protected function titlewindow1_addedHandler(event:Event):void
              windowFade.play();
    3. Make sure the effect is stopped before you start the animation with windowFade.stop()

  • 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

  • [CS3] Flash buttons with fade effects.

    Well as the title says, i've got some buttons in Flash CS3,
    using AS 2 which when clicked changes the frame. The thing is that
    i want to add a fade effect to the text area AFTER the button was
    pressed. So for example:
    The user is reading the text, he presses one of the buttons
    (all of which change frames, in this case text) and the text fades
    away and the new text fades in.
    Well, i've designed the frames needed for this, so i've got
    10 frames before the frame the user will see for it to fade in and
    10 frames after it to fade out. What i havent figured out yet is
    how i'll make the script do that. I mean, i can make the script go
    forward one frame, starting the fade out effect, i can make it go
    to the frame i want but how will i do both.
    I've got 6 buttons and 6 corresponding texts.
    Does anyone have any ideas?
    Thank you in advance.
    P.S.: Any ideas welcome. I can change the frame layout.
    P.S.S.: Also forgot to mention that making layers for every
    combination is out of question....

    I've already had them placed each on their layer. I thought i
    might need mobility on the timeline.
    Let me see how much of this i understand...
    quote:
    which im assuming are MovieClip instances
    They're graphics but i can simply change them to be movie
    clips if it's the case.
    quote:
    do the same with your buttons on a seperate layer but you
    will only need one for them all
    I've lost you here....you're saying ill only need one AS
    reference?
    quote:
    for(var i=0; i<btns.length; i++) {
    Hmm... you're using the size of the array to set how many
    times the loop control will actually loop? Took me a bit to figure
    out what length an array could have
    quote:
    new Tween(current, '_alpha', Strong.easeOut, 100, 0, 10,
    false);
    new Tween(clips[this.id], '_alpha', Strong.easeOut, 0, 100,
    10, false);
    current = clips[this.id];
    //start the first clip transition 'in'
    current = clips[0];
    new Tween(clips[0], '_alpha', Strong.easeOut, 0, 100, 10,
    false);
    Ok i didnt get most of this but i'll have to check out the
    parameters for the Tween function.
    Actually i plan on going from a 50% alpha to a 100%, but
    that's just my choice.
    Thanks a lot and hope i dont become too annoying.
    P.S. I had a huge revelation at the end when i re-read the
    code and finally understood how this is going to work.

  • Rotating Images with Java 2D

    Im working on a program that requires the use of rotating images. I am using AffineTransformation to rotate and translate my BufferedImages. I have a problem when I rotate, I have a picture posted bellow of sample code and it's output.
    http://i125.photobucket.com/albums/p64/roryfenrir/tankhelp.png
    I four images, back (a solid color background, will not be solid in final product); tread and base, both get rotated together; and top, which rotates seperatly from the others.
    My problem is that when an image is rotated, it takes a section of the background with it even though its a seperate image. Im wondering how to fix or get around this problem. Sorry if this is a dumb question but I would really like to get this down.
    Thanks.
    Edited by: RoryFenrir on Nov 11, 2008 4:13 PM

    alright sorry, I didnt think that I needed to paste the whole code. Anyway I tried it out on some other computers and it didnt have this problem, both computers I used had java 6.0 and mine has 5.0 (Im pretty sure) so maybe thats the problem, but anyway I would still like to figure it out for this computer.
    heres the code for the paintPanel, the program that runs it just adds it as a panel then sends arguments into the Overpaint method.
    import java.awt.image.BufferedImage;
    import javax.swing.*;
    import java.io.*;
    import javax.imageio.ImageIO;
    import java.awt.*;
    import java.awt.geom.*;
    public class TankPaint extends JPanel
      static BufferedImage back;
      private BufferedImage top,base,tread;
      private Graphics g;
      private int x,y,x2,y2,deg1,deg2;
      //boolean dialog = false;
         public TankPaint(String back,String top,String base,String tread,int deg1,int deg2,int x,int y,int x2,int y2)
              super();
              try
                   this.back = ImageIO.read(new File("Backgrounds\\"+back));
                   this.top = ImageIO.read(new File("Images\\"+top));
                   this.base = ImageIO.read(new File("Images\\"+base));
                   this.tread = ImageIO.read(new File("Images\\"+tread));
              catch (IOException ex) {}
              this.x = x;
              this.y = y;
              this.x2 = x2;
              this.y2 = y2;
              this.deg1 = deg1;
              this.deg2 = deg2;
         public void paintComponent(Graphics g)
          Graphics2D g2d = (Graphics2D)g;
         AffineTransform transform = new AffineTransform();
              g2d.setColor(Color.red);
             g.drawImage(back, x2, y2, this);
             //g.drawImage(tread, x-125, y-125, this);
                 //g.drawImage(base, x-125, y-125, this);
                 //g.drawImage(top, x-125, y-125, this);
              transform.setToTranslation(x,y-5);
              transform.rotate(Math.toRadians(deg1),tread.getWidth()/2,tread.getHeight()/2-10);
             g2d.drawImage(tread, transform, this);
                 g2d.drawImage(base, transform, this);
              transform.setToTranslation(x,y);
              transform.rotate(Math.toRadians(deg2),top.getWidth()/2,top.getHeight()/2-25);
                 g2d.drawImage(top, transform, this);
      public void overPaint(String back,String top,String base,String tread,int deg1,int deg2,int x,int y,int x2,int y2)
         try
              this.back = ImageIO.read(new File("Backgrounds\\"+back));
              this.top = ImageIO.read(new File("Images\\"+top));
              this.base = ImageIO.read(new File("Images\\"+base));
              //this.tread = ImageIO.read(new File("Images\\"+tread));
         catch (IOException ex) {System.out.println("Image Error");}
           this.x = x;
        this.y = y;
        this.x2 = x2;
        this.y2 = y2;
        this.deg1 = deg1;
         this.deg2 = deg2;
         repaint();
    }

  • Help!  Ideas for displaying ~100-300 still images with After Effects / Premiere Pro

    Hi, I am a cadet at a US Air Force detachment and am responsible for making this semester's end of the year video.
    I have the Adobe creative cloud and am familiar with the basics of Photoshop, and Premiere Pro, and I am trying to also learn After Effects.  I have a large amount of picture and video, and am at a loss for how to quickly make all these pictures into an interesting slideshow.  Software such as Cyberlink Powerdirector had a "photo grid" which would allow me to create an automatic slideshow of images on a 3x3 grid, where each image flashed into place one at a time.  I am looking for automated processes or tutorials to feed my images into and have a modern effect of displaying the images.
    If anyone has any idea for a template or where to start on handling a large amount of still images in After Effects or Premiere Pro, I could definitely use a point in the right direction!
    Exactly what I want can be found at 5:27 of this video: https://www.facebook.com/photo.php?v=10150247563700519&set=vb.120583801339638&type=2&theat er

    read below
    -http://helpx.adobe.com/premiere-pro/kb/error---preludevideo-play-modules.html
    -http://forums.adobe.com/thread/1001579
    -Use BIOS http://forums.adobe.com/thread/1019004?tstart=0
    -link to why http://forums.adobe.com/message/4685328
    -http://www.anandtech.com/show/4839/mobile-gpu-faceoff-amd-dynamic-switchable-graphics-vs-n vidia-optimus-technology/2

  • Using Javascript to rotate images with the style.backgroundImage property & I leave the onload pg & return, the images have trouble loading.

    I'm using Javascript to rotate background images -->
    function rotateImages() {
    setInterval("startRotator()", 7000);
    var counter = 0;
    function startRotator() {
    var images = ["images/finance1.jpg","images/finance2.jpg","images/finance3.jpg","images/finance4.jpg","images/finance5.jpg","images/finance6.jpg"];
    if( counter >= images.length ) {
    counter = 0;
    var image = "url('" + images[counter] + "')";
    counter++;
    document.body.style.backgroundImage=image;
    The script is triggered by the load event when the homepage loads and the script only runs on the homepage. Everything works fine upon opening the homepage.
    If I leave the home page and return, the images will have trouble loading for about 3 to 5 cycles and I'll get white backgrounds for part of the time. The same thing happens if I enter the site from a page other than the homepage and then go to the homepage.
    I discovered, however, that if I enter the site at the homepage and then leave the homepage and return using the back button, everything runs fine. Apparently it then accesses a cached version of the homepage? Seems having two cached versions creates a conflict?
    This problem only happens with Firefox (I have ver 29.0.1). It does not happen on IE ver 11, Chrome ver 34, or Safari ver 5.1.7.
    I get the same problem with XP, Win7, and Win8 but, only on Firefox.
    Can you please fix this?

    Hey, I am trying to reproduce this here: [http://jsfiddle.net/u3TLb/]
    Mozillazine forums and the [http://webcompat.com] are more specialized in Web Compatibility, please ask there as well.

  • Problem With Fade Effect For JTextField

    Hello Friends !
    I am putting a 'bounty' of 10 Duke dollars
    for the clever clogs who can help me out !
    I want to create a 'fade in' effect when a
    textfield has the focus and a 'fade out'
    effect when it looses focus.
    The code for what I have done so far is
    listed below, but it leaves nasty 'artifacts'
    behind when painting.
    regards, Asad.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class RunProgramAgain{
    public static void main(String[] args){
    JFrame frame = new MyFrame();
    class MyField extends JTextField{
    public MyField(){
    setPreferredSize(new Dimension(100, 30));
    public void paintComponent(Graphics g){
    super.paintComponent(g);
    if(hasFocus())
    fadeIn();
    else
    fadeOut();
    private synchronized void fadeIn(){
    for(alpha = MIN; alpha <= MAX; ++alpha)
    setBackground(new Color(RED, GREEN, BLUE, alpha));
    private synchronized void fadeOut(){
    for(alpha = MAX; alpha >= MIN; --alpha)
    setBackground(new Color(RED, GREEN, BLUE, alpha));
    private int alpha = MIN;
    private static final int MIN = 0;
    private static final int MAX = 10;
    private static final int RED = 0;
    private static final int GREEN = 255;
    private static final int BLUE = 0;
    class MyButton extends JButton{
    public MyButton(){
    super("Start");
    class MyFrame extends JFrame{
    public MyFrame(){
    setSize(new Dimension(300,250));
    getContentPane().setLayout(new FlowLayout());
    getContentPane().add(new MyButton());
    getContentPane().add(new MyField());
    show();
    }

    Played some more and came up with a class that will allow you to fade the background color of any JComponent:
    import java.awt.*;
    import java.awt.event.*;
    import java.util.Hashtable;
    import java.util.Vector;
    import javax.swing.*;
    public class Fader
         private static final int MIN = 0;
         private static final int MAX = 10;
         private Color fadeFrom;
         private Color fadeTo;
         private Hashtable backgroundColors = new Hashtable();
         **  The background of any Component added to this Fader
         **  will be set/reset to the fadeFrom color.
         public Fader(Color fadeTo, Color fadeFrom)
              this(fadeTo);
              this.fadeFrom = fadeFrom;
         **  The original background of any Component added to this Fader
         **  will be preserved.
         public Fader(Color fadeTo)
              this.fadeTo = fadeTo;
         **  Fading will be applied to this component on gained/lost focus
         public Fader add(JComponent component)
              //  Set background of all components to the fadeFrom color
              if (fadeFrom != null)
                   component.setBackground( fadeFrom );
              //  Get colors to be used for fading
              Vector colors = getColors( component.getBackground() );
              //     FaderTimer will apply colors to the component
              new FaderTimer( colors, component );
              return this;
         **  Get the colors used to fade this background
         private Vector getColors(Color background)
              //  Check if the color Vector already exists
              Object o = backgroundColors.get( background );
              if (o != null)
                   return (Vector)o;
              //  Doesn't exist, create fader colors for this background
              int rIncrement = ( background.getRed() - fadeTo.getRed() ) / MAX;
              int gIncrement = ( background.getGreen() - fadeTo.getGreen() ) / MAX;
              int bIncrement = ( background.getBlue() - fadeTo.getBlue() ) / MAX;
              Vector colors = new Vector( MAX + 1 );
              colors.addElement( background );
              for (int i = 1; i <= MAX; i++)
                   int rValue = background.getRed() - (i * rIncrement);
                   int gValue = background.getGreen() - (i * gIncrement);
                   int bValue = background.getBlue() - (i * bIncrement);
                   colors.addElement( new Color(rValue, gValue, bValue) );
              backgroundColors.put(background, colors);
              return colors;
         class FaderTimer implements FocusListener, ActionListener
              private Vector colors;
              private JComponent component;
              private Timer timer;
              private int alpha;
              private int increment;
              FaderTimer(Vector colors, JComponent component)
                   this.colors = colors;
                   this.component = component;
                   component.addFocusListener( this );
                   timer = new Timer(5, this);
              public void focusGained(FocusEvent e)
                   alpha = MIN;
                   increment = 1;
                   timer.start();
              public void focusLost(FocusEvent e)
                   alpha = MAX;
                   increment = -1;
                   timer.start();
              public void actionPerformed(ActionEvent e)
                   alpha += increment;
                   component.setBackground( (Color)colors.elementAt(alpha) );
                   if (alpha == MAX || alpha == MIN)
                        timer.stop();
         public static void main(String[] args)
              // Create test components
              JComponent textField1 = new JTextField(10);
              JComponent textField3 = new JTextField(10);
              JComponent textField4 = new JTextField(10);
              JComponent button = new JButton("Start");
              JComponent checkBox = new JCheckBox("Check Box");
              JFrame frame = new JFrame("Fading Background");
              frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
              frame.getContentPane().add(textField1, BorderLayout.NORTH );
              frame.getContentPane().add(button, BorderLayout.SOUTH );
              frame.getContentPane().add(textField3, BorderLayout.EAST );
              frame.getContentPane().add(textField4, BorderLayout.WEST );
              frame.getContentPane().add(checkBox);
              //  Fader preserving component background
              Fader fader = new Fader( new Color(155, 255, 155) );
              fader.add( textField1 );
              fader.add( button );
              fader.add( checkBox );
              //  Fader resetting component background
              fader = new Fader( new Color(155, 255, 155), Color.yellow );
              fader.add( textField3 );
              fader.add( textField4 );
              frame.pack();
              frame.setVisible( true );
    }

Maybe you are looking for

  • Hidden, Visible and back to Hidden using a radio button

    Ok this might be really simple for someone to answer. I have a radio button I'm using to toggle between two list boxes with multiple lines of text (hidden and then visible). Here's the problem, when I toggle the radio button back and forth I have bot

  • Export function not working in Internet Explorer

    so i've got a report displayed in IE, but when i go to export to any file format, IE opens a new tab and that's it. depending on certain settings (like adding the server to intranet zone), i can get the new tab to say nothing or "Blank Page". i've tr

  • How to make duplicate of current document ?

    hi, Can anyone tell me that how to make a duplicate copy of current document? so that i can do the modification with duplicate document without changing the status of original document. thanks

  • Hierarchy problem in sql query

    Hello Experts,                I am using oracle 11g database with sql developer tool at windows 7.I am trying to make hierarchy for my table data.I have a table tbl_state as State_Code State_Name Country_Code 1 AH 0 2 BH 91 3 CI 72 4 DI 72 5 EH 91 6

  • Text Links changing style in IE

    Hi, My page www.bethhockley.com/ptihome2.htm uses two styles of text link, both of which are defined in my external CSS www.bethhockley.com/bethhockleychanged.css the text links look as they should in all browsers barr IE where the link [email protec