Featured Categories
-
Lectora®
Lectora® is the most trusted authoring tool in the world. Rock out your creativity! Author courses any way you like. Lectora adheres to best practices for Accessibility and Web Content Accessibility Guidelines (WCAG), offers responsive authoring for eLearning, and publishes to any LMS (Learning Management System).
-
CenarioVR®
Experience virtual reality through CenarioVR®, our training and virtual reality (VR) authoring software that allows you to create immersive learning in minutes! No coding required!
-
Rockstar Learning Platform®
Our Rockstar Learning Platform® has all the features you’ll love. Help your employees be better at their jobs, more valuable to your company, and most effective in servicing your customers.
-
The Training Arcade®
Level up your learner engagement with the Training Arcade®! The Training Arcade is a library of fun, mobile-ready, casual games that can be rapidly customized with your content to create effective gaming!
-
ELB Learning Content
Did you know that our AssetLibrary™ has over 120 million engaging, interactive, and awe-inspiring templates and assets to help you become an eLearning Rockstar®?
Need help with Lectora to Flash (update variable)

i am working with lectora version 9 and a flash(swf) on a page
I am using an action with Flash command/ set variable to update a variable in flash but it doesnt work
when i do a GotoLabel command it does work so i suppose something in my as2 code is wrong
anyone has an example they did that you could share so i can find out what i am doing wrong
in flash i ahve defined the variable like this:
var currentpage:string = "ip0";
any help is appreciated,
thanks
Comments
-
I've tested what you describe with no problems.
The command setting of the Flash Command should be:
Name: nameOfTheFlashVariable
Value: can be a number, a string or a Lectora variable, e.g. VAR(CurrentPageName)
If that isn't working, maybe your Flash variable is in a MovieClip?
You can set the Flash Command setting to:
Name: nameOfTheMovieClip.nameOfTheFlashVariable
Are you sure the Flash variable isn't updated or do you want to display the updated value in the animation and the display isn't updated? You would need an onEnterFrame or a similar way to constantly check for the updated variable value.
Tim -
okay, i tried what you said but without success. i even tried it online(server)
let me explain what i need to do: in lectora i want to use the flash command to modify a variable in flash, then in flash at the 1st frame i have a script that declares the variable and tells flash that on enter frame check the function that sees if the variable has changed, if it has changed then make a movieclip on the timeline go to frame2
i am using a string variable for this.
any suggestions?
Thanks -
-
@timk 55999 wrote:
Here's what i tested successfully:
1. In Flash
var currentpage:string = "ip0";
this.onEnterFrame = function(){
if (currentpage == "ip1"){
this.your_mc.gotoAndStop(2);
}
}
2. In Lectora
On:
Action: Flash command
Target: your.swf
Command: Set variable
Name = currentpage
Value = ip1
Tim
All of this worked perfectly)))))
thanks a lot for taking your time to help.
Categories
- 35.9K All Categories
- 110 ✫ Announcements
- 33.2K Lectora®
- 31.1K Lectora Discussions
- 29K Lectora Desktop
- 2K Lectora Online
- 2K Lectora Feature Requests
- 71 Lectora User Groups
- 36 Lectora Accessibility User Group (LAUG)
- 27 ELB Learning Content
- 27 ELB Learning Content Discussions
- 346 CenarioVR®
- 205 CenarioVR Discussions
- 141 CenarioVR Feature Requests
- 44 Rockstar Learning Platform®
- 41 Rockstar Learning Platform Discussions
- 108 CourseMill®
- 108 CourseMill Discussions
- 48 ReviewLink®
- 48 ReviewLink Discussions
- 7 The Training Arcade®
- 7 The Training Arcade Discussions
- 938 All Things eLearning
- 39 eLearning Development
- 546 Learning Management System (LMS) Integration
- 333 Web Accessibility
- 1.2K ♪ The Green Room
- 9 Additional Learning Products