Animation and sound forward, but not backwards

For general questions about Content Authoring

Moderator: Nav

Animation and sound forward, but not backwards

Postby aprilsheninger » Thu Jan 20, 2011 9:30 am

Hi.

I am not sure if this can be done, but I haven't found anything yet that SmartBuilder can't do, so I thought I'd ask.

I am working on a very high profile course on Alcohol Awareness. We used Alcohol.edu for the last several years. To save money and to have more customized content, I have been assigned to create something to replace it. No pressure there, right? I am working with several SMEs that know all about Alcohol, but they know very little about how technology works. They asked for animated slides, so I gave them animated slides using the Timeline feature. It works great for that. They wanted a voiceover. Again, not an issue for SmartBuilder and the Timeline feature. But they also want to be able to go backwards without the animations and audio automatically running again. So whatever the last thing displayed on the screen is, they want that to stay there after the animation stops. So if the student wants hit back and to review it, they can without sitting through the animation and voiceover. But they don't want the student to have to press play for the audio and animation to play on each screen when going forward either.

It kind of sounds like a riddle doesn't it? Is this possible? How would I do something like this? Everything I have thought of seems too insane to be the right way to do it. I don't have time to experiment much on my own. Oh, did I tell you that the entire thing needs to be done by April 15 for the pilot and I am still getting content? Not an ideal situation that I have here.

As always, thanks in advance!
April
aprilsheninger
 
Posts: 68
Joined: Tue Mar 18, 2008 8:51 am
Location: State College, Pa

Re: Animation and sound forward, but not backwards

Postby Nav » Mon Jan 24, 2011 11:57 am

Hi April,
Thanks for posting this on the forum! I think this is possible. I don't know how easy it will be, and part of that will depend on the complexity of the content. I think templates or copying and pasting pages will end up helping a bit.

There's 2 parts to this problem - 1) you have to know if the page is already viewed, and alter the behavior of the timeline/page objects accordingly, and 2) you need to tell the timeline to not play, but jump to the end instead.

Let's start with part 2) first. Since there is no jumpToEnd method for the Timeline, you'll have to create an action to simulate this. Basically you'll need to create an action pauses the Timeline and then shows everything (all the graphics and text that the Timeline would have shown). You can bundle this all into one action with multiple responses.

Trigger: Page Controller > onPageLoad
Response: Timeline > Pause
Response: Graphic 1 > show
Response: Text 1 > show
Response: Graphic 2 > show
...etc...

Now for part 1), we only want this stuff to happen if the page has already been viewed. The most straightforward way to do this is to create a Global True/False Variable for each page in the lesson. When the page loads, you check to see if the Variable is True. If so, you do the stuff above. If not, you play the Timeline and set that Variable to True. Here's what the full action would look like:

Trigger: Page Controller > onPageLoad
Condition: Global Variables > True/False > page8viewed > getValue == true [checked]
True Response: Timeline > Pause
True Response: Graphic 1 > show
True Response: Text 1 > show
True Response: Graphic 2 > show
False Response: Timeline 1 > Play
False Response: Global Variables > True/False > page8viewed > setValue > true


Now depending on how complex your pages are and how much content there is on it, this might not be too bad (also, I can't see a way around it). However, if there are many pages, I can see that becoming a pain. You could use a Menu Object on the Master Page to track which pages have been visited and which have not, therefore centralizing that and not having to deal with tons of variables. Then you could check to see if the current page was already visited, and if so, fire a Global Event that is caught on each page.

In addition to the regular actions to operate the menu, you would have this on the Master Page:
Trigger: Page Controller > onPageLoad
Trigger: Page Controller > onPageChange
Condition: Menu with Topics and Pages > isPageVisited == Page Controller > getPageIndex
True Response: Page Controller > fireGlobalEvent = "alreadyViewed"
False Response: Page Controller > fireGlobalEvent = "playTimeline"

Then on each content page, you would have the same actions:
Trigger: Page Controller > onGlobalEvent
Condition: Page Controller > getGlobalEvent == "alreadyVisited"
True Response: [pause Timeline and show all those objects that the Timeline would have showed]
False Response: [leave this blank]

Trigger: Page Controller > onGlobalEvent
Condition: Page Controller > getGlobalEvent == "playTimeline"
True Response: [play timeline]
False Response: [leave this blank]

I know this second part seems more complicated, but if you set that action on the Master Page up once, and you copy and paste pages, or use a template, you will potentially save hours of creating and managing variables. If anything is unclear, please let me know.

- Nav
Nav
 
Posts: 866
Joined: Mon Nov 05, 2007 2:58 pm

Re: Animation and sound forward, but not backwards

Postby aprilsheninger » Wed Feb 02, 2011 11:52 am

Hi Nav,

Not easy, indeed! The lesson has 90 pages so far. Doing it the way you have outlined will take a very long time. If that is the only way, of course, I'll do what I have to, but I might be able to simplify the situation a little. A user would never view a page going backwards that he/she had not already viewed once going forward. The lesson must be viewed in a linear manner the first time. After that, the user can choose how to hop around to review. Will this simplify the Actions any? If so what would change?

Thank you,
April
aprilsheninger
 
Posts: 68
Joined: Tue Mar 18, 2008 8:51 am
Location: State College, Pa

Re: Animation and sound forward, but not backwards

Postby Nav » Wed Feb 02, 2011 12:25 pm

Hi April,
The bulk of the time will be creating actions to show the stuff that you've already created in the timeline. If you can apply templates, I'd recommend using the Global Events method outlined earlier. However applying a template actually autosaves the lesson, so I can imagine that alone could be a time-consuming process. And then you still have to select the individual items to show on each page.

To answer your question, though, yes. You could create a condition to look at a "latestPageVisited" Variable that you would increment. Here's what the action to increment the variable would look like on the Master Page:

Trigger: Page Controller.onPageChange
Condition: Global Variables.Number.latestPageVisited.getValue < PageController.getPageIndex
True Response: PageController.getPageIndex = Global Variables.Number.latestPageVisited.getValue
False Response: [blank]

And then on the regular pages, you would check to see if the variable is higher (if the page has already been visited), and act accordingly:

Trigger: Page Controller.onPageLoad
Condition: Global Variables.Number.latestPageVisited.getValue > PageController.getPageIndex
True Response: [show all the things and pause timeline]
False Response: [play timeline]

It wouldn't really benefit from template application process, and I don't know if it's any easier than using Global Events. But it is certainly just as valid a way to do it! I don't know if that helps.

- Nav
Nav
 
Posts: 866
Joined: Mon Nov 05, 2007 2:58 pm

Re: Animation and sound forward, but not backwards

Postby aprilsheninger » Tue Mar 08, 2011 11:16 am

Hi Nav.

I was successful in talking the committee out of doing the backwards thing, but I need the audio and animation to pause when the menu is displayed. I remember talking briefly about this with you, but I don't remember what the end result was. Was this one of the things that a Global Event might help me with? I tried working the code out myself, but it got to be too complicated and circular. So maybe it can't be done, but I thought I'd ask if it can or if you can suggest something else. I thought of hiding the page and muting then restarting the timeline if the person goes back to the same page. That seems more possible, but I'd prefer that the page just pick up where the student pauses it. Let me know what you think.

Thank you,
April
aprilsheninger
 
Posts: 68
Joined: Tue Mar 18, 2008 8:51 am
Location: State College, Pa

Re: Animation and sound forward, but not backwards

Postby Nav » Mon Mar 14, 2011 11:21 am

Hi April,
Sorry for the delay, this slipped under my radar. Yeah, this is possible, it's just going to be a lot of tedious action-making. If you had known about this before you started, you could have used templates or copying and pasting pages to make your life easier. Just FYI for future projects.

So as I understand it, when the menu shows, you want to pause whatever audio/timeline is on the page. When the menu is hidden, that audio/timeline starts playing from that point again. Right?

On the Master Page, you'll create 2 actions:

Trigger: Resources Set > Menu > onShow
Response: Page Controller > fireGlobalEvent "pauseAudio"

Trigger: Resources Set > Menu > onHide
Response: Page Controller > fireGlobalEvent "playAudio"

Then, on each page, you'll have to create 2 actions:

Trigger: Page Controller > onGlobalEvent
Condition: Page Controller > getGlobalEvent == "pauseAudio"
True Response: [pause audio/timeline]
False Response: [leave this blank]

Trigger: Page Controller > onGlobalEvent
Condition: Page Controller > getGlobalEvent == "playAudio"
True Response: [play audio/timeline]
False Response: [leave this blank]

That's it! It's just going to take a while to create all those actions. Actually... Looks like you're in luck! You can copy parts of actions across pages, if they deal with the Page Controller. Here's what I mean - http://screencast.com/t/0824NREEZrh

So you can sweep through and create all your triggers. Then all your conditions. Then set up your responses, which will be different on every page since they are different timeline objects. If you create one action, then you can also copy and paste the entire action and modify it to do the second one - http://screencast.com/t/MDEPUZDxw

- Nav
Nav
 
Posts: 866
Joined: Mon Nov 05, 2007 2:58 pm

Re: Animation and sound forward, but not backwards

Postby aprilsheninger » Wed Mar 16, 2011 9:12 am

HI Nav.

This really wasn't all that bad!I thought with that many pages it would be painful, but it really wasn't. Copying really sped things up a lot. While I was going though I found a few spots that required two timelines or a timeline and a video. Generally if a page has two timelines the second timeline launches after the first has finished. I have a couple of questions about this:

1. Do I need to pause both timelines or will the second timeline stay paused because it is set up that way? Will the original code override the new stuff? I assumed yes because since I am pausing the first timeline, it won't finish to launch the second one. I just want to verify.

2. If the student pauses during the second timeline, how does the module know to not play the first one over again? Do I need to set up a condition for that?

3. I have a few pages that have a video and a separate audio file. I set up a separate GlobalEvent for the video based on the audio version that you sent. First, is that correct? Second, how will the module know which to launch, the audio file or the video? Should I just reload the page and make the audio intro run even if they stopped in the middle of the video? Should I set up a condition for this?

Thank you!
April
aprilsheninger
 
Posts: 68
Joined: Tue Mar 18, 2008 8:51 am
Location: State College, Pa

Re: Animation and sound forward, but not backwards

Postby Nav » Wed Mar 16, 2011 3:26 pm

Hi April,
To answer you first couple questions, you'll probably need to set up some sort of condition to manage which is the active timeline. Perhaps a variable that you change at the same time you tell the 2nd timeline to play. It adds a bit of complexity, but it should be possible.

As for your last question, yes, it would probably be the easiest to simply reload the page. If you choose not to, then you could use the same method that you devise for the problem above. You can pause both items, but when you want to play again, you have to know which item was playing, and continue that one. Whether they are timelines, audio, or video, it shouldn't matter.

I would not use a different Global Variable, though. One "play" and one "pause" should be sufficient. Also, if you fire 2 Global Events at the same time, sometimes one will cancel out the other.

Hope that helps!

- Nav
Nav
 
Posts: 866
Joined: Mon Nov 05, 2007 2:58 pm

Re: Animation and sound forward, but not backwards

Postby aprilsheninger » Thu Mar 17, 2011 7:19 am

Hi Nav.

To answer you first couple questions, you'll probably need to set up some sort of condition to manage which is the active timeline. Perhaps a variable that you change at the same time you tell the 2nd timeline to play. It adds a bit of complexity, but it should be possible.

Is there an example of this that I can look at? Variables are a mystery to me sometimes.


As for your last question, yes, it would probably be the easiest to simply reload the page. If you choose not to, then you could use the same method that you devise for the problem above. You can pause both items, but when you want to play again, you have to know which item was playing, and continue that one. Whether they are timelines, audio, or video, it shouldn't matter.

OK. I will probably just go with the same process as above for consistency sake.

I would not use a different Global Variable, though. One "play" and one "pause" should be sufficient. Also, if you fire 2 Global Events at the same time, sometimes one will cancel out the other.

Does this mean that I shouldn't have set up the Pause Video and Play Video Global Events? Should I just control the video with the Pause Audio and Play Audio Global Events then?

The one good thing about all of the work on this course is that this is going to be the model for all of our future courses. I can set up a few templates and I'll be good to go. I'll need a lot less help from you in the future too which I am sure you are happy to hear.

Thank you.
April
aprilsheninger
 
Posts: 68
Joined: Tue Mar 18, 2008 8:51 am
Location: State College, Pa

Re: Animation and sound forward, but not backwards

Postby Nav » Fri Mar 18, 2011 5:05 pm

Hi April,
Here's a video that shows you how to do this.



- Nav
Nav
 
Posts: 866
Joined: Mon Nov 05, 2007 2:58 pm

Re: Animation and sound forward, but not backwards

Postby aprilsheninger » Tue Mar 22, 2011 1:35 pm

Perfect!

Thanks, Nav.
April
aprilsheninger
 
Posts: 68
Joined: Tue Mar 18, 2008 8:51 am
Location: State College, Pa

Re: Animation and sound forward, but not backwards

Postby Nav » Thu Mar 24, 2011 4:46 pm

No problem!

- Nav
Nav
 
Posts: 866
Joined: Mon Nov 05, 2007 2:58 pm


Return to General

Who is online

Users browsing this forum: No registered users and 2 guests

cron
Not able to open ./cache/data_global.php