Solved

Function to return shape (as3)

Posted on 2013-05-21
1
533 Views
Last Modified: 2013-08-11
Hello

How would you make a function that returns an shape based on getting a image from a url then just put the image in the background(fill) of a shape(Rectangle) and return it in a function so you can use it like:
addChild(GetShapeAndImage('www.randomimage.com/myimg.png')); ?
0
Comment
Question by:JoachimPetersen
1 Comment
 
LVL 29

Accepted Solution

by:
dgofman earned 500 total points
ID: 39188898
function GetShapeAndImage(url:String) {
    var loader:Loader =new Loader();
    loader.load(new URLRequest(url));
    return loader;
};
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to how to record live broadcast.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question