Please discuss the programming of the combination of flash. ocx (8.0) and. net.

Source: Internet
Author: User

In actual development, if Flash and Microsoft products are used in combination for programming, the interface development efficiency can be improved or the game development method can be changed (when the requirements are relatively low,
I don't have to use OpenGL or other engines for programming. I even used. Net to write online games (based on UDP ).
For the purpose of inspiring discussion, we should try our best to use brilliant language orCodeReply. Could you please help me back up? (I describe it in VB. You can reply in any language)

Load Control: softwave flash (flash. ocx 8.0)
Control Loading Flash Animation shockwaveflash1.movie = app. Path + "\ flash.swf"
Set the falsh background to transparent (Windows wmode = Windows by default, and white blocks the background of other layers. Note that the animation background should also be transparent)
Set wmode = transparent
To obtain the value of a variable in flash, use shockwaveflash1.getvariable ("txtname ") 'Txtname is the "variable" attribute of the text box in flash.
 You can useShockwaveflash1.setvariable "txtname", "variable value"

If there are multiple buttons in the animation, to determine which button the user has clicked, the first step isEachAs shown in figure
On release {
Fscommand ("e ")'E is the flag value
}
Step 2: write in the Flash control event of VB
Private sub shockwaveflash1_fscommand (byval command as string, byval ARGs as string)
If command = "OK" then
MSG = msgbox ("what you press is" & command & "button", vbapplicationmodal, "flash and VB are combined successfully ")
Elseif command = "retry" then
MSG = msgbox ("You are pressing" & command & "button", vbapplicationmodal, "flash and VB have been combined successfully ¡")
Elseif command = "exit" then
MSG = msgbox ("You are pressing" & command & "button", vbapplicationmodal, "flash and VB have been combined successfully ¡")
Else
Unload me
End if
End sub
I don't know if Flash supports the attribute process. If you want to do something, there are a lot of variable parameters and it is very troublesome to pass them one by one. Flash. ocx (8.0)
A new function called callfunction is added, but the debugging is not successful recently. It may be because I used the MX 2004 version.
Can the SWF generated after writing a function? Recently I read a foreign Article, as if the new method of the Flash. ocx 8.0 control is only
The format support for flash 8.0 is released. You can try it and discuss it later. Another question is how to call the callfunction with parameters, because
Shockwaveflash1.callfunction only supports one variable. If you are using a previous version (for flash. ocx 7.0, check VB or VC ++
If the transferred value changes, you can define the duplicate execution in the animation. In fact, if the number of unique operations is small, the resources consumed can be ignored)
Cross-language programming materials have always been rare in China. I hope you will be interested in this topic and support this post, and I will reply to your tips.
To enrich the content of this post, the important thing is to float first

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.