Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 8:37 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Controlling objects across publication panels and windows
PostPosted: March 4th, 2008, 7:16 pm 
Offline

Joined: March 4th, 2008, 6:49 pm
Posts: 11
Can a button in a layout panel trigger an object in the Main Publication Window? I would like buttons on the left layout panel to start and stop a video object in the Main Publication Window.

As it now stands, the chapter that contains the buttons (panel1) has no visibility to the objects in the chapter which acts as the Main Publication Window.

I hope my explanation is not too convoluted. The problem is pretty straightforward. If panel objects cannot trigger objects in other panels, their use as controls is limited. Perhaps I can target objects in other chapters via scripting if the syntax allows cross-chapter visibility.

Many thanks for any enlightenment anyone on the forum could offer.

--Mark


Top
 Profile  
 
 Post subject:
PostPosted: March 5th, 2008, 12:29 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Oh Yes! And IMHO this is one of those fantastic features that puts Opus ahead of the game...

On the screen being controlled use variable changed trigger for the action you need. On the control screen, the button then simply changes the variable used in the trigger.


Depending on the complexity of your project - I would be inclined to script this where multple actions are required by attaching the variable change trigger to the page and passing, via this variable, the name of a function to an eval command.

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject:
PostPosted: March 5th, 2008, 9:05 pm 
Offline

Joined: March 4th, 2008, 6:49 pm
Posts: 11
Thank you! I have implemented it and it works quite spectacularly.

This opens up a new world of possibility. Knowing the javascript DOM as I do, I am now hoping there is a way to address objects by chapter and page directly. For example:

Code:
myVideo.Play()


The function above plays the "myVideo" object on the current page. What I wish for is something like this:

Code:
chapOne.pageSix.myVideo.Play()


The above (hypothetical) example references both the chapter and page as well as the object. This would make it possible to reach across chapters and pages, "zero in" on an object and issue commands to it from any other page in the publication.

Is there any concept of public and private functions in opusScript -- and a way to reference methods for objects that are "encapsulated" in other chapters and pages?

Again, many thanks for solving my initial problem!


Top
 Profile  
 
 Post subject:
PostPosted: March 5th, 2008, 10:32 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Mark,

If I understand you, have you looked at GetChild(), GetType() etc.?

I think there's a benefit of using Frames (and Multiframes for that matter) so you could clearly identify the container that holds any objects you want to manipulate. 'Frame' not needed though.

Abstracting the code and using it in functions makes it easy "to cross pages". I've used the eval() command successfully to concatenate ops and vars to 'build-up' object names. Also w/ or w/o eval(), using GetFirstChild(), GetNextChild() lets you operate on the objects. 'yes', can reference these for example: Frame033.GetChild( num ).GetChild( numB ).MoveX(50)

Also, take a look at GetNumberofViews() and GetView() if you want to spawn extra windows. (note that references to views are dynamic, and the numbering will change if you close one of several open views)

I'm not versed in java or public/private, but hope the above gives you some ideas.

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject:
PostPosted: March 6th, 2008, 12:57 am 
Offline

Joined: March 4th, 2008, 6:49 pm
Posts: 11
very good info (and encouraging, too!). I will look at those functions and think about re-implementing some designs across frames on the same page instead of across chapters/pages.

I'll probably come back after the weekend with a specific question or two about the way Opus handles methods and objects. There is an insane amount of useful functionality hiding behind that little <script> icon!

Thanks for all the great information.
--Mark

_________________
Development Platform Info:
License A-Opus Pro 6/WinXP SP2 Pentium D 3.39GHz 2GB
License B-Opus Creator 6/WinXP SP2 Core2 Duo 2.4GHz 2GB


Top
 Profile  
 
 Post subject:
PostPosted: March 6th, 2008, 5:21 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Mark, as long as you're at the early stage let me throw another 'curve' into the mix. Bear with me on this, as I've only played with it and while I think I know what's working I may not explain it quite right.

Master pages!

I've managed to create nested Master Pages. But even if considering just a single M-pg, it's possible to create an Object whose location, or color, or other 'effect' is based on a Variable. Now if you make that variable a Pub var (or even a Page var refreshed later by a Pub var or some script manipulation), that Object 'hosted' by a Master Page can be moved or changed later. I think there is a 'because' here. 'Because' its state or properties on the Master Page is controlled by variables.

-- I know that's a bit abstract. I'm not able to offer an Imp example right now as I'm caught between an XP to Vista migration. :shock:

Lar

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject:
PostPosted: March 6th, 2008, 10:38 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
DITTO!!

When you consider that the 'little' script icon gives you access to the following :

1. JavaScript language
2. PHP language
3. SQL language
4. unmanagaed DLLs
5. Any other exes including parameters


Pretty much anything is possilbe :-)

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 38 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group