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 


[Help] Flash1.callfunction in Visual Basic 2008

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

Joined: 30 Aug 2009
Posts: 145

PostPosted: Sun Sep 06, 2009 2:15 am    Post subject: [Help] Flash1.callfunction in Visual Basic 2008 Reply with quote

Hey everyone. I'm making a flash game trainer and I'm trying to use the "callfunction" function in visual basic 2008, yet whenever I do, I get an error like this:

Code:
Error HRESULT E_FAIL has been returned from a call to a COM component.


Does any one know how to fix this? Any help will be appreciated Smile

Also, I am not looking for flash1.setvariable, I have that working, but cannot get callfunction working

Thanks in advance
Back to top
View user's profile Send private message MSN Messenger
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Sun Sep 06, 2009 10:07 am    Post subject: Reply with quote

Read: http://forum.cheatengine.org/viewtopic.php?t=451459
Back to top
View user's profile Send private message
Opaque02
Expert Cheater
Reputation: 0

Joined: 30 Aug 2009
Posts: 145

PostPosted: Sun Sep 06, 2009 9:08 pm    Post subject: Reply with quote

But that doesn't really help me, this isn't in VB 2008 Sad. I've searched in many places and cannot find out how to do it in VB 2008. I know I have the right function, so in theory flash1.callfunction([function name here]) should work, but unfortunately theory and practice are two different things Sad

Any help would be appreciated.
Back to top
View user's profile Send private message MSN Messenger
Odecey
Master Cheater
Reputation: 1

Joined: 19 Apr 2007
Posts: 259
Location: Scandinavia

PostPosted: Sun Sep 06, 2009 11:58 pm    Post subject: Reply with quote

Opaque02 wrote:
But that doesn't really help me, this isn't in VB 2008 Sad. I've searched in many places and cannot find out how to do it in VB 2008. I know I have the right function, so in theory flash1.callfunction([function name here]) should work, but unfortunately theory and practice are two different things Sad

Any help would be appreciated.

According to Athaem's post this is how it's done:
Code:

myFlashObject.CallFunction "<invoke name=""SomeFunction"" returntype=""xml""><arguments><string>First parameter</string><string>Second parameter</string></arguments></invoke>"
//If you get errors regarding the CallFunction parameter, try putting @ infront of it.
On a related note, KinkyBitchy and this thread leads me to believe that you will run into problems when trying to call a function like that.
_________________
Never confuse activity with productivity. You can be busy without a purpose, but what's the point?- Rick Warren
Back to top
View user's profile Send private message MSN Messenger
Opaque02
Expert Cheater
Reputation: 0

Joined: 30 Aug 2009
Posts: 145

PostPosted: Mon Sep 07, 2009 2:05 am    Post subject: Reply with quote

Odecey wrote:
According to Athaem's post this is how it's done:
Code:

myFlashObject.CallFunction "<invoke name=""SomeFunction"" returntype=""xml""><arguments><string>First parameter</string><string>Second parameter</string></arguments></invoke>"
//If you get errors regarding the CallFunction parameter, try putting @ infront of it.


I read that part, But I don't understand it. Is that in C++ or some other coding language?
Back to top
View user's profile Send private message MSN Messenger
Odecey
Master Cheater
Reputation: 1

Joined: 19 Apr 2007
Posts: 259
Location: Scandinavia

PostPosted: Mon Sep 07, 2009 8:58 am    Post subject: Reply with quote

Opaque02 wrote:
Odecey wrote:
According to Athaem's post this is how it's done:
Code:

myFlashObject.CallFunction "<invoke name=""SomeFunction"" returntype=""xml""><arguments><string>First parameter</string><string>Second parameter</string></arguments></invoke>"
//If you get errors regarding the CallFunction parameter, try putting @ infront of it.


I read that part, But I don't understand it. Is that in C++ or some other coding language?


It's visual Basic, like you requested. I think you may be confused by the xml, so let me clarify: All the below text is simply a string parameter of CallFunction.
Code:
"<invoke name=""SomeFunction"" returntype=""xml""><arguments><string>First parameter</string><string>Second parameter</string></arguments></invoke>"

_________________
Never confuse activity with productivity. You can be busy without a purpose, but what's the point?- Rick Warren
Back to top
View user's profile Send private message MSN Messenger
Opaque02
Expert Cheater
Reputation: 0

Joined: 30 Aug 2009
Posts: 145

PostPosted: Mon Sep 07, 2009 7:40 pm    Post subject: Reply with quote

Odecey wrote:
It's visual Basic, like you requested. I think you may be confused by the xml, so let me clarify: All the below text is simply a string parameter of CallFunction.
Code:
"<invoke name=""SomeFunction"" returntype=""xml""><arguments><string>First parameter</string><string>Second parameter</string></arguments></invoke>"


Thanks for this, but I still don't understand where to put this? Would I put it in Form1.events, or somewhere else?

Thanks in advanced Smile
Back to top
View user's profile Send private message MSN Messenger
Jorg hi
I post too much
Reputation: 7

Joined: 24 Dec 2007
Posts: 2276
Location: Minnesota

PostPosted: Mon Sep 21, 2009 1:51 pm    Post subject: Reply with quote

You guys are playing bones with ears... You can't just make an application forcibly call a flash function like that... It has to be set both ways.

VB.net:
Code:
dim func as string
func = "<invoke name=" & """" & "thisMethod" & """" & " returntype=" & """" & "xml" & """" & "><arguments><string>wow noob</string></arguments></invoke>"
Me.AxShockwaveFlash.callfunction(func)



Flash:
Code:
import flash.external.ExternalInterface;
var success:Boolean = ExternalInterface.addCallback("thisMethod",this, test);

function test(msg:String)
{
trace(msg);
}


This application did the exact same thing but it was AS3 http://forum.cheatengine.org/viewtopic.php?t=448195

_________________
CEF will always stay alive.
Back to top
View user's profile Send private message
Odecey
Master Cheater
Reputation: 1

Joined: 19 Apr 2007
Posts: 259
Location: Scandinavia

PostPosted: Tue Sep 22, 2009 9:02 am    Post subject: Reply with quote

Jorg hi is back wrote:
You guys are playing bones with ears... You can't just make an application forcibly call a flash function like that... It has to be set both ways.

VB.net:
Code:
dim func as string
func = "<invoke name=" & """" & "thisMethod" & """" & " returntype=" & """" & "xml" & """" & "><arguments><string>wow noob</string></arguments></invoke>"
Me.AxShockwaveFlash.callfunction(func)



Flash:
Code:
import flash.external.ExternalInterface;
var success:Boolean = ExternalInterface.addCallback("thisMethod",this, test);

function test(msg:String)
{
trace(msg);
}


This application did the exact same thing but it was AS3 http://forum.cheatengine.org/viewtopic.php?t=448195

If you had clicked the link I provided in my first post, you would have found a thread on another forum stating exactly that.

_________________
Never confuse activity with productivity. You can be busy without a purpose, but what's the point?- Rick Warren
Back to top
View user's profile Send private message MSN Messenger
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