A flash file function library calling method, device, electronic equipment and medium

A technology of file functions and preset functions, which is applied in the computer field, can solve problems such as slow opening speed, slow download, and large space occupation, and achieve the effect of code reuse and size reduction

Active Publication Date: 2022-03-22
WUHAN DOUYU NETWORK TECH CO LTD
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The embodiment of the present application solves the existing technical problems of slow downloading, slow opening speed, and large space occupation caused by large Flash files by providing a method, device, electronic device, and medium for invoking a Flash file function library.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A flash file function library calling method, device, electronic equipment and medium
  • A flash file function library calling method, device, electronic equipment and medium
  • A flash file function library calling method, device, electronic equipment and medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0046] like figure 1 As shown, a method for invoking a Flash file function library, the Flash file includes an ActionScript main program and N SWC components, and N is a positive integer, and the method includes:

[0047] Step S101, read the calculation parameters required by the target function into the first variable through the preset function function in the SWC component, wherein the target function belongs to the ActionScript main program;

[0048] Step S102, call the objective function interface corresponding to the objective function in the ActionScript main program through the preset function function, so that the objective function calculates the first variable, obtains a calculation result, and stores the calculation result into the second variable;

[0049] Step S103, allocating a variable pointer, the variable pointer is used to store the second variable, and the second variable is used as a parameter of the variable pointer;

[0050] Step S104, passing the firs...

Embodiment 2

[0099] This embodiment provides a Flash file function library calling device, such as Figure 4 As shown, the Flash file includes an ActionScript main program and N SWC components, where N is a positive integer, and the device includes:

[0100] The reading module 401 is used to read the calculation parameters required by the target function into the first variable through the preset function function in the SWC component, wherein the target function belongs to the ActionScript main program;

[0101] The calling module 402 is configured to call the target function interface corresponding to the target function in the ActionScript main program through the preset function function, so that the target function can calculate the first variable, obtain a calculation result, and store the calculated result. Put the above calculation result into the second variable;

[0102] An allocation module 403, configured to allocate a variable pointer for storing the second variable, using th...

Embodiment 3

[0110] This embodiment provides an electronic device, such as Figure 5 As shown, it includes a memory 510, a processor 520, and a computer program 511 stored on the memory 510 and operable on the processor 520. When the processor 520 executes the computer program 511, the following steps are implemented:

[0111] Through the preset function function in the SWC component, read the calculation parameters required by the target function into the first variable, wherein the target function belongs to the ActionScript main program;

[0112] Call the target function interface corresponding to the target function in the ActionScript main program through the preset function, so that the target function can calculate the first variable, obtain the calculation result, and store the calculation result in the second variable;

[0113] allocating a variable pointer for storing the second variable, using the second variable as a parameter of the variable pointer;

[0114] Passing the first...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a Flash file function library calling method, device, electronic equipment and medium. The method includes: reading the calculation parameters required by the target function into the first variable through the preset function function in the SWC component; The function function calls the target function interface corresponding to the target function in the main program of ActionScript, stores the calculation result in the second variable; allocates the variable pointer for storing the second variable; passes the first variable and the second variable to the ActionScript language through the preset function function; Write the second variable to the first parameter and pass it to the caller. It solves the technical problems of slow downloading, slow opening speed and large space occupation caused by the existing large Flash files. The technical effect of reducing the size of the SWF file, thereby increasing the download speed, increasing the opening speed and reducing the file space occupation is realized.

Description

technical field [0001] The invention relates to the technical field of computers, in particular to a method, a device, an electronic device and a medium for invoking a function library of a Flash file. Background technique [0002] At present, Flash is widely used in web design, web animation production and web video playback. Most video websites, including live broadcast websites, use Flash as their video player, and most web games are also developed using Flash. The specific file used for Flash is a SWF file. In order to reuse the code so that Flash can support C language and C++ language development, Flash provides a disguised SWC library file, and the SWC function library can be developed in C and C++ languages. By writing ActionScript code, SWC will be called. Libraries, so as to finally generate executable SWF files, so that the existing function codes of C and C++ can be greatly reused. [0003] However, in order to realize the same function in C language and Action...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): G06F8/30
CPCG06F8/31
Inventor 周志刚张文明陈少杰
Owner WUHAN DOUYU NETWORK TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products