Jump to content
The Uniform Server Community
rex

Uniserver Can not load swf file

Recommended Posts

I try to run uniserver on windows 2003, html working fine, but the flash video can not play. anything wrong on apache setting? I have check the MIME setting, it has swf and flv setting.

thanks

Rex.

Share this post


Link to post
Share on other sites

Hey Rex not sure myself but I'd like to know how to get an html page as an object from the server myself. The page shows up when I write it to the innerHTML of a div on my index page as an object but the script built into the page causes IE8 to warn and refresh the index page sending you back to the original content or just not running the script for that page at all. Calling object might mean that the object has to be registered on the server so that it has a classID and I can't find out how to do the server registration of objects. Would be nice if the UniServer team could cherp in? Either that or I have to revert to a Ajax call to a PHP page of the HTTML page I want to load in my div which throws out the whole beauty of the object tag. My guess is that the object has to be registered on the server to allow it to run it's scripts? :)

Share this post


Link to post
Share on other sites

Rex,

 

How does an installed browser on Windows have anything to do with UniServer? If you have the Flash plugin, you should be able to play Flash.

Share this post


Link to post
Share on other sites

Rex,

 

How does an installed browser on Windows have anything to do with UniServer? If you have the Flash plugin, you should be able to play Flash.

 

 

I run my uniserver on VPS, and access from my laptop, I can not load flash file in my browser.

thanks

Rex.

Share this post


Link to post
Share on other sites

I want to be able play flv and mp4 in brower, I try to play in VPS localhost, it did play flv but not mp4,from outside VPS, both can not access, flv and mp4.

any idea?

thanks

Rex.

Share this post


Link to post
Share on other sites

This really isn't a UniServer-related problem. The flash is executed on your client system, not the server. I have a site on UniServer 7-Orion that serves Flash just fine, so I would suggest that your problem has MUCH more to do with file locations for your Flash code, or perhaps VPS firewall settings. There really is very little info to conclude otherwise.

 

Regards,

BobS

Share this post


Link to post
Share on other sites

boBs Flash files generaly have a relative link to the server of the flash player company set as a param in the object along with CLASID: and base directories or file paths etc. which allow the flash to run without refreshing the page or issuing a warning/promt to run the Activ-X object depending on your browser advanced settings.

If I use html Object tag to get an HTML page from UniServer to replace the content of a div it is still a form of http request that avoids the use of a bloated Ajax file to make that request.

EG. INDEX.HTML EXTERNAL.JS

var contact=document.getElementById('contact');
addEvent(contact,'click',function(){
var f1=document.getElementById('f1');
f1.innerHTML='<object id=contacthtml class=htmlpage type=text/html data=contactus.html>
<script src=./scripts/contact.js type=text/javascript></script>//Doesn't work
</object>';
alert(document.getElementById('contacthtml').outerHTML); //shows the objects html?
},false);

If I use the object method the div f1 innerHTML content is changed but it's internal or external js is not recognized and doesn't run even if you allow the script to run at the warning/prompt the page is refreshed and the content reverts to it's previous state. The external.js link of the index page method can't refrence the id of the object and apply functions to the html elements of the object and hard coded inline scripting only works on the <a tag elements even though it still draws the warning/prompt?

 

I'm guessing that the objects have to be prefetched before writting them to the innerHTML and that the client has to approve their download but I can't find any reasonable explanation on the web other than flash type obects. :)

Share this post


Link to post
Share on other sites

Again, this isn't relevant to The Uniform Server, and I have no way of helping you with this specific code.

 

That said, there IS a better way to embed your Flash objects: Use swfobject.

Find out more at: http://code.google.com/p/swfobject/

I just used it to repair an outdated website that used Flash displays.

 

Regards,

BobS

Share this post


Link to post
Share on other sites

BobS Hey guy I finaly got the javascript written in script tags of the contact.html page which I wrote to the innerHTML of the 'display' div as an object. What it took was amazingly simple. I had to have written an httpServerRequest or Ajax call to the server via external.js before the javascript would run. The call did not have to be made but just had to be there. Lucky for me I had links that required both object and ajax php calls, otherwise I would never have known. Any search on the subject generaly leads to the type swfObject or javaApplet etc. Thanks for that as in general these objects have urls that steer the media player to a proprietary company server that allows the scripts to run. Even though validation is a nusance the classic embed tag allows sounds etc. to be played regardless of what media player is loaded on the client. I didn't get to read your link but saved it to My Favorites and will do so soon. It will be interesting to see how long the browser war will continue to represent proprietory media recognition, a not so subtle form of cronyism bogged down in contract negotiations ;)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...