Jump to content
Search Community

Is there a way to set the stroke around an image?

junky test
Moderator Tag

Recommended Posts

you can draw one with the graphics drawing API

 

import com.greensock.*;
import com.greensock.loading.*;
import com.greensock.events.LoaderEvent;


var myImage:ImageLoader = new ImageLoader("car.jpg",{container:this,x:10,y:10,onComplete:drawStroke});


myImage.load();

function drawStroke(e:LoaderEvent):void
{
var img:Sprite = e.target.content;
img.graphics.lineStyle(2, 0xff0000, 1, false, LineScaleMode.VERTICAL, CapsStyle.SQUARE, JointStyle.MITER);
img.graphics.drawRect(0,0,img.width,img.height);
}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...