Macromedia Flash - Automatically copy images in flash workspace
In this article, I will show you how to import any image into the flash workspace and then copy it multiple times using a small piece of code. Now let us begin.
Step 1
First save the image below (or have the picture you need ready):
Step 2
Create a new flash document. Press Ctrl + J key on the keyboard ( Document Properties ) and set the width of your document to 400 pixels and the height of the document to 300 pixels .
Step 3
Call the current layer image . Double-click on its default name (Layer 1) to change the name, then press Enter to save the new name.
Step 4
Now select File > Import > Import to stage ( Ctrl + R ) and import the picture you prepared in step 1.
Step 5
While this photo is still selected, press the delete key on the keyboard to delete it.
Step 6
Right-click on the image in the Library library of flash and select Linkage . In this dialog box select Export for Actionscript and give this class a unique name. In this case, I use the image name.
Step 7
Create a new layer above the image layer and name it action . After that, select the first frame of layer action and go to the Action Script ( F9 ). Then add the following code:
import flash.display.BitmapData;
var tile: BitmapData = BitmapData.loadBitmap ("image");
this.beginBitmapFill (tile);
this.lineTo (Stage.width, 0);
this.lineTo (Stage.width, Stage.height);
this.lineTo (0, Stage.height);
this.lineTo (0, 0);
this.endFill ();
Hopefully this guide will save you a lot of time when you need to copy many objects.
You should read it
- Should I buy a Canon or Brother printer?
- How to Put Pictures on a Flash Drive
- The painful and prolonged death of Flash
- [Review] Is the Brother MFC L2701DW printer good?
- 8 tips to help flash games run faster
- Brother printer has an error when connecting by USB to a computer with Windows 11
- Men who have a brother have a higher chance of becoming gay
- What is the Apple Center Stage feature? What is the effect?
May be interested
- Macromedia Flash - Product image advertising effectsin this article, we will show you how to create a product advertising effect in flash. you can use this effect when you need to introduce a new product launch or in banner ads. this effect does not need to use any action script code but only created with mask in flash.
- Macromedia Flash - Create menu effectsthis lesson will show you how to create a flash menu with the effect when moving the mouse. to create this post, you will have to use the action script code.
- Macromedia Flash - Vivid photo effectsthrough this tutorial, you will learn how to create a vivid photo effect with some basic flash tips. this article does not need to use action script code.
- Macromedia Flash - Create flash menu with soundin this flash tutorial, we will guide you to create a dynamic flash menu with sound. you can use this menu on any website.
- Macromedia Flash - Create analog clock in Flashthis tutorial will show you how to create a real working clock using flash effects.
- Macromedia Flash - Self-designed animated menuthis tutorial is quite complicated but we will try to explain it in the easiest way. make sure you follow the instructions step by step.
- Macromedia Flash - Text presentation in Flashin this article, we will learn how to create a text presentation in flash using some special flash tips.
- How to prevent GIFs from automatically playing in the browserthere are now many websites for automatic playback of gif images in the browser. this sometimes annoys the reader, even affecting the page loading speed, especially when the network flickers to download gif images for quite some time. the best way is to disable the ability to automatically play animated images on the browser.
- Macromedia Flash - Effects of changing position of textthis tutorial will show you how to create a constantly changing text effect in flash using the action script.
- Macromedia Flash - Create a snow effectthrough this tutorial, you will create a snow effect simply and quickly. you can use this effect on headers, banners on holidays or christmas cards ...