|
-
Prid - Outing
It's actually pretty simple. Say your rectangle Movieclip has an instance name of, rectangle_mc, and you have different Bitmap textures in your Library, given that each one has their own linkage ID (right-click a bitmap at a time, choose Properties, expand show Advanced, tick/check Export for Actionscript, and in the Identifier field, type something unique, for instance, texture1, then repeat this for the other Bitmaps in your Library, but give each one a unique linkage ID, texture2, texture3, etc.). Finally, in your button click-code (on(relelase) or onRelease or something), type this:
Code:
bitmap = flash.display.BitmapData.loadBitmap("texture1"); // change texture1 for other textures
b = rectangle_mc.getBounds(rectangle_mc);
rectangle_mc.createEmptyMovieClip("mc", 0);
with(rectangle_mc.mc){
lineStyle(0, 0x000000, 0);
moveTo(b.xMin, b.yMin);
beginBitmapFill(bitmap);
lineTo(b.xMax, b.yMin);
lineTo(b.xMax, b.yMax);
lineTo(b.xMin, b.yMax);
lineTo(b.xMin, b.yMin);
endFill();
}
I am back, guys ... and finally 18 :P
BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|