5 Replies Latest reply on Feb 19, 2016 3:01 PM by bumples5

    can not embed html5 flash in my javacript file that opens the pages.to my magazine.

    bumples5 Level 1

      I have tried to open the html5 flash on my javascript file that opens the pages to the mag. I use to have a code for flash.  In the default page that loads the file I put the html5 code and createjs files. Then I saved the individual pages with html5flash, javascript, images in a folder that should open it up.

       

      Here is a sample of the javascript file that opens up the pages.

       

      var issueNumber     = 11;

      var issuePageCount  = 12;

      var issuePageWidth  = 578;

      var issuePageHeight = 680;

      var issueNextPage   = 1;

       

      Issue_IssueName = function(){

          return "Issue" + ((issueNumber < 100) ? "0" : "") + ((issueNumber < 10) ? "0" : "") + issueNumber.toString();

      };

       

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

      // Page 8, 9 - Alphabet Game

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

      var alphabetAlpacaContainer = null;

      var alphabetAlpacaGame = null;

       

      IssueGame_AlAlphabetSetup = function(letters, container)

      {

          var tagArray = letters.split(",");

         

          var _areaTop    = 50;

          var _areaLeft   = 496;

          var _areaHeight = 579;

          var _tagWidth   = 21;

          var _tagHeight  = 22;

          var _dropLeft   = 49;

          var _dropTop    = 456;

          var _dropOffX   = 26.2;

          var _dropOffY   = 30.6;

         

          for(var i = 0; i < tagArray.length/3; i++)

          {

              var _originalX  = _areaLeft;

              var _originalY  = _areaTop + i * Math.abs(((_areaHeight - _tagHeight) / (tagArray.length/3 - 1)));

              var _toX        = Math.round(_dropLeft + tagArray[i*3+2] * _dropOffX);

              var _toY        = Math.round(_dropTop + tagArray[i*3+1] * _dropOffY);

              var _dropX1     = _toX;

              var _dropX2     = _dropX1 + _tagWidth;

              var _dropY1     = _toY;

              var _dropY2     = _dropY1 + _tagHeight;

              var _width      = _tagWidth;

              var _height     = _tagHeight;

              var _image      = "Issue011/Games/AlAlphabet/letter-" + tagArray[i*3].toString() + ".png";

              var _group      = tagArray[i*3].toString();

             

              container.Insert(_originalX, _originalY, _toX, _toY, _dropX1, _dropY1, _dropX2, _dropY2, _width, _height, _image, _group);

          }

      };

       

      var hunterPuzzleContainer = null;

      var hunterPuzzleGame = null;

       

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

      // Load

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

       

      function BmOnLoad()

      {

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

          // settings

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

      bmPageWidth     = issuePageWidth;
      bmPageHeight    = issuePageHeight;
      bmNextPage      = issueNextPage;
      var pageUriTemplate = Issue_IssueName() + "/Pages/page-";
      for(var pg = 1; pg <= issuePageCount; pg++)
          bmPages[pg] = pageUriTemplate + ((pg < 10) ? "0" : "") + pg.toString() + ".jpg";

          BmInitialize();

          

      // ========================================================================================= ======
      //Page 6 flash
      // ========================================================================================= ======
         pg6 = "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,2,0\" width=\"578\" height=\"680\" id=\"pg6\" align=\"middle\"><param name=\"allowScriptAccess\" value=\"sameDomain\"   /><param name=\"allowFullScreen\" value=\"false\" /><param name=\"movie\" value=\"Issue011/Images/pg6.swf\" /><param name=\"quality\" value=\"high\" /><param name=\"wmode\" value=\"transparent\" /><param name=\"bgcolor\" value=\"#ffffff\" /><embed src=\"Issue011/Images/pg6.swf\" quality=\"high\" wmode=\"transparent\" bgcolor=\"#ffffff\" width=\"578\" height=\"680\" name=\"pg6\" align=\"middle\" allowScriptAccess=\"sameDomain\" allowFullScreen=\"false\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" /></object>";

          pg6Html = InsertDinamicDiv(6,"pg6","", 0, 0, 586, 680, "", "", "", "");

          pg6Html.innerHTML =pg6;

       

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

      // Page 8 - A-Alphabet -Alpaca

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

            

      alphabetAlpacaContainer = InsertDinamicDivArea(8, "alphabetAlpacaContainer", "", 0, 0, 578, 680, "", "", "", "");
      alphabetAlpacaGame = new MoveObjectTo(alphabetAlpacaContainer, 200);
      IssueGame_AlAlphabetSetup("A,0,0,A,3,0,A,5,0,A,2,2,C,4,0,E,1,4,G,0,2,G,3,3,L,1,0,L,0,3,N,2 ,3,N,0,5,O,1,1,O,2,1,O,1,3,O,1,5,P,2,0,R,1,2,S,3,2,S,2,4,W,0,1,Y,0,4,", alphabetAlpacaGame);
      InsertDinamicDiv(8, "", "", 0, 0, 5, 5, "alphabetAlpacaGame.Solve()", "", "", "");
      InsertDinamicDiv(8, "", "", 576, 0, 5, 5, "alphabetAlpacaGame.Reset()", "", "", "");
      // ========================================================================================= ======
      // Page 9 - hunter Puzzle

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

      hunterPuzzleContainer = InsertDinamicDiv(9, "hunterPuzzleContainer", "", 25, 94, 553, 560, "", "", "", "");
      hunterPuzzleGame = new Puzzle(hunterPuzzleContainer, 4, 5, "Issue011/Games/HunterPuzzle/piece-", 100, 102, 10, 200);
      InsertDinamicDiv(9, "", "", 48, 51, 42, 35, "hunterPuzzleGame.Shuffle()", "", "", "");
      InsertDinamicDiv(9, "", "", 0, 0, 2, 2, "hunterPuzzleGame.Solve()", "", "", "");

       

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

      // Start
      // ========================================================================================= ======
      BmStart();
      BmFlipTo(issueNextPage);

      }

       

      I hope someone can help me.

      Jen

        • 1. Re: can not embed html5 flash in my javacript file that opens the pages.to my magazine.
          rezun8 Level 4

          what gets displayed when you try opening the file in a browser? any errors being outputted?

          • 2. Re: can not embed html5 flash in my javacript file that opens the pages.to my magazine.
            bumples5 Level 1

            Either I can't open that issue or I can open the issue but those pages are empty.  I have tried insert dynamic divs where I list the html5 file. All my other files have opened with the insert dynamic divs.  I have javascript files for games and animation that are opened with the divs.

            The majority of the pages are open are just text with images that open with the bmload.

             

            Hope this gives you an idea and thanks. The site is bumples.com and does have other errors but not pertaining to opening the issues. I am in the process of trying toupdate the whole program.

            Jen

            • 3. Re: can not embed html5 flash in my javacript file that opens the pages.to my magazine.
              rezun8 Level 4

              the content for the issue, does that load/work/publish ok from FLash?

              • 4. Re: can not embed html5 flash in my javacript file that opens the pages.to my magazine.
                bumples5 Level 1

                I open up the site and that is fine. When I try to open the issues if there is a problem with a file. I don't get an error message. Either the file will open as a blank page or it opens the file or issue and when I come to a page where the html flash is it is blank.

                So I gather that it is not opening that page due to an error with my coding.

                • 5. Re: can not embed html5 flash in my javacript file that opens the pages.to my magazine.
                  bumples5 Level 1

                  could it be in the default file. Here it is.  I need the bmonload to load the rest of the pages.

                  <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="EP.BumplesMagazine.UI.Issues_Default" %>

                   

                  <!DOCTYPE HTML>

                   

                  <html xmlns="http://www.w3.org/1999/xhtml">

                   

                  <head>

                    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

                    <title>Bumples Magazine</title>

                   

                      <link rel="shortcut icon" href="../Documents/Visual Studio 2013/Projects/web12/Images/FavIcon.ico" />

                      <link rel="icon" type="image/x-icon" href="../Documents/Visual Studio 2013/Projects/jen12/Images/FavIcon.ico" />

                     

                    <link rel="stylesheet" href="../Documents/Visual Studio 2013/Projects/jen12/Css/MagazineStyles.css" type="text/css" />

                    <script src="../Documents/Visual Studio 2013/Projects/jen12/Issues/libs/easeljs-0.8.1.min.js"></script>

                      <script src="../Documents/Visual Studio 2013/Projects/jen12/Issues/libs/tweenjs-0.6.1.min.js"></script>

                      <script src="../Documents/Visual Studio 2013/Projects/jen12/Issues/libs/movieclip-0.8.1.min.js"></script>

                      <script src="../Documents/Visual Studio 2013/Projects/jen12/Issues/libs/preloadjs-0.6.1.min.js"></script>

                      <script src="../Documents/Visual Studio 2013/Projects/jen12/Issues/myFile_Canvas.js"></script>

                     

                      <%= LoadCss() %>

                   

                   

                   

                   

                   

                  <script>

                     var canvas, stage, exportRoot;

                   

                   

                     function init() {

                         canvas = document.getElementById("canvas");

                         images = images || {};

                   

                   

                         var loader = new createjs.LoadQueue(false);

                         loader.addEventListener("fileload", handleFileLoad);

                         loader.addEventListener("complete", handleComplete);

                         loader.loadManifest(lib.properties.manifest);

                   

                   

                         function handleFileLoad(evt) {

                             if (evt.item.type == "image") { images[evt.item.id] = evt.result; }

                         }

                   

                   

                         function handleComplete(evt) {

                             exportRoot = new lib._myFile_Canvas();

                   

                   

                             stage = new createjs.Stage(canvas);

                             stage.addChild(exportRoot);

                             stage.update();

                             stage.enableMouseOver();

                   

                   

                   

                   

                             createjs.Ticker.setFPS(lib.properties.fps);

                             createjs.Ticker.addEventListener("tick", stage);

                         }

                     }

                  </script>

                    </head>

                   

                   

                   

                      <body onload="BmOnLoad();">

                      <form id="form1" runat="server">

                      </form>  

                   

                  <script type="text/javascript">

                  var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");

                  document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

                  </script>

                   

                   

                  <script type="text/javascript">

                  try {

                  var pageTracker = _gat._getTracker("UA-10539155-1");

                  pageTracker._trackPageview();

                  }

                  catch(err) {}

                  </script>

                   

                   

                  </body>

                  </html>