Welcome Guest, Not a member yet? Register   Sign In
How can I insert a flash intro in my CI website?

[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?

In the same way you would normally...
Just embed it in the view that gets called by the default controllers index function (aka homepage)

[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.

[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

class page extends Controller {

    function index()
        // Load the view here with the flash intro

    function home()
        // Load here your home page

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

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

I will try with this,

Thanks again
PD: Regards from Santiago Chile

[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

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,


If you are autoloading the welcome.php file as your default controller, then as explained above you would have:
class Welcome extends Controller{

   function Welcome(){

   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
   <embed src="flash.swf" />
   <p>&lt;?php echo anchor('welcome/home','Skip');?&gt;</p>

//In your home_view.php file
  <h1>Welcome to my homepage</h1>
  <p>This is my homepage!</p>

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?

This is what I have at the top of welcome.php
class Welcome extends Controller {

function Welcome()

// session_start(); //start session for captcha
/*$this->load->model('captcha_model'); //load captcha model

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:

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.

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.

Theme © iAndrew 2016 - Forum software by © MyBB