[SWFObject] FlashObject Undefined

Geoff Stearns geoff at deconcept.com
Wed Oct 4 10:48:09 PDT 2006


can you post a link to the page with the problem?



On Oct 3, 2006, at 7:25 PM, Brian Lee wrote:

> I forgot to add now the error says SWFObject is undefined it's the  
> same
> behavior as before all the flash on the page is broken. If I  
> refresh the
> same page after the errors everything is fine and the flash loads  
> this error
> occurs site wide randomly sometimes on first load a page will load  
> fine but
> if I click on a link from that page the flash will break.
>
> -Brian
>
>
> On 10/3/06 7:17 PM, "Brian Lee" <brian.lee at kaboose.com> wrote:
>
>> I've updated to version 1.4.4 and converted all of my flash code  
>> to the
>> following format
>>
>> Swfobject.js include line in the header (between the <head></head>  
>> tags)...
>>
>>         <script language="javascript"
>> src="http://fundev.kaboose.com/swfobject.js"></script>
>>
>> Code examples on a typical page...
>>
>>                 <div id="navBar"></div>
>>
>> <script type="text/javascript">
>>     // <![CDATA[
>>     var so = new SWFObject("http://fundev.kaboose.com/topnav.swf",  
>> "topNav",
>> "995", "136", "6", "#DAEAAA");
>>     so.addVariable("xmldata", "http://fundev.kaboose.com/ 
>> navXML.xml");
>>     so.addVariable("currentSelection", "3");
>>     so.setAttribute('xiRedirectUrl',
>> 'http://fundev.kaboose.com/fun-blaster/halloween/index.html');
>>     so.addParam("wmode", "opaque");
>>     so.write("navBar");
>>     // ]]>
>> </script>
>>
>>
>>     <div id="subNavFlash"></div>
>>
>> <script type="text/javascript">
>>     // <![CDATA[
>>     var so = new SWFObject("http://fundev.kaboose.com/subnav.swf",  
>> "subNav",
>> "810", "108", "6", "#B4D453");
>>     so.addVariable("subNavXML",
>> "http://fundev.kaboose.com/funBlasterSubNav.xml");
>>     so.addVariable("currentSelection", "3");
>>     so.setAttribute('xiRedirectUrl',
>> 'http://fundev.kaboose.com/fun-blaster/halloween/index.html');
>>     so.addParam("wmode", "opaque");
>>     so.write("subNavFlash");
>>     // ]]>
>> </script>
>>
>>
>>         <div id="sideBarFlash"></div>
>>
>> <script type="text/javascript">
>>     // <![CDATA[
>>     var so = new SWFObject("http://fundev.kaboose.com/ 
>> sidebarNav.swf",
>> "sideBarFlash", "162", "297", "6", "#DAEAAA");
>>     so.addVariable("sideBarXML", "http://fundev.kaboose.com/ 
>> 210.xml");
>>     so.setAttribute('xiRedirectUrl',
>> 'http://fundev.kaboose.com/fun-blaster/halloween/index.html');
>>     so.addParam("wmode", "opaque");
>>     so.write("sideBarFlash");
>>     // ]]>
>> </script>
>>
>>
>>   <div id="featureFlash">
>>     <div class="featureBG" id="featureBG"></div>
>> </div>
>>
>>
>> <script type="text/javascript">
>>     // <![CDATA[
>>     var so = new SWFObject("http://fundev.kaboose.com/ 
>> halloween_AC.swf",
>> "FeatureFlash", "480", "235", "6", "#B4D453");
>>     //Default attributes list
>>
>>     //Custom attributes list
>>
>>
>>
>>             so.addVariable("printables_link4",
>> "http://fundev.kaboose.com/fun-blaster/halloween/printables/ 
>> halloween-colori
>> ng-pages.html");
>>
>>
>>             so.addVariable("printables_link3",
>> "/fun-blaster/halloween/printables/halloween-printables.html? 
>> page=2");
>>
>>
>>             so.addVariable("printables_link2",
>> "/fun-blaster/halloween/printables/halloween-printables.html? 
>> page=1");
>>
>>
>>             so.addVariable("printables_link1",
>> "/fun-blaster/halloween/printables/halloween-printables.html? 
>> page=1");
>>
>>
>>             so.addVariable("link7",
>> "http://fundev.kaboose.com/fun-blaster/halloween/games/ 
>> game_monster_numbers.
>> html");
>>
>>
>>             so.addVariable("link6",
>> "http://fundev.kaboose.com/fun-blaster/halloween/games/ 
>> game_spooky_differenc
>> es.html");
>>
>>
>>             so.addVariable("link5",
>> "http://fundev.kaboose.com/fun-blaster/halloween/games/ 
>> game_ghostly_differen
>> ces.html");
>>
>>
>>             so.addVariable("link4",
>> "http://fundev.kaboose.com/fun-blaster/halloween/games/ 
>> game_frankenbrain.htm
>> l");
>>
>>
>>             so.addVariable("link3",
>> "http://fundev.kaboose.com/fun-blaster/halloween/games/ 
>> game_transylmania.htm
>> l");
>>
>>
>>             so.addVariable("link2",
>> "http://fundev.kaboose.com/fun-blaster/halloween/games/ 
>> game_streamer_screame
>> r.html");
>>
>>
>>             so.addVariable("link1",
>> "http://fundev.kaboose.com/fun-blaster/halloween/games/ 
>> game_whack_o_wheen.ht
>> ml");
>>
>>
>>             so.addVariable("more_link4",
>> "http://fundev.kaboose.com/fun-blaster/halloween/science/halloween- 
>> slime.htm
>> l");
>>
>>
>>             so.addVariable("more_link3",
>> "http://fundev.kaboose.com/fun-blaster/halloween/recipes/edible- 
>> eyeballs.htm
>> l");
>>
>>
>>             so.addVariable("more_link2",
>> "http://fundev.kaboose.com/fun-blaster/halloween/recipes/sticky- 
>> spiders.html
>> ");
>>
>>
>>             so.addVariable("more_link1",
>> "http://fundev.kaboose.com/fun-blaster/halloween/recipes/ghostly- 
>> pears.html"
>> );
>>
>>
>>             so.addVariable("arcadeHome",
>> "http://fundev.kaboose.com/fun-blaster/games/index.html");
>>
>>
>>             so.addVariable("costumes_link3",
>> "http://fundev.kaboose.com/fun-blaster/halloween/crafts/halloween- 
>> wizard-wan
>> d.html");
>>
>>
>>             so.addVariable("costumes_link2",
>> "http://fundev.kaboose.com/fun-blaster/halloween/crafts/halloween- 
>> vampire-bl
>> ood.html");
>>
>>
>>             so.addVariable("costumes_link1",
>> "http://fundev.kaboose.com/fun-blaster/halloween/crafts/halloween- 
>> witch-hat.
>> html");
>>
>>
>>             so.addVariable("pumpkin_link6",
>> "/fun-blaster/halloween/printables/halloween-pumkin-art.html? 
>> page=3");
>>
>>
>>             so.addVariable("pumpkin_link5",
>> "/fun-blaster/halloween/printables/halloween-pumkin-art.html? 
>> page=3");
>>
>>
>>             so.addVariable("pumpkin_link4",
>> "/fun-blaster/halloween/printables/halloween-pumkin-art.html? 
>> page=2");
>>
>>
>>             so.addVariable("pumpkin_link3",
>> "/fun-blaster/halloween/printables/halloween-pumkin-art.html? 
>> page=2");
>>
>>
>>             so.addVariable("pumpkin_link2",
>> "/fun-blaster/halloween/printables/halloween-pumkin-art.html");
>>
>>
>>             so.addVariable("pumpkin_link1",
>> "/fun-blaster/halloween/printables/halloween-pumkin-art.html");
>>
>>
>>     so.addParam("wmode", "opaque");
>>     so.write("featureBG");
>>     // ]]>
>> </script>
>>         </div>
>>
>>
>>
>>
>> On 10/3/06 7:08 PM, "Geoff Stearns" <geoff at deconcept.com> wrote:
>>
>>> first, update to the latest version - older versions have small bugs
>>> that may come back to haunt you.
>>>
>>> second, if you are seeing that error, it usually means that you are
>>> trying to execute js before the script is loaded... so make sure you
>>> are linking the script in the head of the document, so it will be
>>> loaded 100% before you call the functions associated with it.
>>>
>>>
>>> On Oct 3, 2006, at 3:28 PM, Brian Lee wrote:
>>>
>>>> Hello,
>>>>
>>>> I've been struggling with this problem for a while now and can't
>>>> seem to
>>>> figure out whats wrong I'm using the swfobject but on random
>>>> ocassions I'll
>>>> get this error "Line [number]... Error FlashObject is undfined"
>>>> I'll be
>>>> asked to debug if I click no the same error on a different line
>>>> will come
>>>> up... Has anyone else experience this problem? The page has a lot
>>>> of flash
>>>> object on it at minimum 3-5.
>>>>
>>>> The FlashObject is referenced externally here is a sample of from
>>>> my page
>>>> this line is in between the <head></head> tags
>>>>
>>>> <script language="javascript"
>>>> src="http://fundev.kaboose.com/FlashObject.js"></script>
>>>>
>>>> Sample call...
>>>>
>>>>
>>>> <div id="subNavFlash"></div>
>>>>
>>>> <script type="text/javascript">
>>>>     // <![CDATA[
>>>>     var so = new FlashObject("http://fundev.kaboose.com/ 
>>>> subnav.swf",
>>>> "subNav", "810", "108", "6", "#B4D453");
>>>>     so.addVariable("subNavXML",
>>>> "http://fundev.kaboose.com/funBlasterSubNav.xml");
>>>>     so.addVariable("currentSelection", "3");
>>>>     so.setAttribute('xiRedirectUrl',
>>>> 'http://fundev.kaboose.com/fun-blaster/halloween/index.html');
>>>>     so.addParam("wmode", "opaque");
>>>>     so.write("subNavFlash");
>>>>     // ]]>
>>>> </script>
>>>>
>>>> Regards,
>>>>
>>>> Brian
>>>>
>>>> _______________________________________________
>>>> SWFObject mailing list
>>>> SWFObject at lists.deconcept.com
>>>> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com
>>>
>>> _______________________________________________
>>> SWFObject mailing list
>>> SWFObject at lists.deconcept.com
>>> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com
>>
>> _______________________________________________
>> SWFObject mailing list
>> SWFObject at lists.deconcept.com
>> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com
>
> _______________________________________________
> SWFObject mailing list
> SWFObject at lists.deconcept.com
> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com




More information about the Swfobject mailing list