Tween Stretching Corners
Hi I have created a tween using Actionscript. The tween increases the height of a shape from 60px to 600px. The shape that I am stretching vertically has rounded corners. I have noticed that when I stretch the object with the tween the corners are also stretched and this distorts the object.Does anyone have a solution for this?Thank you in advanced.
Adobe > ActionScript 1 and 2
Posted on: 04/05/2008 02:58:23 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Tween Stretchs Corners
Hi I have created a tween using Actionscript. The tween increases the height of a shape from 60px to 600px. The shape that I am stretching vertically has rounded corners. I have noticed that when I stretch the object with the tween the corners are also stretched and this distorts the object.
Does anyone have a solution for this?
Thank you in advanced.
Corners
Hey,
I've made a small thing in fireworx, a little arrow in a box. Now i imported that in flash mx, and put it on the scene, but i don't see the botom line of the box
So i thought, maybe i can draw this in flash itself, i started ... but i don't know how to get the corners right. They never are in 90° angle. You gotta really zoom in to see it ... cuz it's kinda small.
If you use the hairline, it's fine, but the line is to small.
I added the fla file so you could see for yourself ...
Hope you understand what i mean and somebody can help me
Greetz,
DiGiTi
Who Wants To Help Me? - Join Tha Four Corners
1.Help me Rebuild and Layout My Site i have a host already.
a)help me make and intro if you want read B
b)help me and my friend GoGo Anime -Brian make movies
2.Join Tha Four Corners theres already 2 me and brian
a)if you do u get Yourname@frozenflash.com E-mail Fowarding to you.
Please Tell Me which one you can help with i hope u can help with everything.
Rounded Corners
why is it that when u have used rounded corners on illustrator when you go to import it into flash mx it becomes straight edges?? Can anyone help????
Square With Corners
When you draw a square ouline using rectangle tool (using stroke only/no fill) then increase the line thickness the corners become rounded.
How do you draw square corners at this thickness?
How do you make the line thicker than '10'?
+
Radius Corners
Hello Peoples, I am new to this forum and flash in general. My site is http://www.mosaictilecreations.com/. I recently built this site and a friend in Calgary did the animation. The one thing I would like to do is place radius corners on the Mosaic Sea Animation. I dunno, somehow the sharp corners just seem a little harsh. Anyway, if anyone can help me accomplish this I'd be grateful. Cheers, scubes
[F8] Rounding The Corners
i have this quick function to make a box with a green-ish background:
Code:
function makeBox(){
newsBox = imageBox.createEmptyMovieClip("newsBox"+X, imageBox.getNextHighestDepth());
newsBox.init();
//news bg******************************
newsBg = newsBox.createEmptyMovieClip("newsBg", newsBox.getNextHighestDepth());
var newsBm:BitmapData= new BitmapData(300,12,false,0xbcff39);
newsBg.attachBitmap(newsBm, 1);
}
works fine, but is there a way to make the corners rounded, rather than "right angles". Thanks
Rounder Corners
I can draw a rounded rectangle but how do i draw a rounder rectangle with say only 2 corners rounded and a border around the shape?
Rounded Corners
I can draw a rounded rectangle but how do i draw a rounder rectangle with say only 2 corners rounded and a border around the shape?
Sharp Corners
Hi there,
I have a pretty old version of Flash, MX I think and I'm simply trying to draw a box with a 5px outline that has sharp corners. I've checked the 'sharp corners' check box in the custom settings for the outline but I keep ending up with a box that has slightly rounded corners! It's driving me mad, can anyone tell me where I'm going wrong???
Thanks.
Darkened Corners
how can i achieve darkened corners on my flash site, like in http://www.artofdavesilva.com ? i've been playing with the color fill but i don't think thats how to get the BEST looking dark corner. thanks
Why Does It Round My Corners?
Okay...I am just trying to import single vector graphics in MX from Illustrator 10 by exporting them as swf files in Illustrator. My problem is that when import them in flash, the export/import rounds all of my corners on my graphic. For example, in Illustrator, I have a series of small 2x2 pixel squares...in Flash the corners are all rounded. Any ideas???
Stretch To Both Corners, How?
Hi,
Im working on my portfolio.
How can i get it stretched all the way on the right side?
Have a look
http://privat.bluezone.no/stein.sebergsen/issue04.htm
Regards,
Simon
Box Corners Not Rendering Completely...
Howdy.
I create streaming media modules for various clients using Flash (version doesn't really matter, but I am usually using v5). I create a .fla and then I drop the tuned .swf files into RealPlayer as backgrounds creating an "environment" for the presentation. Frequently I use a box as an outline for the video region, slide region, or whatever region happens to be needed. I have a client complaining that the corners of the boxes are missing the connecting pixel. The boxes use a 1pixel line, and the lines are connected. When I zoom in on the box corner in the .fla file, all is good, but when I publish it out to a .swf, it loses the corner pixel...only at the BOTTOM of the box. Odd eh? Anyone have a way to fix this? My client is driving me nuts about it.
On a related note, how do I make the corners of the box a right angle and not a smooth, rounded corner? Am I missing something? Like my brain. Seems like it should be an easy fix. Thanks a lot. I appreciate any input at all. I am desperate.
Boxes With Straight Corners?
How is it possible to get boxes with straight corners in Flash MX? How does Macromedia do this in their web site's current Flash animation? (This one: http://www.macromedia.com/home_movies/home_fma.swf)
If you look at the top right corner, at the square right of "Navigation", when you zoom in, you can see that the box has straight corners. How did they do this? How would you do it?
I have tried to convert lines to fills, however this does not fix the "smooth corner" problem (when I zoom in, the corners are still not straight).
I thank you for any suggestions.
RCarlton
Squared Corners On Strokes
Even if I check the "Sharp Corners" check box to create a stroke on a rectangle, I still get rounded corners. Is there a way to do it to get sharp corners?
Drawing Square Corners
I'm having problems trying to draw anything without rounded corners. For instance if I use the square tool to draw a square the outside corners of the stroke are rounded. I made sure that corner radius is 0 on the tool preferences and under the custom for the stroke Square corners is checked. The inside of the stroke is square but the outside is rounded. Any suggestions?
Thanks.
Lines With Straight Corners
is it possible to create lines in flash with straigth corners instead of rounded shapes? each end of a line is rounded now, I need a straight end.
any ideas?
thanks
Untidy Rounded Corners
I am currently designing a flash demo where all the windows need to have rounded corners. I have noticed that when using the rounded corners tool in mx 2004 the results are quite poor. The corners are very untidy and jagged. Has anyone else had this problem and if so is there any way to overcome this problem? I've attached a screenshot to show what I mean.
Thanks in advance
Applying Round Corners
I would like to now if there is a way of applying round corners to an existing rectangle.
I need to be able to create the rectangle, then resize it and finally apply the round corners. If I do the corners while first drawing the rectangle, they are distorted when I resize it.
Is there a way?
Rounded Corners Annoy Me
My Flash movie contains a rectangle with rounded corners. Trouble is the stroke never lines up properly on the corners, no matter how careful I am. I've never seen this issue on professional Flash movies. How can I prevent this?
I attach a screenshot of the annoying rounded corner problem! If anyone can solve this problem, I would be extremely grateful!!
Jagged Rounded Corners
Ok I know the topic of jagged rounded corners has been brought up before, but for the life of me I can't figure this out. If I make a rounded rectangle, circle, what have you the rounded parts come out jagged no matter how thick I make the stroke. If I zoom in it gets clear.
So what's the deal? I'm using MX 2004.
Any help would me great.
Thanks
Rounding Corners On Images
Hi everyone,
Need help! Does anyone know how I could round the corners of images using CSS? Is it actually possible to do, or am I beating round the bush?
Thanks
Nikki
Edited: 02/18/2007 at 12:55:40 PM by Nikki00
Rounded Corners With Border
I need to create a swf with rounded corners and a 3px border for display on a web page that has a gradient background. Therefore the corners must be transparent (rather than a solid color since that will not match the background). I have drawn the rounded corners border in my Flash file and imported images beneath it but cannot eliminate the outside corners when I create the swf. Is there a way to turn off the background color so that the outside corners are transparent in my swf? Also, the only way I have found to eliminate the outside corners from my imported images is to import gifs with transparent rounded corners. Does Flash support transparency in any other file formats since gifs are not good for photos? Thanks for any help provided.
DrawBox With Round Corners?
If I use the drawBox function, how can make the corners round?
I want to set all the corner radiuses of the dynamically created box to 6 pixels.
Maybe later I need to set the corner radius to a different number.
How can I achieve this with scripting?
thanks Attila
Rounded Corners Issue
Im in a hurry, so don't give me the "please search before post"-talk. I need to draw a box with rounded corners. I can't get a hang of it. I want to draw it from the following variables:
boxwidth = 200;
boxheight = 200;
radius = 5;
How do I draw this? You should see the artwork I have (by mistake) created while trying to get it right
'
Block With Round Corners
I always noticed that if you have a block with round corners that the rounds never looked good unless the _xscale/_yscale ratio didn't change... so today I wrote a class to handle it for me. Its all actionscript and draws you a block with round corners. It dosen't handle exactly like a movieclip... but I'll be using it in the future for sure:
SWF: http://jsites.no-ip.com/Flash/exp/ro...roundBlock.swf
AS Class File: http://jsites.no-ip.com/Flash/exp/ro.../roundBlock.as
FLA: http://jsites.no-ip.com/Flash/exp/ro...roundBlock.fla
ZIP: http://jsites.no-ip.com/Flash/exp/ro...roundBlock.zip
Usage:
ActionScript Code:
//initializeround = new roundBlock("uniqueMovieClipName", initialWidth, initialHeight, initialXPosition, initialYPosition, initialAlpha, initialColor);function mover() {this._par._x = 15;this._par._y = 20;//set the postion of the top left corner of the box to (15, 20);this._par.update();//update the boxes postion/look}//set an onEnterFrame function for the boxround.setOnEnterFrame(mover);//clear the onEnterFrame of the boxround.clearOnEnterFrame();//Available properties:_width //set the width of the box_height //set the height of the box_x //the x postion of the left side of the box_y //the y position of the top of the box_alpha //the alpha of the box_roundSize //the width/height of the bevel_bgcolor //the color of the box (0xFFFFFF format)/*------------Use _par as a reference in the movieclip to refer to its parent roundBlock class (as seen in the onEnterFrame function above)--------------You must call the update() function everytime you wish to update the boxTherefore you must use this._par.update() in all onEnterFrame functions*/
I hope that I explained well enough
Drawing API Corners/Curves
This was something I played with a while ago, trying to get a handle on the Flash Drawing API (another post today reminded me of it). Thought someone might be able to use it/learn from it. All code is in the first frame. (Oh, if you wonder why it isn't doing anything just click around a bit.)
Crappy Looking Rounded Corners...WHY?
Is there any way to fix the way flash renders rounded corners like on rounded rectangles? They'll look fine in authoring, but look like crap once published.
Rounded Corners Issue
Im in a hurry, so don't give me the "please search before post"-talk. I need to draw a box with rounded corners. I can't get a hang of it. I want to draw it from the following variables:
boxwidth = 200;
boxheight = 200;
radius = 5;
How do I draw this? You should see the artwork I have (by mistake) created while trying to get it right
'
Block With Round Corners
I always noticed that if you have a block with round corners that the rounds never looked good unless the _xscale/_yscale ratio didn't change... so today I wrote a class to handle it for me. Its all actionscript and draws you a block with round corners. It dosen't handle exactly like a movieclip... but I'll be using it in the future for sure:
SWF: http://jsites.no-ip.com/Flash/exp/ro...roundBlock.swf
AS Class File: http://jsites.no-ip.com/Flash/exp/ro.../roundBlock.as
FLA: http://jsites.no-ip.com/Flash/exp/ro...roundBlock.fla
ZIP: http://jsites.no-ip.com/Flash/exp/ro...roundBlock.zip
Usage:
ActionScript Code:
//initializeround = new roundBlock("uniqueMovieClipName", initialWidth, initialHeight, initialXPosition, initialYPosition, initialAlpha, initialColor);function mover() {this._par._x = 15;this._par._y = 20;//set the postion of the top left corner of the box to (15, 20);this._par.update();//update the boxes postion/look}//set an onEnterFrame function for the boxround.setOnEnterFrame(mover);//clear the onEnterFrame of the boxround.clearOnEnterFrame();//Available properties:_width //set the width of the box_height //set the height of the box_x //the x postion of the left side of the box_y //the y position of the top of the box_alpha //the alpha of the box_roundSize //the width/height of the bevel_bgcolor //the color of the box (0xFFFFFF format)/*------------Use _par as a reference in the movieclip to refer to its parent roundBlock class (as seen in the onEnterFrame function above)--------------You must call the update() function everytime you wish to update the boxTherefore you must use this._par.update() in all onEnterFrame functions*/
I hope that I explained well enough
Drawing API Corners/Curves
This was something I played with a while ago, trying to get a handle on the Flash Drawing API (another post today reminded me of it). Thought someone might be able to use it/learn from it. All code is in the first frame. (Oh, if you wonder why it isn't doing anything just click around a bit.)
Rough Rounded Box Corners?
Whenever I use the rounded corner option with the box tool, the corners look muddy or jaggy.
Anyone else?
frozenpeas
Rounded Corners Are Not Smooth
I am trying to make boxes with rounded corners (with a stroke).
No matter what number I set for the points, they come out blurry.
When I zoom in they are clean and smooth but at 100% they are blurry.
Does anyone else get this problem?
Sharp Stroke Corners?
How do I make the corners of just a stroked box sharp? As it is now, the "inside" of the stroke is sharp, but the outside is rounded ... any help? I did a search for this here and couldn't find anything ... Thanks, all
Stretching A MC
Plz help me out from my situation...i am briefing my probs here..
I have some movie clips in _root. and there will be hotsopt point in each MC. on pressing and dragging that point the MC will resize accordingly...
This thing i want to do it with ActionScript...i am planning for another MC(empty MC) in _root which is having ActionScript for changing the other MCs..
The ActionScript MC will take parameters of MCname to resize and current Width and Height..
I have all the idea in my mind....but i am not good at ActionScript .. can any one help me..whether my idea is wrong or right ???
all kinds of comments would be appriciated..
Thanks in adv,
Stretching MC
Hey all,
I have some MCs which I have stretched (keyframed) to suit the content that is loaded into them. I have used the external preloader tutorial.
The problem I have, is that when the MCs are stretched, it's stretching the 'loading' text in the transitions. Is there a simple way around this?
I assume it might be possible with _xscale, or something similar. The MC's are only stretching horizontally.
Cheers,
dreeft.
Help With Stretching...
I have a very simple design for a website I want to make...
What I need help with, is to make the orange square (see attaxhed picture) stretch to each side so that it always cover the entire screen/window.
Everything else (text images etc.) needs to be centered.. I really hope someone can give me a helping hand here
Stretching MC
Hey all,
I have some MCs which I have stretched (keyframed) to suit the content that is loaded into them. I have used the external preloader tutorial.
The problem I have, is that when the MCs are stretched, it's stretching the 'loading' text in the transitions. Is there a simple way around this?
I assume it might be possible with _xscale, or something similar. The MC's are only stretching horizontally.
Cheers,
dreeft.
Scale Rounded Box - Corners Deform
Hi there,
is there a way to use SetProperty on an movieclip with a rounded bow without the corners of the bow getting deformed, meaning that the radius stays fixed ?
Only sollution I found till now is to cut the original graphic in pieces: corners vs. rest and scale these pieces and then position the corners. Of course I get blanks of like 0.5 mm.
All ideas are welcome,
Thanks,
Kurdy
Animated Mask (round Corners)
I need to have a animation which slowly builds an arrow which bends 180 degrees. I want it to appear from the start of the arrow and finish at the end of the point.
I have used a mask of the object with a shape tween which is fine for straight edges but how do i animate a shape so it can go around the angle of the arrow.
Like the arrows in the diagram attached.
Actionscript To Create Box With Rounded Corners
Is there a quick way to draw boxes with rounded corners in actionscript that mimic the ones you can make in the design interface? I haven't found a library or function to do this yet.
Using Flash MX.
Thanks!
Collision Detection: Falling Through Corners?
I've posted this under 'games' section as well but havn't had any bites. If this is wrong to double post just delete me and I won't do it again.
Hi,
I've been working on a game engine for a few weeks now and have come here after much work at trying to fix some of my bugs.
Background
Basically, the world is a LOT larger than the screen (read 12,000x12,000 currently) but split up into screen sized sqaures. As the player moves around, objects are loaded dynamically in and removed when they go off the sreen. Objects left, right, top and bottom coords are kept in 1D arrays for speed of lookup (as opposed to 2D). The array oV keeps a list of all currently visisble (on screen) objects (what position in oX, oY etc arrays these objects are in). oC is the dynamic content for an object, the most that I need to say here I think is that oC[n][1] refers to vX (x velocity) and oC[n][2] to vY (yVelocity).
(If your curious oC[n][0] refers to object's type.)
Problem
OK. Everything works fine. I do a collision detection with the player to all visible objects, I check to see if he's hit something and if so stop him etc Cool right?
The only thing wrong is that if I hit (or maybe approach is a better word) the corner of an object the player (or moving object) will go right through it! I've worked out the why this is but not a solution (or at least one that I like).
You see the problem is because I'm firstly testing to see if it should even bother checking for collision. But if it is not above or beside an object it doesn't bother checking to see if it should hit. If I hit from the top I'll be above the object (x check) before having to check y. If I'm beside an object (y check) for seeing if I hit it when moving in x.
The only thing that comes to mind is doing a line intersect test on each line in the objets bounding box (or at least 2 of them, if I'm coming from the right only check the right, top only top etc) but this might take longer.
Any suggestions? Any things that might make this faster? I do know that I don't really have to be returning more than 1 hit result and this would normally be somewhat overdoing it and I could speed things up by return()ing a result as soon as I find it, but I've found that sometimes you can hit two things at once, and move the player through a later object in the list if you don't bother finding it (only really when moving fast).
code:
// returns an array containing [left, top, right, bottom, hit target]
function checkCollisionWithVisibleBox(n, x1, y1, x2, y2, xVel, yVel){
if (n){
var x1 = oX[n]; // left
var y1 = oY[n]; // top
var x2 = oX_oW[n]; // right
var y2 = oY_oH[n]; // bottom
var xVel = oC[n][1];
var yVel = oC[n][2];
}
var out = [];
for (var n in oV){
if (oHit[n]){
// x motion hit
if ((x1 >= oX[n] && x1 <= oX_oW[n]) || (x2 >= oX[n] && x2 <= oX_oW[n]) || (x1 < oX[n] && x2 > oX_oW[n])){
if (yVel >= 0){ // going down
if (y2 < oY[n] && y2+yVel >= oY[n]){
out.push([false, false, false, true, n]); // left, top, right, bottom, hit target
}
}else{ // going up
if (y1 > oY_oH[n] && y1+yVel <= oY_oH[n]){
out.push([false, true, false, false, n]); // left, top, right, bottom, hit target
}
}
}
// y motion hit
if ((y1 >= oY[n] && y1 <= oY_oH[n]) || (y2 >= oY[n] && y2 <= oY_oH[n]) || (y1 < oY[n] && y2 > oY_oH[n])){
if (xVel > 0){ // going right
if (x2 < oX[n] && x2+xVel >= oX[n]){
out.push([false, false, true, false, n]); // left, top, right, bottom, hit target
}
}else{ // going left
if (x1 > oX_oW[n] && x1+xVel <= oX_oW[n]){
out.push([true, false, false, false, n]); // left, top, right, bottom, hit target
}
}
}
}
}
if (!out.length){
return(false);
}else{
return(out);
}
}
|