Now what I need help with: I need to drag the item again to another location without resizing it to another 100 per cent which makes it grow bigger. What actionscript code will work to make the item return to it's smaller size when it is dragged or to keep it from resizing anymore? Sure appreciate any help anyone can give me.
what I mean is, after doing the first drag and drop, this MC then resizes to 100% and fits the item B. However, when I pick up the MC again from that location, drag it and drop it onto item B again, it resizes to 100% again. The more it is dragged and dropped, it always resizes to 100% which means the item gets bigger and bigger which no longer fits the item B.
what I can't figure out, is how to stop the MC from getting bigger and bigger.
thanks for your reply and I hope you understand what I am trying to do. Think of a piece of clothing that is removed from a doll and again put back on the doll. I have many other outfits that I want to do the same thing. It's a paper doll game.
I'm doing a paper doll project when means the item dragged onto the doll will be dragged and dropped again if the player so desires. Only when I did this, as soon as I dropped the item onto the doll a second time, it got bigger in size and did not fit.
I need to have the code resize one time only for the item. I thought about using if/else, but cannot figure how that should be written.
What I am looking to do, is like the other project. Only this time the movie clip will get smaller as it is moved to another location. When the same movie clip is brought back to the orignial location, it will become it's normal size again.
I'm not sure a drag and drop would work, as the movie clip should get smaller and smaller as it is moved to another location and dropped. Then when it is moved again, it will become bigger and bigger again to it's original size and dropped.
Oh, got it. Make a rectangle, which covers your wardrobe, or where you want when the clothes are dropped, to be bigger again, and convert it to a movieclip. Give it an instance name of wardrobe, and change its Alpha to 0%, or use this code on your frame to make it invisible:
wardrobe._alpha = 0;
Just put this wardrobe rectangle in a new layer below everything, to make things easier for you. Next, use this code instead on your movieclip clothes:
The idea of using getBounds to only hit inside the movieclip's bounds, was not a bad idea, but why do it when there's a much better an easier way??
The Rotation Shape, which I presume is in the movieclip of that code you've provided, copy it, paste it on the Main Stage, click on it or select it, press F8 - now, you'll see a box with 3 alternatives:
MovieClip - used to create an own timeline for an object Button - used to create a button Graphic - used to hold a graphic inside a "box", to make things easier
Select Button, and press OK. Now, give the button an instance name of, rotate_right, copy the button and paste it, use Free Transform Tool (T), to mirror the rotation button, and give it an instance name of rotate_left - Next, use this code on your frame:
What this code does, is that it either rotates himself movieclip LEFT or RIGHT by 30 degrees depending on the button you press, when you PRESS that button. Since this is on the Main Stage, where the himself movieclip is as well, we don't need to use _root or other kind of scopes to refer to it, since the buttons and the movieclip are on the same level. You could also use the same code for movieclip, like, not turn the rotation buttons into buttons, but just have them be movieclip, because onPress also works for movieclips, but the reason I turned it into a button, is because of your getBounds code. It seems like you want them to be able to click on the whole bounds of the movieclip, regardless of the rotation button graphic. To do this with buttons, double-click the buttons, to enter them, find the HIT frame (4th frame, named HIT), select it, press F7 to make a new Keyframe, and draw a rectangle in there - this is going to be the area where the user can click on your button, regardless of its shape, and what you draw on HIT Frame, won't display on your button
Hope this helps
PS: Read my recent tutorial on HERE (check the - BUTTONS - part) - what I do there, is a more easy way to give buttons clickable properties, but you have to put the code ON the button, like you did with your code, you put it ON the movieclip, so I thought that method would work better for you, the method I used, is the same, just to put on Frames!
17 Years old boy, who loves the Computer Technology
BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS
Yes, I see what you mean. I now have two buttons on my stage, one is rotate_right and the other is rotate_left. I have put the code you gave me on the frame. I also have himself, which is a movie clip on the stage. However, when I click on the rotate_left button, himself moves at a 30 degree angle. It did not flip to a mirror image of itself. Did I do something wrong here?
Here I am again. You certainly are good at this flash actionscript stuff. Now I am trying to drag a movie clip(called zeke) from Scene1 to Scene2. I made an alpha movie clip and placed it at the far right of my first scene and gave it an instant name of 'wall'. On the movie clip called zeke I have put this code: