# Random Moving Scaleable Vectors

**URL:** <https://forum.kirupa.com/t/random-moving-scaleable-vectors/261244>\
**Category:** flash\
**Created:** [May 24, 2008, 8:42pm UTC](https://forum.kirupa.com/t/random-moving-scaleable-vectors/261244 "2008-05-24T20:42:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![warw1ck](https://avatars.discourse-cdn.com/v4/letter/w/3ab097/32.png) [@warw1ck](https://forum.kirupa.com/u/warw1ck)\
**Post date:** [May 24, 2008, 8:42pm UTC](https://forum.kirupa.com/t/random-moving-scaleable-vectors/261244/1 "2008-05-24T20:42:04Z")

</div>

Ive been attempting a particular effect one can see on a variety of sites; the best of which can be seen here: [http://www.reschio.com/enter.html](http://www.reschio.com/enter.html)

I, on the other hand, have attempted to create a flowing “sea” of a similar dynamic; however, I have been using the time line and stage for orchestration using wave shaped vectors of different sizes and opacities. I find it is too complex and a nuisance to maintain - and well it flat out just doesn’t work as nicely. So, I have turned to AS.

But, given my infantile knowledge of AS I draw a blank on how to call these vectors randomly each with its own randomly assigned speed (x\_coord), and each with its own exit speeds (\_alpha goes to 0). I havent the slightest clue where to go with this and would appreciate some idea as to how to assemble a vector that can populate the stage randomly as in the above example. Thanks.

---

<div class="post-metadata">

**Author:** ![warw1ck](https://avatars.discourse-cdn.com/v4/letter/w/3ab097/32.png) [@warw1ck](https://forum.kirupa.com/u/warw1ck)\
**Post date:** [May 24, 2008, 9:35pm UTC](https://forum.kirupa.com/t/random-moving-scaleable-vectors/261244/2 "2008-05-24T21:35:01Z")

</div>

Ive spent a little time constructing the following plan of design for what I see needs to be addressed in code. I should be a little more specific in mentioning that my trouble with designing this really comes from figuring out how to assign randomness to each of the following via AS:

(Stage Size: 1280 x 800)

Object size:  
• Width: Scaleable within parameter constraint/cannont exceed 1/2 of stage (640px)  
• Height: Fixed at 800

Object Movement On Axis:  
• X-axis: Movement of object is arbitrary and random in + or - direction  
• Y-axis: No movement/static

Object Placement:  
Object placement at starting points along x-axis is random given stage dimension constraints

Object Speed:  
Speed of object along x-axis is random/variable, but within a specific range of speeds +/- 10 to 15

Initial Object Opacity:  
Introductory Object Opacity is fixed at maximum value: 100% \_alpha

Object Opacity Dissipation:  
Across life of Object Movement On Axis Alpha fades to 0%

Certainly there must be an efficient way of handling all this that I am overlooking.
