In order to catch ALL attempts to open a new window from both html 

<a href="" target="_blank"...>
and
javascript:window.open(...

you will need to look into the HTMLHost class.
Every HTML control in Flex has a property htmlHost, but you can give it 
your own instead.

Then just override this method:

override public function createWindow
(windowCreateOptions:HTMLWindowCreateOptions):HTMLLoader

and return the htmlLoader of the html control in your new tab.

For links in html that open in the same window, everything functions as 
normal and you should not need to do any link parsing ( link parsing 
won't work anyways because it could be ajax and the link could be 
written later ... or it could be javascript which you can't control )

If you want to see a working version of this, join, download, install 
socialu at socialu.com

Cheers,
  Jesse







 



--- In [email protected], "kyleashipley" <[EMAIL PROTECTED]> 
wrote:
>
> I'm writing a wrapper around the core Flex HTML engine to add tabbed
> browsing.  Everything works fine for links with targets of _self or
> _top.  I had to scan all the links on each page and add click handling
> when the target was new or _self (to re-route the calls into my own
> tabbing engine).  However, I'm running into trouble with Flash-based 
ads.
> 
> Because Flash-based ads use getURL or navigateToURL, I don't see any
> event handling structure I can use.  I've been trying to figure out
> how I might go about overriding flash.net.navigateToURL, but to no 
avail.
> 
> Does navigateToURL dispatch an event I'm missing?  Is it possible to
> override the method to redirect the calls to my own tabbing engine?
>


Reply via email to