Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently April 22nd, 2025, 11:39 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Changing Text Caption on a Button Object by using OpusScript
PostPosted: March 3rd, 2005, 10:18 pm 
Offline

Joined: February 26th, 2005, 9:43 am
Posts: 2
Hi,

I've just started using Opus Pro 04, and am having problems with buttons.

If I create a button object on screen, it is easy to add caption text to it by clicking it and typing.

However, how can I change the button caption text by using OpusScript ?

I understand that the Button object inherits Graphic object functionality, but not Text Object functionality which is what I need. Is this assumption correct ?

Although I could create a text object to look like a button by using raised/sunken borders and be able to change its caption using OpusScript, a button object gives a better impression of being pushed in or out, as its caption moves when pressed.

I would appreciate any help in this.

Thanks,

Stephen


For this message Stephen B has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Button Issue
PostPosted: March 3rd, 2005, 10:55 pm 
Offline

Joined: November 3rd, 2004, 2:11 pm
Posts: 323
You didn't specify how many buttons you had, but you could always create two images to use with your buttons. One image would have caption text of one kind and the other image would have caption text of another kind. Then you bring them into the button and set it up that way for the different button states.

I tried a quick text way and it gives the illusion of a button if you set all the states you want.

Maybe I'm missing something?


For this message bwpatric has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: March 4th, 2005, 12:43 am 
Offline

Joined: November 28th, 2004, 6:05 am
Posts: 141
Location: USA
Hi Stephen

You could make the button text a variable and then
change the value of the variable.


HTH
Chris

_________________
Opus Resources and Services


For this message Chris Jones has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Variable Doesn't work in Flex
PostPosted: March 4th, 2005, 4:06 am 
Offline

Joined: November 3rd, 2004, 2:11 pm
Posts: 323
Chris, just tried your suggestion and exported via Flex. The variable just displays, not the text. Otherwise your suggest works great as an Opus publication.

Any thoughts on why this wouldn't work in Flex?


For this message bwpatric has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: March 4th, 2005, 5:13 am 
Offline

Joined: November 11th, 2004, 4:05 am
Posts: 636
Location: Christchurch, NZ
Hi Stephen,
here's an example of a pub containing a variable on a button changing when clicked, and the swf produced when published as Flex .
It works ok -- Opus Pro 4.5, Flash Player 7.
Make sure you don't put var in front of a variable you want to display.
Keep in mind there are a few Opusscript functions not supported when publishing to swf with Flex.
Look up Flex in the Opusscript help to see what functions are ok.

Paul


For this message Paul has been thanked by : mackavi


Last edited by Paul on March 4th, 2005, 5:13 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: March 4th, 2005, 5:13 am 
Offline

Joined: November 28th, 2004, 6:05 am
Posts: 141
Location: USA
Hi Brian

When I tested this, I got strange and inconsistant behaviour
I made 2 buttons, one with the variable "<a>" inserted as
text, and the other I gave an action to change the value of <a>.
On the first publish, it appeared to work, but the text was
offset at the top of the button instead of in the middle.
I inserted a hard return to move the text down and republished.
The result was that the text "<a>" appeared on the button.

I removed the hard return, and republished, still the button
came out with "<a>".

I cleared the text on the button, reinserted the variable, and
republished. It works again, but the text is still offset at the top.

Chris

_________________
Opus Resources and Services


For this message Chris Jones has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: March 4th, 2005, 10:27 am 
Offline

Joined: October 25th, 2004, 12:27 pm
Posts: 526
Location: Digital Workshop
Chris Jones wrote:
On the first publish, it appeared to work, but the text was
offset at the top of the button instead of in the middle


I'm afraid that Flex does not currently support vertical alignment of dynamic text and this will always be aligned to the top of the container.

Opus Pro 04 help file wrote:
These features are not supported by dynamic text:

ยท Vertical alignment (always top)


I have reproduced the issue with line returns before the variable and have notified our developers of this problem.

Kind regards,

_________________
Robin Garrett
Digital Workshop Technical Support


For this message Robin Garrett has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: March 5th, 2005, 9:50 pm 
Offline

Joined: February 26th, 2005, 9:43 am
Posts: 2
Thanks for all your help, suggestions and the time you've spent on this.

Thanks also for the script sample.

I'll try these ideas out.

Stephen


For this message Stephen B has been thanked by : mackavi


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 9 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group