May 5, 2016 at 11:56 am #314098
I am trying to simulate dialing a phone and having the phone number appear as it is dialed. I have a phone pad with a transparent button on each number. I can get the numbers to appear as dialed until I have to repeat a number. For example the number: 616-267-0038. Once it get to the 2nd I can’t get it to appear. I’ve tried putting multiple transparent buttons on the 6 and having the original button hide once it is clicked, I’ve tried moving the original transparent button….nothing seems to work. Any ideas/suggestions would be greatly appreciated!!May 5, 2016 at 12:54 pm #314108
Jennifer ValleyMember114 pts@jvalley4735
It should be working if you show a transparent button that shows the first six and then have it hidden once clicked and show a new transparent button that shows the second six. If you can share the course or page I’d be happy to check out your logic and offer some advice.
May 5, 2016 at 1:13 pm #314116
- This reply was modified 3 years, 7 months ago by Jennifer Valley.
It depends on how you want to use the number. If you are just simulating it and do not need an integer (in other words a string will do) try this.
1. make a variable “phoneNumber” (no quotes) and make the initial value just one blank space.
2. one each button add a modify variable action “Set Equal To” and the value is VAR(phoneNumber)X (where X is equal to the number pressed.)
This will create a string, not an actual number. See attached example with three numbers.
Attachments:May 9, 2016 at 2:15 pm #314507
Thanks Darrel. When I try to open the attachment, I get an empty Lectora file. Wondering if it’s because I’m still on Lectora 11.3?May 11, 2016 at 9:21 pm #314835
I’m sorry it didn’t work. I created what I’ll call a widget (re-usable object) immediately after reading your post that I intend on sharing with the forum. I put up a temporary lesson page on my under construction site demonstrating the widget. If you like the way it works and it does what you need, let me know and I will work with you, no charge, to get it going. When my main site is back up I will have step by step instructions on how it was built, how it works and how it can be customized along with some other cool stuff. I’m also taking request so if you have an idea about something that can be re-used let me know.
I’d love to hear the good, the bad and the ugly from anyone willing to share their thoughts.
DarrelMay 12, 2016 at 6:30 am #314875
Darrel – this is exactly what I am looking for! I’d love to work with you and thank you so much!May 12, 2016 at 12:05 pm #314956
Okay, lets try this in the forum so others can use this is they so choose.
Download the attached zip folder. Once extracted you will find two .awo files and a folder named media with some .mp3’s. If you need help extracting the zip let me know.
1. Open a lesson that you want to add the keypad into.
2. Open My Library, select ‘Add File’ then browse to the location you extracted the .awo files. Add one at a time. You should now have phoneWidget.awo and widgetScripts.awo in your library.
3. Select the title of your lesson in the Title Explorer (top icon) so that it is highlighted then double click widgetScripts.awo in your library. You should now see, in this order, jquery, widgetJS and widgetCSS right under the title of your lesson.
4. Select the page you want the actual keypad on then double click the phoneWidget.awo in your library. You should now see a custom Div named ‘phoneWidget’ and a text box named ‘deleteAfterSetup’.
5. Let’s add the needed Lectora variable and then you can delete that text box. Make sure you name the variable ‘_phoneNumber’ (no quotes). The underscore and capital “N” are necessary or it will not work. You’re almost done.
6. Select the phoneWidget in the title explorer so that it is highlighted. Now open its propeties tab. Under Additional Settings select ‘Required Variables”. Since you just created the _phoneNumber variable it should be sitting there under ‘specify required variables’ just click add and you should see it now listed in the required variables box. Dont close this yet. Select the ‘Additional Files’ tab and select ‘Add Folder’. Browse to and select the ‘media’ folder to add it.
7. At this point you now should have the working phone widget object. Do a test in browser and make sure your speakers are on. 😉
8. clicking the ‘Dial” button on the keypad will assign whatever phone number is displayed to the lectora variable ‘_phoneNumber’ (no quotes). You can use this in any way you like. If you want me to explain how I set up the example on my site let me know.
If you, or anyone else, has a problem implementing the above you can reply here or email me privately at firstname.lastname@example.org. Other than the example I posted in the post above my site is down while I revise it (time, I wish I had more). I intend on providing in-depth material about how this and other widgets I have built were made as well as various e-learning web design stuff. Oh, I almost forgot. You can alter the ‘widgetCSS’ to style many aspects of the object and the library objects you added are fully re-usable. Again, if you need help with any of this let me know.
I’d like to hear what you and others think, good, bad or ugly. Would anyone like to see other widgets?
DarrelThis post has received 2 votes up.
Attachments:May 13, 2016 at 5:37 am #315010
Math NotermansMember119 pts@mnotermans5114
I do like your setup Darrel !
If your at LUC lets meetup for a chat and a cold beer 😉
Might be good to team up after LUC to create some cool widgets…May 13, 2016 at 6:03 am #315012
Thanks, Math.May 23, 2016 at 2:00 pm #315798
Thanks so much for giving such detailed information and steps. It’s working great. The only issue I has was when I tried to add the .awo files to my library the .awo files didn’t show up. I dragged them to the title explorer and they worked. Thanks again! Very, very grateful!May 23, 2016 at 2:59 pm #315802
You’re welcome. I actually need to do a slight bug fix. I noticed that if you click reset to clear the current number that it will not reset the Lectora variable unless a new number is entered, my goof. It’s unlikely someone would reset and not put in a new number but it can happen. I’ll revise as soon as possible and and post the files here.May 23, 2016 at 6:08 pm #315805
Here is the revised .awo (WidgetScripts2.awo). To avoid confusion please delete the original.
DarrelMay 23, 2016 at 6:09 pm #315806
You must be logged in to reply to this topic.