Method for receiving value from page (. NET) in flash.

Source: Internet
Author: User
In flash Code

Onenterframe = Function () {
VaR tmp_id=ID;//ID is a variable from the page
}

Methods on the page < Script >
Function F_change (FID)
{
Document. All ("Object1"). Setvariable ("ID", FID)
}
</ Script >  

< Object Classid = "CLSID: D27CDB6E-AE6D-11cf-96B8-444553540000" Codebase = "Http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" Width = "550" Height = "400" ID = "Object1" >
< Param Name = "Movie" Value = "Test.swf" >
< Param Name = "Quality" Value = "High" >
< Param Name = "Flashvars" ID = "Flashvars" Value = "ID"   >
< Embed SRC = "Test.swf" Quality = "High" Pluginspage = "Http://www.macromedia.com/go/getflashplayer" Type = "Application/X-Shockwave-flash" Width = "550" Height = "400" > </ Embed > </ Object > < BR />
< ASP: Label ID = "Label1" Runat = "Server" > </ ASP: Label >
< BR />
< Button Onclick = "Javascript: f_change (123 )" > Test </ Button >
< Button Onclick = "Javascript: f_change (456 )" > Test </ Button >

Ideas...
Use loadvar (<ParamName= "Flashvars"ID= "Flashvars"Value= "ID" >) Pass the value to the Flash (Onenterframe) to dynamically update the received value.

Disadvantages:
Constantly refresh the flash and occupy CPU resources.

Searching for other methods...

Why is the flash remoting for. Net of... Macromedia not supported to directly call the method on the page?

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.