|
-
Actionscript Drawing
Hi,
I need to develop dialog boxes with handleers like below.
http://www.krishnakorea.com/sudhi/dialogue.bmp
It has four handlers to drag , resize, rotate and fifth handler which is out of box to rotate it.
I have no idea how start this development. Can anybody share a code snippet or idea to start with.
Thanks in Advance.
~Sudhi
-
var x:Number = 1; x /= 0;
well, I can get you a code for rotating, but resizing...I have no idea.
to rotate it, you would have a movie clip (whatever you want to use to rotate the box) inside another movie clip that holds the text box
we'll call it "rotate_mc"
we'll say something like this:
Code:
onClipEvent(enterFrame){
this.onPress = function(){
this._parent._rotation = Math.atan2(Math.sqrt(Math.pow(_parent._x-_parent._x,2)+Math.pow(_parent._y-_ymouse,2)),Math.sqrt(Math.pow(_parent._x-_xmouse,2)+Math.pow(_ymouse-_ymouse,2)));
}
}
I think that should work.
Tell me how it goes.
~Zippy Dee
Ted Newman
-
var x:Number = 1; x /= 0;
I just had another thought, which is that to do resizing, you could change the scale, but I think that would change the text size, too...
You could give it a try. I'll keep looking.
-
thanks
Dear Zippy,
Thanks for your response.
I have got idea how to resize, rotate, drag a movie on a stage.
But I dont get idea how to maintain the fifth handler, which is outside of box.
I must able to move that on stage .
-
var x:Number = 1; x /= 0;
nested movie clips?
I'm not quite sure what you're asking for.
do you mean just another rotation point that is not on the corners of the box?
-
Fifth handler means the one which is outside in below pic,
http://www.krishnakorea.com/sudhi/dialogue.bmp
If you observer picture , there are 4 handlers on the corner of rectangle and one in center.
The four handlers are to resize and rotate movie, the middle one is to move movie clip ( drag and drop) . If you observer the picture there is another one ( 6th handler on smalll circle shape) which outside of rectangle.
I need to move that as well to get differnt shape.
If you can share little code snippet , I will be delightful.
Thanks ,
Sudhi
-
var x:Number = 1; x /= 0;
Ah, so you want to be able to move that to around but have the rest stay still?
-
yes
 Originally Posted by ZippyDee
Ah, so you want to be able to move that to around but have the rest stay still?
Yes.absolutely
-
var x:Number = 1; x /= 0;
Hmm, well... I'm not exactly sure how you would do that with AS, but I know of a program that does allow drawing. It is very bad, I will say, but there are some good things (such as that). I would not say to use it over Flash, but if you have to get something, then go for it.
The program is 3D Flash Animator. There is a section on flashkit for it. Check it out.
www.3dfa.com I believe. You can get a free trial that allows you to export for 7 days.
if you need it, I can give you some codes to accomplish that so you can get it done in 7 days...
or just find a way to do it in AS (which I suggest would be better)
-
get it ,its all yours
Check out this link you will get it all here
http://blog.greensock.com/
-
Try using flash's drawing ability like this:
you use: lineStyle(0x000000);
this to move without drawing: moveTo(x,y);
this to move with drawing: lineTo(x,y)
and this to make curves: curveTo(curvePointx, curvePointy, anchorPointx, anchorPointy);
also use clear() to erase everything.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|