dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: AS2 help please, movie clip used as a button ?

  1. #1
    Senior Member
    Join Date
    Apr 2009
    Posts
    117

    AS2 help please, movie clip used as a button ?

    Hey, I have searched everywhere for how to do this and couldnt find anything i need to create a new movieclip in the actionscript and then be able to click the new movieclip so it rotates ? any help, thanks 8)

    Below is what i already have as my code, shape1 is the movieclip i am duplicating and square 1 is the new movieclip but i cant seem to get it to work when i click it :/

    Code:
    duplicateMovieClip(shape1, square1, 1);
    setProperty(square1, _x, 200);
    
    
    square1.onPress = function()
    {
    	setProperty(square1, _rotation, 90);
    
    }

  2. #2
    :
    Join Date
    Dec 2002
    Posts
    3,518
    Code:
    var sq1 = shape1.duplicateMovieClip("square1", 1);
    sq1._x = 200;
    
    sq1.onPress = function() {
    	this._rotation += 90;
    };

  3. #3
    Senior Member
    Join Date
    Apr 2009
    Posts
    117
    thanks this should do the trick :P i need to get on my coding computer first though to try it out, thanks

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