| View previous topic :: View next topic |
| Author |
Message |
Opaque02 Expert Cheater
Reputation: 0
Joined: 30 Aug 2009 Posts: 145
|
Posted: Sun Sep 06, 2009 2:15 am Post subject: [Help] Flash1.callfunction in Visual Basic 2008 |
|
|
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
Also, I am not looking for flash1.setvariable, I have that working, but cannot get callfunction working
Thanks in advance
|
|
| Back to top |
|
 |
Flyte Peanuts!!!!
Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
|
| Back to top |
|
 |
Opaque02 Expert Cheater
Reputation: 0
Joined: 30 Aug 2009 Posts: 145
|
Posted: Sun Sep 06, 2009 9:08 pm Post subject: |
|
|
But that doesn't really help me, this isn't in VB 2008 . 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
Any help would be appreciated.
|
|
| Back to top |
|
 |
Odecey Master Cheater
Reputation: 1
Joined: 19 Apr 2007 Posts: 259 Location: Scandinavia
|
|
| Back to top |
|
 |
Opaque02 Expert Cheater
Reputation: 0
Joined: 30 Aug 2009 Posts: 145
|
Posted: Mon Sep 07, 2009 2:05 am Post subject: |
|
|
| 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 |
|
 |
Odecey Master Cheater
Reputation: 1
Joined: 19 Apr 2007 Posts: 259 Location: Scandinavia
|
Posted: Mon Sep 07, 2009 8:58 am Post subject: |
|
|
| 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 |
|
 |
Opaque02 Expert Cheater
Reputation: 0
Joined: 30 Aug 2009 Posts: 145
|
Posted: Mon Sep 07, 2009 7:40 pm Post subject: |
|
|
| 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
|
|
| Back to top |
|
 |
Jorg hi I post too much
Reputation: 7
Joined: 24 Dec 2007 Posts: 2276 Location: Minnesota
|
Posted: Mon Sep 21, 2009 1:51 pm Post subject: |
|
|
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 |
|
 |
Odecey Master Cheater
Reputation: 1
Joined: 19 Apr 2007 Posts: 259 Location: Scandinavia
|
Posted: Tue Sep 22, 2009 9:02 am Post subject: |
|
|
| 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 |
|
 |
|