ActionScript 2.0 :: Dynamic Border Drawing Code?
May 2, 2006Anyone know if there is some actionscript that could draw a border around a movieclip?
View 3 RepliesAnyone know if there is some actionscript that could draw a border around a movieclip?
View 3 RepliesFlash draws borders centered on the edge of shapes. Is there an AS3 way to draw a border all inside a shape? I've got an image gallery and I'd like to create a rollover effect with a 4px border growing inside the thumbs. I can do it via timeline, but I'd like to do it via AS.
View 11 RepliesIs it possible to draw a border around an arbitrary Shape (or Sprite) dynamically with ActionScript? From the IDE is really easy, just select the line color and click the Shape with the paint tool (S).
View 3 RepliesI'm having an issue trying to automatically create a Sprite border for movieclips generated by an xml file.
Here is my loop function :
Code:
function callThumbs():void {
for (var i:Number = 0; i < my_total; i++) {
var thumb_url = my_images[i].@THUMB;
[Code]....
All the pictures from the xml file do load, they all have the glowfilter effect but only the first one has border..
I am drawing a rectangle at 0,0 with a line-style-thickness of 4px. It has height 100% and width 50%. The right-hand edge has a border 4px wide, but all 3 other sides are only 2px, suggesting the mid-point of the edge is classed as the border. Why isn't the edge drawn 'inside' the rectangle?
View 1 Repliesi am loading JPG images into movie clips, then drawing a border around them with this code:
Code:
var frameColor:Number = 0xffffff;
var lineThick:Number = 1;[code]..............
i am resizing the movieclips (and thus the contained pictures) down to 160 x 120, but those pixel values didn't work in my lineTo statements. i multiplied them by 3, using 480 and 360 and it works better. however, the behavior isn't consistent. i am attaching a picture so you can see how the border is too tall on some of the images.so, is there a better way to use pixel dimensions with lineTo? does the scaling factor between flash vector units and pixels change between movieclips depending on what content i load into the movie clip?
My question is related to putting a border around an image. I am dynamically loading images from an xml file and they appear as thumbnails. I want to put a 1 or 2 pixel black border around the image when I load it. The problem that I see is that some of the images are portrait and others, landscape. I hope there is a way to do this in AS? I have searched the forum but nothing.
View 3 RepliesI have a dynamic border with a loader and buttons and whatnot. It works for the most part, but when the images have not loaded on the persons machine before, there is an occasional glitch preventing it from displaying properly(the border shrinks to nothing, the loading bar goes to aobut 10px, etc.)
[Code]...
Just thought I'd see if this is possible with the XML Photo Gallery.1. Is it possible to create a dynamic border for the loaded image depending on the size of the image being loaded? 2. Is it possible to move the Y position of the caption text box depending on the height of the loaded image? ie if the image is 200 pixels high, then the text box should be positioned at 220 pixels.The current code I have which loads the images then automatically scrolls through them is:
Code:
delay = 6000;
// -----------------------
[code].....
My question is related to putting a border around an image. I am dynamically loading images from an xml file and they appear as thumbnails. I want to put a 1 or 2 pixel black border around the image when I load it. The problem that I see is that some of the images are portrait and others, landscape.
View 3 RepliesI have a dynamic border with a loader and buttons and whatnot. It works for the most part, but when the images have not loaded on the persons machine before, there is an occasional glitch preventing it from displaying properly(the border shrinks to nothing, the loading bar goes to aobut 10px, etc.)Here is the gallery thing (only 1 - 11 are uploaded)I assume it's some kind of issue with loading, as in resizing before loading properly or something...but to me the code looks fine. The big problem with this error is it's extremely hard to troubleshoot as i have to upload the SWF, and clear my cache everytime.
View 3 RepliesIs there a way to set the border of a box to be set in actionscript, as well as set a glow property.I am going to be resizing the box using actionscript so if I have it as an image or in the mc it will be resized and that would be no good.
View 10 RepliesIm adding video windows to a video object inside mxml file
videoMovie = new Video(120,80);
Now would it be possible to apply a rounded border of 2px on this somehow?
I know you can use
<s:controlBarContent>
<s:Label text="cornerRadius:" />
<s:HSlider id="slider"
[Code]....
On regular objects but cannot find out how to do this with dynamically added ones :(
I need to know that how to create a border to dynamic MovieClip.
I wanted to give a border to thumbnails which is coming through xml
I have a background with a border that is behind dynamic images. I am trying to resize the background to custom fit each jpg that is loaded. However, I cannot get the width/height from the movieclip the jpgs are loaded into and I can't get the width/height from the jpgs.
Here is what I tried:
setProperty("_root.serve_contents.photo_button.pho to_background_image.subpages.photo_examples_bg", _height, getProperty("examples/photo/event/amcel_medium.jpg", _height));
[Code]....
I'm making an animation wich draws a line after a moving object (circle on a guide line). this circle is a movieclip. and I have many lines to draw up, so i put many of them on separate scenes. I've created buttons from movieclips, and when pressed it draws a line. I got everything to work properly, but when one line is drawn, and you press the same button to get the same line drawn again I get the error code.. #1009 cannot access a property or method of a null object reference.I think that it's because the graphics is still there but i can't seem to clear it before it draws again.. Ive used graphics.clear (); but that just clears all, so when it "draws" again it doesn't show..only the movieclip-animation works. so what is the problem here?my code for the line drawing is:
import flash.display.Shape;
import flash.events.Event;
var shape = new Shape();
[code]....
Can someone tell me how to command it to retrieve a movie clip in my library instead of drawing stuff by code and working with that? The movie clip I want to get is called "float1".[code]
View 9 RepliesI'm using evt.target.borderColor = 0xff00000 to successfully change the color of a dynamic text filed that is the target Now I'm trying to change the border size. borderSize isn't being accepted, so I was wondering if there is an attribute to change the border size of a text field? My internet searches are coming up with nothing that works.
View 1 RepliesHow would I make a dynamic text boxes border a certain color, along with background color.
View 1 RepliesHere's my latest attempt at rendering a dynamic rectange (w/ width, height, border_width, border_color & background_color) I'm trying to render a dashed border, and can't seem to get the code right...
I've reworked my logic about five times, and can get the dashes to render right (almost) but the fill color disappears. It's rendered using actionscript. You can see the issues if you change the border width... Anyone mind taking a look to see what I'm doing wrong? It seems like the moveTo function isn't behaving right when I get to the end of each line.
[Code]...
i need to draw an API Drawing and do the following with it;
-Effective experimentation with the drawing API e.g. gradient fills, curves etc.
-Effective rationalising of code using functions and loops.
-A sophisticated/realistic looking drawing, that shows the ability to use the drawing API with a high degree of skill.
I have a skin that's base clas is GraphicRectangularBorderSkin (from degrafa). I'm using it as a panel skin. I'm using Degrafa 3.2, Flex 3.2. It throws a #1502 error (thrown when a script runs too long) every time. If I remove the line changing the em variable, the error goes away.The class is basically (although I paraphrased for the sake of clarity):[code]
View 1 RepliesI've been having some trouble with this code:
Code:
onClipEvent(load)
{
_root.stop();
dO = 3.6;
r = 75;
[code]....
I've created a movieclip with a donut graphic.Set the actionscript to the clip. Created a 2nd frame in the timeline with a photo.Nothing happens.
I am trying to dynamcally create several buttons using the Flash API. The following code hnts at the concept. But I can't sem to dynamically name and create the MovieClip since the attachMovieClip() method does not seem to exist in Actionscript 3.
View 4 RepliesI am trying to make a dynamic drawing tool for rectangle like this link : [URL]
I was able to make a line tool.
I can't get this code to work. Is this complete?
[URL]
Code:
onClipEvent(load)
{
_root.stop();
[Code].....
I have a line drawing that I have to animate it has curved lines like the image attached.I have tried tweening however it looks terrible and not smooth in it drawing.this is the action script I already have so far.
createEmptyMovieClip ("curveLine", 1);
with (curveLine) {
lineStyle (2,0xffffff, 600);[code].....
drawing a straight line, just like on the flash game Line rider. I need to be able to create a line by dragging it with the mouse.
View 3 Repliesthe short version of what i need to do - via AS3 and PHP - is a user can come to this project and draw something. drawing's no problem, that's done. my issue is figuring out how to take that drawing data, converting it into something i can save to my database ... then reload said data and recreate it on the stage when the user "loads" it.
i guess i'm just searching for a way to take drawn data (just using typical as3 drawing methods) and breaking it down to a string, then bringing that string back in and recreating it. i'm not super versed in ByteArrays - which i suspect is where my answer lies.
user doesn't need to adjust any of this after it's loaded, fwiw. i'd just like to send this drawing data out - then bring it back in and place it back on the stage.
Picture a stage filled with multiple instances of a circular movieclip. I want to be able to:
(a) Dynamically draw a path from any one instance X to any other instance Z, but that path cannot cross any instance Y that happens to fall in between instances X and Z (a kind of dynamic drawing with collision detection). If an instance Y sits between X and Z, the path should curve around Y to get from X to Z. I am able to draw a path from X to Z using the drawing API, but I am not sure how to perform a hit test on the path and every other instance because I can't seem to limit the hit area of the hit test to the actual shape of the path (as opposed to its bounding box).
(b) Use a tapered, brush-like stroke for the line style. I have had mixed results with this. I can get it to taper (although not very smoothly), but I have a hard time getting it to twist and wind in a convincing fashion.