Welcome, Guest. Please login or register.
Did you miss your activation email?
02/08/12, 08:31
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  General
| |-+  Flash 8 (Moderators: Jorge Solis, ..:: Mazhar Hasan ::.., Andresss)
| | |-+  how to scroll fotos
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: how to scroll fotos  (Read 1101 times)
Susanna
Server what's that
*
Posts: 23


View Profile Email
« on: 09/30/09, 14:45 »

hi there..
can anyone help me? i have to make a vertikal foto scroll...
like a text. but the fotos have to be clickable (buttons) and a big foto has to appear...
i have no idea how to do this...

thanks susanna
Logged
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6162


View Profile WWW Email
« Reply #1 on: 09/30/09, 22:59 »

you can load fotos just like movieclips.
For flash basicly ther is no difference.
A movieclip can fetch click events by default - ju just need to assign a function to the according event attribute.
The scroll itself needs some coding - but it is only the variation of the x attribute (in flash 8 it is _x) which does the move.
Use LoadMovie("yourPic.jpg") for loading the images.
To keep it organized, I would read them into an array, so you have an array of movieclips, which is easyly walked through to move the images around.
Logged

happy flashing
Cool
Ronald
Susanna
Server what's that
*
Posts: 23


View Profile Email
« Reply #2 on: 10/01/09, 06:14 »

hmm sounds good but i'm afraid that my knowledge is too basic to be able to do this.. for example i don't have an idea how to put the images in an array... and don't know which code to use to get the pictures scrolled..
Logged
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6162


View Profile WWW Email
« Reply #3 on: 10/01/09, 07:05 »

Hi Susanna,
an array is one of the most important construct in any programming language - so you should be looking at it.
Anyway, the pictures themself have to reside in a movieclip.
Depending on how many pictures you want to have on stage at once, you need the containing movieclips, or loader components.

You create either an array, or an XML-Structure for storing the picture names, paths etc.

If the reside all in the same path, it is easy, because you only need the filenames then.
Code:
picList=Array("filename1.jpg","filename2.jpg","filename3.jpg"); // as many you like
so far the array.
Now you assign the filenames to the loaders - or at least as many as can be displayed at once.
If you want to shift to the left, you move the second picture to the first loader, the third to the second etc.
If you want a more smooth move, just make the loaders x-coordinate chnage, until they overlay in position, and then do the move of the pics.
Logged

happy flashing
Cool
Ronald
Susanna
Server what's that
*
Posts: 23


View Profile Email
« Reply #4 on: 10/20/09, 12:20 »

hmmm... can u recommend a book for those things?
i got the basic one (i think u will know it) it*s called: flash 8, das offizielle trainingsbuch, of James English.
do u know if there is a second addition???
i think it would be easier for me if i found some examples...
i*m afraid that my professional english in this sector is not good enough to understand everything of what u are talking about.
Logged
Pages: [1] Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
anything