SwishTalk.com
 

Go Back   SwishTalk.com > .:: THE HELP DESK ::. > » SWiSH Max2 General Help

Reply
 
Thread Tools Display Modes
#1   Randomly generating Swirls, Curls or Twills  
 
softhunterdevil's Avatar

Name: 
softhunterdevil
Status: Offline
Rank: /\._,.-*"*-.,_./\
Posts: 5
Old 12-07-2007, 12:49 PM Reply With Quote


I want my flash to show a kind of randomly generating swirls forming and moving around with trails and then slowly vanishing in space.
Or like curly branches generating from one another and slowly the parent branch will vanish.

Like Vista Ribbon Screensaver or like ...

How is this possible ???




               
__________________
Quote:
s@fthun-|-3rde^V^1L
 
View Public Profile Send a private message to softhunterdevil Find all posts by softhunterdevil Add softhunterdevil to Your Contacts
#2   string  
 
cycle1500's Avatar

Name: 
cycle1500
Status: Offline
Rank: Oberlin, Ohio, USA
Posts: 1,496
Mood: MEAN: Do's not play well
Old 12-08-2007, 06:17 AM Reply With Quote


This can be done with some little or a lot of scripting depending on what effect you want.
Below are a few examples of what can be done.
If you want more come on over to my sight.
Sign up and check out several different things.
These files are Max1 but will work ok in Max2.


Wayne


Attached Files
File Type: swi trail2.swi (2.7 KB, 66 views)
File Type: swi tail.swi (3.6 KB, 54 views)
File Type: swi flower12[1].swi (4.7 KB, 70 views)
               
__________________
The Hairy One
Wayne helps those that helps themselves.
 
View Public Profile Send a private message to cycle1500 Find all posts by cycle1500 Add cycle1500 to Your Contacts
#3   teach  
 
cycle1500's Avatar

Name: 
cycle1500
Status: Offline
Rank: Oberlin, Ohio, USA
Posts: 1,496
Mood: MEAN: Do's not play well
Old 12-09-2007, 07:03 AM Reply With Quote


Here is a fractureal.

Code:
 onFrame (1) {
    stop ();
Stage.scaleMode = "noScale";
Stage.align = "TL";
MovieClip.prototype.unplay = function (){
    this.onEnterFrame = function (){
        this.prevFrame();
        if (this._currentframe == 1){
            delete this.onEnterFrame;
        } 
    };
};
createEmptyMovieClip("lines_mc", 500);
lines_mc._x = 50;
lines_mc._y = 70;
onEnterFrame = function (){//change onEnterFrame to a mc button so when clicked it regenerates.
    for (var _loc2 = 0; _loc2 < 180; ++_loc2){
        removeMovieClip (_root["lines_mc" + _loc2]);
    }
    _root.lines_mc.clear();
    _root.lines_mc.lineStyle(1, 13369344, 100);
    _root.lines_mc.moveTo(Math.random() * 100, Math.random() * 150);
    _root.lines_mc.curveTo(Math.random() * 100, Math.random() * 150, Math.random() * 100, Math.random() * 150);
    _root.lines_mc.curveTo(Math.random() * 100, Math.random() * 150, Math.random() * 100, Math.random() * 150);
    _root.lines_mc.curveTo(Math.random() * 100, Math.random() * 150, Math.random() * 100, Math.random() * 150);
    var _loc3 = new flash.filters.GlowFilter(13369344, 5.000000E-001, 5, 5, 2, 3);
    _loc3.quality = 1;
    for (var _loc2 = 0; _loc2 < 180; ++_loc2){
        duplicateMovieClip("lines_mc", "lines_mc" + _loc2, _loc2);
        _root["lines_mc" + _loc2]._rotation = _loc2;
        _root["lines_mc" + _loc2]._x = 50 + _loc2 * 2;
        _root["lines_mc" + _loc2]._y = 70 + _loc2 * 2;
        _root["lines_mc" + _loc2]._alpha = 20;
        _root["lines_mc" + _loc2].filters = [_loc3];
    } 
};

}
:drunk:

Wayne




               
__________________
The Hairy One
Wayne helps those that helps themselves.
 
View Public Profile Send a private message to cycle1500 Find all posts by cycle1500 Add cycle1500 to Your Contacts
#4   Thanks  
 
softhunterdevil's Avatar

Name: 
softhunterdevil
Status: Offline
Rank: /\._,.-*"*-.,_./\
Posts: 5
Old 12-09-2007, 08:39 AM Reply With Quote


The last one is which I wanted ...

But it is tottaly random ... I want it to kind of change position and slowly fade/ or move from one position to another rather than generation of fractal every step.


               
__________________
Quote:
s@fthun-|-3rde^V^1L
 
View Public Profile Send a private message to softhunterdevil Find all posts by softhunterdevil Add softhunterdevil to Your Contacts
#5   files  
 
cycle1500's Avatar

Name: 
cycle1500
Status: Offline
Rank: Oberlin, Ohio, USA
Posts: 1,496
Mood: MEAN: Do's not play well
Old 12-12-2007, 07:46 AM Reply With Quote


Code:
 onFrame(1) {
setProperty("", _quality, "low");
this.createEmptyMovieClip("mc", 1);
c = 0;
mc.onEnterFrame = function (){
    this.createEmptyMovieClip("i" + c, c + 10);
    with (this["i" + c]){
        _x = 150;
        _y = 150;
        _rotation = 360 * Math.sin(c / 103);
        a = 100 + 200 * Math.sin(c / 19);
        r = 50 + 50 * -Math.sin(c / 11);
        lineStyle(0, 0xFF9944, 100);
        moveTo(0, -r);
        curveTo(a, -r, r, 0);
        curveTo(r, a, 0, r);
        curveTo(-a, r, -r, 0);
        curveTo(-r, -a, 0, -r);
    }
    this["i" + c].onEnterFrame = function (){
        var _loc1 = this;
        _loc1._alpha = _loc1._alpha - 2.000000E-001 * _loc1._alpha;
        if (_loc1._alpha <= 1){
            _loc1.removeMovieClip();
        } 
    };
    ++c;
};
}
Pure scripting play around with this to fine tune for what you want.

This next one is set up with 2 sprites and drawline verry simple.
See file attached.


Wayne


Attached Files
File Type: swi fract._1.swi (4.0 KB, 47 views)
               
__________________
The Hairy One
Wayne helps those that helps themselves.
 
View Public Profile Send a private message to cycle1500 Find all posts by cycle1500 Add cycle1500 to Your Contacts
#6    
 
pedromau's Avatar

Name: 
pedromau
Status: Offline
Rank: \m/ [ºº] \m/
Posts: 1,537
Mood: weird?!
Old 12-12-2007, 08:25 AM Reply With Quote


heyz wayne...
max2?!



The script doesn't work in max1


               
__________________
pEdRomAU
-------------------------------
http://www.theswishdock.com THE SWISHDOCK - Swishmax files from $1!!!
http://www.statiks.net
http://www.kneeldown.net
 
View Public Profile Send a private message to pedromau Visit pedromau's homepage! Find all posts by pedromau Add pedromau to Your Contacts
#7   move  
 
cycle1500's Avatar

Name: 
cycle1500
Status: Offline
Rank: Oberlin, Ohio, USA
Posts: 1,496
Mood: MEAN: Do's not play well
Old 12-12-2007, 09:56 AM Reply With Quote


The above file is Max2 the script is written in Max2 also.
The one below is Max1.


Wayne


Attached Files
File Type: swi frac_max1.swi (5.2 KB, 55 views)
               
__________________
The Hairy One
Wayne helps those that helps themselves.

Last edited by cycle1500; 12-12-2007 at 10:02 AM..
 
View Public Profile Send a private message to cycle1500 Find all posts by cycle1500 Add cycle1500 to Your Contacts
#8    
 
pedromau's Avatar

Name: 
pedromau
Status: Offline
Rank: \m/ [ºº] \m/
Posts: 1,537
Mood: weird?!
Old 12-12-2007, 10:14 AM Reply With Quote


Looks awsome!
Your scripts are great!


               
__________________
pEdRomAU
-------------------------------
http://www.theswishdock.com THE SWISHDOCK - Swishmax files from $1!!!
http://www.statiks.net
http://www.kneeldown.net
 
View Public Profile Send a private message to pedromau Visit pedromau's homepage! Find all posts by pedromau Add pedromau to Your Contacts
#9    
 
entranced's Avatar

Name: 
entranced
Status: Offline
Rank: Constant newbie
Posts: 518
Old 12-16-2007, 11:14 AM Reply With Quote


Really cool. Wish I could code like that.


               
__________________
entranced.se
 
View Public Profile Send a private message to entranced Visit entranced's homepage! Find all posts by entranced Add entranced to Your Contacts
#10    
 
gsb's Avatar

Name: 
gsb
Status: Offline
Rank: Registered User
Posts: 771
Mood: Always getting better.
Old 12-16-2007, 06:34 PM Reply With Quote


Yes. Nice exampl.


gsb


               
 
View Public Profile Send a private message to gsb Find all posts by gsb Add gsb to Your Contacts
Advertisement:





Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump