A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: AS in image scroll

Threaded View

  1. #1
    Junior Member
    Join Date
    Sep 2005
    Posts
    15

    AS in image scroll

    Attached is a sample of the template I purchased ... it is for a horizontal image scroll.

    It appears that the only code used to scroll the image conveyor is as follows:

    Code:
    onClipEvent (load) {
    	_root.move = true;
    	_root.speedX = 1.5;
    }
    onClipEvent (enterFrame) {
    	if (_root.move == true) {
    		if (this._x > 650) {
    			this._x -=  645;
    		} else if (this._x < 0) {
    			this._x +=  645;
    		}
    		this._x +=  _root.speedX;
    	}
    }
    Again, you can look at the zipped attachment calle l_scroll.zip ... it will show you how they implemented the project.

    Here is my question ... When I tried to add this code to a new image conveyor in my project I can't get the images to loop. It moves, but does not start in the correct location or loop around.

    I "understand" that I don't "understand" AS all that well. Can someone explain the code to me so that I might be able to first, learn something and second, implement it in my project.

    Just some notes: My projects width is 800 and I am using many more images so my conveyor is much longer.

    Thanks for any help ... also, if you need me to clarify anything please let me know.
    Attached Files Attached Files

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