Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Moving "filmstrip" that moves 6 pictures left to right in a continuous loop.

Posted on 2007-11-21
5
Medium Priority
?
489 Views
Last Modified: 2008-05-13
I want to create a continuous loop of 6 pictures (pic1, pic2, etc.)moving left to right so that as picture 6 moves off screen to the right, it appears to the left of picture 1 and the whole thing just keeps on going like that.
Is there a way to do that with code or something so that all you need is the six pictures, no duplicates off mask to the left or right?
Eventually I would like to have maybe a dozen or more pictures, and have that effect where if you mouse over to the right, the strip moves faster and if you mouse over to the left it switches direction.
(I only mention that now in case there's a way to answer my initial question that would set me up to accomodate the more sophisticated technique later).

Thanks!
John
0
Comment
Question by:gabrielPennyback
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 1

Author Comment

by:gabrielPennyback
ID: 20341335
Here's a link to the flash file: http://www.designamania.com/MichaelTekstra/textra_beta3f.fla 
Please take a look and let me know how to achieve the automatic scrolling of the pictures.

Thanks,
John
0
 

Expert Comment

by:Brakers
ID: 20356029
this site has really gone down. Good luck with your question I m still waiting for an answer to mine and I m not impressed
0
 
LVL 18

Accepted Solution

by:
Antonio Estrada earned 2000 total points
ID: 20363125
Here's something I made really quick... it's not exactly perfect but it can give you an idea on where to go if you want to push it further; otherwise, it's useful as it is.

<code snippet>

Brakers: Can you post a link to your question?, we might have overlooked it.

-V
var Filmstrip:MovieClip;
Filmstrip = new MovieClip();
Filmstrip.Elements = "MyPic1,MyPic2,MyPic3,MyPic4,MyPic5,MyPic6,MyPic7,MyPic8";
Filmstrip.Holder = _root;
Filmstrip.Holder.Width = 550;
Filmstrip.Holder.Height = 400;
Filmstrip.yPos = 75;
 
startUp();
 
function startUp():Void {
	Filmstrip.movieArray = Filmstrip.Elements.split(",");
	Filmstrip.Speed = -1;
	Filmstrip.xPos = 0;
	Filmstrip.firstShown = 0;
	for(i=0;i<=Filmstrip.movieArray.length;i++) {
		i!=0?temp = eval("Filmstrip.Holder.Picture"+(i-1)+"._width")+50:temp = 0;
		Filmstrip.xPos += temp;
		Filmstrip.lastShown = i-1;
		Filmstrip.xPos>Filmstrip.Holder.Width+100?i=Filmstrip.movieArray.length+1:false;
		Filmstrip.Holder.attachMovie(Filmstrip.movieArray[i],"Picture"+i,Filmstrip.Holder.getNextHighestDepth(),{_x:Filmstrip.xPos,_y:Filmstrip.yPos});		
	}
}
 
Filmstrip.Holder.onEnterFrame = function() {
	for(i=0;i<=Filmstrip.movieArray.length;i++) {
		currentPicture = eval("Filmstrip.Holder.Picture"+i);
		currentPicture._x += Filmstrip.Speed;
		if(currentPicture._x<(currentPicture._width*-1)) {
			Filmstrip.lastShown>=Filmstrip.movieArray.length-1?Filmstrip.lastShown=-1:false;
			k = Filmstrip.lastShown+1;
			Filmstrip.lastShown++;
			Filmstrip.firstShown++;
			Filmstrip.Holder.attachMovie(Filmstrip.movieArray[k],"Picture"+k,Filmstrip.Holder.getNextHighestDepth(),{_x:Filmstrip.Holder.Width,_y:Filmstrip.yPos});
			removeMovieClip(currentPicture);
		}
		if(currentPicture._x>(Filmstrip.Holder.Width)) {
			Filmstrip.firstShown<=0?Filmstrip.firstShown=Filmstrip.movieArray.length:false;			
			k = Filmstrip.firstShown-1;
			Filmstrip.firstShown--;
			Filmstrip.lastShown--;
			Filmstrip.Holder.attachMovie(Filmstrip.movieArray[k],"Picture"+k,Filmstrip.Holder.getNextHighestDepth(),{_x:(currentPicture._width)*-1,_y:Filmstrip.yPos});
			removeMovieClip(currentPicture);
		}
	}
	if(_xmouse>(Filmstrip.Holder.Width-200)) {
		Filmstrip.Speed = -5;
	} else if(_xmouse<(Filmstrip.Holder.Width-Filmstrip.Holder.Width+200)) {
		Filmstrip.Speed = +5;
	} else {
		Filmstrip.Speed = 0;
	}
}

Open in new window

0
 
LVL 18

Expert Comment

by:Antonio Estrada
ID: 20363131
I also uploaded the swf file so you can take a look at how it works:

http://evilrealm.polygonized.com/FilmStrip.swf

Hope this helps.

-V
0
 

Expert Comment

by:Brakers
ID: 20363153
nope
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…

664 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question