Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-12-2008, 08:01 PM
Junior Member
 
Join Date: Apr 2008
Posts: 3
Default Due to CPU usage in transperent mode compilation

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
Reply With Quote
  #2 (permalink)  
Old 04-14-2008, 05:04 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: Due to CPU usage in transperent mode compilation

Thank you. The two programs can communicate with each other by using either the localconnection object in action script or the PConn object in ffish script.
Reply With Quote
  #3 (permalink)  
Old 04-14-2008, 07:02 PM
Junior Member
 
Join Date: Apr 2008
Posts: 3
Default Re: Due to CPU usage in transperent mode compilation

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
Reply With Quote
  #4 (permalink)  
Old 04-15-2008, 10:36 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: Due to CPU usage in transperent mode compilation

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");
}
In the "initialize" script of main.exe
Code:
function controlContainer(frame) {
var conn = new PConn();
var result = conn.send("Container.exe", "HandleData", frame);
}
Now in the container.exe, modify the "HandleData" method
Code:
function HandleData(frame)
{
  FlashPlayer.targetGotoLabel("_root", frame);
}
Reply With Quote
  #5 (permalink)  
Old 04-16-2008, 04:48 PM
Junior Member
 
Join Date: Apr 2008
Posts: 3
Default Re: Due to CPU usage in transperent mode compilation

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
Reply With Quote
  #6 (permalink)  
Old 04-21-2008, 04:03 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: Due to CPU usage in transperent mode compilation

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.
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 05:09 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.