focousing on a swf game

  • 1
  • Question
  • Updated 7 years ago
  • Answered
i am having trouble getting the website to focous on a swf game. when you go to the website you can play the game but if you press the arrow keys the hole page moves, how do i stop it doing this.
Photo of fgfhelp

fgfhelp

  • 11 Posts
  • 0 Reply Likes
  • confused

Posted 7 years ago

  • 1
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Hello fgfhelp.

Please can you share your URL so that we can take a look at the issue you're describing. Thanks!
Photo of fgfhelp

fgfhelp

  • 11 Posts
  • 0 Reply Likes
flashgamesfree.co.uk, the problem lies with some of the games on the pages, an example is in the games page under the link "box-head 2". thank you
Photo of Brianna

Brianna

  • 2045 Posts
  • 92 Reply Likes
Thanks, fgfhelp!

I will be referring you to Sanja. She'll gladly look over this and respond the next time she is online. We appreciate your patience in the meantime.
Photo of Ed-a-Torials @ Honey Bear Playhomes

Ed-a-Torials @ Honey Bear Playhomes, Champion

  • 2582 Posts
  • 279 Reply Likes
What you are experiencing is an Internet Explorer issue with the code that you were using to embed the flash game on your site. Flash movies are much simpler to embed and thus the code that you used would have worked fine for a video but for a game it requires a little more to make it work well in all the major browsers.

Use the following script instead for your flash games in the future. Just replace the "yourflashgame.swf" occurring twice in the code below with the individual games actual name. Only copy the code between the <!-- and the -->

<!--

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/sh..." width="640" height="480">
<param name="movie" value="resources/yourflashgame.swf" />
<param name="quality" value="high" />
<embed src="resources/yourflashgame.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflash..." type="application/x-shockwave-flash" width="640" height="480"></embed>
</object>

-->

So... For your BoxHead game it would be:

<!--

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/sh..." width="640" height="480">
<param name="movie" value="resources/Boxhead 2play.swf" />
<param name="quality" value="high" />
<embed src="resources/Boxhead 2play.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflash..." type="application/x-shockwave-flash" width="640" height="480"></embed>
</object>

-->

This will lock in the game and ensure that it does not migrate when you use the up or down arrow when while playing the game in Internet Explorer.

For certain games on your site they might require the changing of the width and height settings in the script to match the game play field. Look at the old script to locate those settings and then make the appropriate changes (twice) in the code that I provided above after changing the flash file name.

Happy site building
Ed

If the lady bears don’t find you handsome they should at least find you handy...Don't forget to share the bear....

Honey Bear Playhomes Tips and Favs in one place... A Honey bear Playhomes Tip ;)
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Thanks Ed!
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Hello fgfhelp,

I hope that Ed's suggestion has helped to resolve the issue.
Photo of fgfhelp

fgfhelp

  • 11 Posts
  • 0 Reply Likes
unfortunatly i am only a free member so i can i am not able to put in my own script, is there any other way of accomplishing my goal?
Photo of Ed-a-Torials @ Honey Bear Playhomes

Ed-a-Torials @ Honey Bear Playhomes, Champion

  • 2582 Posts
  • 279 Reply Likes
Why would being a free user matter?

Simply:

1) Delete the previous Boxhead2 game script HTML widget on your site
2) Copy the script (between but not including the <!-- and the -->) below and paste it into a new HTML widget on your site

It's that easy...

<!--

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/sh..." width="640" height="480">
<param name="movie" value="resources/Boxhead 2play.swf" />
<param name="quality" value="high" />
<embed src="resources/Boxhead 2play.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflash..." type="application/x-shockwave-flash" width="640" height="480"></embed>
</object>

-->

As you already have the Boxhead2 game in your file manager the script (code) above will work without any editing.

For future games simply edit the name and the dimensions as stated in my previous reply.

Being a free member is no different than a paid member when inserting scripts my friend...
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Hi fgfhelp.

Ed is correct! The HTML Widget is available to both Yola Free and Yola Silver users. Please do give Ed's suggestion a try and let us know if you're still struggling with this.
Photo of fgfhelp

fgfhelp

  • 11 Posts
  • 0 Reply Likes
thats all good but i did not use the html widget i used the swf widget, i am not great at coding, well i don't know anything about it to be honest. please could you create the coding for my and show me were i can edit the games, also please could you set the size of the games to fit in the screen. thank you so much u have been very helpful
Photo of Ed-a-Torials @ Honey Bear Playhomes

Ed-a-Torials @ Honey Bear Playhomes, Champion

  • 2582 Posts
  • 279 Reply Likes
I already coded it for you if you read my post above...

Simply:

1) Delete the previous Boxhead2 game SWF widget on your site
2) Copy the script (between but not including the <!-- and the -->) below
3) Drag a new HTML widget onto your page and paste the copied script into the code editor
4) Click "Ok"

It's that easy...

<!--

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/sh..." width="640" height="480">
<param name="movie" value="resources/Boxhead 2play.swf" />
<param name="quality" value="high" />
<embed src="resources/Boxhead 2play.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflash..." type="application/x-shockwave-flash" width="640" height="480"></embed>
</object>

-->

5) In the case of your other SWF games that are acting funny simply edit the code below to reflect the name of the game that you are trying to embed. Just replace the "yourflashgame.swf" occurring twice in the code below with the individual games actual name. Only copy the code between the <!-- and the -->

The dimension settings are pretty standard for flash games so you should be okay there but in the event that you need to change them to better fit the game that you are trying to embed just do it incrementally by changing the width and height settings to match the size that you are looking for. The dimensions (width="640" height="480") would need to be changed twice (in two places) in the code below/above to whatever variable that you want.

<!--

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/sh..." width="640" height="480">
<param name="movie" value="resources/yourflashgame.swf" />
<param name="quality" value="high" />
<embed src="resources/yourflashgame.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflash..." type="application/x-shockwave-flash" width="640" height="480"></embed>
</object>

-->

This may sound curt but in site building it takes a good bit of teaching oneself through a great deal of reading online how to do things. I have given you the tools that will help you achieve your goal many times in this thread and it is now up to you to follow and implement them.

Good luck...