Highlighted

specify image placeholder value based on user variable?

New Here ,
Jun 09, 2020

Copy link to clipboard

Copied

Hi,  I should start off by saying that I'm a javascript developer, not a captivate developer, and I'm simply trying to figure out how to add some functionality to a captivate project a co-worker of mine is developing.  All I know about Captivate is based on online documentation and google searches.

 

On the first slide of the project, the user will click on the avatar they wish to use.  I imagine that the master content slides we'll be using will have a placeholder for the avatar's image.  I've read up on advanced actions and user variables, and realize that I need to set a variable when the user selects their avatar, but I'm not sure what the value should be.   If the project's library contains all of the images, can I simply set a variable named avatarImage to a image's path, i.e. 'images/avatar1.jpg', and then somehow set the slides placeholder to be the value of that variable?

 

Any help would be appreciated,

 

-Scott

 

Most Valuable Participant
Correct answer by Lilybiri | Most Valuable Participant

Hmmm... I do use multistate objects when needing to have different avatars, and go to the appropriate state baded on the choice of the learner.  Totally different concept of course.  How do you want to define the choice? Not by the learner?

 

I never use placeholders for images since they fix the size. You cannot use multistate objects on master slides.

Topics

Advanced actions

Views

180

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

specify image placeholder value based on user variable?

New Here ,
Jun 09, 2020

Copy link to clipboard

Copied

Hi,  I should start off by saying that I'm a javascript developer, not a captivate developer, and I'm simply trying to figure out how to add some functionality to a captivate project a co-worker of mine is developing.  All I know about Captivate is based on online documentation and google searches.

 

On the first slide of the project, the user will click on the avatar they wish to use.  I imagine that the master content slides we'll be using will have a placeholder for the avatar's image.  I've read up on advanced actions and user variables, and realize that I need to set a variable when the user selects their avatar, but I'm not sure what the value should be.   If the project's library contains all of the images, can I simply set a variable named avatarImage to a image's path, i.e. 'images/avatar1.jpg', and then somehow set the slides placeholder to be the value of that variable?

 

Any help would be appreciated,

 

-Scott

 

Most Valuable Participant
Correct answer by Lilybiri | Most Valuable Participant

Hmmm... I do use multistate objects when needing to have different avatars, and go to the appropriate state baded on the choice of the learner.  Totally different concept of course.  How do you want to define the choice? Not by the learner?

 

I never use placeholders for images since they fix the size. You cannot use multistate objects on master slides.

Topics

Advanced actions

Views

181

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Most Valuable Participant ,
Jun 09, 2020

Copy link to clipboard

Copied

Hmmm... I do use multistate objects when needing to have different avatars, and go to the appropriate state baded on the choice of the learner.  Totally different concept of course.  How do you want to define the choice? Not by the learner?

 

I never use placeholders for images since they fix the size. You cannot use multistate objects on master slides.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Jun 11, 2020

Copy link to clipboard

Copied

Thanks multi-state objects was the solution, as I only had a small set (6) of potential avatars.   

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Lilybiri LATEST
Most Valuable Participant ,
Jun 12, 2020

Copy link to clipboard

Copied

You're welcome. Why make it complicated if a simple solution is possible? 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Advocate ,
Jun 09, 2020

Copy link to clipboard

Copied

Scott,

 

Perhaps the link below will offer some thoughts on how to approach what you are trying to do.

I work through the concept of avatar selection using JavaScript.

What I do not think I mention is the idea of creating a subsequent placeholder downstream that remains for the rest of the project. I might have an example of that somewhere but I would have to try and find it.

 

https://elearning.adobe.com/2018/04/using-javascript-concatenate-real-state-changer/

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Jun 11, 2020

Copy link to clipboard

Copied

Thanks! this was very helpful.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...