Mutual control between VFP and Flash - Data Interaction

xiaoxiao2021-03-06  69

[Original] Mutual Control between VFP and Flash - Data Interaction

The flash article (http://dev.9cbs.net/Article/35/35481.shtm) mainly illustrates Flash to control VFP, which is one-way. This article describes the data interaction between them, so that the real application can be applied in practical applications. . .

Look at the interface first. . .

The related pictures of this topic are as follows:

Flash used in the program

[Fullscreen views] http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash 'type =' application / x-shockwave-flash 'width = 600 height = 168> http: // www. vfp.cn/sdss/uploadfile/2004-9/test2.swf

I will understand the interface, roughly think: Flash issues an open command --- VFP response Opens the command and open the table ---- incoming the relevant information of the table to Flash

About Flash issued an open command --- VFP response Opens the command and open the table, please refer to post: http: //dev.9cbs.net/Article/35/35481.shtm

I mainly explain the implementation of the second half.

The main steps:

[1] Several dynamic text domains are added in Flash, named (ie, set the variable name).

[2] Use the setvariable (name, value, value, value) of the flash object in the VFP to incorporate the value into the corresponding Flash object. . Flash will automatically refresh this value.

Part of code:

THIS.SETVARIABLE ("T_Name", Alltrim (DBF (Alias ​​()))) && Tested THIS.SetVariable ("T_Recount", Alltrim (Str (Recount ()))) && records THISTVARIABLE ("t_fcount", AllTrim (Str (FCount ())))) && field number this.setvariable ("t_curecno", alltrim (Str (scruto ())) && current record

It's so simple. . .

You can also use the getVariable () function to get the value of the object in Flash, of course, these objects should be implemented as variables. .

The following is a quote from VFP fans in 2004-9-3 10:15:30:

I am going to make a dairy farm with Flash. I can know the relevant information of this cows (such as how many cows, have a few heads of pregnancy .....)

This is my most ideal dairy farm "real scene" query system

(Oh, there is already abroad, but I don't know if I use the Flash database)

By the way, talk about the solution for this application proposed by the VFP charm.

When you click on a cattle in the cattle, the parameters are incorporated into the VFP query method, and the results of the query are in Flash, and then in the form of milk, then in the corresponding dairy parameters display window. Display, or don't click, when the mouse moves to a certain cow's object. Parameters are automatically passed, and the query is returned. .

Continue to find it. . .

转载请注明原文地址:https://www.9cbs.com/read-120003.html

New Post(0)