Hello everyone,
I need your help. I've already searched for a couple of weeks now and I just can't make it work.
I've copy-pasted a code that generates an "matrix" effect in my flash movie.
I've also made two scenes.
The first scene contains the matrix script, the second one just a plane black background.
So.. I play the script in the first scene and want it to stop when I go to the second scene.
When I put a stop(); command in the timeline it still keeps playing in the first AND second scene.
The question is: How can I stop the actionscript in Scene 1 before I go to Scene 2?
This is the script I'm talking about (found here):
In the timeline this code is used:
for (i=0; i<=463; i++) {
_root.attachMovie("digit","digit"+i,i);
this["digit"+i].the_depth = i;
}
In the "digit" object they wrote this code:
// --------------------------------------
// created by Adrian C.
adrianTNT.com - Flash design
// --------------------------------------
//
var text_array:Array = Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "l", "m", "n", "o", "p", "<", ">", "!", "`", "@", "#", "$", "%", "^", "&", "*", "(", ")", "-", "+", "|", "/", "=", "_", ",", "[", "]", "{", "}", ":", ";");
//var text_array:Array = Array("0", "1");
text_box.text = text_array[random(text_array.length)];
//
var matrix_position:Array = Array();
//
counter = 0;
counter_limit = random(5)+3;
//
for (r=0; r<=Stage.width/this._width; r++) {
matrix_position.push(r*this._width);
}
this._x = matrix_position[random(matrix_position.length-1)];
this._y = random(Stage.height-this._height);
this.speed = random(8)+8;
rand_scale = int(random(100));
this._alpha = rand_scale;
this._xscale = rand_scale;
this._yscale = rand_scale;
//
this.swapDepths(rand_scale);
//
import flash.filters.BlurFilter;
import flash.filters.GlowFilter;
//
var filter:GlowFilter = new GlowFilter(0x009999, rand_scale+1, 10, 10, 3);
var filterArray:Array = new Array();
filterArray.push(filter);
//
var filter:BlurFilter = new BlurFilter((80-rand_scale)/15, (80-rand_scale)/15);
filterArray.push(filter);
this.filters = filterArray;
//
//
this.onEnterFrame = function() {
/*
// letters change during animation
counter++;
if (counter>counter_limit) {
text_box.text = text_array[random(text_array.length)];
counter = 0;
}
*/
this._y += speed;
if (this._y>=Stage.height+this._height) {
this._y = 0-this._height;
}
};