Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Movie clip and/or Simple button background image

Guest
Aug 20, 2015 Aug 20, 2015

If possible:

  1. How to display a background image within the movie clip or simple button borders only?
  2. How to tile the image if is smaller than the movie clip or simple button?

Thank you

TOPICS
ActionScript
210
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 20, 2015 Aug 20, 2015

1. You could use a mask that is the size of the bordered area and use it for the background image.

2. After you import an image into the library you can select it as a fill in your color panel.  Just choose the bitmap option in the fill selection drop down of the color panel - normally it defaults to "Solid color" as shown, but there is a bitmap option at the bottom of that drop down

colorpaqnel.fw.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 20, 2015 Aug 20, 2015
LATEST

FloorPlan.jpg

Ned,

More details to hopefully describe better the issue.

This is an empty .swf floor plan pulled out from SQL server.

Then a floor matching query in ASP file creates all flooring samples per each room and put them in a XML file.

And .as3 included file inserts each room with the flooring samples.

It can be seen how room 1 is bigger than the sample, room 2 extends outside floor plan and room 3 can be seen in the wall(s) gaps.

Of course this example uses a single color sample for simplicity.

I would love to clip any sample within each room ONLY.

And tile them if the room is bigger than the sample.

Thank you for your time

TK

for each (var Product:XML in myXML.product)

{

    if(Product.@fileID!="")

    {

        var imageLdr:Loader = new Loader();

        imageLdr.load(new URLRequest("820.jpg"));

        for each (btn in Product.room)

        {

            myButton = getChildByName("btn_" + btn.@number);

            if (myButton != null)

            {

                myButton.addChild(imageLdr);

            }

        }

        imageLdr.unload();

    }

    else

    {

        trace("Not found");

    }

}

<?xml version="1.0" encoding="ISO-8859-1" ?>

- <floor products="5">

- <product rooms="1" id="4" color="24" code="821" name="Frothy Latte" fileID="optima821.jpg">

<room id="605" number="100" name="Foyer" area="37.72" percentage="100" />

</product>

- <product rooms="1" id="21" color="27" code="824" name="Yellow Mustard" fileID="optima824.jpg">

<room id="571" number="113" name="Multipurpose" area="99.83" percentage="100" />

</product>

- <product rooms="1" id="9" color="32" code="831" name="Hot Ginger" fileID="optima831.jpg">

<room id="569" number="116" name="Gym" area="375" percentage="100" />

</product>

- <product rooms="1" id="14" color="51" code="862" name="Raw Ivory" fileID="">

<room id="584" number="151" name="Classroom" area="78.93" percentage="100" />

</product>

- <product rooms="1" id="8" color="71" code="904" name="Camouflage" fileID="">

<room id="583" number="209" name="Classroom" area="78.98" percentage="100" />

</product>

</floor>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines