How can I insert a flash intro in my CI website?

#1
[eluser]Sebastián Faúndez[/eluser]
Hi everyone,

I need to know how can I insert a flash intro in my CI website. The idea is that when a user visit the site see that flash and after that loads the index.php or my home_view.php file (or my home page),
Can anyone help me plase?

#2
[eluser]Dam1an[/eluser]
In the same way you would normally...
Just embed it in the view that gets called by the default controllers index function (aka homepage)

#3
[eluser]Sebastián Faúndez[/eluser]
Hi Dam1an,
First of all thanks again,
So you say that i must insert the flahs in the home_view.php and after the flash movie CI will load the home_view.php again?, cause i need that after the flash the user goes to the home.

#4
[eluser]Iván Argulo[/eluser]
You could have 2 controllers, one to load the flash intro and other one to load the home page. Just redirect to your second controller when the flash is clicked.

Or, with just one controller

Code:
<?php
class page extends Controller {

    function index()
    {
        // Load the view here with the flash intro
        $this->load->view('flash_intro');
    }

    function home()
    {
        // Load here your home page
        $this->load->view('home_page_no_flash');
    }
}
?>

The first URL will be http://yourweb.com/page, and the second page will be http://yourweb.com/page/home

#5
[eluser]Sebastián Faúndez[/eluser]
Thanks ivanargulo,

I will try with this,

Thanks again
PD: Regards from Santiago Chile

#6
[eluser]Iván Argulo[/eluser]
Your welcome.

I don't know if it's allowed to post in Spanish, if you need further help, don't hesitate contacting me via PM.

Saludos desde España

#7
[eluser]wiz88[/eluser]
Hi,
I'm new to this. My main controller is welcome.php
I have a flash intro page that I want to load before that with a link to welcome.php

Walk me through this please what do I rename my files to?
If the flash file is welcome.php I know that won't work Sad

Thanks in advance,

Wayne
http://multimedia100.com

#8
[eluser]pickupman[/eluser]
If you are autoloading the welcome.php file as your default controller, then as explained above you would have:
Code:
<?php
class Welcome extends Controller{

   function Welcome(){
      parent::Controller();
   }

   function index(){
      $this->load->view('flash_view'); //Load view with flash banner
   }

   function home(){
      $this->load->view('home_view'); //Load your homepage view
   }
}

//In your flash_view.php file
<body>
   <embed src="flash.swf" />
   <p>&lt;?php echo anchor('welcome/home','Skip');?&gt;</p>
&lt;/body&gt;

//In your home_view.php file
&lt;body&gt;
  <h1>Welcome to my homepage</h1>
  <p>This is my homepage!</p>
&lt;/body&gt;
?&gt;

Any controller will call the index method by default unless another method is passed in a url. In this example, since index calls your flash page, when someone goes to http://www.yoursite.com, CI is actually loading http://www.yoursite.com/welcome/index. Then when you click the skip link you will then be loading http://www.yoursite.com/welcome/home.

As a side note, flash/splash pages have become a little taboo over that last few years. Why not just incorporate the flash piece into your real homepage?

#9
[eluser]wiz88[/eluser]
This is what I have at the top of welcome.php
&lt;?php
class Welcome extends Controller {

function Welcome()
{
parent::Controller();

$this->load->helper('url');
$this->load->helper('form');
$this->load->library('validation');
// session_start(); //start session for captcha
/*$this->load->model('captcha_model'); //load captcha model
$this->load->scaffolding('subcategory');
$this->load->model('Leftbar');*/
}

function index()
{
-------------------------------------------------------------------------------------
Where do I put the code?
OH and to answer your question we sell flash intros with our sites. Girls seem to love them.
Check it out:
http://multimedia100.com/flash-intro.html

This auto goes to index.php after you get there and click on the logo the index.php
goes away. I never really used PHP. I'm old school what can I say.

#10
[eluser]pickupman[/eluser]
I think I provided what you needed above. Take a look again. Just copy your own stuff from function Welcome() part into the example I provided.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.