Refer to a common value to the scene by the global data
Overview
Using the global data, make the value which the scene can refer together
Specification of this example
Behavior
Set the global data, and Get in another scene.
Screenshot
How to try this example
1.Click the link below, then the folder containing zip file automatically opens.
File
2.Right-click and hold on the zip file, and drop it on working window of FJ system. The images and scene data in zip file are loaded on the program automatically.
3.Set the global data by loading the Scene 0, and re-measure the image. Then System automatically gets the global data and display in Text Window.
How to implement
Scene data
Unit No.
|
Processing Item
|
0.
|
Macro
|
The Macro Program below segment is to be set in '0.Macro'.
Macro Program
*MCRINIT
AddGlobalData "SampleValue", 9999 '(1)
Return
*MEASUREPROC
Return
*MEASUREPROC
GetGlobalData "SampleValue", SV& '(2)
Return
*MEASUREDISPT
DrawText "Get SampleValue = " + Str$(SV&), 1, 1
Return
The macro program is in
this(Scene0) and
this(Scene1) link.
Explanation
(1)Set the global data("SampleValue").
(2)Get the global data("SampleValue").