Flash MX Combat Highlights: Defining pop-up windows

Source: Internet
Author: User
Tags html tags
Pop-up window

   Example Description
In the process of designing a Web page, you often want to make some pop-up windows, and the size of the window, hidden menu bar, toolbar and other properties can be changed.

   relevant Knowledge
Use JavaScript to control the properties of pop-up windows.

   production Process
Step 1: Open Flash and create a new file. Select the Insert > Add symbol (insert>new symbol) from the menu bar, click the button in the dialog box that appears, and use the Rectangle tool to draw a rectangular box in the up frame, as shown in the picture.

Step 2: Place the button in the appropriate location, select button buttons, select Actions/mouse control/on from the Drop-down menu that appears in the Actions panel, and add mouse events, as shown in the figure.

Point again
Select the Actions/browser/network/get URL from the Drop-down menu that appears, and the URL entry bar appears as shown in the figure.

Input in URL bar: Javascript:openwin ("http://www.yufeng21.com", "Yu Feng Multimedia", "Toolbar=no,location=no, width=776 height=600")
The Windows bar does not need to enter parameters because JavaScript commands can help us implement pop-up windows.
Variables (variable) is the default don ' t send.
The final code is as follows:
On (release) {
GetURL ("Javascript:openwin", "http://www.yufeng21.com\", "Yu Feng multimedia \", "\" Toolbar=no,location=no, width=776 height=600\ ")");
}
Tip: A. " Http://www.yufeng21.com ": Opens the URL address of the window.
B. Yu Feng Multimedia: window name.
C.toolbar=no,location=no, width=776 height=600: Window properties.
Step 3: Select File > Publish settings from the menu bar (file>publish settings), select HTML tags in the pop-up dialog box, set the corresponding parameters or use the default values directly, click the Publish button, and publish the HTML file. As shown in the figure.

Step 4: Edit the published HTML file and insert the following code between <script language= "JavaScript" >
var newwin;
function Openwin (winurl,winname,winfeatures)
{
Newwin = window.open (winurl,winname,winfeatures);
}
</SCRIPT>
Tip: You can insert the above code in Dreamweaver, FrontPage, and other web editing software, or you can open and edit HTML files in Notepad, as shown in the figure.

Step 5: Save the edited file, and then open the test in the browser, and the pop-up window should look like the following:

You can change the above URL address to another address, you can also modify the window properties, the following is attached to set the window properties options and instructions.
Toolbar whether the toolbar is displayed. Yes is displayed; No is not displayed
Location whether the address bar is displayed. Yes is displayed; No is not displayed
Directories whether the link bar is displayed. Yes is displayed; No is not displayed
Status shows whether the state bar is displayed. Yes is displayed; No is not displayed
Menubar whether the menu is displayed. Yes is displayed; No is not displayed
Scrollbar whether scroll bars are displayed. Yes is displayed; No is not displayed
Resizable whether the window is allowed to change size. Yes to allow; no is not allowed
Width to set the breadth of the window in pixels (px)
Height setting window, in pixels (px)
The distance, in pixels (px), of the top window and the upper boundary of the screen.
The distance, in pixels (px), of the left window and the left-hand edge of the screen.
Channelmode set whether you want to open the window in Windows98 Channel view. Yes opens as a channel view, no to open a general window. The default value is No.
Fullscreen whether the window opens a new window as a full screen. Yes opens a new window as a full screen window; No is open as a normal window, and the default is No. After the full screen opens the window, you need to press the ALT+F4 key to close the window.


Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.