As3 obtain URL parameters

Source: Internet
Author: User

 

VaR Str = Loaderinfo. Parameters [ " True_name " ];

 

Note: The parameter name is. SWF ?... Address

 

 

 

In fact, it is very simple. I used to use: xx.swf? Xx = 11 & xxx = 22 ...... It is inconvenient to pass parameters to flash. Later I checked the param tag. Oh, it's too easy ~ I would like to share with you the following!

In the webpage, add a sentence under the <OBJECT tagCode: <Param name = "flashvars" value = "xx = 1 & xxx = 2"/>

In flash, the value can be directly used: XX or XXX!

Of course, the above method is for As2, so what should as3 do? Of course, parameters is used!

Use in Flash: stage (stage can be left blank, this is available). loaderinfo. Parameters. XX (XX is the parameter name imported from the web page described above) or take it like this:Stage. loaderinfo. Parameters [0];

Haha, I 've done it before. I forgot. Today I met someone else's as2 code and reviewed it. By the way, I recorded it for my reference ~ If it is helpful to you, please leave a footprint, 3q ~

 

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.