TwelvestoneFlash

Damn functions


Sign in

  • Waiting for Godot ( 730 k posts )
    Just conversation.
  • Thunder Dome ( 23 k posts )
    Photoshop Tennis and Collabs.
  • Photography ( 5.1 k posts )
    For all you shutterbugs, sh...
  • Flash ( 18 k posts )
    ActionScripting to tweens, ...
  • Front End ( 5.9 k posts )
    general front end design an...
  • Back End ( 9.7 k posts )
    serverside scripting, progr...
  • Projects and Theory ( 12 k posts )
    This forum is for discussio...
  • FAQ ( 269 posts )
    All those nagging questions...
  • Design ( 17 k posts )
    graphics & all aspects of g...
  • Purgatory ( 3.6 k posts )
    12stone Jail, feel free to ...
Naughty
 
2003-01-27

I have a code in my movie, which works fine, but for fun of it I wanted to rewrite it using functions .. just cannot get it to work properly:

On the MC flake0 in _root.txtRMC.ballMC

onClipEvent (load) { n = 1; pad = _root.txtRMC.ballMC; pad.flake0._visible = false; }

onClipEvent (enterFrame) { _root.moveDots (pad, flake0, flake, 20, 25); }

On the maintimeline:

function moveDots (pad, theClip, ClipClean, xstart, nrClips) {

if (n <= nrClips) { pad.theClip.duplicateMovieClip("ClipClean"+n, n); rClip = pad["ClipClean"+n]; rClip._x = xstart + (n*-10); rClip._alpha = (n*5); n += 1;

trace("rClipX= "+rClip._x); trace("rClip= "+rClip); trace("pad= "+pad); trace("theClip= "+theClip); trace("theClipClean= "+ClipClean); trace("xstart= "+xstart); trace("nrClips= "+nrClips); trace("n= "+n);

}else{
n=1

}

}

Result of the traces:

rClipX= rClip= pad= _level0.txtRMC.ballMC theClip= theClipClean= xstart= 20 nrClips= 25 n= 1

Can anybody give me a hand?

Naughty
 
2003-01-27

k, I changed it a little ..

onClipEvent (enterFrame) { _root.moveDots (pad, "flake0", "flake", 20, 25); }

Now gives me: rClip= rClipX= pad= _level0.txtRMC.ballMC theClip= flake0 theClipClean= flake xstart= 20 nrClips= 25 n= 1

Still lost on the rClip values.

Sorry, you must be a member to post to a conversation. Either log in or sign up to get involved.
TwelvestoneFlash

Damn functions