A Flash Developer Resource Site

View Poll Results: Was this post clear and to the point?

Voters
1. You may not vote on this poll
  • Wait what? say that again....complete jibberish

    0 0%
  • i don't think u knwo what yoru talking about

    0 0%
  • you could clarify your post better

    1 100.00%
  • VERY CLEAR POST!

    0 0%
Multiple Choice Poll.
Results 1 to 20 of 27

Thread: array and indexing movie clips

Threaded View

  1. #21
    Will moderate for beer
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    6,801
    Oh. yeah, there's a bug there. currentFader will be null until you actually drag one.
    Code:
    function loop(e:Event):void{	
       if (currentFader != null){
         var bounds:Rectangle = currentFader.bounds;
         svalue.text=String(Math.round((currentFader.y-bounds.bottom)/(bounds.top-bounds.bottom)*8.00));
       }
    }
    
    function dropScroll(evt:MouseEvent):void{
      currentFader.stopDrag();
      currentFader = null;
      dragging=false;
    }
    I'm sure it's called loop because it runs every frame. You do need a separate bounds for each fader, but I've already done that above and set each as a property on their respective faders.

    What error exactly did you get when trying to put the clips in the array directly?
    Last edited by 5TonsOfFlax; 11-10-2009 at 06:00 PM.

Tags for this Thread

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