Probem Loading .SWF game [Javascript/ActionScript].

Discussion in 'Programming' started by xkaser101, Sep 1, 2011.

  1. #1
    Hello,

    I have a Scratch & Win game I created for my website, I designed it using A software called "Hothotsoftware.com Scratch and Win"
    The software outputs 4 main files the first is a Javascript file called ("AC_RunActiveContent.js") the second is an XML document Which stores the Game's configuration called ("config.xml") The Third is just a simple .Htm file that loads the game and here is the Source code used :

    
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>HotHotSoftware Scratch And Win Game!</title>
    <script language="javascript">AC_FL_RunContent = 0;</script>
    <script src="AC_RunActiveContent.js" language="javascript"></script>
    </head>
    <body bgcolor="#0xFFFFFF">
    <!--url's used in the movie-->
    <!--text used in the movie-->
    <!--
    Loading 
    -->
    <!-- saved from url=(0013)about:internet -->
    <script language="javascript">
    	if (AC_FL_RunContent == 0) {
    		alert("This page requires AC_RunActiveContent.js.");
    	} else {
    		AC_FL_RunContent(
    			'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0',
    			'width', '500',
    			'height', '300',
    			'src', 'HotHotSoftware_ScratchAndWin_Eval',
    			'quality', 'high',
    			'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
    			'align', 'middle',
    			'play', 'true',
    			'loop', 'true',
    			'scale', 'showall',
    			'wmode', 'transparent',
    			'devicefont', 'false',
    			'id', 'HotHotSoftware_ScratchAndWin_Eval',
    			'bgcolor', '#0xFFFFFF',
    			'name', 'HotHotSoftware_ScratchAndWin_Eval',
    			'menu', 'true',
    			'allowFullScreen', 'false',
    			'allowScriptAccess','sameDomain',
    			'movie', 'HotHotSoftware_ScratchAndWin_Eval',
    			'salign', ''
    			); //end AC code
    	}
    </script>
    <noscript>
    	<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553550000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="500" height="300" id="HotHotSoftware_ScratchAndWin_Eval" align="middle">
    	<param name="allowScriptAccess" value="sameDomain" />
    	<param name="allowFullScreen" value="false" />
    	<param name="movie" value="HotHotSoftware_ScratchAndWin_Eval.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#0xFFFFFF" />	<embed src="HotHotSoftware_ScratchAndWin_Eval.swf" quality="high" wmode="transparent" bgcolor="#0xFFFFFF" width="500" height="300" name="HotHotSoftware_ScratchAndWin_Eval" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
    	</object>
    </noscript>
    </body>
    </html>
    
    Code (markup):
    Finally The .Swf file and it is called "HotHotSoftware_ScratchAndWin_Eval.swf",

    However everything works fine when i double click the .htm file and the game runs just fine under this url format ("file:///C:/Program%20Files/HotHotSoftware/scratch_and_win_game/scratchworkspace/HotHotSoftware_ScratchAndWin.htm") But when I Run the same Htm page on a local Testing server (WAMP) like this ("http://localhost/scratch/HotHotSoftware_ScratchAndWin.htm") The game gives me a huge red "Invalid" error message,

    I would really appreciate it If anyone can tell me whats the difference between the two Links and how could that make an Error Also how to solve it. :confused:

    EDIT : Hello I have just noticed that when i right click on the Invalid Flash Error Message and Click Play the game Loads is there a way to make it load instantly ?

    Thanks in Advance,
    Kind Regards,
    Issa Shamoun.
     
    Last edited: Sep 1, 2011
    xkaser101, Sep 1, 2011 IP