Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Ultimate Flash trainers in delphi...

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Kevin
Grandmaster Cheater Supreme
Reputation: 0

Joined: 07 Mar 2007
Posts: 1139
Location: Spiderman-World

PostPosted: Sat Jun 30, 2007 5:22 am    Post subject: Ultimate Flash trainers in delphi... Reply with quote

When using a ActiveX component (TShockwaveFlash) in delphi, you need to double click and set the URL to the flash file. So i wondered... Is there a possible way to do this in delphi, like you can do it in VB, if so - could you give me some hints or sources or links to sites which tutors in that.

im thinking using an edit box, when you enter the URL in that, and click load you load the URL. I've seen it work in Visual Basic, so i though it might work in Delphi.


Last edited by Kevin on Sat Jun 30, 2007 6:29 am; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
Ksbunker
Advanced Cheater
Reputation: 0

Joined: 18 Oct 2006
Posts: 88

PostPosted: Sat Jun 30, 2007 6:22 am    Post subject: RE: Reply with quote

I'm not big on delphi, but i'm sure the folloing link will help you immensely.

http://www.delphiflash.com/library-show-flash-movie.php
Back to top
View user's profile Send private message
Kevin
Grandmaster Cheater Supreme
Reputation: 0

Joined: 07 Mar 2007
Posts: 1139
Location: Spiderman-World

PostPosted: Sat Jun 30, 2007 6:25 am    Post subject: Reply with quote

thats about loading movies and stuff from .res files. I already know that.

I need to know how you can set the (TShockwaveFlash) Flash Game's URL in a text box, and when you hit a Load Button the TShockwaveFlash component loads the URL, just like if you double click it on the form and enter the URL.

thanks for trying


Last edited by Kevin on Sat Jun 30, 2007 7:37 am; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
Ksbunker
Advanced Cheater
Reputation: 0

Joined: 18 Oct 2006
Posts: 88

PostPosted: Sat Jun 30, 2007 6:48 am    Post subject: Reply with quote

In the Delphi IDE

- click on "Component", "Import ActiveX Control"
- chose "Shockwave Flash" and click on "install".

Now you have a TShockwaveFlash component in your IDE on the ActiveX tabsheet.
Place the TShockwaveFlash Component onto your form, resize it as needed but
for now do not assign a movie to it.

You will need to register the ocx file if it is not installed on the
target computer. So you should have a resource file with

- the swflash.ocx and your Flash ( *.swf) file.

- Copy swflash.ocx (from i.e. windows\system32\macromed\flash) and your
custom swf file to your project path.
- Create a textfile with a code like this:

SHOCKWAVEFILE RCDATA yourfile.swf
SHOCKWAVEOCX RCDATA swflash.ocx

(Where yourfile.swf is your swf-file)

- Save this file as flash.rc
- Goto Commandline, change to your project dir and enter the line:

"Brcc32 -r flash.rc"

- Now you have your new resource as flash.res file



{************************************************************}

uses
ShockwaveFlashObjects_TLB; // will be used automatically

implementation

{$R *.DFM}
{$R flash.res} // your new created resource
{...}

procedure TForm1.FormCreate(Sender: TObject);
var
SystemDir: array[0..MAX_PATH] of Char;
SWFDir, AppDir: string;
Fres: TResourceStream;
Ffile: TFileStream;
begin
GetSystemDirectory(@SystemDir, MAX_PATH);
SWFDir := SystemDir + '\macromed\flash\';
GetDir(0, AppDir); // Get current directory

//check whether the sw-flash ocx is already installed
if FileExists(SWFDir + 'swflash.ocx') = False then
begin
//create directories if needed and extract file from resource.
{$i-} //compiler directive to suppress i/o error messages
MkDir(SystemDir + '\macromed');
MKDir(SystemDir + '\macromed\flash');
{$i+}
Fres := TResourceStream.Create(0, 'SHOCKWAVEOCX', RT_RCDATA);
Ffile := TFileStream.Create(SWFDir + 'swflash.ocx', fmCreate);
Ffile.CopyFrom(Fres, Fres.Size);
Fres.Free;
Ffile.Free;

//register ocx (simple but useful)
WinExec(PChar('regsvr32 /s ' + SWFDir + 'swflash.ocx'), SW_HIDE);
end;
// extract ShockwaveFile from resource to application directory
Fres := TResourceStream.Create(0, 'SHOCKWAVEFILE', RT_RCDATA);
Ffile := TFileStream.Create('flashmovie.swf', fmCreate);
Ffile.CopyFrom(Fres, Fres.Size);
Fres.Free;
Ffile.Free;

//Assign the extracted swf file to your TShockwaveFlash object
FlashMovie.Movie := AppDir + '\flashmovie.swf';
end;

{************************************************************}

FlashMovie.Movie is the variable that you have to manipuate to load different movies. In this example, it presumes the movie "flashmovie.swf" resides in the same folder/directory as the application (see AppDir, GetDir(0, AppDir); // Get current directory).

Read the contents of the edit box and pass the read contents to variable sURL, then do as following to load movie.

FlashMovie.Movie := sURL;
Back to top
View user's profile Send private message
Kevin
Grandmaster Cheater Supreme
Reputation: 0

Joined: 07 Mar 2007
Posts: 1139
Location: Spiderman-World

PostPosted: Sat Jun 30, 2007 7:36 am    Post subject: Reply with quote

yes i knew that.

take a look in flash section and see the Ultimate Flash Trainer.

I want to make one like that. where you can enter the URL and then it will load the flash game. I already knew all what you posted Neutral
Back to top
View user's profile Send private message MSN Messenger
compactwater
I post too much
Reputation: 8

Joined: 02 Aug 2006
Posts: 3923

PostPosted: Sat Jun 30, 2007 8:52 am    Post subject: Reply with quote

Flash loader & source attached. Smile

Download: http://forum.cheatengine.org/download.php?id=12363



The Extension 'rar' was deactivated by an board admin, therefore this Attachment is not displayed.

Back to top
View user's profile Send private message
Kevin
Grandmaster Cheater Supreme
Reputation: 0

Joined: 07 Mar 2007
Posts: 1139
Location: Spiderman-World

PostPosted: Sat Jun 30, 2007 9:06 am    Post subject: Reply with quote

thanks alot.
Back to top
View user's profile Send private message MSN Messenger
compactwater
I post too much
Reputation: 8

Joined: 02 Aug 2006
Posts: 3923

PostPosted: Sat Jun 30, 2007 1:49 pm    Post subject: Reply with quote

Kevinnn wrote:
thanks alot.

No problem. Very Happy
Back to top
View user's profile Send private message
Ksbunker
Advanced Cheater
Reputation: 0

Joined: 18 Oct 2006
Posts: 88

PostPosted: Sat Jun 30, 2007 8:16 pm    Post subject: re: Reply with quote

The information I posted was no more wrong or right than the information compactwater attached. As the adage goes, there is more than one way to skin a cat. It's just that you wanted access to prefabricated source code. You will learn more if you start from scratch instead of editing a line here and there of someone else's project.
Back to top
View user's profile Send private message
compactwater
I post too much
Reputation: 8

Joined: 02 Aug 2006
Posts: 3923

PostPosted: Sun Jul 01, 2007 1:53 am    Post subject: Reply with quote

I left a bunch of comments in it, so if he needed to understand how something works he could just read it. Wink
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites