How to have smooth fade effect between the two images via XML

I have my xml gallery working fine, all i need is to have a smooth fade effect between the two images, right now they are changing with a jerk. Can somebody help me getting this effect with my code. Any help is much appreciated.
function loadXML(loaded) {
    if (loaded) {
        xmlNode = this.firstChild;
        image = [];
        link = [];
        thumbnails = [];
        thumbnailsOn = [];
        total = xmlNode.childNodes.length;
        for (i=0; i<total; i++) {
            image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
            link[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
            thumbnails[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
            thumbnailsOn[i] = xmlNode.childNodes[i].childNodes[3].firstChild.nodeValue;
            thumbnails_fn(i);
        firstImage();
        loopPlay();
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("data.xml");
thumbnail_mc.attachMovie("prev", "prev_new", 1);
    thumbnail_mc.prev_new._x= -20;
    thumbnail_mc.prev_new._y= -1;
thumbnail_mc.attachMovie("next", "next_new", 4);
thumbnail_mc.next_new._y= -1;
    //thumbnail_mc.next_new._x= -30;
thumbnail_mc.prev_new.onRelease = function() {
    prevImage();
thumbnail_mc.next_new.onRelease = function() {
    nextImage();
p = 0;
this.onEnterFrame = function() {
    filesize = holder.getBytesTotal();
    loaded = holder.getBytesLoaded();
    //preloader._visible = true;
    if (loaded != filesize) {
        preloader.preload_bar._xscale = 100*loaded/filesize;
    } else {
        preloader._visible = false;
        if (holder._alpha<100) {
            holder._alpha += 10;
function nextImage() {
    if (p<(total-1)) {
        p++;
        if (loaded == filesize) {
            holder._alpha = 0;
            holder.loadMovie(image[p], 1000);
            //desc_txt.text = description[p];
            picture_num();
click._alpha=0;
click.onRelease = function() {
    getURL(link[p], "_blank");
    loopStop();
function HoldImage() {
    nextImage();
    clearInterval(myTimer2);
    loopPlay();
function checkImageState() {
    if (p==total-1) {
        p = -1;
    if (loaded==filesize) {
        clearInterval(myTimer1);
        myTimer2 = setInterval(HoldImage,3000);
function loopPlay() {
    myTimer1 = setInterval(checkImageState, 3000);
function loopStop() {
    clearInterval(myTimer1);
    clearInterval(myTimer2);
function prevImage() {
    if (p>0) {
        p--;
        holder._alpha = 0;
        holder.loadMovie(image[p], 1000);
        target_mc._alpha = 40;
        picture_num();
function firstImage() {
    if (loaded == filesize) {
        holder._alpha = 0;
        holder.loadMovie(image[0], 1000);
        picture_num();
function picture_num() {
    current_pos = p+1;
function thumbnails_fn(k) {
    thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth());
    tlistener = new Object();
    tlistener.onLoadInit = function(target_mc) {
        target_mc._x = (target_mc._width+10)*k;
        target_mc.pictureValue = k;
        target_mc.onRelease = function() {
            p = this.pictureValue-1;
            nextImage();
        target_mc.onRollOver = function() {
            this._alpha = 40;
        target_mc.onRollOut = function() {
            this._alpha = 100;
    image_mcl = new MovieClipLoader();
    image_mcl.addListener(tlistener);
    image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k);       

I have a center of energy program similar to the one used by IMAQ. I have attached an example using your data. I first found the center of the entire image. Then I split the array in two and found the centers of each half. That gives you the position of the two spots. This program won't work if the spots are too close to each other or are separeted in the other axis.
Attachments:
distance between two spots one direction.vi ‏1096 KB
Center of energy calc.vi ‏40 KB

Similar Messages

  • 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

  • I have purchased a new iPad and given my old one to my husband.  How do I change the Apple ID over to him.  We are having continuous confusion between the two iPads

    I have purchased a new iPad and given my old one to my husband.  How do I change the Apple ID over to him.  We are having continuous confusion between the two iPads

    Hi Marg42,
    Thanks for visiting Apple Support Communities.
    First, your husband can create his own Apple ID via the web, computer, or iPad, if he hasn't already:
    My Apple ID
    https://appleid.apple.com
    iTunes: How to set up an Apple ID within iTunes
    http://support.apple.com/kb/ht2731
    Next, he can sign out of the Apple services that are currently using your Apple ID on your old iPad, and sign in with his own.
    This article has instructions for doing so for specific Apple services:
    Apple ID: What to do after you change your Apple ID
    http://support.apple.com/kb/HT5796
    Alternately, he can erase the device and set it up as new using the steps in this article:
    iOS: How to back up your data and set up your device as a new device
    http://support.apple.com/kb/ht4137
    Best Regards,
    Jeremy

  • My daughter and I both have an iPhone and we have shared my apple ID. Now her phone is syncing with mine and we want to have different contacts. How do I differentiate between the two phones?

    My daugher and I both have an iPhone and we have shared my apple ID. She just replaced her phone and now our contacts are syncing -- and we don't want that. How do I differentiate between the two phones?

    Is the same Apple iCloud account being accessed on each iPhone?

  • I have one iPhone GS and one iPad 2, how do I syncronise my contacts and my calendar between the two devices?

    I  have one iPhone GS and one iPad 2, how do I syncronise my contacts and my calendar between the two devices?

    Install iOS 5 onto both and you can use iCloud to sync contacts and calendars between the 2 devices.

  • I have just owned a macbook pro and trying to learn things since i have all along used windows laptop. My first question is : when there are two files i am working together, one above the other on screen, how you switch over between the two with key ?

    I have just owned a macbook pro and trying to learn things since i have all along used windows laptop. My first question is : when there are two files i am working together, one above the other on screen, how you switch over between the two with key ?

    Hi...
    Mac OS X keyboard shortcuts
    Control-F4
    Move focus to the active (or next) window
    Shift-Control-F4
    Move focus to the previously active window
    By the way...  since you are new to Mac, click a clear space on your Desktop. You should see "Finder" top left corner of the screen in the menu bar.
    Click Help then click Help Center
    As an example type in    keyboard shortcuts
    You can use the Help menu for almost any application on your Mac.
    Apple - Find Out How - Mac Basics
    For held switching from PC to Mac >  Apple - Support - Switch 101

  • Transition effects between the states..?

    Hi, There.
       How I can set the "Transition effects" between the states please?. When I add the different photos to the several states, I want to set the transition effects like "Fade". Help me anyone please.
    Thanks

    Try to make a few more transitional states in between with varying levels of opacity for each picture (and play with the State Delay time). Other than that, i don't think Fireworks has transitional effects for slideshows (i may be wrong).

  • TS3367 I have two IPhones and one IPad all with the same Apple ID. I can call facetime between the two IPhones, but I cannot call the IPAD from either of the IPhones and when I call my IPhone from the IPad it rings my wife's IPhone after briefly calling m

    I have two IPhones and one IPad all with the same Apple ID. I can call facetime between the two IPhones, but I cannot call the IPAD from either of the IPhones and when I call my IPhone from the IPad it rings my wife's IPhone after briefly calling mine.

    Each device needs a separate address. Use an email address (gmail.com) on the iPad.
    Using FaceTime http://support.apple.com/kb/ht4319
    Troubleshooting FaceTime http://support.apple.com/kb/TS3367
    The Complete Guide to FaceTime + iMessage: Setup, Use, and Troubleshooting
    http://tinyurl.com/a7odey8
    Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/TS4268
    Using FaceTime and iMessage behind a firewall
    http://support.apple.com/kb/HT4245
    iOS: About Messages
    http://support.apple.com/kb/HT3529
    Set up iMessage
    http://www.apple.com/ca/ios/messages/
    Troubleshooting Messages
    http://support.apple.com/kb/TS2755
    Setting Up Multiple iOS Devices for iMessage and Facetime
    http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l
    FaceTime and iMessage not accepting Apple ID password
    http://www.ilounge.com/index.php/articles/comments/facetime-and-imessage-not-acc epting-apple-id-password/
    Unable to use FaceTime and iMessage with my apple ID
    https://discussions.apple.com/thread/4649373?tstart=90
    For non-Apple devices, check out the TextFree app https://itunes.apple.com/us/app/text-free-textfree-sms-real/id399355755?mt=8
    How to Send SMS from iPad
    http://www.iskysoft.com/apple-ipad/send-sms-from-ipad.html
     Cheers, Tom

  • How do you add multiple effects to the same clip

    How do you had multiple effects to the same clip. I have tried for hours
    I would like to add sepia and aged movie to the same clip. I heard it can be done, but have not figured out how to do it.
    anyone please.

    Normally you can apply only one video effect at a time. But for Sepia, black and white, and others that can be done through the video Adjustments tab, you are in luck.
    Aged Movie should already have a bit of a sepia tone.
    If you want more of a sepia tone or you want to fine tune the sepia effect you can do it with the Clip Inspector/Video Adjustments tab.
    Note: Thanks to Jeff Carlson of MacWorld for this tip.
    If you're looking for a washed-out sepia appearance, first open iMovie's preferences and turn on the Show Advanced Tools option, which adds more controls to the Video Adjustments HUD and other areas of the program. Select the clip you want to alter and press the V key. Set Saturation to 0 percent, and then drag the Red Gain slider to 143 percent, the Green Gain slider to 90 percent, and the Blue Gain slider to 53 percent (feel free to tweak these settings to customize the results). Click on Done when you're finished. Note that the clip thumbnail still appears in color, as the video was shot, but the preview reflects your changes.--JC
    If you need to apply the same settings to all clips, first select the clip you have adjusted. Then Edit/Copy. Then Edit/Select All. Then Edit/Paste Adjustments.

  • Is it possible for the Adobe to put video instructions on these following things as my professor works on CS4 and I have CS6,it is really confusing for me to follow the disparitie between the two.

    Is it possible for the Adobe to put video instructions on these following things as my professor works on CS4 and I have CS6,it is really confusing for me to follow the disparitie between the two
    Modifying the header
    Changing page background color
    Changing sidebars in CSS
    Adding/changing a Spry link's background and hover colors in navbar
    Formatting headers in split view
    Deleting placeholder copy in the content container
    Inserting a video in a table
    Changing table background color
    Formatting text in the content container
    Format hyperlinks in CSS
    Insert page anchors and link to them with navbar hyperlinks
    Enter text in footer with a hyperlink
    Insert and format headers
      Use of a color picker (Color Cop)

    Use CS6 Help (F1).  Those are the most up to date articles for your product version.
    <Changing page background color>
    We've already told you how to do that with CSS code.
    <Deleting placeholder copy in the content container>
    Placeholders are deprecated.  Adobe removed them.
    <Inserting a video in a table>
    Insert > Media > HTML5 Video
    <Insert page anchors and link to them with navbar hyperlinks>
    Named anchors are deprecated in HTML.  Adobe removed them from DW.  Use Div IDs instead.
    Why are you taking a course that teaches outdated methods in CS4 which is no longer supported?
    Nancy O.

  • How to sync the data between the two iSCSI target server

    Hi experts:
    I have double HP dl380g8 server, i plan to install the server 2012r2 iSCSI target as storage, i know the iSCSI storage can setup as high ability too, but after some research i doesn't find out how to sync the data between the two iSCSI target server, can
    any body help me?
    Thanks

    Hi experts:
    I have double HP dl380g8 server, i plan to install the server 2012r2 iSCSI target as storage, i know the iSCSI storage can setup as high ability too, but after some research i doesn't find out how to sync the data between the two iSCSI target server, can
    any body help me?
    Thanks
    There are basically three ways to go:
    1) Get compatible software. Microsoft iSCSI target cannot do what you want out-of-box but good news third-party software (there are even free versions with a set of limitations) can do what you want. See:
    StarWind Virtual SAN [VSAN]
    http://www.starwindsoftware.com/native-san-for-hyper-v-free-edition
    DataCore SANxxx
    http://datacore.com/products/SANsymphony-V.aspx
    SteelEye DataKeeper
    http://us.sios.com/what-we-do/windows/
    All of them do basically the same: mirror set of LUs between Windows hosts to emulate a high performance and fault tolerant virtual SAN. All of them do this in active-active mode (all nodes handle I/O) and at least StarWind and DataCore have sophisticated
    distributed cache implementations (RAM and flash).
    2) Get incompatible software (MSFT iSCSI target) and run it in generic Windows cluster. That would require you to have CSV so physical shared storage (FC or SAS, iSCSI obviously has zero sense as you can feed THAT iSCSI target directly to your block storage
    consumers). This is doable and is supported by MSFS but has numerous drawbacks. First of all it's SLOW as a) MSFT target does no caching and even does not use file system cache (at all, VHDX it uses as a containers are opened and I/O-ed in a "pass-thru" mode)
    b) it's only active-passive (one node will handle I/O @ a time with other one just doing nothing in standby mode) and c) long I/O route (iSCSI initiator -> MSFT iSCSI target -> clustered block back end). For reference see:
    Configuring iSCSI Storage for High Availability
    http://technet.microsoft.com/en-us/library/gg232621(v=ws.10).aspx
    MSFT iSCSI Target Cluster
    http://techontip.wordpress.com/2011/05/03/microsoft-iscsi-target-cluster-building-walkthrough/
    3) Re-think what you do. Except iSCSI target from MSFT you can use newer technologies like SoFS (obviously faster but requires a set of a dedicated servers) or just a shared VHDX if you have a fault tolerant SAS or FC back end and want to spawn a guest VM
    cluster. See:
    Scale-Out File Servers
    http://technet.microsoft.com/en-us/library/hh831349.aspx
    Deploy a Guest Cluster Using a Shared Virtual Hard Disk
    http://technet.microsoft.com/en-us/library/dn265980.aspx
    With Windows Server 2012 R2 release virtual FC and clustered MSFT target are both really deprecated features as shared VHDX is both faster and easier to setup and use if you have FC or SAS block back end and need to have guest VM cluster.
    Hope this helped a bit :)
    StarWind VSAN [Virtual SAN] clusters Hyper-V without SAS, Fibre Channel, SMB 3.0 or iSCSI, uses Ethernet to mirror internally mounted SATA disks between hosts.

  • HT5621 Hi, we have three iPhones and iPods which are currently linked to one apple ID.  I have now set up an apple id for each phone/iPod.  How do I go about re-directing the two accounts to the relevant one that has now been set up please?

    Hi, we have three iPhones and iPods which are currently linked to one apple ID.  I have now set up an apple id for each phone/iPod.  How do I go about re-directing the two accounts to the relevant one that has now been set up please?  I could do with a step by step guide to follow as am worried about loosing aps, music, photo's etc which are on the individual phones.
    Thanks
    Mandi

    On each of the phones you're gonna use a new Apple ID for iCloud: turn off Contacts, Calendars, etc. for iCloud. You'll be prompted to keep the data or delete it from the phone, then turn off iMessage, FaceTime & delete the iCloud account...Settings>iCloud...scroll down...delete account. Then, setup iCloud using the new Apple ID, turn on iMessage & Facetime.
    This will have no affect on the ID you share for iTunes content, & you can continue to do so.

  • How can i play iTunes on apple tv from my mac?  i used to have an icon that synced the two but i can't find that icon anymore

    how can i play iTunes on apple tv from my mac?  i used to have an icon that synced the two but i can't find that icon anymore

    If you are using the 2nd or 3rd gen Apple TV (little black box) then it would have no syncing or storage capability.
    iTunes content would be accessed using home sharing.
    Setting up Home Sharing for Apple TV (2nd generation and 3rd generation) - Apple Support
    If you are referring to the 1st gen (bigger aluminum box with hard drive)
    iTunes 11 for Mac: Play items in your iTunes library using Apple TV (1st generation)

  • How do i get this effect in the video 0:7 - 0:8 That the lines come together and build a logo? pls h

    How do i get this effect in the video 0:7 - 0:8 That the lines come together and build a logo? pls help me      http://www.youtube.com/watch?v=mfU8bZDKAMQ&list=HL1352499622&feature=mh_lolz

    This looks like the final logo was created with several layers probably in Illustrator, then the file was most likely imported into After Effects and revealed by animating mask paths.

  • My IPhone has a different ICloud Apple ID than my iPad. How can I stream between the two devices

    My iPhone has a different id than my iPad. How can I stream between the two devices

    I should say that you can add the other account to each device as a seconday account by going to Settings>Mail,Contacts,Calendars>Add Account>iCloud and signing in with the ID the other device is using.  This would allow you to see mail, contacts, calendars, reminders and notes from the other account alongside the same data from the primary account on each device.

Maybe you are looking for