Click to See Complete Forum and Search --> : Random element display

01-23-2002, 10:27 AM
I have 84 elements (all logos in .jpg format), and I would like to have them show fading up in 1 second, then hiding in 1 second, then the next element and so on. Easy enough, but to do this for all 84 elements means creating 168 actions, which are all the same, albeit for different elements. Is there any way I can tell the program to select an element from random, and display it at a random place on the screen, following the show and hide conventions I require?

Thanks in advance from a newbie to Flash.

[Edited by Kevinede on 01-23-2002 at 10:37 AM]

01-23-2002, 04:39 PM
Get a random number(1 more than as many images you have)and assign it to a varible(x,y,123,whatever you want to call it). Then use an "if" command to set your properties. Set the opacity for one element for each number at 100%,all the rest set to 0%. The element at 100% should then contain an 'x' and 'y' "set property" for position, set these at a random number with a maximum value as large as your movie. Do this for all of your images and let it go.

Here is a working version with 3 images:

If you would like to see the movie file(probably a lot less confusing than my description), email me using the email form at the bottom of this post, and I will send a zip containing the movie and the images I used.


[Edited by zoranvedek on 01-23-2002 at 03:48 PM]

01-24-2002, 07:46 AM
Thanks for your help Jason.

I have now got the files in, but I think I am pushing the boundaries of what this app can do.

When I used the show option before, I did not use an action form, I simply created a Show Event, which scaled up the image over a period of 1 second. I then used a Hide Event, which faded out the image over a period of 1 second.

Have you any idea how I can incorporate this into the system? I have been unable to find any way of doing this.


01-29-2002, 04:59 PM

1. Highlight all items that you wish to display.
select the first one and then press shift click on the last one.
2. Then add a show items and select 1 second delay between each item.
3. do step 1 again.
4. Then add a hide items with a 1 second delay between items.
5. Then add a delay to the hide items of 1 second.

This will then show all items 1 second after each other.

Hope this makes sense.

If you need an example let me know.
email = freeflash@members.optusnet.com.au


01-29-2002, 11:00 PM
The new release contains JAVASCRIPT functionality that can handle this sort of logic. We are working to make it available within the week.

Thanks for your support


01-30-2002, 12:32 PM
Thanks for the type a_non_amouse.

Unfortunately it does not quite do what I wanted, but thanks for the advice. When I selected all the items and added a show, it shows them all one after another with 1 second intervals as you said, but what I wanted was when the first item is show using a transition, that the same element is then hidden using a transition immediately after it had completed it's show transition.

Element03 etc...
(Imagine 84 elements listed above)
Wait 0
Show Element01 using Scale Up Transition over a period of 1 second, scale up from 0,0 , fade up from 0%.
Wait 0
Hide Element01 using Fade Out Transition over a period of 1 second, fade down to 0%.
Wait 0
Show Element02 using Scale Up Transition over a period of 1 second, scale up from 0,0 , fade up from 0%.
Wait 0
Hide Element02 using Fade Out Transition over a period of 1 second, fade down to 0%.
Wait 0

As dkerr has said, the new version they are trying to get out in the next few days will do it in javascript, but I do not know javascript, so I still don't have a solution!



01-30-2002, 04:44 PM

you didn't follow the rest of the instructions.

give me your email address and I will send you a working test movie.

my email = freeflash@members.optusnet.com.au