We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6726
    • 7,075 Posts
    Disclaimer : This stuff is experimental, I just started playing with it. It seems to work but is not extensively tested. I hope you’ll shoot comments, advices, ideas about using this technique and possibly improving it.

    I have been working on a project for which the client required a flash intro (not that I like that but hey it’s business, sometimes you have to compromise).

    Since I had never embedded a flash movie into a web page (usually, I advise against those), I had asked some help about the skip intro method, and Kudolink posted a really smart method to do just that (using the template switcher, you should check it out !).

    I did not yet implement that part, but I was after an another way to avoid redirecting the user to a new page at the end of the movie. I thought... well, there is AJAX, wouldn’t it be nice to have the movie load into one of those Box thingy (GreyBox, ThickBox, iBox....). At first I was not so optimistic about that, since most of those Box thing load when you click a link. That’s when I found LITBox, and better yet LITBOx w/Flash.

    Now this already was interresting, I had a Box able to load a flash movie. But still, the sample code were similar to those on the author’s blog, like this one. Meaning you had to click a link to view the movie. I wanted to have it launch on load. Luckily, LITBOX is "basically a few modifications of Thickbox made into a Prototype class based off of the Scriptaculous". A class ? Hmmm, would that mean using Boby’s method could apply to the LITBox ? Well : yes !

    You can see it there. (Edit : Actually you can’t anymore, client’s choice huh I’ll put up another demo when I get the time...)
    It’s a first draft and I will have to make sure it degrades OK but the basics is there.

    Here is the call :

    <script type="text/javascript"><!-- // --><![CDATA[
    
    	/* Observe when page loads and run the "init" function */
    	Event.observe(window, 'load', init, false);
    
    	/* When page is loaded, this function is called */
    	function init()
    	{
               new LITBox('[(site_url)]assets/flash/intro-sworld.swf',{type: 'flash', draggable: false, height:387, width:648, flashheight:357, flashwidth:648, overlay:true, resizable:false});
    	}
    
    	// ]]>
    
    </script>


    I thought I would share smiley
      .: COO - Commerce Guys - Community Driven Innovation :.


      MODx est l&#39;outil id
      • 25663 MODX Staff
      • 12,272 Posts
      Now that’s cool David... great work. Now if only you could set a cookie that won’t set it on repeat visits. smiley
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 6726
        • 7,075 Posts
        Thanks Ryan smiley

        Yeah as I said in the post, the cookie part is not done yet.
        I’ll do what Kudolink suggested (use Template Switcher which will load either one of the templates : with or without flash).
          .: COO - Commerce Guys - Community Driven Innovation :.


          MODx est l&#39;outil id
          • 37550 ☆ A M B ☆
          • 711 Posts
          onesmarthost Reply #4, 20 years ago
          This looks great, I was just looking for a kinda Ajax popup to show flash tutorials on my website laugh laugh
            http://www.onesmarthost.co.uk
            UK MODX Hosting with love.
            • 31227
            • 198 Posts
            great work! love how it came out, although is it possible for the black bg to be darker? Also once the coockie is done it will be excellent, will emplement it in the website for sure)
              Pure MODx sites
              Viriko.ru & Viriko.com - Multilingual and running on 1 MODx
              • 6726
              • 7,075 Posts
              Thanks smiley
              BTW, your cookie method will definitely help me there !

              Yeah you can change the color and opacity of the overlay : Just edit litbox.css, the .LB_overlay class grin
                .: COO - Commerce Guys - Community Driven Innovation :.


                MODx est l&#39;outil id
                • 31227
                • 198 Posts
                Now heres my question, I dont know if any of you guys heard of such a script or not anyway, here goes: I saw some sites that have a splash screen and at the screen they have a choice such as Html, View Intro, Skip intro and there is an option remeber this option,. Does anyone know where I can get such a script? Php preferred but I am even willing to go with perl :p
                  Pure MODx sites
                  Viriko.ru & Viriko.com - Multilingual and running on 1 MODx
                  • 6726
                  • 7,075 Posts
                  Quick Note : the demo page is no longer available, since the client insisted on reverting to the good ol’fashionned way...

                  I’ll set up a demo page at as soon as possible (probably next week).
                  Thanks !
                    .: COO - Commerce Guys - Community Driven Innovation :.


                    MODx est l&#39;outil id