Home
Services
DotNetNuke
Adobe Flash Development
Lectora e-Learning, Lectora Development, Training
Adobe Captivate Development
ASP.Net Development
Web Design & Hosting
Blog
Contact
Site
Web
Search
Login
|
Register
You are here:
Blog
Blog
Archive
<
February 2012
>
Sun
Mon
Tue
Wed
Thu
Fri
Sat
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
1
2
3
4
5
6
7
8
9
10
Monthly
January, 2011 (8)
September, 2009 (1)
April, 2007 (1)
January, 2007 (1)
October, 2006 (1)
September, 2006 (1)
Go
Categories
Captivate (1)
Flash (2)
Lectora (8)
Blog
Using Flash/Captivate to Navigate Lectora
Jan
19
Written by:
1/19/2011 2:42 PM
Flash button action for Previous
on(release){
getURL (“trivPrevPage()”);
}
Flash button action for Next
on(release){
getURL (“trivNextPage()”);
}
Flash button action for Home - or any specific Page
(assuming your home is index.html)
on(release){
getURL ("trivExitPage('index.html',true)");
}
**To go to a specific page replace ‘index.html’ with correct page
Exit button
on(release){
getURL("exitTitle()");
}
Lectora “external HTML object, type: top of file Scripting” ‘test’ being the lectora title name.
Open a New Window
(this one isn't for Lectora, but could probably be modified?)
on (release) {
getURL ("NewWindow=window.open('ShowPopup.php','newWin', 'width=400,height=300,left=0,top=0,toolbar=No,location=No,sc rollbars=No,status=No,resizable=No,fullscreen=No'); NewWindow.focus(); void(0);");
}
Writing/Editing a variable from Flash to Lectora.
getURL("VarVARIABLENAME.set('Yes')");
(Or whatever you want written to the variable...)
Showing/Hiding an image/object from Flash to Lectora.
getURL("OBJECTHTMLNAME.actionShow();");
(Or whatever you want the action to be "show, hide, etc"...)
Flash ActionScript 3.0
Remember that in actionscript 3.0 all script is written to the frames and not the objects such as buttons and movieclips.
Go to Next Page:
function gotoNextPage(event:MouseEvent):void
{
var url:String = "trivNextPage()";
var request:URLRequest = new URLRequest(url);
navigateToURL(request,"_self") ;
}
invButton.addEventListener(MouseEvent.CLICK,gotoNextPage);
Go to Previous Page:
function gotoPreviousPage(event:MouseEvent):void
{
var url:String = "trivPrevPage()";
var request:URLRequest = new URLRequest(url);
navigateToURL(request,"_self") ;
}
invButton.addEventListener(MouseEvent.CLICK,gotoPreviousPage ); (Note: "invButton" is the button instance) (Note: "invButton" is the button instance
Calling from Flash
flash.external.ExternalInterface.call(“command”, optional variable);
Sample Commands, Optional variable, Example
alert , Value to alert “alert”, “Final Page”
action123, n/a, “action80”
trivNextPage , n/a, “trivNextPage”
trivPrevPage, n/a, “trivPrevPage”
Object.actionShow, n/a, “button80.actionShow”
Object.actionHide, n/a, “button80.actionHide”
VarName.getValue, n/a, “VarStudenName.getValue”
VarName.set, Value to set, “VarStudentName.set”, “Bill”
Tip: Don’t put the ‘()’ after the command when calling them in Flash
To get the name of an object in Lectora go to File>Preferences then check the “Show HTML-published object names in object properties” checkbox. Then double-click an object and its name will be in the upper-right corner of the dialogue popup.
Trackback
Print
Tags:
Flash
,
Lectora
,
Communication
,
Actions
Categories:
Lectora
,
Flash
,
Captivate
Location:
Blogs
Justin
0 comment(s) so far...
Login to Add Your Comment
Search Blog
Keywords
Phrase
Blog
View All Recent Entries
Justin (0)
Copyright 2008 www.JustinBall.net
Terms Of Use
Privacy Statement