Solved

Function to return shape (as3)

Posted on 2013-05-21
1
512 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
Comment Utility
function GetShapeAndImage(url:String) {
    var loader:Loader =new Loader();
    loader.load(new URLRequest(url));
    return loader;
};
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now