Make pictures slide in and out of view?

Hello!  I have created an xml slide show and currently when one presses the next or back btns then the next or previous image will come on screen. I am trying to make it where when one presses next the next image will slide on the screen from the right side and stop at the center while the previous image slides off to the left side.  I am posting the code that I have currently but I am not sure where to take it from here.
I am fairly new to AS as a note.
var xmlRequest:URLRequest = new URLRequest("imageData.xml");
var xmlLoader:URLLoader = new URLLoader(xmlRequest);
var imgData:XML;
var imageLoader:Loader;
var rawImage:String;
var rawH:String;
var rawW:String;
var imgNum:Number = 0;
var checkSec:Timer = new Timer(100);
var numberOfChildren:Number;
var vx:Number = 0;
var ax:Number = 0;
xmlLoader.addEventListener(Event.COMPLETE, xmlLoadedF);
btnNext.addEventListener(MouseEvent.CLICK, nextImgF);
btnNext.buttonMode = true;
btnBack.addEventListener(MouseEvent.CLICK, prevImgF);
btnBack.buttonMode = true;
function xmlLoadedF (event:Event):void{
     checkSec.start();
     checkSec.addEventListener(TimerEvent.TIMER, checkerF);
     imgData = new XML(event.target.data);
function packagedF():void{
     checkSec.removeEventListener(TimerEvent.TIMER, checkerF);
     rawImage = imgData.image[imgNum].imgURL;
     numberOfChildren = imgData.*.length();
     rawW = imgData.image[imgNum].imgW;
     rawH = imgData.image[imgNum].imgH;
     imageLoader = new Loader;
     imageLoader.load(new URLRequest(rawImage));
     master_mc.addChild(imageLoader);
     imageLoader.x = (stage.stageWidth - Number(rawW)) /2;
     imageLoader.y = (stage.stageHeight - Number(rawH)) /5;
function checkerF(event:TimerEvent):void {
     if (imgNum == 0) {
          packagedF();
     }else if(imgNum < numberOfChildren) {
          packagedF();
     }else{
          imgNum = 0;
          packagedF();
function nextImgF(event:MouseEvent):void {
     checkSec.addEventListener(TimerEvent.TIMER, checkerF);
     imgNum++;
function prevImgF(event:MouseEvent):void {
     checkSec.addEventListener(TimerEvent.TIMER, checkerF);
     imgNum--;
I was able to manage getting the image to come on screen and slide off to the right or left with onEnterFrame but not with the use of a btn. And then my code for the buttons did not work any more. Here is the basic code I used for that (just the basic added code not included in the above code). I also modified the above a little to fit this code but here it is so you get the idea:
private var vx:Number = 0;
private var ax:Number = .2;
//this was included at the end of the- function packageF():void {
        addEventListener(Event.ENTER_FRAME, onEnterFrame);
private function onEnterFrame(event:Event):void {
        vx += ax;
        imageLoader.x += vx;
I am probably doing this totally wrong and not going in the right direction.
Can you pls help me? Thanks in advance!

Hey thanks! Tween was just the tool and works well now. The first eases on stage from the left and when I press the btnNext the image on stage eases out to the left and the next image eases on from the right.
This leads to my next question.... When I add the btnBack it goes all funky.. the image that went off stage to the left comes back on stage from the left but then the next image on the right comes on stage at the same time! I am trying to get the image that went off stage to the left when I pressed next to come back on stage and the current picture that is on screen to go back off the the right.
Here is my code thats working with tween but not on the back btn:
import fl.transitions.Tween;
import fl.transitions.easing.*;
var xmlRequest:URLRequest = new URLRequest("imageData.xml");
var xmlLoader:URLLoader = new URLLoader(xmlRequest);
var imgData:XML;
var imageLoader:Loader;
var rawImage:String;
var rawH:String;
var rawW:String;
var inTween:Tween
var outTween:Tween
var imgNum:Number = 0;
var checkSec:Timer = new Timer(100);
var numberOfChildren:Number;
xmlLoader.addEventListener(Event.COMPLETE, xmlLoadedF);
btnNext.addEventListener(MouseEvent.CLICK, nextImgF);
btnBack.addEventListener(MouseEvent.CLICK, prevImgF);
btnNext.buttonMode = true;
btnBack.buttonMode = true;
function xmlLoadedF (event:Event):void{
     checkSec.start();
     checkSec.addEventListener(TimerEvent.TIMER, checkerF);
     imgData = new XML(event.target.data);
function packagedF():void{
     checkSec.removeEventListener(TimerEvent.TIMER, checkerF);
     rawImage = imgData.image[imgNum].imgURL;
     numberOfChildren = imgData.*.length();
     rawW = imgData.image[imgNum].imgW;
     rawH = imgData.image[imgNum].imgH;
     imageLoader = new Loader;
     imageLoader.load(new URLRequest(rawImage));
     master_mc.addChild(imageLoader);
     imageLoader.x = (stage.stageWidth - Number(rawW)) /1.65;
     imageLoader.y = (stage.stageHeight - Number(rawH)) /5;
     inTween = new Tween(imageLoader, "x", Regular.easeInOut, 1500, (stage.stageWidth - Number(rawW)) /1.65, 1.5, true);
     imageLoader.scaleX = .8;
     imageLoader.scaleY = .8;
function checkerF(event:TimerEvent):void {
     if (imgNum == 0) {
          packagedF();
     }else if(imgNum < numberOfChildren) {
          packagedF();
     }else{
          imgNum = 0;
          packagedF();
function nextImgF(e:MouseEvent):void {
     checkSec.addEventListener(TimerEvent.TIMER, checkerF);
     outTween = new Tween(imageLoader, "x", Regular.easeInOut, (stage.stageWidth - Number(rawW)) /1.65, -1200, 1.5, true);
     imgNum++;
function prevImgF(e:MouseEvent):void {
     checkSec.addEventListener(TimerEvent.TIMER, checkerF);
     outTween = new Tween(imageLoader, "x", Regular.easeInOut, -1200, (stage.stageWidth - Number(rawW)) /1.65, 1.5, true);
     imgNum--;
So, whats the deal here? I must be missing something like a listener or something. Not sure what. Can you pls help?
Thanks!

Similar Messages

  • How to make images fade in and out

    how to make images fade in and out continuously

    HI,
    The Ken Burns effects can do this nicely. Available in the iLife suite of software.
    iLife 06 minimum requirements:
    http://support.apple.com/kb/HT2675
    iLife 06 - Amazon
    Carolyn

  • Can I use "accesshw.zip" to make the in port and out port VIs work (for NT) for Labview 6.0.2.

    I am trying to write to the parallel port using labview 6.0.2 (vi attatched). It does not seem to be working with NT though it does with Win 98.
    The information about the software (accesshw.zip)mentions versions 4.x and 5.x only.
    Please refer to the link given below:
    http://zone.ni.com/devzone/explprog.nsf/6c163603265406328625682a006ed37d/49664743ded6f1da862564bc004e3a7f?OpenDocument
    thanks.
    Pari.

    Hi Rob,
    I cannot completely agree..... Please find attached a
    accesshw_lv6.llb. Originally it was made for LV5; now in LV6-version) This .llb contains accesshw-files for use under NT & W2k. These files work, if you store them (!! including the sub.vi's !!) into: C:\Program Files\National Instruments\LabVIEW 6\vi.lib\platform\system.llb (this should be the typical path). The "old" In Port and Out Port vi's have to be substituted. Find in addition a simple test-program for use with scope in order to test
    the execution speed / toggeling of bits.....see the scope-picture copied into diagram. In addition I strictly recommend the use of buffer-circuits in order not to destroy the mainboard-IC's by accident. If somebody needs schematics or programs rela
    ted to parallel port - example see jpeg-file please mail to: [email protected]
    regards
    wha
    Attachments:
    accesshw_lv6.llb ‏171 KB
    printer_port_test.llb ‏135 KB
    8255_diagram.jpg ‏186 KB

  • Still pictures zoom in and out

    i am trying to make a movie with all still pictures. when i play the movie each photo zooms in then out but i dont want it to do that. i want each picture to stay still

    What you see is the Ken Burns effect. See this video tutorial on how to change the way a still picture is displayed:
    http://www.apple.com/es/ilife/tutorials/#imovie-photos
    You can select the default cropping action (Fit/Crop/Ken Burns) for newly added stills to a project in the Project Properties.
    Message was edited by: Valenciano

  • I have some old slide photo and would like to put them on a disc. How do I do it?

    I have some old slide photos and would like to convert them to a slideshow how do I do it?

    Well...you have some choices. You can take the slides to a photo/camera shop and they can transfer them to a DVD. Or...you can purchase a slide veiwer like I did and while viewing slide, take its picture with a steady mounted digital camera. Then you can load them into you computer and make the slide show and then burn them to a DVD.
    Kinda complicated but it worked for me. My slide viewer was only $29 and blew the slide up to 8"x8".
    There may be a few folks on this forum who will suggest less complicated methods. I hope so.
    Luck...virg

  • Can I make a button not make a slide continue?

    Hi.
    I looked for this question, but could not find an answer, so I'm hoping I'm re-posting something already answered.  If so, I will accept my verbal chasisement.
    Anyway...
    I am attemping to create a "click and reveal' type interaction in Captivate 4 using buttons and hiding/unhiding objects. Essentially, when the user clicks button A, it will reveal image A and Caption A .  When they click button B, through the magic of multiple actions, image A and Caption A will disappear and image B and Caption B will appear....etc.  These buttons are at about 5 or so seconds into the timeline.
    Around 28 seconds into the slide timeline, I have a "Back" and "Next" button that I use for user navigation instead of using the navigation buttons on the skin.  This will pause the slide until the user clicks one of them to be navigated to the next slide or previous slide.
    The problem I am running into is that if the user "lingers" on the slide and clicks back and forth between buttons A, B, C, etc. to re-look at all the objects, clicking on any of those buttons will continue the slide which is paused by the "Back and Next" buttons at the end of the timeline.  Try as I might, I just can't make the slide pause and wait until the user actually clicks the "Next" or "Back" buttons when I click buttons A, B, and C over and over to re-look at the images and captions. 
    So is there any way to tell a button NOT to continue the slide?  I want my buttons A, B, and C to do the multiple actions i have assigned them (show and hide objects) but do NOT want them to make the slide continue at the pause implemented by my navigation buttons.
    Thoughts?
    Thanks.
    Rob

    Hi there
    Actually I do believe there is a way to make the behavior what you want. But I'll address your issue for making things known to Adobe first. Adobe has something called the "Wish Form/Bug Reporting Form" that they monitor. So you use that. (Link to that is in my sig line)
    As for the button issue, you can accomplish it using Advanced Actions. What you need to do is to manipulate the Playhead to keep it paused. One way is by configuring the variable rdcmndGotoFrame with the value rdinfoCurrentFrame. Sometimes this works to just keep the playhead paused. Other times I've tried to do it with some success by repositioning the playhead farther upstream and allowing it to "float" back to the pause point of the object. And to do this you use the variable rdcmndGotoFrameAndResume and assigning it the frame number earlier in time. Of course, to do this you must first calculate the frame number to position at. I normally did this by inserting a Text Caption configured to present the rdinfoCurrentFrame variable and manipulating the pause points using a Click Box object to arrive at the desired value.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • In and out of focus

    I downloaded from Canon HV30 (tape) to iMovie '09. Every 20 seconds or so the picture goes in and out of focus and then back to sharp again. It is a very "soft" focus change but annoying. This continues after editing and sharing to iDVD and burning.
    Could this be a problem with the camera tape not being tight, or could it be something in iMovie?

    Tape tension has nothing to do with it.
    This is a digital camera: if the tape lost tension you'd have no image at all, or a "mosaic" or "blocky" image because of missing chunks of data.
    The focus isn't related to the tape at all. It's like moments of blurry eyesight aren't caused by lack of grip on the floor of your shoes!
    It's the camera "hunting" for focus, as explained by AppleMan and Karsten. You may not see this on the camera's own built-in viewfinder monitor ..but that really is the cause.
    The tape's tension, or contact with the tape-head, is not it. If there were poor contact you'd have sporadic loss of both sound and picture ..but not a change of focus.

  • I am using IDVD to make slide shows.  The pictures are clear and of good quality.  When I burn the slide show to a disk, the pictures are blurry and of poor quality.  Is there a setting for quality of picture in burning a disk?

    I am using IDVD to make slide shows.  The pictures are clear and of high quality when viewed on my computer.  When I burn the slide show to a disk, the pictures are blury and of poor quality.  Is there a setting adjustment to correct this problem?

    I would re-post in the iDVD forum.  You are likely to get a faster answer there.  Good luck.

  • I am using using IDVD to create slide shows.  When viewed on my computer the pictures are clear and of high quality.  When I burn the slide show to a disk and play it back, the pictures are blurry and of poor quality.

    I am using IDVD to create slide shows.  When viewed on my computer, the pictures are clear and of high quality.  When I burn the slide show to a disk and play it back, the pictures are blury and of poor quality.  Is there a setting that controls the quality of the burn and if there is, where do I find it?  Thank you.

    The Mac software - iPhoto, iMovie, and iDVD are not the best with the Ken Burns effect (zoom in/out effect), so you might want to minimize that effect; also, if your subjects are wearing stripes for instance, that will have an effect if you zoom. There is better software available for slideshows; however, I do not know of any that is free (and does a good job). I've used Photo to Movie for some time; it does a fine job even in HD, but you have to pay for it. I use iDVD extensively, but only to add a menu, theme, special effects, etc. and then to burn it.

  • I am using photos . I add a camera and make my photos slide in.  How do I add a second behavior to the photo to make it slide out.  I want the photo to hold on the screen for a few seconds in between sliding in and sliding out.

    I am using photos in Motion 5.  I add a camera and make my photo slide in.  How do i add a second behavior to the photo to make it slide out?  I want the photo to hold for a few seconds in between sliding in and sliding out.  When I am trying to do this  I am not getting the photo to hold, i am making one continuous motion which I do not want.
    Thanks

    Are you using the "motion path" behavior? If so just duplicate it and drag it down the timeline to where you want it to start. Trim it to end at the end of the project. The gap you leave in the timeline between the two behaviors is your hold time. Not sure why you are using a camera unless you have a behavior on the camera.If you are using keyframes just set two keyframes at the same position values in the inspector for the hold time.

  • How do I make a slide show? I want to be able to drop in an entire folder album and not individual pictures?

    I want to make a picture slide show. How do I do it? I would like to drop an entire photo album into a slide show app?? and mke it without
    entering individual pictures.

    There are many ways to produce slide shows using iPhoto, iMovie or iDVD and some limit the number of photos you can use (iDVD has a 99 chapter (slide) limitation).
    If what you want is what I want, namely to be able to use high resolution photos (even 300 dpi tiff files), to pan and zoom individual photos, use a variety of transitions, to add and edit music or commentary, place text exactly where you want it, and to end up with a DVD that looks good on both your Mac and a TV - in other words end up with and end result that does not look like an old fashioned slide show from a projector - you may be interested in how I do it. You don't have to do it my way, but the following may be food for thought!
    Firstly you need proper software to assemble the photos, decide on the duration of each, the transitions you want to use, and how to pan and zoom individual photos where required, and add proper titles. For this I use Photo to Movie. You can read about what it can do on their website:
    http://www.lqgraphics.com/software/phototomovie.php
    (Other users here use the alternative FotoMagico:  http://www.boinx.com/fotomagico/homevspro/ which you may prefer - I have no experience with it.)
    Neither of these are freeware, but are worth the investment if you are going to do a lot of slide shows. Read about them in detail, then decide which one you feel is best suited to your needs.
    Once you have timed and arranged and manipulated the photos to your liking in Photo to Movie, it exports the file to iMovie  as a DV stream. You can add music in Photo to Movie, but I prefer doing this in iMovie where it is easier to edit. You can now further edit the slide show in iMovie just as you would a movie, including adding other video clips, then send it to iDVD 7, or Toast,  for burning.
    You will be pleasantly surprised at how professional the results can be!
    To simply create a slide show in iDVD 7 onwards from images in iPhoto or stored in other places on your hard disk or a connected server, look here:
    http://support.apple.com/kb/HT1089

  • How can I make a tent with two halves of the info ( and pictures one direction and the other half the opposite direction ( towards each other of course)

    How can I make a table tent in PAGES with both halves of the info and pictures turned towards each other?  I can figure out how to turn just the picture upside down  AND the text sideways, but not upside down with the picture included so that it is at the top and not the bottom! 

    Layout the picture and text (in text boxes) the way you want them in the lower half of the page. Then Select All and Group them. With the Group selected, type Cmnd+D to duplicate it and then hold down the Shift and Command keys and grab a corner box (you’ll see a double headed arrow) and rotate the box until it’s upside down. (Holding down the Shift key will constrain the rotation to 45 and 90 degree positions.) Now drag the box into position in the top half of the page.
    Walt

  • The bookmarks sidebar keeps popping in and out and I can't get it to stop. I have gone to "View" and tried to hide it but no luck. Any suggestions?

    The bookmarks sidebar keeps popping in and out. This shifts the screen making it hard to read or write anything. I have gone to "View" but am unable to stop it. The firefox questions don't address this issue.

    Did you check if there were extensions installed in that new profile?<br />
    Some programs install extensions globally and appear automatically in a new profile.
    Do a clean (re-)install:
    * Download a fresh Firefox copy and save the file to the desktop.
    * http://www.mozilla.com/firefox/all.html
    * Uninstall your current Firefox version and remove the Firefox program folder before installing that copy of the Firefox installer.
    * Don't remove personal data if you uninstall the current version.
    * It is important to delete the Firefox program folder to remove all the files and make sure that there are no problems with files that were leftover after uninstalling.
    Do a malware check with some malware scanning programs.<br />
    You need to scan with all programs because each program detects different malware.<br />
    Make sure that you update each program to get the latest version of their databases before doing a scan.<br />
    * http://www.malwarebytes.org/mbam.php - Malwarebytes' Anti-Malware
    * http://www.superantispyware.com/ - SuperAntispyware
    * http://www.microsoft.com/windows/products/winfamily/defender/default.mspx - Windows Defender: Home Page
    * http://www.safer-networking.org/en/index.html - Spybot Search & Destroy
    * http://www.lavasoft.com/products/ad_aware_free.php - Ad-Aware Free
    See also:
    * "Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked

  • Setting in and out points in list view.

    I am in list view.  I am showing several favorited clips from one video.  Say I am playing back the third favorited range and I want to select in and out points for that favorited range.  The video is playing and I hit i.  I am immediately jumped from the favorited range I have selected to the first favorited clip in the list.  When I click back on the clip I was setting the in point for I find that it has set the in point where I wanted.  The entrire process then repeats when I try to select the out point.  Set out point.  Jumps up to first clip.  Click back on original clip to get to my out point.
    This is very frustrating and makes using favorites and list view a huge waste of time.  Can anyone help?

    That should not happen.  Before anythign else, do these two things.
    1- Go into the "Final Cut Pro" menu, "Command", and be sure "Default" is checked.   Quit out of FCP X.
    2- Open System Preferences (Apple menu), Keyboard, Keyboard Shortcuts.  Click the "Restore Defaults" option.  The issue here is OS shortcuts will override app shortcuts.
    3- Launch FCP X and try again.  If that doesn't fix it...
    4- Download the free app "Preference Manager" from  Digital Rebellion (dot com) and use it to delete the FCP X pref files.
    After you've done all of these, report back and let us know what's up.

  • I can't find the View Tab to Zoom in and out! My font got so small and I don't know how to enlarge it without zoom!!

    My font on the facebook page has suddenly gotten very SMALL. In the past when this happened in Firefox, I simply went up to the bar and clicked on VIEW and then ZOOMED in or out. NOW there are NONE of the old wanted and loved tabs at the top of the new horrible page. WHERE is the VIEW tab or the ZOOM in and ZOOM out tab??

    Usually you have either the orange Firefox button or the classic menu bar, but not both at the same time.
    You should be able to switch back and forth this way:
    If the classic menu bar is not displayed, tap the Alt key to display it and then use
    View > Toolbars > Menu Bar
    to make it persistent. It should replace the orange Firefox button. To switch back, uncheck
    View > Toolbars > Menu Bar
    Does that work??
    Also, you can zoom by holding the Ctrl key and scrolling your mouse wheel. This is a finder adjustment, but can be harder to control.

Maybe you are looking for

  • How to use Titles in iMovie?

    When i add closing titles to my project, i have terrible problems aligning the font. For instance, if i want top part to be left justified with a tab space (traditional format for lisiting an actor and their name) but then have the text below centred

  • Microsoft office is unavaliable.

    I continue to recieve this message every single time I try to open microsoft office 2013. "The connection to microsoft office Exchange is unavailable. Outlook must be online or connected to complete this action."<input id="mac_address" type="hidden"

  • BB Desktop Manager v4.7 error

    I recently downloaded v4.7 for the desktop and was having issues so I removed it from my computer. I tried to reinstall but it won't let me. I am no longer getting the error code for the .msi file to be located, but I am now getting that "the wizard

  • Imac force display resolution

    Hi, I'm trying to send video to a CRT TV. I currently do it through an HDMI to S-Video adaptor but, no matter what video setting I use on the iMac, it is always out of proportion i.e. too narrow in width versus height. Is there a way to force the iMa

  • Is there a way to use more than one column in sorting?

    I'm sorting my CDs by "Grouping", thus I have all my Christmas CDs together, all my Pop, all my Dance, etc. Only problem is that within those groupings the CDs aren't listed alphabetically. I'd like to have, for example, all my Christmas CDs grouped