Method, system and the equipment that loads progress bar is added in the Flash recreation in batches
Technical field
The invention belongs to field of computer technology, be specifically related to a kind of Flash recreation and add method, system and the equipment that loads progress bar in batches.
Background technology
Flash recreation is the new in recent years a kind of game form that rises and since its have recreation simple, easy to operate, green, need not advantages such as installation and file volume are little and liked by numerous online friends gradually.
When on webpage, opening certain Flash recreation, games page can show the loading progress bar usually, thus progress from this Flash recreation to the game player that point out games page that prestrain is carried out in.
Though existing Flash recreation self has the loading progress bar,, such loads progress bar and mainly has following defective: (one) versatility is poor: can only in certain Flash recreation, use; (2) in the recreation loading procedure, after network interrupted and recovers, can only play to this Flash again loaded, thereby has wasted game player's time, has reduced game player's experience.
Summary of the invention
To the defective that prior art exists, the present invention provides a kind of Flash recreation to add method, system and the equipment that loads progress bar in batches, has the good advantage of versatility; And, in loading game process, also have the network state detection function, when the Flash recreation is interrupted and after recovering, can the loading progress when interrupting begin to continue to load this Flash recreation, saved player's time, improved player's experience.
Technical scheme provided by the invention is following:
The present invention provides a kind of Flash recreation to add the method that loads progress bar in batches, may further comprise the steps:
S1, batch processing server generate to the Flash recreation and add the needed configuration file of loading progress bar;
S2 when the swf file of the source of said batch processing server reception client upload, adds said configuration file to said source swf file, obtains new swf file;
S3, the said new swf file of said batch processing server stores and the mapping relations of said source swf file.
Preferably, said configuration file comprises: said Flash recreation required material file of playing more than that uses in operational process; Each said recreation material file is according to the execution time series arrangement in said Flash recreation.
Preferably, after the S3, also comprise:
S4, when said client was moved said source swf file, the recreation load page of said client was obtained the IP address of said batch processing server;
S5, said recreation load page is set up communication linkage according to the IP address and the said batch processing server of said batch processing server;
S6, said recreation load page is sent to said batch processing server and is added the request message that loads progress bar; Wherein, carry the filename of said source swf file in this request message;
S7, said batch processing server obtains the said new swf file corresponding with said source swf file according to the said new swf file that prestores with the mapping relations of said source swf file;
S8, said batch processing server sends to said recreation load page with said new swf file;
S9, said recreation load page receives and carries out said new swf file.
Preferably, said recreation load page is carried out said new swf file and is specially:
Carry out in the process of said new swf file in said recreation load page, said recreation load page detects the linking status of current network in real time;
When said recreation load page detected the current network interruption, the recreation when said recreation load page is preserved the network interruption loaded progress;
When said recreation load page detected current network and recovers connection status from interrupting changing into, the recreation that said recreation load page reads said network when interrupting loaded progress, and began continuation from this recreation loading progress this recreation is loaded.
The present invention also provides a kind of Flash recreation to add the system that loads progress bar in batches, comprising:
The batch processing server is used for generating to the Flash recreation and adds the needed configuration file of loading progress bar; When the swf file of the source of reception client upload, add said configuration file to said source swf file, obtain new swf file; Store the said new swf file and the mapping relations of said source swf file;
Client is used for sending source swf file to said batch processing server.
The present invention also provides a kind of batch processing server, comprising:
Generation module is used for generating to the Flash recreation and adds the needed configuration file of loading progress bar;
Receiver module: the source swf file that is used to receive client upload;
Add module: be used for adding the said configuration file that said generation module generates to said source swf file that said receiver module receives, obtain new swf file;
Memory module: the mapping relations that are used to store the said source swf file that said new swf file that said interpolation module obtains and said receiver module receive.
Preferably, said configuration file comprises: said Flash recreation required material file of playing more than that uses in operational process; Each said recreation material file is according to the execution time series arrangement in said Flash recreation; Said batch processing server also comprises:
First communication module: be used for setting up communication linkage with said client;
First receiver module: be used for setting up after the communication linkage, receive the request message that interpolation that said client sends loads progress bar through said first communication module and said client; Wherein, carry the filename of said source swf file in this request message;
First acquisition module: be used to search the said new swf file of said memory module storage and the mapping relations of said source swf file, the said source swf file that receives according to said first receiver module obtains the said new swf file corresponding with said source swf file;
First sending module: be used for the said new swf file that said first acquisition module gets access to is sent to said client.
The present invention also provides a kind of client, and said client comprises the recreation load page, and said recreation load page comprises:
Second acquisition module: be used for when the swf file of the said source of operation the IP address that obtains said batch processing server;
Second communication module: the IP address and the said batch processing server of the said batch processing server that is used for getting access to according to said second acquisition module are set up communication linkage;
Second sending module: the communication linkage that is used for setting up according to said second communication module sends to said batch processing server and adds the request message that loads progress bar; Wherein, carry the filename of said source swf file in this request message;
Second receiver module: be used to receive the said new swf file that said batch processing server sends;
Execution module: be used to carry out the said new swf file that said second receiver module receives.
Preferably, said execution module comprises:
Detection sub-module: be used for carrying out the process of said new swf file, detect the linking status of current network in real time in said recreation load page;
Preserve submodule: be used for when said detection sub-module detects the current network interruption, the recreation when preserving the network interruption loads progress;
Reading submodule: be used for when said detection sub-module detects current network and recovers connection status from interrupting changing into; Recreation when reading network that said preservation submodule preserves and interrupting loads progress, and begins continuation from this recreation loading progress this recreation is loaded.
Beneficial effect of the present invention is following:
The method and apparatus that loads progress bar is added in Flash recreation provided by the invention in batches, can in all kinds of Flash recreation, add in batches to load progress bar, has the good advantage of versatility; And, in loading game process, also have the network state detection function, when the Flash recreation is interrupted and after recovering, can the loading progress when interrupting begin to continue to load this Flash recreation, saved player's time, improved player's experience.
Description of drawings
Fig. 1 adds the schematic flow sheet of the method that loads progress bar in batches for the Flash recreation that the embodiment of the invention provides;
The structural representation of the system that loads progress bar is added in the Flash recreation that Fig. 2 provides for the embodiment of the invention in batches;
The structural representation of the batch processing server that Fig. 3 provides for the embodiment of the invention;
The structural representation of the client that Fig. 4 provides for the embodiment of the invention.
Embodiment
As shown in Figure 1, the present invention provides a kind of Flash recreation to add the method that loads progress bar in batches, may further comprise the steps:
S1, batch processing server generate to the Flash recreation and add the needed configuration file of loading progress bar; Wherein, said configuration file comprises: said Flash recreation required material file of playing more than that uses in operational process; Each said recreation material file is according to the execution time series arrangement in said Flash recreation.For example: files such as used game picture, sound when the recreation material file can be carried out for Flash recreation.
S2 when the swf file of the source of said batch processing server reception client upload, adds said configuration file to said source swf file, obtains new swf file;
When the user hopes in existing any a Flash that does not have loading progress bar Presentation Function plays, to add the loading progress bar; Then need to have the Flash game uploading now and give the batch processing server; In existing Flash recreation, add the loading progress bar by the batch processing server, thereby realized in the Flash recreation, adding the purpose that loads progress bar in batches.
Among the present invention, source swf file is the existing Flash recreation that loads progress bar that do not have.
Wherein, Swf (shock wave flash) is the professional format of the animation software Flash of Macromedia (at present by ADOBE corporate buyout) company; It is a kind of animation file form of supporting vector and dot pattern; Be widely used in webpage design, fields such as cartoon making, the swf file also is called as the Flash file usually.
S3, the said new swf file of said batch processing server stores and the mapping relations of said source swf file.
S4, when said client was moved said source swf file, the recreation load page of said client was obtained the IP address of said batch processing server;
S5, said recreation load page is set up communication linkage according to the IP address and the said batch processing server of said batch processing server;
S6, said recreation load page is sent to said batch processing server and is added the request message that loads progress bar; Wherein, carry the filename of said source swf file in this request message;
S7, said batch processing server obtains the said new swf file corresponding with said source swf file according to the said new swf file that prestores with the mapping relations of said source swf file;
S8, said batch processing server sends to said recreation load page with said new swf file;
S9, said recreation load page receives and carries out said new swf file.
In this step, the recreation load page is carried out said new swf file and is specially:
Carry out in the process of said new swf file in said recreation load page, said recreation load page detects the linking status of current network in real time;
When said recreation load page detected the current network interruption, the recreation when said recreation load page is preserved the network interruption loaded progress;
When said recreation load page detected current network and recovers connection status from interrupting changing into, the recreation that said recreation load page reads said network when interrupting loaded progress, and began continuation from this recreation loading progress this recreation is loaded.
Through this step, realized the network state detection function, when Flash recreation is interrupted and after recovering, can the loading progress when interrupting begin to continue to load this Flash recreation, saved player's time, improved player's experience.
The present invention also provides a kind of Flash recreation to add the system that loads progress bar in batches, and is as shown in Figure 2, comprising:
Batch processing server 21 is used for generating to the Flash recreation and adds the needed configuration file of loading progress bar; When the swf file of the source of reception client upload, add said configuration file to said source swf file, obtain new swf file; Store the said new swf file and the mapping relations of said source swf file;
Client 22 is used for to batch processing server 21 transmission source swf files.
The present invention also provides a kind of batch processing server, and is as shown in Figure 3, comprising:
Generation module 31 is used for generating to the Flash recreation and adds the needed configuration file of loading progress bar; Wherein, configuration file comprises: said Flash recreation required material file of playing more than that uses in operational process; Each said recreation material file is according to the execution time series arrangement in said Flash recreation;
Receiver module 32: the source swf file that is used to receive client upload;
Add module 33: be used for adding the said configuration file that generation module 31 generates to source swf file that receiver module 32 receives, obtain new swf file;
Memory module 34: be used to store the mapping relations of adding the said source swf file that said new swf file that module 33 obtains and receiver module 32 receive.
The batch processing server also comprises:
First communication module 35: be used for setting up communication linkage with said client;
First receiver module 36: be used for setting up after the communication linkage, receive the request message that interpolation that said client sends loads progress bar through first communication module 35 and said client; Wherein, carry the filename of said source swf file in this request message;
First acquisition module 37: be used to search the said new swf file of memory module 34 storages and the mapping relations of said source swf file, the said source swf file that receives according to first receiver module 36 obtains the said new swf file corresponding with said source swf file;
First sending module 38: be used for the said new swf file that first acquisition module 37 gets access to is sent to said client.
The present invention also provides a kind of client, and is as shown in Figure 4, and said client comprises the recreation load page, and said recreation load page comprises:
Second acquisition module 41: be used for when the swf file of the said source of operation the IP address that obtains said batch processing server;
Second communication module 42: the IP address and the said batch processing server of the said batch processing server that is used for getting access to according to second acquisition module 41 are set up communication linkage;
Second sending module 43: the communication linkage that is used for setting up according to second communication module 42 sends to said batch processing server and adds the request message that loads progress bar; Wherein, carry the filename of said source swf file in this request message;
Second receiver module 44: be used for after said second sending module 43 sends the request message of said interpolation loading progress bar, receiving the said new swf file that said batch processing server sends;
Execution module 45: be used to carry out the said new swf file that second receiver module 44 receives.
Execution module comprises:
Detection sub-module 451: be used for carrying out the process of said new swf file, detect the linking status of current network in real time in said recreation load page;
Preserve submodule 452: be used for when detection sub-module 451 detects the current network interruption, the recreation when preserving the network interruption loads progress;
Reading submodule 453: be used for when detection sub-module 451 detects current network and recovers connection status from interrupting changing into; Recreation when the network that reading and saving submodule 452 is preserved interrupts loads progress, and begins to continue this recreation is loaded from this recreation loading progress.
In sum, method, system and the equipment that loads progress bar is added in Flash recreation provided by the invention in batches, can in all kinds of Flash recreation, add in batches to load progress bar, has the good advantage of versatility; And, in loading game process, also have the network state detection function, when the Flash recreation is interrupted and after recovering, can the loading progress when interrupting begin to continue to load this Flash recreation, saved player's time, improved player's experience.
The above only is a preferred implementation of the present invention; Should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; Can also make some improvement and retouching, these improvement and retouching also should be looked protection scope of the present invention.