PDA

View Full Version : Flash as a background


tecmeister
07-21-2007, 01:35 AM
Hello everyone,
I was wondering if it is possible to have a flash effect as the background of a html website.
If it is, how do i do so?

Thanks for the help.

atomic
07-21-2007, 02:46 AM
Set the Flash movie (wmode set to transparent) on a lower z-index than the other html content.

tecmeister
07-21-2007, 12:04 PM
The thing that i was wondering was, will i be able to put the martix effect on the background of the website, and have the all of the tab, data etc over the top of it.
This is the actionscript if it helps:


maxLines = 40;
minScale = 10;
maxScale = 70;

theMatrix = createEmptyMovieClip('MatrixCode',1);
curLines = 0;

theMatrix.onEnterFrame = function(){

if(curLines <= maxLines){
curLines++;

codeLine = this.createEmptyMovieClip('codeLine',curLines);

var ranScale = Math.round(Math.random() * (maxScale-minScale)) + minScale;
codeLine._xscale = codeLine._yscale = ranScale;

codeLine._x = Math.random() * Stage.width;

codeLine.speed = (codeLine._xscale)/10;

codeLine.myCodes = [];
numPods = 0;
while(codeLine._height < Stage.height){
numPods++;

pod = codeLine.attachMovie('one_pod','pod'+numPods,numPo ds);
codeLine.myCodes.push(pod);

pod._y -= (pod._height+2) * numPods;

pod.the_one.Neo.text = chr(Math.round(Math.random() * 27) + 96);
}

codeLine.ind = 0;

codeLine.delay = codeLines.myCodes.length;

codeLine.onEnterFrame = function(){

this._y += this.speed;

if(this._y - this._height >= Stage.height) {

maxLines++;

this.removeMovieClip();
}

this.curCode = this.myCodes[this.ind];

if(this.curCode._currentframe == 1) this.curCode.play();

if(this.ind < this.myCodes.length and this.delay != 0){

this.ind++;

this.delay--;
} else {

this.ind = 0;

this.delay = this.myCodes.length;
}
}
}
}

atomic
07-21-2007, 02:12 PM
Best way to find out, is to try it! ;)

tecmeister
07-21-2007, 04:37 PM
I have been trying and it doesn't seem to work. But i guess i will just keep on trying.

atomic
07-21-2007, 04:45 PM
Can you attach your .fla and .html, or post a link to this online?

Hambo
07-21-2007, 10:13 PM
put your flash in a div with a lower z-index than everything else i.e 0, and set its position to abosolute with top left @ 0,0 and width and height of 100%


did it myself here:
http://www.hambo.oneuk.com

atomic
07-21-2007, 10:28 PM
Isn't that what I first suggested?

Hambo
07-24-2007, 08:49 AM
the lack of example and 4 replies later suggests he didnt get it.!

hope that helps..

Hambo
07-24-2007, 08:51 AM
I have been trying and it doesn't seem to work.

the lack of example and 4 replies later suggests he didnt get it.!


hope that helps