Welcome Guest, Not a member yet? Register   Sign In
flash not working with CI
#1

[eluser]Vasi[/eluser]
Hi,
I have a flash which I use for my intro here: http://www.autoitp.ro/ . I defined $config['base_url'] as beeing http://www.autoitp.ro/.

The problem is when I enter the address without the "www" (http://autoitp.ro/), the flash links to the site doesn't work.

If I change $config['base_url'] as beeing "http://autoitp.ro/", it will work, but only for this address, so I am guessing is from the config file.

Any ideas?

Thanks.
#2

[eluser]KingSkippus[/eluser]
Both URLs with and without the www are working fine for me. Are you by any chance using Firefox with NoScript or FlashBlock? If so, you'll have to whitelist both domain names.

One thing I noticed is that regardless of domain, you're linking to www.autoip.ro for your Flash embed. You might want to consider linking the actual domain under which the Flash element is being loaded. In other words, in your view, instead of:

Code:
<embed src="http://www.autoitp.ro/flash/index.swf" width="550" height="400"></embed>

Use this:

Code:
<embed src="http://<%=$_SERVER['HTTP_HOST'] %>/flash/index.swf" width="550" height="400"></embed>

That way, users don't have to whitelist both domains if they're using a Flash blocker.

One last bit of advice that doesn't really have to do with the question. A lot of folks (like me) use Flash blockers and get turned off of sites on which it is required to have Flash to do basic stuff like navigate. Unless your site is a full-blown web application in which Flash is necessary for the core of what it does, such as YouTube, a gaming site, etc., then I strongly recommend having the ability to navigate and use the site without Flash. You can use Flash to enhance the site and provide easier navigation, but it looks like you're starting off on a site that uses Flash exclusively to navigate, and I would avoid that if possible.
#3

[eluser]Vasi[/eluser]
Thanks a lot, really appreciate it. I will add some plain old good html links to the intro, unfortunately the client is a bit a "deprecated" to say at least and it doesn't leave me much of a choice.

I will do as you suggest to embed the flash and see where that gets me and let you know, thanks again.

Cheers,
#4

[eluser]KingSkippus[/eluser]
[quote author="Vasi" date="1279642196"]Hi,
I have a flash which I use for my intro here: http://www.autoitp.ro/ . I defined $config['base_url'] as beeing http://www.autoitp.ro/.[/quote]

Wow, after re-reading your post, I just realized that I asked you to correct a server reference in your view but left out correcting it here. I normally use the following in my config file so that in case I change hosts or have multiple domain names pointing to the same site, I don't have to hard code the site name:

Code:
$config['base_url'] = 'http://'.$_SERVER['HTTP_HOST'].'/';
#5

[eluser]Vasi[/eluser]
Thanks again!

Code:
$config['base_url'] = 'http://'.$_SERVER['HTTP_HOST'].'/';



Worked like a charm Smile

All the best!
#6

[eluser]KingSkippus[/eluser]
Glad I could help. I hope the developers working on CodeIgniter 2.0 include this as the default. (Hint, hint... Wink)




Theme © iAndrew 2016 - Forum software by © MyBB