6 Replies Latest reply on Dec 16, 2013 3:09 PM by sandip

    Code within symbols added to the stage are executed at time 0.0

    sandip

      Hi,

      We are an eLearning company who wants to make a transitiion from flash to HTML5 for providing our packages on mobile devices, particularly running ios. We have chosen Edge animate as a solution.

      I was converting part of one of our lessons written in Flash into animate. I have placed symbols with Elearning content, containing audio, video and animation respectively in the time line with navigation button. Since the symbols when placed on the timeline shows up in every frame, I have used the Display property to make the symbols visible at specific labels in the timeline. Every thing seems perfect except that the transition from 1st keyframe to the next is very slow. I figured out that the code within each symbol on the time line is getting executed at time 0.00. I tried using the Playback property to stop at 0.00 for all the symbols and had it play where the appropriate labels are on the timeline, but it overlaps the contents within the symbol (eg. I have images on the first frame within a symbol which when clicked plays videos in the subsequent frames; what happens is - the video overlaps with the images when I tinker with the Playback or Autoplay (within the symbol)).

       

      Is there a way to execute the code within the symbols where they are actually placed on the timeline?

        • 1. Re: Code within symbols added to the stage are executed at time 0.0
          resdesign Adobe Community Professional & MVP

          use autoplay off and then play the symbols with

          sym.getSymblo('symbolName').play();

           

          now remember that depending where you are you may have to use;

          sym.getCompostion().getStage().getSymblo('symbolName').play();

          instead.

           

          Let us know if this helps.

          1 person found this helpful
          • 2. Re: Code within symbols added to the stage are executed at time 0.0
            elainecc Adobe Employee

            If all of your code is executing at 0ms, it's very likely you have a JavaScript error in there somewhere.  Can you share your project for us to look at?


            Thanks,

             

            -Elaine

            • 3. Re: Code within symbols added to the stage are executed at time 0.0
              sandip Level 1

              Hi Elaine,

               

              I will be very happy to share my project with you. There are confidential videos and audio in the project, however I can share all the rest with you. Please let me know how I can send the project to you.

               

              Thanks and regards,

              sandip

              • 4. Re: Code within symbols added to the stage are executed at time 0.0
                sandip Level 1

                Hi resdesign,

                 

                When I tick off autoplay property of the symbol, the video holder (image) which is in the next frame overlaps with images in the first frame of the symbol, although the display for the holder is off in the first frame. When I tick the autoplay property of the symbol, the contents are in place.

                • 5. Re: Code within symbols added to the stage are executed at time 0.0
                  resdesign Adobe Community Professional & MVP

                  If you want you can share your files so we can look at them. If you do not want to share your files publicly, PM me the link so I can look at them.

                  • 6. Re: Code within symbols added to the stage are executed at time 0.0
                    sandip Level 1

                    Hi resdesign,

                     

                    Please find below the code generated in edgeActions.js, it is about 1000 lines and has all the functions I have created. I will be very happy to zip and attach the files created by animate to you. The content of the project is an extremely confedential internal training program of a company. Hence we are unable to put it on a public server.

                     

                    /***********************

                    * Adobe Edge Animate Composition Actions

                    *

                    * Edit this file with caution, being careful to preserve

                    * function signatures and comments starting with 'Edge' to maintain the

                    * ability to interact with these actions from within Adobe Edge Animate

                    *

                    ***********************/

                    (function($, Edge, compId){

                    var Composition = Edge.Composition, Symbol = Edge.Symbol; // aliases for commonly used Edge classes

                     

                     

                       //Edge symbol: 'stage'

                       (function(symbolName) {

                         

                         

                          Symbol.bindElementAction(compId, symbolName, "${_rightNav}", "click", function(sym, e) {

                             if (sym.getComposition().getStage().nextButtonEnabled)

                             {

                                       if (sym.getComposition().getStage().currentFrame != sym.getComposition().getStage().lastFrame)

                                       {

                                                 if(sym.videoActivity)

                                                 {

                                                           videoPlayer.pause();

                                                           videoPlayer2.pause();

                                                           sym.videoActivity = false;

                                                 }

                                                 sym.play();

                                       }

                             }

                            

                     

                     

                          });

                          //Edge binding end

                     

                     

                          Symbol.bindElementAction(compId, symbolName, "${_leftNav}", "click", function(sym, e) {

                             var PF = sym.getComposition().getStage().prevFrame;

                            

                             if(sym.videoActivity)

                             {

                                       videoPlayer.pause();

                                       videoPlayer2.pause();

                                       sym.videoActivity = false;

                             }

                             if(PF != "")

                             {

                                       sym.stop(PF);

                             }

                     

                     

                          });

                          //Edge binding end

                     

                     

                          Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 0, function(sym, e) {

                             sym.stop();

                             sym.$('Heading').text("What’s the mindset of a small business customer?");

                             sym.getComposition().getStage().disableNextBtn();

                             sym.getComposition().getStage().currentFrame = "1.1";

                             sym.getComposition().getStage().prevFrame = "";

                             var finishedFrame = sym.getComposition().getStage().checkBookmark("1.1");

                             if(finishedFrame)

                             {

                                       sym.getComposition().getStage().enableNextBtn();

                             }

                            

                             sym.getComposition().getStage().showScorm();

                     

                     

                          });

                          //Edge binding end

                     

                     

                          Symbol.bindSymbolAction(compId, symbolName, "creationComplete", function(sym, e) {

                             sym.currentFrame = "";

                             sym.prevFrame = "";

                             sym.lastFrame = "1.5";

                             sym.prevButtonEnabled = false;

                             sym.nextButtonEnabled = false;

                             sym.videoActivity = false;

                             sym.audioActivity = false;

                            

                             var scormVar = new Array();

                             //Stores boolean for activities finished in different screen

                             var screen1_1_BoolArr = new Array();

                             var screen1_2_BoolArr = new Array();

                             var screen1_5_BoolArr = new Array();

                            

                             screen1_1_BoolArr = [true, false, false]; //The first activity is the default

                             screen1_2_BoolArr = [false, false];

                             screen1_5_BoolArr = [false, false, false, false];

                             sym.screen1_5_BoolDragActivity = false;

                            

                             // Add bookmark

                             sym.checkBookmark = function(bookmarkVar)

                             {

                                       var i = 0;

                                       found = false;

                                       var finishedScreen = bookmarkVar + "F";

                                       var finishedBool = false;

                                       while((!found) && (i < scormVar.length))

                                       {

                                                 if((scormVar[i] == bookmarkVar) || (scormVar[i] == finishedScreen))

                                                 {

                                                           found = true;

                                                 }

                                                 if(scormVar[i] == finishedScreen)

                                                 {

                                                           finishedBool = true;

                                                 }

                                                 i++;

                                       }

                                       if(!found)

                                       {

                                                 scormVar.push(bookmarkVar);

                                       }

                                       return finishedBool;

                             }

                            

                             // Finished handler function that adds "F" to the screen ID and enables the navigation button

                             sym.finishedHandler = function(bookmarkVar)

                             {

                                       var i = 0;

                                       var found = false;

                                       var foundIndex;

                                       var finishedScreen = bookmarkVar + "F";

                                       while((!found) && (i < scormVar.length))

                                       {

                                                 if((scormVar[i] == bookmarkVar) || (scormVar[i] == finishedScreen))

                                                 {

                                                           found = true;

                                                           foundIndex = i;

                                                 }

                                                 i++;

                                       }

                                       var howManyToPop = scormVar.length - i;

                                       if(scormVar[foundIndex] != finishedScreen)

                                       {

                                                 for (i = 0; i <= howManyToPop; i++)

                                                 {

                                                           scormVar.pop();

                                                 }

                                                 scormVar.push(finishedScreen);

                                       }

                                       sym.nextButtonEnabled = true;

                                       sym.enableNextBtn();

                             }

                            

                             sym.screen1_1 = function(bookmarkIndex, finishedIndex)

                             {

                                       var allActivitiesComplete = true;

                                       screen1_1_BoolArr[finishedIndex] = true;

                                       for(i = 0; i < screen1_1_BoolArr.length; i++)

                                       {

                                                 if(screen1_1_BoolArr[i] == false)

                                                 {

                                                           allActivitiesComplete = false;

                                                 }

                                       }

                                       if(allActivitiesComplete)

                                       {

                                                 sym.finishedHandler(bookmarkIndex);

                                       }

                             }

                            

                             sym.disableNextBtn = function()

                             {

                                       sym.nextButtonEnabled = false;

                                       sym.$("rightNav").css({opacity:0.3});

                             }

                            

                             sym.enableNextBtn = function()

                             {

                                       sym.nextButtonEnabled = true;

                                       sym.$("rightNav").css({opacity:1.0});

                             }

                            

                             sym.screen1_2 = function(bookmarkIndex, finishedIndex)

                             {

                                       var allActivitiesComplete = true;

                                       screen1_2_BoolArr[finishedIndex] = true;

                                       for(i = 0; i < screen1_2_BoolArr.length; i++)

                                       {

                                                 if(screen1_2_BoolArr[i] == false)

                                                 {

                                                           allActivitiesComplete = false;

                                                 }

                                       }

                                       if(allActivitiesComplete)

                                       {

                                                 sym.finishedHandler(bookmarkIndex);

                                       }

                             }

                            

                             sym.screen1_5 = function(bookmarkIndex, finishedIndex)

                             {

                                       var allActivitiesComplete = true;

                                       screen1_5_BoolArr[finishedIndex] = true;

                                       for(i = 0; i < screen1_5_BoolArr.length; i++)

                                       {

                                                 if(screen1_5_BoolArr[i] == false)

                                                 {

                                                           allActivitiesComplete = false;

                                                 }

                                       }

                                       //The 1st and second activities are watching the videos

                                       if(screen1_5_BoolArr[0] && screen1_5_BoolArr[1])

                                       {

                                                 sym.screen1_5_BoolDragActivity = true;

                                       }

                                       if(allActivitiesComplete)

                                       {

                                                 sym.finishedHandler(bookmarkIndex);

                                       }

                             }

                            

                             sym.showScorm = function()

                             {

                                       var localScormVar = "";

                                       for (var i = 0; i < scormVar.length; i++)

                                       {

                                                 localScormVar += scormVar[i] + ",";

                                       }

                                       alert(localScormVar);

                             }

                            

                     

                     

                          });

                          //Edge binding end

                     

                     

                          Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 3000, function(sym, e) {

                             sym.stop();

                             sym.$('Heading').text("The opportunities and challenges for small business owners");

                            

                             sym.getComposition().getStage().disableNextBtn();

                             sym.getComposition().getStage().currentFrame = "1.2";

                             sym.getComposition().getStage().prevFrame = "1.1";

                             var finishedFrame = sym.getComposition().getStage().checkBookmark("1.2");

                            

                             sym.getComposition().getStage().showScorm();

                            

                             if (finishedFrame)

                             {

                                       sym.getComposition().getStage().enableNextBtn();

                             }

                            

                     

                     

                          });

                          //Edge binding end

                     

                     

                          Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 5000, function(sym, e) {

                             sym.stop();

                             sym.$('Heading').text("How the banker can help");

                            

                             sym.getComposition().getStage().disableNextBtn();

                             sym.getComposition().getStage().currentFrame = "1.3";

                             sym.getComposition().getStage().prevFrame = "1.2";

                             var finishedFrame = sym.getComposition().getStage().checkBookmark("1.3");

                            

                             sym.getComposition().getStage().showScorm();

                            

                             if (finishedFrame)

                             {

                                       sym.getComposition().getStage().enableNextBtn();

                             }

                     

                     

                          });

                          //Edge binding end

                     

                     

                          Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 8000, function(sym, e) {

                             sym.stop();

                             sym.$('Heading').text("What are the opportunities and challenges?");

                            

                             sym.getComposition().getStage().disableNextBtn();

                             sym.getComposition().getStage().currentFrame = "1.4";

                             sym.getComposition().getStage().prevFrame = "1.3";

                             var finishedFrame = sym.getComposition().getStage().checkBookmark("1.4");

                             if (finishedFrame)

                             {

                                       sym.getComposition().getStage().enableNextBtn();

                             }

                            

                             sym.getComposition().getStage().showScorm();

                     

                     

                          });

                          //Edge binding end

                     

                     

                          Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 9000, function(sym, e) {

                             sym.stop();

                             sym.$('Heading').text("Drag and Drop");

                            

                             sym.getComposition().getStage().disableNextBtn();

                             sym.getComposition().getStage().currentFrame = "1.5";

                             sym.getComposition().getStage().prevFrame = "1.4";

                             var finishedFrame = sym.getComposition().getStage().checkBookmark("1.5");

                             if (finishedFrame)

                             {

                                       sym.getComposition().getStage().enableNextBtn();

                                       sym.getSymbol("screen_5").$("S1_5_Video1").css({opacity:0.5});

                                       sym.getSymbol("screen_5").$("S1_5_Video2").css({opacity:0.5});

                             }

                            

                             sym.getComposition().getStage().showScorm();

                            

                     

                     

                          });

                          //Edge binding end

                     

                     

                       })("stage");

                       //Edge symbol end:'stage'

                     

                     

                       //=========================================================

                      

                       //Edge symbol: 'screen_1'

                       (function(symbolName) {  

                      

                          Symbol.bindElementAction(compId, symbolName, "${_imageMask-PP}", "click", function(sym, e) {

                             // stop the timeline at the given position (ms or label)

                             sym.stop('pp');

                            

                     

                     

                          });

                          //Edge binding end

                     

                     

                          Symbol.bindElementAction(compId, symbolName, "${_imageMask-LS}", "click", function(sym, e) {

                            

                             finishedFrame = sym.getComposition().getStage().checkBookmark("1.1");

                             if(!finishedFrame)

                             {

                                       finishedFrame = sym.getComposition().getStage().checkBookmark("1.1.2");

                                       sym.getComposition().getStage().screen1_1("1.1", 1);

                             }

                             //sym.getComposition().getStage().showScorm();

                             sym.stop('ls');

                            

                     

                     

                          });

                          //Edge binding end

                     

                     

                          Symbol.bindElementAction(compId, symbolName, "${_imageMask-BB}", "click", function(sym, e) {

                            

                             finishedFrame = sym.getComposition().getStage().checkBookmark("1.1");

                             if(!finishedFrame)

                             {

                                       finishedFrame = sym.getComposition().getStage().checkBookmark("1.1.3");

                                       sym.getComposition().getStage().screen1_1("1.1", 2);

                             }

                             //sym.getComposition().getStage().showScorm();

                             sym.stop('bb');

                            

                     

                     

                          });

                          //Edge binding end

                     

                     

                          Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 0, function(sym, e) {

                             sym.stop();

                     

                     

                          });

                          //Edge binding end

                     

                     

                          Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 1000, function(sym, e) {

                             sym.stop();

                     

                     

                          });

                          //Edge binding end

                     

                     

                          Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 2020, function(sym, e) {

                             sym.stop();

                     

                     

                          });

                          //Edge binding end

                     

                     

                       })("screen_1");

                       //Edge symbol end:'screen_1'

                     

                     

                       //=========================================================

                      

                       //Edge symbol: 'screen_2'

                       (function(symbolName) {  

                      

                          Symbol.bindElementAction(compId, symbolName, "${_video1}", "click", function(sym, e) {

                            

                             var finishedFrame = sym.getComposition().getStage().checkBookmark("1.2.1");

                             //sym.getComposition().getStage().showScorm();

                            

                             sym.stop('video1');

                     

                     

                          });

                          //Edge binding end

                     

                     

                          Symbol.bindElementAction(compId, symbolName, "${_video2}", "click", function(sym, e) {

                            

                             var finishedFrame = sym.getComposition().getStage().checkBookmark("1.2.2");

                             //sym.getComposition().getStage().showScorm();

                            

                             sym.stop('video2');

                     

                     

                          });

                          //Edge binding end

                     

                     

                          Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 3000, function(sym, e) {

                             sym.stop();

                            

                             var vid = sym.$("Rectangle");

                             vid.html('<video id="videoPlayer" width="400" height="225" src="" type="video/mp4" controls="controls"></video>');

                             var finishedFrame = sym.getComposition().getStage().checkBookmark("1.2");

                             if(finishedFrame)

                             {

                                       sym.$("video1").css({opacity:0.5});

                                       sym.$("video2").css({opacity:0.5});

                             }

                            

                     

                     

                          });

                          //Edge binding end

                     

                     

                          Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 3260, function(sym, e) {

                             sym.stop();

                             //sym.getComposition().getStage().showScorm();

                             videoPlayer.src="video/01_01_01_00_A.mp4";

                             var currentTimeVar;

                             //get the value of a Symbol variable

                            

                             videoPlayer.addEventListener("timeupdate",

                             function ()

                             {

                                       sym.getComposition().getStage().videoActivity = true;

                                       currentTimeVar = (videoPlayer.currentTime).toFixed(0);

                                       sym.$('Text1').text("Duration: " + currentTimeVar);

                                       displayCC1_2_1(currentTimeVar);

                                       if (currentTimeVar == videoPlayer.duration.toFixed(0))

                                       {

                                                 //Check to see if all the activities are finished to enable the next button

                                                 sym.getComposition().getStage().screen1_2("1.2", 0);

                                                 videoPlayer.pause();

                                                 videoPlayer.src="";

                                                 sym.$('ccText').text("");

                                                 sym.getComposition().getStage().videoActivity = false;

                                                 sym.$("video1").css({opacity:0.5});

                                                 sym.stop("start");

                            

                                       }

                             }

                             , false);

                            

                             // CC function

                             displayCC1_2_1 = function(ccTime)

                             {

                                       var ccArray = new Array();

                                       var timeArray = new Array();

                                       var i = 0;

                                       var found = false;

                            

                                       ccArray =

                                       ["Our biggest concerns: staffing would be one of them. Second would be the cash flow management side of it, and the third would be just our customers,",

                                       "just making sure that our customers are satisfied with our services. So I would say they'd be our three biggest concerns.",

                                       "For me juggling in the small business is full time. Not only do I have a family to run I also have kids to drop off to school,",

                                       "and I also have to make sure we get business in so I can pay bills."

                                       ];

                                       timeArray = [1, 13, 20, 28];

                            

                                       while((!found) && (i < timeArray.length))

                                       {

                                                 if(timeArray[i] == ccTime)

                                                 {

                                                           sym.$('ccText').text(ccArray[i]);

                                                           found = true;

                                                 }

                                                 i++;

                                       }

                                       //The code below accounts for seeking the scrubber manually to the start or finish

                                       if((ccTime > 0) && (ccTime < timeArray[1]))

                                       {

                                                 sym.$('ccText').text(ccArray[0]);

                                       }

                                       if(ccTime >= timeArray[timeArray.length-1])

                                       {

                                                 sym.$('ccText').text(ccArray[timeArray.length-1]);

                                       }

                             }

                     

                     

                          });

                          //Edge binding end

                     

                     

                          Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 3500, function(sym, e) {

                             var currentTimeVar;

                            

                             videoPlayer.src="video/01_01_01_00_B.mp4";

                             videoPlayer.autoplay="true";

                            

                             var currentTimeVar;

                             //get the value of a Symbol variable

                            

                             videoPlayer.addEventListener("timeupdate",

                             function ()

                             {

                                       currentTimeVar = (videoPlayer.currentTime).toFixed(0);

                                       sym.$('Text1').text("Duration: " + currentTimeVar);

                                       sym.getComposition().getStage().videoActivity = true;

                                       displayCC1_2_2(currentTimeVar);

                                       if (currentTimeVar == videoPlayer.duration.toFixed(0))

                                       {

                                                 //Check to see if all the activities are finished to enable the next button

                                                 sym.getComposition().getStage().screen1_2("1.2", 1);

                                                 sym.getComposition().getStage().videoActivity = false;

                                                 sym.$('ccText').text("");

                                                 videoPlayer.pause();

                                                 videoPlayer.src="";

                                                 sym.$("video2").css({opacity:0.5});

                                                 sym.stop("start");

                            

                                       }

                             }

                             , false);

                            

                             // CC function

                             displayCC1_2_2 = function(ccTime)

                             {

                                       var ccArray = new Array();

                                       var timeArray = new Array();

                                       var i = 0;

                                       var found = false;

                            

                                       ccArray =

                                       ["Your first worry about an experience I guess would be, I think dealing with your staff, as an owner,",

                                       "and treating them right and being able to have the money in your account at the end of the week to pay them for the work they’ve done,",

                                       "paying the rent, things like that. Rent’s always a big chunk of your business expenses,",

                                       "and a fixed expense whether you’ve got one customer coming through the door or a thousand you’ve still got your fixed,",

                                       "you know costs of rent. And I guess providing for your family as well."

                                       ];

                                       timeArray = [1, 6, 12, 16, 22];

                            

                                       while((!found) && (i < timeArray.length))

                                       {

                                                 if(timeArray[i] == ccTime)

                                                 {

                                                           sym.$('ccText').text(ccArray[i]);

                                                           found = true;

                                                 }

                                                 i++;

                                       }

                                       //The code below accounts for seeking the scrubber manually to the start or finish

                                       if((ccTime > 0) && (ccTime < timeArray[1]))

                                       {

                                                 sym.$('ccText').text(ccArray[0]);

                                       }

                                       if(ccTime >= timeArray[timeArray.length-1])

                                       {

                                                 sym.$('ccText').text(ccArray[timeArray.length-1]);

                                       }

                             }

                            

                     

                     

                          });

                          //Edge binding end

                     

                     

                       })("screen_2");

                       //Edge symbol end:'screen_2'

                     

                     

                       //=========================================================

                      

                       //Edge symbol: 'screen_3'

                       (function(symbolName) {  

                      

                          Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 5000, function(sym, e) {

                             sym.stop();

                             var audioTag = sym.$("AudioRectangle");

                            

                             audioTag.html('<audio id="audioPlayer" controls="controls" src="audio/screen1_2_2.mp3" type="audio/mp3"></audio>');

                             var currentTimeVar;

                             var prevTime = 0;

                            

                             //get the value of a Symbol variable

                            

                             audioPlayer.addEventListener("timeupdate",

                             function ()

                             {

                                       sym.getComposition().getStage().audioActivity = true;

                                       currentTimeVar = (audioPlayer.currentTime).toFixed(0);

                                       sym.$('Text1').text("Duration: " + currentTimeVar);

                                       displayAudioCC(currentTimeVar);

                                       playAnimation(currentTimeVar);

                                       if (currentTimeVar == audioPlayer.duration.toFixed(0))

                                       {

                                                 //Check to see if all the activities are finished to enable the next button

                                                 sym.getComposition().getStage().finishedHandler("1.3");

                                                 audioPlayer.pause();

                                                 sym.$('ccText').text("");

                                                 sym.getComposition().getStage().audioActivity = false;

                                       }

                             }

                             , false);

                            

                             //Animation function

                             playAnimation = function(aniTime)

                             {

                                       var aniTimeArray = new Array();

                                       var found = false;

                                       var i = 0;

                            

                                       aniTimeArray = [1, 4, 8, 9, 12];

                                       if(aniTime == 0)

                                       {

                                                 prevTime = 0;

                                                 sym.getSymbol("_1_2_2_aniMc").stop("startAni1_2_2");

                                       }

                                       else

                                       {

                                                 while((!found) && (i < aniTimeArray.length))

                                                 {

                                                           if((aniTime == aniTimeArray[i]) && (aniTime > prevTime))

                                                           {

                                                                     sym.getSymbol("_1_2_2_aniMc").play();

                                                                     prevTime = aniTimeArray[i];

                                                                     found = true;

                                                           }

                                                           i++;

                                                 }

                                       }

                             }

                            

                             // CC function

                             displayAudioCC = function(ccTime)

                             {

                                       var ccArray = new Array();

                                       var timeArray = new Array();

                                       var i = 0;

                                       var found = false;

                                       ccArray =

                                       ["Small business customers want us to be proactive.",

                                       "They don’t want to be walking in off the street trying to find someone to help them,",

                                       "they want to know who you are and they want to know your name. So building a relationship with customers is very important.",

                                       "Secondly, they want someone who listens to them and really tries to understand the challenges they’re facing as a small business customer."

                                   ];

                                       timeArray = [1, 4, 7, 14, 22];

                            

                                       while((!found) && (i < timeArray.length))

                                       {

                                                 if(ccTime == timeArray[i])

                                                 {

                                                           sym.$('ccText').text(ccArray[i]);

                                                           found = true;

                                                 }

                                                 i++;

                                       }

                            

                                       //The code below accounts for seeking the scrubber manually to the start or finish

                                       if((ccTime > 0) && (ccTime < timeArray[1]))

                                       {

                                                 sym.$('ccText').text(ccArray[0]);

                                       }

                                       if(ccTime >= timeArray[timeArray.length-1])

                                       {

                                                 sym.$('ccText').text(ccArray[timeArray.length-1]);

                                       }

                             }

                     

                     

                          });

                          //Edge binding end

                     

                     

                       })("screen_3");

                       //Edge symbol end:'screen_3'

                     

                     

                       //=========================================================

                      

                       //Edge symbol: '_1_2_2_aniMc'

                       (function(symbolName) {  

                      

                          Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 5000, function(sym, e) {

                             sym.stop();

                     

                     

                          });

                          //Edge binding end

                     

                     

                          Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 5500, function(sym, e) {

                             sym.stop();

                     

                     

                          });

                          //Edge binding end

                     

                     

                          Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 6000, function(sym, e) {

                             sym.stop();

                     

                     

                          });

                          //Edge binding end

                     

                     

                          Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 6500, function(sym, e) {

                             sym.stop();

                     

                     

                          });

                          //Edge binding end

                     

                     

                          Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 6750, function(sym, e) {

                             sym.stop();

                     

                     

                          });

                          //Edge binding end

                     

                     

                          Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 7000, function(sym, e) {

                             sym.stop();

                     

                     

                          });

                          //Edge binding end

                     

                     

                       })("_1_2_2_aniMc");

                       //Edge symbol end:'_1_2_2_aniMc'

                     

                     

                       //=========================================================

                      

                       //Edge symbol: 'screen_4'

                       (function(symbolName) {  

                      

                          Symbol.bindElementAction(compId, symbolName, "${_S1_4_Choice2}", "mouseover", function(sym, e) {

                             sym.$("S1_4_Choice2").hide();

                             sym.$("S1_4_Choice2Hover").show();

                            

                     

                     

                          });

                          //Edge binding end

                     

                     

                          Symbol.bindElementAction(compId, symbolName, "${_S1_4_Choice1}", "mouseover", function(sym, e) {

                             sym.$("S1_4_Choice1").hide();

                             sym.$("S1_4_Choice1Hover").show();

                            

                            

                     

                     

                          });

                          //Edge binding end

                     

                     

                          Symbol.bindElementAction(compId, symbolName, "${_S1_4_Choice2Hover}", "mouseout", function(sym, e) {

                             sym.$("S1_4_Choice2Hover").hide();

                             sym.$("S1_4_Choice2").show();

                            

                     

                     

                          });

                          //Edge binding end

                     

                     

                          Symbol.bindElementAction(compId, symbolName, "${_S1_4_Choice1Hover}", "mouseout", function(sym, e) {

                             sym.$("S1_4_Choice1Hover").hide();

                             sym.$("S1_4_Choice1").show();

                            

                     

                     

                          });

                          //Edge binding end

                     

                     

                          Symbol.bindElementAction(compId, symbolName, "${_S1_4_Choice2Hover}", "click", function(sym, e) {

                             sym.$("S1_4_Incorrect").hide();

                             sym.$("S1_4_Correct").show();

                             sym.getComposition().getStage().finishedHandler("1.4");

                            

                            

                     

                     

                          });

                          //Edge binding end

                     

                     

                          Symbol.bindElementAction(compId, symbolName, "${_S1_4_Choice1Hover}", "click", function(sym, e) {

                             sym.$("S1_4_Incorrect").show();

                             sym.$("S1_4_Correct").hide();

                            

                            

                     

                     

                          });

                          //Edge binding end

                     

                     

                          Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 8000, function(sym, e) {

                             sym.$("S1_4_Incorrect").hide();

                             sym.$("S1_4_Correct").hide();

                            

                     

                     

                          });

                          //Edge binding end

                     

                     

                       })("screen_4");

                       //Edge symbol end:'screen_4'

                     

                     

                       //=========================================================

                      

                       //Edge symbol: 'screen_5'

                       (function(symbolName) {  

                      

                          Symbol.bindElementAction(compId, symbolName, "${_S1_5_Video2}", "click", function(sym, e) {

                             var finishedFrame = sym.getComposition().getStage().checkBookmark("1.5.2");

                             //sym.getComposition().getStage().showScorm();

                            

                             sym.stop('video2_1.5');

                            

                     

                     

                          });

                          //Edge binding end

                     

                     

                          Symbol.bindElementAction(compId, symbolName, "${_S1_5_Video1}", "click", function(sym, e) {

                             var finishedFrame = sym.getComposition().getStage().checkBookmark("1.5.1");

                             //sym.getComposition().getStage().showScorm();

                            

                             sym.stop('video1_1.5');

                            

                     

                     

                          });

                          //Edge binding end

                     

                     

                          Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 9000, function(sym, e) {

                             sym.stop();

                             var vid2 = sym.$("Rectangle2");

                             vid2.html('<video id="videoPlayer2" width="400" height="225" src="" type="video/mp4" controls="controls"></video>');

                            

                             //The drag and drop

                            

                             if(sym.getComposition().getStage().screen1_5_BoolDragActivity)

                             {

                                       sym.$("S1_5_Drop1").show();

                                       sym.$("S1_5_Drop2").show();

                                       sym.$("S1_5_Drag1").show();

                                       sym.$("S1_5_Drag2").show();

                             }

                             else

                             {

                                       sym.$("S1_5_Drop1").hide();

                                       sym.$("S1_5_Drop2").hide();

                                       sym.$("S1_5_Drag1").hide();

                                       sym.$("S1_5_Drag2").hide();

                             }

                            

                             yepnope({nope:['js/jquery-ui-1.10.3.custom.min.js', 'js/jquery.ui.touch-punch.min.js'], complete:init});

                            

                             function init()

                             {

                                       var draggedItem = "";

                                       dropPos1 = sym.$("S1_5_Drop1").position();

                                       dropPos2 = sym.$("S1_5_Drop2").position();

                            

                             //Draggable object

                                       sym.$('S1_5_Drag1').draggable({opacity:.5, revert:'invalid', start:function(){draggedItem="S1_5_Drag1";}});

                                       sym.$('S1_5_Drag2').draggable({opacity:.5, revert:'invalid', start:function(){draggedItem="S1_5_Drag2";}});

                            

                                       //Drop object 1

                                       sym.$('S1_5_Drop1').droppable({

                                       accept:function(){if(draggedItem == 'S1_5_Drag2') return sym.$(draggedItem);},

                                       drop:function(){

                                                 if(draggedItem == 'S1_5_Drag2')

                                                 {

                                                           sym.$("S1_5_Drag2").css({left:dropPos1.left, top:dropPos1.top});

                                                           sym.getComposition().getStage().screen1_5("1.5", 2);

                                                 }

                                                 draggedItem = "";

                                                 }

                                       });

                            

                                       //Drop object 2

                                       sym.$('S1_5_Drop2').droppable({

                                       accept:function(){if(draggedItem == 'S1_5_Drag1') return sym.$(draggedItem);},

                                       drop:function(){

                                                 if(draggedItem == 'S1_5_Drag1')

                                                 {

                                                           sym.$("S1_5_Drag1").css({left:dropPos2.left, top:dropPos2.top});

                                                           sym.getComposition().getStage().screen1_5("1.5", 3);

                                                 }

                                                 draggedItem = "";

                            

                                                 }

                                       });

                             }

                            

                            

                     

                     

                          });

                          //Edge binding end

                     

                     

                          Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 9250, function(sym, e) {

                             sym.stop();

                             //sym.getComposition().getStage().showScorm();

                             videoPlayer2.src="video/01_01_01_00_A.mp4";

                             var currentTimeVar;

                             //get the value of a Symbol variable

                             videoPlayer2.addEventListener("timeupdate",

                             function ()

                             {

                                       sym.getComposition().getStage().videoActivity = true;

                                       currentTimeVar = (videoPlayer2.currentTime).toFixed(0);

                                       sym.$('Text1').text("Duration: " + currentTimeVar);

                                       displayCC1_5_1(currentTimeVar);

                                       if (currentTimeVar == videoPlayer2.duration.toFixed(0))

                                       {

                                                 //Check to see if all the activities are finished to enable the next button

                                                 sym.getComposition().getStage().screen1_5("1.5", 0);

                                                 videoPlayer2.pause();

                                                 videoPlayer2.src="";

                                                 sym.$('ccText').text("");

                                                 sym.getComposition().getStage().videoActivity = false;

                                                 sym.$("S1_5_Video1").css({opacity:0.5});

                                                 sym.stop("start_1.5");

                            

                                       }

                             }

                             , false);

                            

                             // CC function

                             displayCC1_5_1 = function(ccTime)

                             {

                                       var ccArray = new Array();

                                       var timeArray = new Array();

                                       var i = 0;

                                       var found = false;

                            

                                       ccArray =

                                       ["Our biggest concerns: staffing would be one of them. Second would be the cash flow management side of it, and the third would be just our customers,",

                                       "just making sure that our customers are satisfied with our services. So I would say they'd be our three biggest concerns.",

                                       "For me juggling in the small business is full time. Not only do I have a family to run I also have kids to drop off to school,",

                                       "and I also have to make sure we get business in so I can pay bills."

                                       ];

                                       timeArray = [1, 13, 20, 28];

                            

                                       while((!found) && (i < timeArray.length))

                                       {

                                                 if(timeArray[i] == ccTime)

                                                 {

                                                           sym.$('ccText').text(ccArray[i]);

                                                           found = true;

                                                 }

                                                 i++;

                                       }

                                       //The code below accounts for seeking the scrubber manually to the start or finish

                                       if((ccTime > 0) && (ccTime < timeArray[1]))

                                       {

                                                 sym.$('ccText').text(ccArray[0]);

                                       }

                                       if(ccTime >= timeArray[timeArray.length-1])

                                       {

                                                 sym.$('ccText').text(ccArray[timeArray.length-1]);

                                       }

                             }

                     

                     

                          });

                          //Edge binding end

                     

                     

                          Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 9500, function(sym, e) {

                             var currentTimeVar;

                            

                             videoPlayer2.src="video/01_01_01_00_B.mp4";

                             videoPlayer2.autoplay="true";

                            

                             var currentTimeVar;

                             //get the value of a Symbol variable

                            

                             videoPlayer2.addEventListener("timeupdate",

                             function ()

                             {

                                       currentTimeVar = (videoPlayer2.currentTime).toFixed(0);

                                       sym.$('Text1').text("Duration: " + currentTimeVar);

                                       sym.getComposition().getStage().videoActivity = true;

                                       displayCC1_5_2(currentTimeVar);

                                       if (currentTimeVar == videoPlayer2.duration.toFixed(0))

                                       {

                                                 //Check to see if all the activities are finished to enable the next button

                                                 sym.getComposition().getStage().screen1_5("1.5", 1);

                                                 sym.getComposition().getStage().videoActivity = false;

                                                 sym.$('ccText').text("");

                                                 videoPlayer2.pause();

                                                 videoPlayer2.src="";

                                                 sym.$("S1_5_Video2").css({opacity:0.5});

                                                 sym.stop("start_1.5");

                            

                                       }

                             }

                             , false);

                            

                             // CC function

                             displayCC1_5_2 = function(ccTime)

                             {

                                       var ccArray = new Array();

                                       var timeArray = new Array();

                                       var i = 0;

                                       var found = false;

                            

                                       ccArray =

                                       ["Your first worry about an experience I guess would be, I think dealing with your staff, as an owner,",

                                       "and treating them right and being able to have the money in your account at the end of the week to pay them for the work they’ve done,",

                                       "paying the rent, things like that. Rent’s always a big chunk of your business expenses,",

                                       "and a fixed expense whether you’ve got one customer coming through the door or a thousand you’ve still got your fixed,",

                                       "you know costs of rent. And I guess providing for your family as well."

                                       ];

                                       timeArray = [1, 6, 12, 16, 22];

                            

                                       while((!found) && (i < timeArray.length))

                                       {

                                                 if(timeArray[i] == ccTime)

                                                 {

                                                           sym.$('ccText').text(ccArray[i]);

                                                           found = true;

                                                 }

                                                 i++;

                                       }

                                       //The code below accounts for seeking the scrubber manually to the start or finish

                                       if((ccTime > 0) && (ccTime < timeArray[1]))

                                       {

                                                 sym.$('ccText').text(ccArray[0]);

                                       }

                                       if(ccTime >= timeArray[timeArray.length-1])

                                       {

                                                 sym.$('ccText').text(ccArray[timeArray.length-1]);

                                       }

                             }

                            

                     

                     

                          });

                          //Edge binding end

                     

                     

                       })("screen_5");

                       //Edge symbol end:'screen_5'

                     

                     

                    })(jQuery, AdobeEdge, "EDGE-976202");