A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: [F8] looping

  1. #1
    Junior Member
    Join Date
    Jan 2008

    [F8] looping

    What i am trying to do is create a preloader in which the letters spelling "loaded" drop in as it loads. The way i was thinking to do it was to have a bar off screen sliding along and as it goes beneath each letter it triggers them dropping. At the moment though i can only get it to work for one of the letters.

    here is what i have got so far.

    import com.mosesSupposes.fuse.*;

    ZigoEngine.register(Fuse,PennerEasing, FuseFMP);

    var i:Number = 4;
    var ball:Array = new Array();
    ball = [l_mc,o_mc,a_mc,d_mc,e_mc,d1_mc];

    var f:Fuse = new Fuse();
    text_mc.holder_mc._visible = true;
    f.push({target:line_mc,x:504.0,time:4,ease:"linear "});

    function drop() {
    ball[i].onEnterFrame = function(){
    if (line_mc._x >= ball[i]._x){

    var l:Fuse = new Fuse();
    l.push({target:ball[i],y:40.0,time:1.5,ease:"easeOutBounce",func:afterFu se, scope:ball[i]});


    delete this.onEnterFrame;

  2. #2
    Getting There! bitsk308's Avatar
    Join Date
    Jul 2000
    Phoenix, AZ
    not sure what all your fuse stuff is about, that's obviously someone elses class.
    but besides that it looks like what may be the problem is that you start at i=4 and within three frames, a fraction of a second, i has increased past 8 and won't ever turn back. So you start with the letter "i" (since your array starts with l_mc at the 0 index) and within those first three frames, if your line_mc hasn't move far enough, your ifs will evaluate false and the last letters will never fall. Of course the first letters never have a chance since you're starting at i=4 and not i=0.

    I presume the actual byte/frame loading is being read by those other clases, since there is nothing in your code, but even so, the script doesn't seem to be basing anything off that since your drop function fires instantly and hits the ground running.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center