Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

63 users online



AS: always staying a certain distance away?

AS: always staying a certain distance away?

Currently viewing this thread: 1 (0 members and 1 guests)


Page 2 out of 2
devonair

devonair

Neverside Newbie
Status: Offline!

That's the one! Good book. He calls the expanding box thing a zero energy system (as the overall width of all the boxes put together never changes)..

Here's the script I updated from MX to MX 2004 - now, you'll just have to downdate it to F5.. lol..

PHP:

<?php
//width you want each box to be
var baseSize:Number 150;
// play around with these 2.
var damping:Number .6;
var 
easeSpeed:Number .2;
// number of boxes on stage..
var maxNo:Number 3;
// number pixels between each box.
var bufferSpace:Number 2;
for (var 
0maxNoi++) {
    var 
box:MovieClip this["box" "_mc"];
    
box.speed 0;
    
box.num i;
    
box.maxNo maxNo;
    
box.boost 60;
    
box.antiboost = (box.boost * -1) / (maxNo 1);
    
box.useHandCursor false;
    
box.onRollOver = function() {
        
this.onEnterFrame = function() {
            for (var 
0this.maxNoi++) {
                if (
== this.num) {
                    
this.speed += this.boost;
                } else {
                    
this._parent["box" "_mc"].speed += this.antiboost;
                }
            }
        };
    };
    
box.onRollOut = function() {
        
delete this.onEnterFrame;
    };
}
onEnterFrame = function () {
    for (var 
0maxNoi++) {
        var 
box:MovieClip this["box" "_mc"];
        
box.speed box.speed damping + (baseSize box._width) * easeSpeed;
        
box._width += box.speed;
        if (
0) {
            
box._x this["box" + (1) + "_mc"]._x this["box" + (1) + "_mc"]._width bufferSpace;
        }
    }
};
?>

By the way (inappropriate place, I know, but since I'm typing..), just saw your post in marketplace and thought I'd say if you ever need freelance flash work done, please keep me in mind (http://www.onebyonedesign.com). Unfortunately, my little gig with the US Navy prevents me from making a larger commitment than occasional freelancer, but just something to keep in the back of your mind.

d.

___________________

obod | weapons of mass dysfunction

jadedchron

jadedchron

Neverside Newbie
Status: Offline!

Devon,

Thanks. I actually made use of the zip you sent above. It works pretty well. It definitely needs some tweaking, such as having the boxes expand to a certain height and so forth.

As far as the free lance thing, I'll keep that in mind as I might need dedicated flash design from time to time (I haven't touched Flash in a long time).

Back to the drawing board! Smile

___________________

Nick
Pixel-Infinity

Page 2 out of 2
Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0083 seconds.