Indigo Rose Software
  #1  
Old 10-01-2003
Desmond's Avatar
Desmond Desmond is offline
Indigo Rose Staff Member
 
Join Date: Jul 2003
Posts: 628
Grin Interacting with Embedded Web Objects

AutoPlay Media Studio 5.0 Knowledge Base

Interacting with Embedded Web Objects

Document ID: IR10055
The information in this article applies to:
  • AutoPlay Media Studio 5.0 Standard Edition
  • AutoPlay Media Studio 5.0 Professional Edition

SUMMARY

This article describes how to interact with embedded web objects.

DISCUSSION

In AutoPlay Media Studio 5.0, it is possible to navigate around your project using an embedded html file.

As an example, create an HTML file (index.html) that contains one link (href="#Page2").

Create a web object on the application page that loads index.html. Name it "Web1".

Insert the following script in the page's On Preload event:

Web.LoadURL("Web1", "AutoPlay\\Docs\\index.html");

The above line resets the web object named Web1 to AutoPlay\Docs\index.html. This is necessary because the URL in a web object will persist across pages, and the On Navigate event is called when the web object appears on the page after a page load; if we don't reset the URL in this web object whenever the page loads, it will still have the #Page2 URL in it, and our script in the On Navigate event (see below) will make the application jump right back to page 2.

Insert the following script in the web object's On Navigate event:
-- search from right to left for a number sign (#)  

nPos = String.ReverseFind(e_URL, "#", true);



-- did we find a # ?

if nPos then

-- get everything to the right of the #

strPage = String.Mid(e_URL, nPos + 1, -1);

--[[ jump to the page name that we extracted from

the URL. If there is no page by that name,

the Page.Jump won't do anything. ]]

Page.Jump(strPage);

end
Clicking on a link in this web object will trigger the On Navigate event and put the href string (the link target) into the event variable named e_URL. The String.ReverseFind action looks for the # symbol and, if found, a String.Mid action grabs everything to the right of the # symbol in the string. The resulting string is stored in a variable and then used as the target of a Page.Jump action.

When the user clicks on the link 'Go to Page 2' in the example HTML file, the application will jump to "Page2".

KEYWORDS: AutoPlay Media Studio 5.0, Navigate, Web, HTML, Control, Jump


Last reviewed: October 1, 2003
Copyright © 2003 Indigo Rose Corporation. All rights reserved.
__________________
Setup Factory 8.0 comes with over 250 actions so you can create smaller, faster and more intelligent software installers than ever before.

WebHelp Guides: AMS | MSIFACT | SUF | TU | VP
 

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 On



All times are GMT -6. The time now is 02:23 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software