Copy link to clipboard
Copied
Hello guys,
I need help on this.
An HTMLLoader is loading a SWF.
Inside that SWF at some point the user can press a button to invoke a navigateToURL.
That navigateToURL is opening an URL to a report.
If the loaded SWF is used directly inside a browser it works (opens a new window in the browser), but when loaded in the HTMLLoader it doesn't work.
How can I call with success a navigateToURL inside HTMLLoader?
The loaded SWF could be not compiled in AIR (because it is also used in browser).
Copy link to clipboard
Copied
If you are loading an swf you can just use the Loader class.
Copy link to clipboard
Copied
Thank you Ned for your reply.
I think I can't use a loader.
My hierarchy is:
Native Window -> HTMLLoader -> SWF -> open link
In some situations is:
Native Window -> HTMLLoader -> SWF -> SWF -> open link
I want to open the link on a browser, but it looks like since the SWF is HTMLLoader wrapper I can't do that.
The link I'm trying to open is somethink like: http://domain.com/docs//docprint.aspx?id=01&year=2014
Copy link to clipboard
Copied
I do not see/understand how your hierarchy prevents you from using a Loader. HAve you tried it? Normally an HTMLLoader is used for loading an HTML page into an swf, but I don't see that in what you describe.
Copy link to clipboard
Copied
Hello again Ned.
The SWF is loaded with the HTMLLoader because the SWF needs some session vars to work.
That variables are passed using URLVaribles on the URLRequest.
Case 1
The user can access SWF1 using a browser.
Imagine SWF1 embed on a ASPX. SWF1 needs a token to validate a session login and some other data, to run.
The login was made on the APSX page. The SWF1 is embed with SWFObject and the vars passed as parameters on the SWFObject.
Case 2
The user can access SWF1 using an AIR application.
Now the same situation must happen on a AIR application. The same SWF1, needs to be loaded and the vars passed to SWF1, but the vars now came from the AIR application. Native Window -> HTMLLoader -> SWF1 -> open link (navigateToURL)
Right now everything is working fine, with one exception.
SWF1 needs to open a new tab/window at some point. When the SWF1 is embed on the ASPX everything works. To accomplish this a call to navigateToURL is used.
When SWF is on the AIR application the the navigateToURL doesn't work. It makes sense, since it is loaded is inside the HTMLLoader... and what a really wanted to happen is the browser to open with the link provided on the navigateToURL.
I think I can fix this if the navigateToURL is called on the NativeWindow. But I don't know how to communicate from SWF1 to NativeWindow with the HTMLLoader between then.
Any solution for this?
Copy link to clipboard
Copied
I friend at work helped me out on this one...
I order to open links on the browser HTMLoader needs to have navigateInSystemBrowser set to true;
htmLoaderInstance.navigateInSystemBrowser = true;
Now, the link inside SWF1 opens on the browser.
Just need to pass the session data...
Find more inspiration, events, and resources on the new Adobe Community
Explore Now