views:

124

answers:

1

i see that that template has some code to see if the client has the required version, and it does stuff if it has or it doesn't and there is a <object> tag inside <noscript>

question: if the stuff is gonna work with the <object> tag anyway why would you need all that stuff above with the control of version if it has or not ?

+2  A: 

What is inside the noscript tag is only run in the case that the user has turned off javascript in their browser. This is required for the Flex page to still work in that case.

The other code is inside of a script tag, and handles the creation of the flash object smoother than the brute force method in the object tag. It would prefer to use this method, but in the case that scripting is disabled, it will use the object method instead in an effort to still give the user what they want on the page.

That is why it seems that it appears twice in the page. For any given browser only one section should actually run.

Brandon Bodnár
what do you mean by brut force inside object tag
Omu
is my flex app gonna render somehow worst in the object tag ?
Omu
It is not really related to your flex app itself, so it will render the same. It is related to loading the actual flash movie file. The object tag method is not guaranteed to work, it basically just tries to create the flash movie in the page without checking if flash is even installed, and then displays what is inside the object tags if it fails. It is better form to check if something exists before trying to create it, hence why the javascript method is preferred. Just know that this is the standard why to include flash movies in web pages, and not anything special about Flex.
Brandon Bodnár