|
|||
|
Hi,
First i want to say you that i check out several SWF2EXE apps but SWf KIT is the best one. I have downloaded SWf KIT Pro 3.2 demo and i'm impressed how fast and easy it works. Thank you. Now on the topic - I want to create a little desktop app which have to be compilated in transperent mode(clip shape is unsuitable). Main.swf has few buttons to load and play external swfs in full screen mode. When i packed all in one exe file the CPU usage is over 60% and flashplayer slowdown. I understand this is because of transperent background mode. But suppose i have compilated Main.swf only in separate exe file. Afterward i create another Container.swf with labeled frames. Each frame have actionscript to load one external swf and compilate Container.swf in another exe file with all swfs packed, but with Appearance->Window shape->Rectangle. In that mode the CPU usage is less than 40% and flashplayer runs adequate. My question is: When the user clicks the button in the Main.exe and execute Container.exe, how can be determinate on which frame in Container.swf playhead to stop? Thanks in advance |
|
|||
|
Thank you for you quick answer but im newbee in SWF Kit and AC2 and cant understand some things.
The situation is as follows: Main.swf is compiled to Main.exe and contain two buttons. In actionscript //for first button code is: on (release) { import SWFKit.*; Container.swf.gotoAndStop("frame_1"); } //for second: on (release) { import SWFKit.*; Container.swf.gotoAndStop("frame_2"); } //In SWF Kit: var conn = new PConn(); var result = conn.send("Container.exe", "HandleData"); //Main.exe=client Container.swf is compiled to Container.exe(server) and contain two frames labeled respectively frame_1 and frame_2. //Actionscript in first frame: stop(); loadMovie("1.swf", _root.empty_mc); //in second frame: stop(); loadMovie("2.swf", _root.empty_mc); //In SWF Kit: getAdditionalFile(); var conn = new PConn(); conn.listen("Container.exe"); //this part i take from SWF Kit Help and i can't understand it: function HandleData(p1, p2) { return p1 + " " + p2; } How have to looks the function "HandleData"? Thank you for support |
|
|||
|
You cannot call "Container.swf.gotoAndStop("frame_1");" in main.exe, because it cannot control the container.swf in another process.
In main.swf to handle the button clicks Code:
on (release) {
import flash.external.*;
ExternalInterface.call("controlContainer", "frame_1");
}
Code:
function controlContainer(frame) {
var conn = new PConn();
var result = conn.send("Container.exe", "HandleData", frame);
}
Code:
function HandleData(frame)
{
FlashPlayer.targetGotoLabel("_root", frame);
}
|
|
|||
|
Hi,
I'm sorry for bothering you again. I puted all codes to their respective places but nothing happens. I even packed Container.exe with Main.exe because of possible path problem but it resulted in nothing. Thank you |
|
|||
|
It should work. The idea of using the PConn object:
1) creating a listening PConn in container.exe, and define a ffish script method in container.exe, so that the main.exe can call that method in container.exe by using the "send" method. 2) when clicking a button in main.exe, in ation script you call a ffish script, in which you call the "send" method of the PConn object, which will call the method in the container.exe, which will play the frame you want. |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|