dcsimg
A Flash Developer Resource Site

Page 2 of 2 FirstFirst 12
Results 21 to 24 of 24

Thread: using AS to rotate a mc?

  1. #21
    Senior Member
    Join Date
    Sep 2004
    Location
    West Mids, UK
    Posts
    101
    glad to hear

  2. #22
    Senior Member
    Join Date
    Feb 2004
    Location
    Worcester Ma
    Posts
    161
    JBum,
    Do you have the code for that pattern of concentric rings you showed us?

  3. #23
    Senior Member Sir Yendor's Avatar
    Join Date
    Sep 2001
    Location
    Over here
    Posts
    1,140
    This is great stuff guys! Awsome thread. If I understand it correctly, this code:


    this._rotation = 0;
    delete this.onEnterFrame;
    gotoAndPlay(31);

    }
    }

    should take the playhead to frame 31 once the CD stops spinning, is that correct? I'm using this code on a frame along the time line where I want the CD to stop spinning:

    // set this to slowest (final) speed
    _root.mc.minRate = 1;

    // set this to control the initial acceleration
    _root.mc.deccel = 0.5;

    _root.mc.curRate = 10;

    _root.mc.onEnterFrame=function()
    {
    // slow down until we hit a speed of 1

    if (this.curRate > this.minRate)
    {
    this.curRate -= this.deccel;
    }
    this._rotation += this.curRate;

    // are we there yet?
    if (Math.round(this._rotation) == 0)
    {
    // yep, we're there.
    this._rotation = 0;
    delete this.onEnterFrame;
    gotoAndPlay("fadeout");
    }

    }


    The frame labeled "fadeout" is one frame past the frame containing the code described above. Over the next 12 frames, the MC has a tween code that shold make it fade to an alpha of 0, but it doesn't seem to take it there.

    Thanks

  4. #24
    Junior Member
    Join Date
    May 2008
    Posts
    5

    Spin and load with actionscript

    Hi Guys,

    I saw this thread and know that someone here will be able to help me out.
    I am struggling my way through creating a fullscreen flash site.

    So what i need is to be able to have a preloader that starts on the right of the screen and a bar grows to the center of the flash movie depending on the % loaded also at the same time i want a rotating star to be fixed at the end of the loading bar

    Is this possible?

    please help out a newbie with this.


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