A Flash Developer Resource Site

Results 1 to 1 of 1

Thread: Changing Varibles on a MC to Change a StartDrag Mc

  1. #1
    Junior Member
    Join Date
    Dec 2002
    Posts
    19

    Changing Varibles on a MC to Change a StartDrag Mc

    Hi Guys...

    I am having a problem changing varibles so another startDrag movieclip can be activated, I have two dragable movieclips, and when you rollon the movie clip the movieclip is activated, these two movie clips have target boxes , I need to clip on a movie clip and the varibles say,, that box selected now drag, i can drag one have tried to chage the varible so the otherone will be seklected but nothing !!

    here is my code


    // declare Movieclip, clip is called mc1, i am trying to change 1 to 2 so movieclip 2 will work then back to 1

    IdMc = mc1
    xPos = 30
    yPos = 30
    TgPic = "1sm.jpg";
    BoxId = "Box1"

    IdMc.onPress = function() {
    startDrag(IdMc);
    }
    IdMc.onRelease = function() {
    stopDrag();
    if (_root.IdMc._droptarget == "/"+BoxId) {
    loadMovie("FlashImages/"+TgPic,BoxId);
    }
    IdMc._x = xPos;
    IdMc._y = yPos;
    IdMc.gotoAndPlay(1);
    }


    here is the code when you roll over the dragable movie clip...

    on (Rollover) {
    RefId = 2
    IdMc = mc2
    xPos = 80
    yPos = 30
    TgPic = "2sm.jpg";
    }

    any ideas why it isn't working...

    here is a link to see my code in action, but you can only drag one box... any help will be good help..

    http://www.connectonlinepreview.co.u...tionOne_2.html


    cheers chris
    Last edited by FragileSTATE; 02-16-2006 at 01:29 PM. Reason: i put in a rubbish title...

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