Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 3:27 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: SetVariable in Flex
PostPosted: May 10th, 2007, 5:54 pm 
Offline

Joined: May 10th, 2007, 5:40 pm
Posts: 4
Hi there,

I am testing out some features using an Opus Flex Publication (Pro XE 5.5). I am trying to mirror some functionality that is available in FlashMX.

The basic issue is this, i created an Opus Flex Publication (named flexHello.swf)with just a display variable (called "text") and published it as a swf with inline html.

On the html I added a function call in javascript to set a variable in the swf object . i added the following to the header

Code:
<script language = "JavaScript"><!--
function PassFlash(){
    flexHello.SetVariable("text", "Hello World");
}
//--></script>


After the embedded object i created a simple link that calls the PassFlash function.

Code:
<a href="#" onClick="PassFlash();return false;">click me</a>


When i click the link, nothing happens, when it should be displaying "Hello World" in the swf file. I double checked that i was doing this correctly by creating a similar flash object using FlashMX. The function and linked worked correctly.

I have not been able to successfully implement SetVariable in a flex file and i cannot find any information on it in help or by searching these forums. Has anyone done something similar to this in the past? Do i need to add some opus script to recieve the variable from the html file?


Top
 Profile  
 
 Post subject:
PostPosted: May 14th, 2007, 3:00 pm 
Offline

Joined: May 10th, 2007, 5:40 pm
Posts: 4
Heh, i take it that this is not an issue that many here have come across, or perhaps I am implementing this incorrectly. Just some follow up information.

I work with other software to implement SCORM compliant SCOs. My brother has had some success in bringing a webpackaged Opus 4 publication in AICC, using the web plugin.

In 5.5 I noticed that there is an "Opus SCORM Flex" publication type that publishes to flash. When a project is set up, the various functions are set up in OpusScript, and there is an htm launcher file that gets created with javascript functions set up designed to initialize the LMS and query it for the user variables, that in turn get sent to the Opus Flex file. This javascript uses extensive use of the SetVariable function, the same function that above i could not get to work at a very basic level.

Please correct me if im wrong, but it does appear to me that if you cannot pass a javascript variable through to an Opus Flex file that the "Opus SCORM Flex" file type would only work one way, only able to send out information, but not recieve it. This at best is only a partial solution, and that we will not be able to implement SCORM compliant courses in Flash, only using Opus.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 45 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group