July 21, 2016 at 12:17 PM #322390
I have a large image I’d like to move over a longer period of time than the speed slider currently allows. Is there any way to edit the HTML to slow down the move action on objects?July 21, 2016 at 3:16 PM #322419
Jennifer ValleyMember117 pts@jvalley4735
How long are you looking to extend it by?July 21, 2016 at 4:08 PM #322420
Clammers, when you say “edit the HTML” are you referring to going into the index.html that Lectora puts out and manually altering the code? If so, yes. Before I explain this I just want to mention I’m not crazy about altering the published code and would much rather use another solution such as GreenSock’s GSAP to completely control the animation. That being said here you go, step by step.
1. Set up your move with an action and set the speed slider to the lowest it can go.
2. Get the HTML Name of the action in No.1 (example ‘action44’) you’ll need this in a minute.
3. Publish to web.
4. Open the index.html in a text editor (Notepad will work fine).
5. Scroll down in the code until you find the function with the action html name from no.2 above. Example: function action44(fn).
6. Under that line you will see the HTML Name of the object being moved along with .objLyr.doTrans (some numbers separated by comma’s).
7. If you moved the slider as slow as it can get the third number (which is used to calculate the duration of the move) will be 11.
8. Alter this number by increasing it by tenths (11.1, 11.2, 11.3……11.9) then save.
9. Run the index.html and test the animation. You’ll notice that as you increase the number to 11.9 it gets much slower. As a matter of fact you can go 2 decimal places up to 11.99 which is hardly noticeable movement.
This is not a great solution but will work if it’s a one shot deal. It would be nice to have more control over the speed, a numeric input in lieu of the graphical slider would allow that. I think Trivantis was probably keeping the learner in mind by limiting how long you can make an animation last. Too slow and stand to lose people.
Hope this helps.This post has received 1 vote up.July 22, 2016 at 1:59 AM #322444
Sergey SnegirevMember339 pts@ssneg
I love the fact that in Lectora you can crank the speed up (down) to eleven 🙂This post has received 1 vote up.July 22, 2016 at 8:28 AM #322457
Jennifer ValleyMember117 pts@jvalley4735
Your jokes and quips this week have been awesome this week Sergey. Keep it up!July 25, 2016 at 6:40 AM #322564
Thank you all for the feedback. This is what I was looking for (and have tried in the past), but I still don’t think it suits my needs. I was testing how I could embed within one Lectora page a separate Lectora page with the same width but different height. Then, by using variables (increased on the ‘original,’ non-embedded page), move the content of the embedded page up or down. Basically, having a page which “scrolls” for the user based on clicks, rather than a scroll bar. Ideally, the content would give the illusion of scrolling up/down, but the move action is so fast you couldn’t see it.
It’s nothing I need to to, per se. Just something I was playing around with to see if I could make it work. Thanks again.July 25, 2016 at 9:46 AM #322599
Is this something like what you are trying to accomplish?
Attachments:July 25, 2016 at 11:39 AM #322620
Not quite. I’d upload my title, but I’m having difficulty doing so at the time.
Here’s my set-up: I have two pages, Home and Embedded Content. Home is a standard resolution for desktop (1009 x 662). Embedded Content is 1009 x 1600 an essentially consists of one image (four 1009 x 400 sections). Home has a web window with a resolution of 1009 x 400 which links to Embedded Content. Home also has two buttons, Up and Down, which add or subtract 1 from a variable. Also on Embedded Content is a timed action which checks this variable and moves the image up or down accordingly.
Everything works swell except for the fact that the move is so quick, it’s almost unnoticeable. Ideally, I’d like a slow move so the user sees the “transition.”July 25, 2016 at 3:53 PM #322652
I think I understand now. It’s like a lightbox type effect. Is there a reason you are using a web window? Would a mask work for your application? See attached. The image being displayed is 1009 x 1600 with four 1009 x 400 sections; each a different color. It’s primitive but I built it just to give you an idea.
The part I’m fuzzy on is what your doing with the variable.
- This reply was modified 4 years, 1 month ago by Darrel Somoza. Reason: 1006 should have been 1009
- This reply was modified 4 years, 1 month ago by Darrel Somoza.
Attachments:July 25, 2016 at 3:56 PM #322658
John BlackmonModerator49 pts@johnb
Maybe break up the move into multiple chained move actions? Even that might be too fast if you are only moving a short distance. Might take some custom coding.July 26, 2016 at 9:05 AM #322764
Thanks, Darrel – something like that may work for what I am trying to do. It is definitely on the same path of what I am trying to accomplish, so I appreciate your ability to follow my (admittedly vague) description.
You must be logged in to reply to this topic.