July 28, 2016 at 1:23 pm #323160
Ok, I have scoured the internet for the last 2 days trying desperately to figure out a solution for this issue I am having. I found a Lectora file a while ago online (which I can’t seem to locate anymore), but it had a flash file with a button and when that button was clicked (while sitting in Lectora), it would move to the next page of the Lectora file. This was build using Lectora 9.
The button in Flash is coded like so:
Now I built a new Lectora file in 12 and I have an animated Flash file sitting on the page and at the end, I added a done button with the same code as above and the nextP action within Lectora.
It works on the file I downloaded from the internet, but not the file I built.
Can anyone help me figure out what I have done wrong?
Desperate.July 28, 2016 at 3:10 pm #323170
John BlackmonMember28 pts@johnb
Can you upload your .fla or .fxg?
July 29, 2016 at 7:08 am #323228
- This reply was modified 2 years, 7 months ago by Darrel Somoza. Reason: typo - missing space
John, I knew it would be something so simple. Thanks for this, it really helped me out. I give you stars and thumbs up. Really appreciate you taking the time to do this.
Sorry Darrel, it is work related, so I can’t post it. I guess I could have created a fake one, but I can tell you John offered the working solution.July 29, 2016 at 7:51 am #323232
That’s why I had given him a thumbs up. I was going to update it and put it back up for you. Np.October 20, 2016 at 1:33 pm #330220
So, ok. I have begun to play with Flash Canvas in Flash professional CC. Not sure any of you have started to play with this, but I am slowly working my way through rebuilding a course and the animation. I have the button working above, but now that I am outputting an html5 and js document. Any advice on acessing trivNextPage() from within the js file?
I am googling, but, as per usual I am lacking the right language I would like to get successful answers.
I hope this makes sense.
Basically before in AS3 I did this:
but if you are working in canvas, it needs to be js.
Thanks all.October 21, 2016 at 9:03 am #330300
Dunnjo98, I am assuming you are working in Animate CC and that you have built a button or something to click on to advance to the next page. I think you’ll find this easier than AS3.
On the stage, select the item that will be click on to advance to the next page in Lectora. Make sure in the timeline you are on the frame you want to add the script. Press f9 to open the Actions panel.
(see image below)
1. Select the <> to open the snippets.
2. Expand the HTML5 canvas snippets then expand Event Handlers. Double click Mouse click Event to add the snippet to the Action pane.
3. Remove the placeholder alert code and replace it with parent.trivNextPage();
That’s it. Publish and it’s ready to be imported into Lectora using the webwidget local-based files. As a side note, I usually select include JS in the HTML file in Animates publish settings (advanced tab) so I do not have to also include a separate js file. Works either way.This post has received 1 vote up.October 24, 2016 at 1:17 pm #330688
Perfect and clear, thanks Darrel. I was missing the parent piece. Huge help.
You must be logged in to reply to this topic.