Script I think Macromedia also finally realized that it would be unwise to remove the normal mode of the Script Editor in the Flash MX2004 version. This is almost equivalent to the vast number of ordinary flash enthusiasts want to learn the script refused to thousands of miles away, and even some beginners have been getting started.
Fortunately, the only temporary, old friend came back, just changed a new name, called "Script Helper." As with previous "normal mode", it provides beginners with a simple, suggestive, and accessible friendly interface with the Scripting Editor, and has been improved to make it more complete. As shown in Figure 1:
As we all know, in the previous version, Flash has provided the dynamic transfer of JPG files, you can use the program from the outside load a picture of JPEG format. In Flash8, the new PNG and GIF format support is also available. Here we do a small test, on the one hand, try to load the PNG and GIF format images, and also experience the new "script helper" charm.
First, prepare two files Aa.png and bb.gif, and to test Flash8 support for dynamically loaded GIFs, we use animated GIF images with transparent backgrounds. Animation for GIF.
Pull a button out of the window-public library. Press Ctrl+f8 to create a new blank movie clip (note: The clip doesn't put any objects in it). Then ctrl+l the library panel, dragging out a blank movie clip and putting it on the stage. Make sure that the blank movie clip is selected and that the instance name is "XX" in the property panel. This blank clip acts as a container for loading pictures and controls where the pictures are transferred. As shown in Figure 3. OK, the preparation is complete.
Select the button to bring up the script editing window and make sure the Script Assistant is selected. Press the "+" number--global function--movie clip control--on, in the Script Assistant panel, make sure the mouse event is released, as shown in Figure 4.
Point "+" number--global function--browser/network--loadmovie, in the Script Assistant panel, enter the URL "aa.png", select "Target" in the list after the location, and then enter "XX" in the following text box, which is the instance name of the blank movie clip that you just made. As shown in Figure 5.
Press Ctrl+s to save the file in the same directory as the two pictures. Press the Ctrl+enter test effect, click the button, "Aa.png" was successfully transferred, as shown in Figure 6.
In the same way, simply modify the Loadmovie URL for bb.gif and press Ctrl+enter to test. You can see that bb.gif is also successfully loaded and keeps the transparent background of the picture, but unfortunately, the GIF animation can only display the first frame. As shown in Figure 7, I changed the background color to determine the retention of the transparent background.
By experimenting, we successfully loaded PNG and GIF images and learned of the "scale" that they could achieve. In this process, the "script assistant" also carried out a cursory browsing, I hope that we can have some harvest, but also may wish to experience the charm of Flash8 in person.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service