Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8701129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:19:20+00:00 2026-06-13T02:19:20+00:00

I’m developing a site which will hold a rather large flash game. The problem

  • 0

I’m developing a site which will hold a rather large flash game. The problem is that when someone is playing the game and then goes to another page he’ll have to reload the flash game when he goes back a couple of seconds / minutes later in the same browsing session. Of course the assets are cached but it still takes a couple of seconds for everything to load.

So I’m trying to figure out the best way to combat this (besides getting the flash dev to improve the games loading time). I came up with the following:

Create one rather empty page, which holds some javascript and 2 iframes, one of them being the website and the other being the website with the flash game loaded. Now the javascript on the parent page is used to switch between browsing the website and playing the flash game. From a user perspective they are in a regular website (ie. they are completely oblivious to the fact that it’s loaded in an iframe).

This still brings some issues in terms of overlapping dialogs over the flash game, but I can work around those by opening them in the parent.

My only worry is that this just doesn’t feel right, it feels like I’m hacking my way around the problem and I’m afraid it’s going to blow up in my face at some point.

So 2 questions

  • What’s your feeling on my approach? Foresee any problems other than the one mentioned (z-index)?
  • Is there a better way of going about this? Surely I’m not the first person to have ever wanted a flash clip to persist for as long as a visitor is on a website.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T02:19:21+00:00Added an answer on June 13, 2026 at 2:19 am

    If you have a page which people can freely leave (i.e the internet) you’re going to have this problem. If it’s a page they need to flick between, then a separate tab/window is preferable – an iframe will give you more headaches than are necessary!

    You can use javascript on the flash page to intercept the user closing/redirecting, and make a prompt which warns the user that they’ll need to reload etc. In an online flash editor I used exactly this technique – every time the user did something which needed saving, I used ExternalInterface:

    public final class ExternalJS
    {
    
        public static var callJS:Boolean = true;
        public static var jsFunc:String = 'setSaved';
    
        public static function setSaved(isSaved:Boolean):void
        {
            if(callJS && ExternalInterface.available)
            {
                ExternalInterface.call(jsFunc,isSaved);
            }
        }
    }
    

    With this, there’s a corresponding JS function on the page:

    var saved = true;
            function setSaved(isSaved){saved = isSaved;}
            window.onbeforeunload = function()
            {
                if(!saved)
                {
                    return "Leaving this page will require it to be reloaded if you visit again, are you sure you wish to navigate away?";
                }
            }
    

    This will create a prompt with this text, and standard ok/cancel options. Short of redesigning your site, this strikes me as the best option.

    Hope this helps.

    PS For your purposes you probably don’t need the Flash code, or even the condition in Javascript, simply use onbeforeunload event to create a prompt.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need a function that will clean a strings' special characters. I do NOT
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I am doing a simple coin flipping experiment for class that involves flipping a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.