PDA

View Full Version : Change object string


pimpx
09-24-2006, 01:19 PM
Hello

I was wondering if i could change an object action via another object?

for example:

i have 2 buttons and another third button (will be called button 3) separated that load a different video on a video object...
so when i click the first button he will change the LOAD ACTION on button 3 so when someone click on it, the video will be changed to another one...
when i click another button, it will change the load action of button 3 again so when someone click button 3 he will load another video..
got it?

it's possible to do that?

thanks

yosik
09-24-2006, 01:57 PM
Yes.
You can use the Page.SetObjectScript Action for that.

Yossi

pimpx
09-24-2006, 02:41 PM
I was trying to pass an action to an object via another object as you explained me but im getting an error message...
Could you help me?

This is my script:
Page.SetObjectScript("but3", "On Click", Video.Load("Video1", "AutoPlay\\Videos\\Acordes.wmv", false, false));

When i click the button with this code i get an error:
"Page1 -> but1 -> OnClick, Line 1: 3 arguments required"

What should i do?

TJ_Tigger
09-24-2006, 08:43 PM
I believe that argument 3 needs to be a string. Try this

Page.SetObjectScript("but3", "On Click", "Video.Load("Video1", "AutoPlay\\Videos\\Acordes.wmv", false, false)");