How can i reload an iframe?

0 favourites
  • 5 posts
From the Asset Store
A sound pack containing 132 laser gun sound effects, including mono and stereo versions of audio files.
  • Hello,

    After years of absence i decided to give construct 2 another go for one of my projects.

    I downloaded a semi broken iframe plugin for it and i created a quick draft for my project.

    Worked like a charm since it has a refresh command.

    So i decided to buy your construct3 year plan so i can have the latest and greatest.

    Now i am missing the refresh option and i am banging my head against the wall because my project depends on it.

    Am i missing something? Is there an option i haven't used?

    I just want the user to click a button and refresh the web page within the iframe.

    Regards

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • If you have a button that loads an iframe, it should automatically reload every time the button is pressed.

  • Thank you for your help.

    Unfortunately i am a bit rusty and i failed to understand what you are trying to tell me.

    on press---> create object--->iframe ---> navigate to url?

    And then what?

    I have to destroy it every time the user presses the reload button, create a new one, set it size, set it coordinates and url?

    And how do i know where the user is if he is navigating a site for example within the iframe?

    How is it possible a community plugin from many years before to have the reload functionality and the official iframe does not?

    Regards

  • The solution to the problem is to execute a little JavaScript.

    We use the Browser object and execute the command location.reload();

    Cheers.

  • Yes, if someone is navigating a site thru the iframe or creating/destroying the iframe, that does add more complexity. I would have been more helpful if your original post stated that. ;)

    I created a tutorial app that uses thumbnail sprites for loading external videos in a main iframe. Every time the user clicks a different thumbnail, it reloads the main iframe. It's pretty simple.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)