PDA

View Full Version : developing site using animation and actionscript


gopi44
11-16-2009, 11:51 AM
hi All !

I am new to this forum. using flash and actionscript to develop starwar effect. like http://waterlife.nfb.ca/. Please can u help what the code to use and develop my site.

Awaiting for your reply.


Thanks,

Gopi.

[Paul Ferrie ]
11-19-2009, 11:04 AM
Can you explain a bit more please?
I dont see this star wars effect your talking about.

gopi44
12-03-2009, 03:23 PM
;889886']Can you explain a bit more please?
I dont see this star wars effect your talking about.
After Entering to this site ( http://waterlife.nfb.ca/ ) the page will load. After loading the page you can see the ENTER by clicking mouse on the screen. Then you can see the small images flying in the screen.

The same effect I want in my project. I hope you understand and will get quick reply.

Thanks,

Awaiting for your reply.

[Paul Ferrie ]
12-03-2009, 04:35 PM
Ah there is some PV3D (http://blog.papervision3d.org/) stuff there. That's something I've not looked at yet. AS for the images loading in the way they are. I can show you how i think the grid is produced but the rest is up to yourself.
This code has just been quickly put together as a starting point
Where there is a number 2 in the array this could be where you would hold the variable that is the path to your image

var imageMap:Array = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
[1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1],
[1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1],
[1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1],
[1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1],
[1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1],
[1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1],
[1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1],
[1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 1, 1],
[1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 1, 1],
[1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1],
[1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1],
[1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1],
[1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1],
[1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1],
[1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1],
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]];
var i:Number = 0;
var j:Number = 0;
var mapW:Number = imageMap[0].length;
var mapH:Number = imageMap.length;
var tileW:Number = 30;
var tileH:Number = 16;
var startX:Number = 6;
var startY:Number = 23;
function buildMap() {
for (i=0; i<mapH; i++) {
for (j=0; j<mapW; j++) {
holder.attachMovie("cell","c_"+i+"_"+j,holder.getNextHighestDepth());
holder["c_"+i+"_"+j]._x = startX+j*tileW;
holder["c_"+i+"_"+j]._y = startY+i*tileH;
holder["c_"+i+"_"+j].gotoAndStop(imageMap[i][j]);
}
}
}
buildMap()


I've also attached the source.

Hope it helps.

gopi44
12-04-2009, 04:29 PM
Thanks for giving this good stuff.

[Paul Ferrie ]
12-04-2009, 04:36 PM
Np. I had to dig out an old fla from whey back, didn't think i still had it.

gopi44
12-13-2009, 06:07 PM
oh... I see