dcsimg
A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Back & Forth image scroll

  1. #1
    Junior Member
    Join Date
    Mar 2007
    Posts
    4

    Back & Forth image scroll

    Hello
    I am a 3d artist i work with 3Dmax and Vray to produce photorealistic renderings
    i was looking for a way to show some images with a scroller but i did not want the typical one and i stumbled into this one > www.thevillas.co.uk < please see the image gallery section

    the scroller helps to view a single image back and forth as if the camera was panning, so i thought it was really great to show 3D renderings this way

    now, after working on it for some hours on flash (im totally newbie) i cannot figure it out, a friend told me i would need a simple script, and i know absolutely nothing about scripting, so i was wondering if someone out there could be so kind to show me how i can achieve this panning/scrolling effect or if the script is simple maybe i can find someone sharing it somewhere

    ive found scripts in the FlashKit archive for scrolling and just pasted them onto the instance and they work, but they only go one way and i cannot figure out how to make it return the other way

    so if anyone could help out thanks

    mauOne

  2. #2
    Junior Member
    Join Date
    Mar 2007
    Posts
    4
    is this the wrong topic area to post this question?
    shoulf i post in flashMX?

    thanks

  3. #3
    Senior Member
    Join Date
    Sep 2004
    Location
    Columbia, MD
    Posts
    206
    There is a similar effect in another thread: http://board.flashkit.com/board/showthread.php?t=726015


    I posted this sample (attached) which can be adapted to your needs.
    Attached Files Attached Files

  4. #4
    Junior Member
    Join Date
    Mar 2007
    Posts
    4
    hello bfuzz

    thanks so much for replying, i appreciate it
    i cannot open the file you sent, do you think its because of Flash versions?
    i am on MX v.7

    do you think that the effect i am looking for is only achievable by scripting?
    i only know how to use flash as a time line animation, like i do on MAX, do you think theres a way i could go that way? or should i just ry and keep looking for a script?

    thanks again

    mauOne

  5. #5
    Senior Member
    Join Date
    Sep 2004
    Location
    Columbia, MD
    Posts
    206
    There isn't a great deal of scripting and it is pretty straight forward. Here I resaved as MX 2004. Try opening.
    Attached Files Attached Files

  6. #6
    Senior Member
    Join Date
    Sep 2004
    Location
    Columbia, MD
    Posts
    206
    Actually this is the only script used:
    Code:
    btn.onPress = function() {
    	startDrag(this, false, 124, 156, 426, 156);
    	Mouse.addListener(mouseListener);
     };
    btn.onRelease = function() { 
     	stopDrag();
    	Mouse.removeListener(mouseListener);
    };
    var mouseListener = new Object();
    mouseListener.onMouseMove = function()	{
    	trace("MC: "+mc._x);
    	trace("Mouse: "+_xmouse)
    	if (_xmouse > _global.lastPost)	{
    		mc._x = mc._x - 2;
    	}
    	else {
    		mc._x = mc._x + 2;
    	}
    	_global.lastPost = _xmouse;
    }

  7. #7
    Senior Member
    Join Date
    Sep 2004
    Location
    Columbia, MD
    Posts
    206
    THe image didn't make it through the wash (nothing attached).

    It sounds like you just need a motion tween, no script needed. Put the image on the stage in a starting position. Select another point on the timeline (same layer) press F6 to add another keyframe. Move image to end position. Right click on the timeline somewhere in between the start and end keyframes and select create motion tween. Flash will automatically tween the image from start position to end position.

    I've attached a different sample. It uses buttons to pan the image, but should be easy to alter for your needs.

    Let me know if I can be of further assistance.
    Attached Files Attached Files

  8. #8
    Junior Member
    Join Date
    Mar 2007
    Posts
    4
    Bfuzz you are the man!
    thanks so much, it actually was much easyer to do it with the motion tween, i'm playing around with it now
    the forum here says i cannot send you an email, i'd like to show it to you when im done but i cannot attach in simple messages

    thanks a bunch!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center