Ask a Question related to Macromedia Flash Sitedesign, Design and Development.
-
Hojomojo #1
Action script??!!?!
HI,
Im kinda new to this action script stuff and a friend of mine gave me some
code a while back to look at. Basically its a menu system with little moving
buttons. I've been tryin to understand it and have kinda worked out what bits
do what thought it might sound stupid i cant figure out how to assign a URL to
each button. As there all generated with action script im a bit confused.
Please help! Heres the code:
Movieclip.prototype.bouge = function(destY,destX){
this.acc = 8; this.dec = 1.8;
this.destY = destY; this.destX = destX;
this.currX = this._x; this.currY = this._y;
this.diffX = this.destX - this.currX;
this.diffY = this.destY - this.currY;
this.vx = (this.vx + (this.diffX) * 1 / this.acc) / this.dec;
this.vy = (this.vy + (this.diffY) * 1 / this.acc) / this.dec;
this.effet=(Math.abs(this._x-destX)/10);
this._alpha=100+effet;
this._yscale=40+effet;
this._xscale=40+effet;
this._x += this.vx;
this._y += this.vy;
updateAfterEvent();
}
function clic(n)
{
var index = Number(n.substring(1,2));
for ( var i=0; i<_root.nb; i++ ) {
if(index==q[i]){
var posit_clic=i;
}
}
for ( var i=posit_clic-1; i>-1; i-- ) {
_root.q[i+1]= _root.q[i];
}
_root.q[0]=index;
for ( var i=0; i<_root.nb; i++ ) {
_root.p[q[i]]=_root.r[i];
if ( i==index ) {
_root["a" add i].gotoAndStop(2);
_root["a" add i].swapDepths(20);
}
else
{
_root["a" add i].gotoAndStop(1);
}
}
}
//---- init ------
var nb=4;
var ecard = 90;
var p=new Array();
var r=new Array();
var q=new Array();
p[0]=50;
r[0]=p[0];
q[0]=0;
for ( var i=1; i<_root.nb; i++ )
{
_root.a0.duplicateMovieClip( "a" add i, i )
_root["a" add i].tx = "Nowt" add (i+1);
p[i]=p[0] + ecard*i;
r[i]=p[i] ;
q[i]=i;
}
_root.a0.tx="Home";
_root.a1.tx="Search";
_root.a2.tx="Groups";
_root.a3.tx="LogOut";
stop();
Hojomojo Guest
-
xml and action script
I want to display the "Value" in a dynamic text field from an xml document called "stocks.xml". here is my action script code for the dynamic text... -
CF Grid / Java Script / Action Script
Hi, Does anyone know of a good reference for the attributes CFgrid exposes in a flash form? eg. I would like to select the first row on load. ... -
action script help
im trying to load an external swf file using the gotoAndPlay(_root.emptyClip.loadMovie("grey_bars.swf")); is it possible to load the same movie... -
Need help with an Action Script
Hello Everyone, I am developing the included action script for one of the Spanish teachers at my work place. The concept is that the students drag... -
Need Help with action script.
I am working on a project for one of my classes, and in it I want to be able to click on an apple (which is a button) and make it fall. I have tried...



Reply With Quote

