Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Matrix



I have seen flashes that have used the matrix effect and I was wondering if a tutorial is going to be posted on this site for that effect. I know that there is a fla that you can download but I want to learn how to do it myself step by step. Great site btw I come here often and use the tutorials I am a little blond and have a very long way to go before I would be considered good so the tutorials have been a great help



KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 03-03-2004, 02:53 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Logic Help: Matrix.b Based Upon Matrix.a Values
Hi ya,

I have always had a hard time figuring out the best way to make a relationship between 2 changing values. Often times I use percents, but in this case that wont work very well.

Anyway, I'd like for the attached movieclip to scale up and then scale back down (and maybe one dip down some). What is the best way to corolate (sp?) these two values?

Cheers



ActionScript Code:
import flash.geom.Matrix;

// set up Matrix filter
var matrix:Matrix = new Matrix();
var totalSkew:Number= -0.3;
matrix.tx = text_mc._x;
matrix.ty = text_mc._y;

// initialize degress and radians
// conversion: radians = degrees * (Math.PI/180);
var radians:Number = 0;
var degrees:Number = 0;

text_mc.onEnterFrame = function():Void
{
    // increment the degrees of rotation and convert to radians
    degrees += 3;
    radians = degrees * (Math.PI/180);
   
    // calculate x scaling
    matrix.a = Math.round(100 * Math.cos(radians)) / 100;
   
    // calculate y skewing
    var range:Number = degrees % 91;
    var percent:Number = (range / 90);
    matrix.b = percent * totalSkew;
   
    // apply transformation
    text_mc.transform.matrix = matrix;
   
}

[FMX] Matrix Algebra And Matrix Inverse
Has anyone here ever developed a function (or general library of relevant functions) that will allow one to find the inverse of a matrix? I've searched the forum archives, as well as the internet more generally, but haven't found anything. If anyone has some leads, I hope you'll pass them along.

If I don't hear anything within the next few days, I might try to develop something on my own, but I'd hate to do so if someone has already done the dirty work.

A solution to this problem would be very useful for 3-D work or anyone doing mathematical programming more generally.

Thanks,
Chris

Matrix
Is possible to make matrix on ActionScript? you know and 2D array?

Matrix Help Plz
Hello!

I got this problem. a client wants a animation on his page, it will look like "Matrix text Fall" .. anyone know how to do that ?? please help me asap!

/micke

Matrix...
Ok, this is how the books shows it:


Code:
_root.createEmptyMovieClip("myMovie", 1);
with (_root.myMovie) {
colors = [0xFF0000, 0x0000FF];
alphas = [100, 100];
ratios = [0, 0xFF];
matrix = { a:200, b:0, c:0, d:0, e:200, f:0, g:200, h:200, i:1};
beginGradientFill("linear", colors, alphas, ratios, matrix);
moveto(100, 100);
lineto(100, 300);
lineto(300, 300);
lineto(300, 100);
lineto(100, 100);
endFill();
}


Obviously this makes a gradient box, pretty dull considering the amount of code. But this is not my problem...

Later on the book gives yet another sample like that, just that the matrix parameter shows like this:



Code:
matrix = {matrixType:"box", x:100, y:100, w:200, h:200, r: (45/180)*Math.PI};


This one I pretty much understand, x and y being the coordinates, and w and h being width and height. The r stands for radius, of course...

But what is a, b, c, d, e, f, g, h, i in the first example? And why is i always equal 1? Anybody can explain this?

The book says the letters stand for a matrix like this:

a, b, c
d, e, f
g, h, i

But I still don't get it...

Matrix Like?
How do i create a matrix-like camera trick within flashMX?

The Matrix
hi i am making a the matrix reloaded website and i am making an intro for it too

this is my site

well i have a gif, of the code going down the screen but i want it to run on a certain frame, and fill the whole screen...

how can i do this?.... someone please help me?

James

Mc Matrix
if i want to have a huge grid of attached movie clips on the stage, all interacting with eachother, does anyone know of any specific limitations as to how many mc's I can use?

The Matrix
Someone wanna help me make the matrix?

Matrix FX
I wanted to know if anybody could help me with matrix effects like the characters shadow type thing that follows them.

Matrix?
Hi, can anyone help me with creating a matrix? Currently I'm using this code for a 10x10 matrix:

v1 = 0
while (v1<9) {
v2 = 0
while (v2<0) {
set("matrix" add v1 add v2, 0)
v2 = v2 + 1
}
v1 = v1 + 1
}
// just to test if I assigned 0 to the right variable
v1 = 4
v2 = 6
test = "matrix" add v1 add v2


Well, the problem is, creating 100 variables as a matrix works, but how I do use the variables?
test became "matrix46" (as text), but I wanted the variable "matrix46", how I do I write that?

Thanks in advance!
-Shin

Why Matrix?
Hi

I've been trying to get in to the Matrix Class in AS3, but I don't get it.

What's it's perpose?
Except transforming a shape, what can it do?

Can you give me some links and stuff, good tutorials or inspiration?

I need to know if it's worth the effort of trying to learn it in a deep level.

//Mikael

Matrix
have a couple of cascaded MC's each have diferent Matrixtransformations on them

let's say for now Master & Master.Slave

now i rotate the Master by 45º

so the Master & the Slave is rotated (this shoud by so)

now i wana Scale the Slave
and here coms the problem !
it's scales BUT in the coordinatesystem of the Master !
and tath shoud NOT by !!!

how can i calculate this ?????

see code for more :


Code:
_root.createEmptyMovieClip("Master", 0);
TM = new flash.geom.Transform(Master);
_bmp1 = new flash.display.BitmapData(150, 150, false, 0x00FF0000);
Master.attachBitmap(_bmp1, 0);
Master.createEmptyMovieClip("Slave", 1);
TS = new flash.geom.Transform(Master.Slave);
_bmp2 = new flash.display.BitmapData(50, 50, false, 0x000000FF);
Master.Slave.attachBitmap(_bmp2, 1);
//
M = new flash.geom.Matrix();
M.translate(100, 50);
TM.matrix = M;
//Rotate Master
M.identity();
M.rotate(45/180*Math.PI);
Tmp = TM.matrix.clone();
M.concat(Tmp);
TM.matrix = M;
//Scale Slave
M.identity();
M.scale(2, 1);
Tmp = TS.matrix.clone();
M.concat(Tmp);
TS.matrix = M;
////////////////////////////
//
//
//This is how it shoud look :
//
_root.createEmptyMovieClip("Master1", 1);
TM1 = new flash.geom.Transform(Master1);
_bmp1 = new flash.display.BitmapData(150, 150, false, 0x00FF0000);
Master1.attachBitmap(_bmp1, 0);
_root.createEmptyMovieClip("Slave1", 2);
TS1 = new flash.geom.Transform(Slave1);
_bmp2 = new flash.display.BitmapData(50, 50, false, 0x000000FF);
Slave1.attachBitmap(_bmp2, 1);
//
M = new flash.geom.Matrix();
M.translate(350, 50);
TM1.matrix = M;
TS1.matrix = M;
//
M.identity();
M.rotate(45/180*Math.PI);
Tmp = TM1.matrix.clone();
M.concat(Tmp);
TM1.matrix = M;
M.identity();
M.rotate(45/180*Math.PI);
Tmp = TS1.matrix.clone();
M.concat(Tmp);
TS1.matrix = M;
//
M.identity();
Orgmatrix = TS1.matrix.clone();
M.a = 2;
M.d = 1;
//
M.tx = Orgmatrix.tx;
M.ty = Orgmatrix.ty;
//
Orgmatrix.tx = 0;
Orgmatrix.ty = 0;
Orgmatrix.concat(M);
TS1.matrix = Orgmatrix;

Like In Matrix
there is this kind of text effet like in Matrix....
http://www.calwhite.com/pix/matrix%20001.jpg
the animation of text that falling like rain.....
how can i do this ?

Matrix
Hey guys! Have u seen the screensaver of Matrix Reloaded by useless-creation?(altho Matrix revolution is coming soon)
Well, I just wonder whether it can be done in Flash.

I've seen many matrix effects using flash in 2D view(which means only words fading out and going down)but can it be done in 3D view?
What I mean is the user can move the environment and perspective by moving the mouse.

If it would be cool if someone can do that!

Another cool effect is the combination of words makes the picture of Neo and others.

Is flash possible to do that? If yes,I think it consume a lot of maths,rite?

Matrix
I have seen flashes that have used the matrix effect and I was wondering if a tutorial is going to be posted on this site for that effect. I know that there is a fla that you can download but I want to learn how to do it myself step by step. Great site btw I come here often and use the tutorials I am a little blond and have a very long way to go before I would be considered good so the tutorials have been a great help

The Matrix
Hi,

This is an MX implementation of the Matrix characters effect (won't work without modification with MX04). I've put some effort in commenting the code, but don't hesitate to tell me if some parts remain obscure

Matrix
How would I go about putting a matrix scene in my background in flash mx then placing menus etc.? thx

Matrix?
Don't laugh...

http://www.reghellin.com/example.gif

Should I use the Matrix to tween from figure 1 to 2 via ActionScript?

Matrix
Hey guys! Have u seen the screensaver of Matrix Reloaded by useless-creation?(altho Matrix revolution is coming soon)
Well, I just wonder whether it can be done in Flash.

I've seen many matrix effects using flash in 2D view(which means only words fading out and going down)but can it be done in 3D view?
What I mean is the user can move the environment and perspective by moving the mouse.

If it would be cool if someone can do that!

Another cool effect is the combination of words makes the picture of Neo and others.

Is flash possible to do that? If yes,I think it consume a lot of maths,rite?

The Matrix
Hi,

This is an MX implementation of the Matrix characters effect (won't work without modification with MX04). I've put some effort in commenting the code, but don't hesitate to tell me if some parts remain obscure

Matrix?
Don't laugh...

http://www.reghellin.com/example.gif

Should I use the Matrix to tween from figure 1 to 2 via ActionScript?

Any idea?

The Matrix
I am trying to reverse engineer the Carousel tutorial and instead of making it a Carousel make a matrix picture gallery.

I was wondering if someone knew where to find a good tutorial to create a matrix? I am not having luck, and I am not even sure if I am using the word Matrix correctly.

I am trying to place icons side by side 5 across the top and then 5 across the bottom. I realize and pretty much know that I can do this manually, but I am looking for future functinality where I load everythign in dynamically using XML similar to the Carousel.

If anyone can point me into the right direction I would appreciate it.

Thanks,

tmoflash

Matrix Question
How the heck did that guy get the matrix 1 and 0 thing to work . It will not work for me. Can someplease help me. The tutorial is in here but I cant figure it out on flash 5.
PLease help it would be very useful to what I want to do.

Matrix Credits Help?
Does anyone know how to do the effect seen in the credits in the Matrix?

It has the matrix code scroll from left-right and it gets brighter near the center at which point a object fades into view and then the words appear as everything fades out...

Could someone help me with this?

DracoNB

Matrix Cube
I try to follow a tutorial from yugop on new master of flash and come out with something as below:
http://www.chupcreations.com/forum/matrix.swf

Only "1" is being able to roll over now, but something is missing, instead of falling back to place, it will keep scaling itself, i think i miss out something. Any idea?

Here is the fla:
http://www.chupcreations.com/forum/matrix.fla

Thanks in advance
chup

Define Matrix
please help me with a *.fla example, to know how to define, then to compute a inverse of a matrix

Matrix Effect Ez Way
Hi to all

I have added one more tutorial in my website

i.e matrix effect

visit :http://www.flashcircle.com

bye

have a good day

Matrix Bitstream
http://www.flashkit.com/tutorials/Sp...52/index.shtml

I an pretty much a complete noob with flash, so hopefully this is just something stupid that I am missing, but I cannot get this tutorial to work correctly in MX.

Has anyone tried it or have any ideas as to how to make it work correctly?


court

Matrix Effect
Hi,
Anybody please tell me how to do matrix effect with script in flash 5.

dhananjay

Matrix Effect
Hi, all. Does anybody know some text effect making the matrix random number? First, it raining down, and then some of them have one text that glows raining down too. I need an expert help here to make my swf looks real like in the movie. Anybody? ( A question also a challenge for all the gurus )

Matrix Of BeginGradientFill
What do the a~i parameters in this object("matrix" in beginGradientFill) represent?

Help Matrix Style
Hey,

i need help on a technique! its sort of like a matrix thing: say if i had a brick falling......behind the brick would be a darker image of the brick that follows the real brick, its like onion skin layer but you can actually see it in the movie!!! as i said its like the matrix slow motion! if you know what im saying then plz send me an email at............. stick_death@hotmail.com and tell me how to do that effect/technique, plz

if you can, plz send a small animation of something similar of what i just said obove so i can learn easier!!! thnx

Reece

Matrix Thingy
u know how to do that? any1, and plz put it in simple terms im only 13, i wanna know how to make letters run down the screen and then make the title effect they use in the movies u no wut i mean

Matrix Code?
I recently saw a link to a tutorial about making 'Matrix Code'. I attempted it, however, the tutorial was quite vague so the outcome wasn't quite as it should be. The writer also left out how to make the text in the middle flicker and expand slightly as if under interference. If anyone could tell me how to do these things I would be very grateful...
Thanks

Pedro

A Matrix Code
Is It Possible To do a Matrix Code Effect With flash? ( Making the Symbols Go from top to bottom) Im looking for an easier way then having to do it symbol by symbol

How To Set A Matrix With BeginGradientFill
Hi, I am trying to recreate the attached radial gradient fill with code.

I am a little hungover and tired, but I really want to work it out before calling it a day.

In the manual is say use the following, with matrix defining the shape of the gradient.

colors = [ 0x000000, 0xFFFFFF ];
alphas = [ 35, 35 ];
ratios = [ 0xFF, 0xFF ];
matrix = { a:0, b:10, c:20, d:10, e:10, f:20, g:20, h:20, i:1 };
this.beginGradientFill( "radial", colors, alphas, ratios, matrix );

Any enlightenment or example would be really great...

M@)

How Do I Do That Matrix Thing?
Ok u know in the movie when its bullet time is turns around the whole screen well my friend did it but he wont tell me how can osmeone help me?

Displaying A Matrix
How can I display a 20x20 matrix in Flash? I mean, what's the easiest way?

Matrix Text
I need help can anyone tell me how to make a bunch of letters and number fall in to write something like in the matrix movies? that would be helpful thx

Matrix For Gradients?
What does the Matrix do for creating gradients?

a, b, c, d, e, f, g, h, i, which can be used to describe a 3 x 3 matrix of the following form:

a b c
d e f
g h i

What does this mean? What do each of the letters do?

Thanks in advance.

Matrix Gradients
What does the Matrix do for creating gradients?

a, b, c, d, e, f, g, h, i, which can be used to describe a 3 x 3 matrix of the following form:

a b c
d e f
g h i

What does this mean? What do each of the letters do?

Thanks in advance.

Printing In Dot Matrix
Hi there, until now i managed to make a form and print the results in a special formatted paper, but the paper has a carbon copy so it has to be printed in a dot matrix printer, but extrangely, when i print in a Epson LX300 or LX300+ and everything goes well, i try it in an Epson FX1050 and it gets all scrambled, same for a Panasonic KX-P1624.
anyone have tried it? i still don't know what is going on, it happens wheter on browser or standalone player right-click menu, or print button in flash.

Anyone knows a way around this?

Matrix Tutorial
i have been trying to do this tutorial here:
http://www.flashkit.com/tutorials/Sp...-932/index.php

is there supposed to be a source file there? i can't find one...

Matrix Animation...
How can i do a animation like Matrix.
The leters em numbers falling ...
I can do something like that, but the way i'm doing is a total mess and the .swf well 300K or more... not good at all and yes, the effect not so good...

Is there any easy way to do that ?

Best Regards

rhercules

Help With Variable Matrix
I have 3 variables, (B,C,and D). B has 4 possible values and D has 4 possible values. The value of C will depend on the values of B and D. Sort of like a simple matrix.

What I am wondering is if there is anyway to dertermine the value of C besides doing a series of nested "if" statements.

For example:


Code:
if(b=1) {
if(d=1) {
c=7
} else if(d=2) {
c=12
} else if(d=3) {
c=6
} else {
c=4
}
} else if(b=2) {
if(d=1) {
c=5
} else if(d=2) {
c=10
} else if(d=3) {
c=7
} else {
c=2
}
} else if(b=3) {
if(d=1) {
c=1
} else if(d=2) {
c=2
} else if(d=3) {
c=3
} else {
c=4
}
} else {
if(d=1) {
c=4
} else if(d=2) {
c=3
} else if(d=3) {
c=2
} else {
c=8
}
}
The matrixes will be soon become much more complex, so I was wondering if there is an easier way to achieve this.

as1 would be preferable but I can do it in as2 if I need to. I also need to limit this to player6 and under.

thanks in advance

Matrix Thingy
How do you make the slow-motion matrix affect on an object?

Using Matrix And Direction
I have a movieclip and I want it to face the mouse when clicked. I am using this code here in my class.

Code:
import flash.geom.*;
class Unit extends MovieClip
{
private var Shoot:Function;
private var MouseMove:Function;
private var Speed:Number;
private var Destination:Point;
private var Velocity:Point;
private var myMatrix:Matrix;

public function Unit()
{
this.onMouseUp = OnClick;

Speed = 0.3;
Destination = new Point(300,300);
myMatrix = new Matrix();
myMatrix = this.transform.matrix;
Velocity = new Point(0,-1);
}
private function Update()
{
var point:Point = new Point(_x, _y);
var diffrence:Point = point;
diffrence = diffrence.subtract(Destination);
diffrence.normalize(1);
var hyp:Number = Point.distance(Velocity, diffrence);
var cos:Number = (hyp^2 - 2) / -2;
var sin:Number = Math.sin(Math.acos(cos));
myMatrix.a = myMatrix.d = cos;
myMatrix.c = -sin;
myMatrix.b = sin;
myMatrix.tx = _x;
myMatrix.ty = _y;
var rot:Matrix = new Matrix();
rot.rotate(Math.acos(cos));
Velocity = rot.transformPoint(Velocity);
this.transform.matrix = myMatrix;
}
private function OnClick()
{
Destination.x = _parent._xmouse;
Destination.y = _parent._ymouse;
Update();
}
}
However the angle is always off

Transformation Matrix
Hi all

I was wondering how efficient would be for me to use the Transformation Matrix class to create any application capable of allowing movie clips (images) to rotate, scale as well as removing them from the stage at the runtime.

From what I read at http://www.senocular.com/flash/tutor...ansformmatrix/ the matrix is really powefull and can reduce the amount of code for things such as rotate,and scale images.

What I'm almost trying to achieve is available here

Or if there is any other way that this could be achieved I would really appreciate. Stuff like hints, tutorial, or sample codes

Thanx

Copyright © 2005-08 www.BigResource.com, All rights reserved