Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-17-2002, 12:27 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default [quote]WebBrowser <-> SWFKit communication

Kam says:


Quote:

Hi
I've got a problem:
Let's say I create a WebBrowser ActiveX object (like in your TinyBrowser example) and load a HTML with some link into it. How to notify SWFKit projector about clicking a link in this HTML page? I'd like to navigate SWF movie with those links. Is it possible? I would really appreciate some code example

PS. When corrected version of SWFKit with working ActiveX object will be available? Some posts in th forum say about this. *

Reply With Quote
  #2 (permalink)  
Old 12-17-2002, 12:28 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: WebBrowser <-> SWFKit communication

Use the event "BeforeNavigate2" of the WebBrowser control: "Occurs when the WebBrowser control is about to navigate to a different URL, which may happen as a result of external automation, internal automation from a script, or the user clicking a link or typing in the address bar. The container has an opportunity to cancel the pending navigation. " (taken from Microsoft MSDN)
Code:
//Initialize

var var1 = createControl("Shell.Explorer.2", 0, 0, 400, 400);
var webctrl = var1.activex;

webctrl.navigate2("http://www.swfkit.com");

webctrl.beforeNavigate2 = function (obj, url, flags, target_frame, postdata, headers, cancel)
{
Dialogs.msgBox(url + " clicked!");

trace(obj);
trace(url);
trace(flags);
trace(target_frame);
trace(postdata);
trace(headers);
trace(cancel);
}


return true;
//The code works well in SWFKit 1.05, it has not been tested in SWFKit 1.0. SWFKit 1.05 will come out in this week. SWFKit 1.05 is case insensitive for the names of methods and properties of ActiveX controls.
Reply With Quote
  #3 (permalink)  
Old 12-17-2002, 12:28 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: WebBrowser <-> SWFKit communication

Sorry, the code causes errors in SWFKit 1.0.
Reply With Quote
  #4 (permalink)  
Old 12-17-2002, 03:46 PM
Kam Kam is offline
Junior Member
 
Join Date: Dec 2002
Posts: 1
Default Re: [quote]WebBrowser <-> SWFKit communication

Thanks for quick feedback About the error - all I can do is waiting for 1.05. But I guess it's worth it.

Thans again ;D
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 01:54 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.