Connected Themes
Active forum topics
Loading external pages and scripts
Posted on: Mon, 06/16/2008 - 11:29
Loading external pages and scripts
In the recent server release, a new API was added to the SDK for loading and scaling external pages and scripts. Applications for this include navigation, scaling, and launching external pages or web content (e.g. Flash).
Here's the code... ENJOY!
// load a standard HTML page from uri with no view constraints
connected.loadPage("http://google.com/", connected.PT_HTML, null);
// load a standard HTML page from uri with resolution constraints
var viewConstraints = connected.createViewConstraintSet();
viewConstraints.addResolutionConstraint(800, 600);
connected.loadPage("http://google.com/", connected.PT_HTML, viewConstraints);
// load a Connected DCTK page from uri with constraints for both resolution and aspect ratio
var viewConstraints = connected.createViewConstraintSet();
viewConstraints.addResolutionConstraint(640, 480);
viewConstraints.addResolutionConstraint(1280, 720);
viewConstraints.addAspectRatioConstraint(4, 3);
connected.loadPage("http://somewhere.com/somefile.js", connected.PT_DCTK, viewConstraints);
Connected Plug-ins
License Agreement
NO COMMERCIAL USE: This License Agreement grants our community members the right to use the Software downloaded from DivX Labs for personal use only in order to evaluate and provide feedback about it to DivX, Inc. Commercial use of the Software or of the work products resulting from its use is not permitted under the Terms of Use of DivX Labs.- To read the full Terms of Use please visit the Terms of Use page.
- To inquire about commercial licensing please email us



Right now, this is what we're looking at for server 1.4:
var params = connected.createPageDescriptor();
params.uri = "http://somewhere.com/someflash.html";
params.pageType = dcIConnected.PT_HTML;
params.viewConstraints.addAspectRatioConstraint(16, 9);
params.audioCapture = true;
params.htmlInputFocusMode = dcIPageDescriptor.FOCUS_MODE_OBJECT;
connected.loadFromPageDescriptor(params);