all groups > flash (macromedia) > november 2004 >
You're in the

flash (macromedia)

group:

Continuously scrolling images randomly picked from the library


Continuously scrolling images randomly picked from the library Ney_André_de_Mello_Zunino
11/19/2004 7:42:41 PM
flash (macromedia):
Hello.

I posted a message yesterday where I described a horizontal bar on which
I am working. It is 800px wide and I wish to have a series of thirty or
so 200px-wide images continuosly scrolling over it (FWIW, from left to
right). The images have all been imported into the library and are
supposed to be randomly selected.

+---------------------------------------------------------------+
| (a) | (b) | (c) | (d) |
| | | | |
| | | | |
+---------------------------------------------------------------+

---------------------------------------------------------------->
------------- images should flow in this direction ------------->
---------------------------------------------------------------->

So, at first there will be four images covering regions a, b, c and d.
As the movie starts to play, they begin to scroll right and out of the
scene. At that time, a new image must be selected from the library to
fill in the space left behind by the first image, which is now moving right.

My basic idea is to have five (six, maybe) 200px image "placeholders".
At first, the last four of them are visible and the first one is out of
the scene, to the left. The script then has to randomly pick 5 images
out of the library and put them in the placeholders. As the movie
begins, the images will scroll right so that the last placeholder will
go out of the scene and the first one will come in. At that moment, the
script would move the last placeholder to the front of the first one and
load a new random image into it.

Hum, does that make sense? Could it work? Is there an easier way which
would still observe the requisites I described? Supposing that I could
indeed do it the way I described, could anyone help me get started with
(I do not need help with programming itself; I am more interested in
understanding the object model):

1) Defining the what-I-called image placeholders or, in other words,
some kind of object which can have its image source dinamically replaced.
2) Selecting a random image from the library.
3) Making all the "placeholders" scroll.

I hope I was able to make my intent clear. Also, I apologize if some of
my questions are rather naive, but I am new to Flash.

Thank you very much,

--
Re: Continuously scrolling images randomly picked from the library Ney_André_de_Mello_Zunino
11/19/2004 9:57:04 PM
[quoted text, click to view]

Thank you for your response and for the suggested file. Unfortunately, I
wasn't able to open it; Flash MX 2004 gives me an "unexpected file
format" error. Do you have that yourself or do you know any other source?

Regards,

--
Re: Continuously scrolling images randomly picked from the library NSurveyor
11/19/2004 11:15:12 PM
Think outside the box. All of the placeholders can easily be made, and motion
tweened fairly easily. And the script isn't that bad.
http://geocities.com/saif7463/PictureScrolling.fla Use this file. It has
everything made. All you have to do is add your pictures to the library, but
make them all into MC's. Then right-click on each one, and go to Linkage. Check
off, the checkbox, Export for Action Script, and then put in an ID NAME (the id
names should be sequential, starting with image1 to image2 to image 3....) And
on the first Frame of the Actions layers, change the totalPictures = 0 to the
number of pictures you have in the library.
AddThis Social Bookmark Button