473,788 Members | 2,759 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Refreshing flash

14 New Member
I am using an XML document to display data in flash. I have the swf embedded in html but I now realize that this won't work. You see the xml data needs to be updated every few minutes. Does anyone know of a simple way to refresh the swf so that it can read from the updated XML and display accordingly in the browser ?
Aug 7 '07 #1
4 2449
xNephilimx
213 Recognized Expert New Member
You can use setInterval if you want to update the xml reading in a fixed ammount of time. So the setInterval will call the xml.load function every time the time lapse ends.
Or simply reload the xml when needed calling the xml.load("thefi le.xml"). May be you want to update the file every time the user does a certain thing.

If you are going to use the setInterval, you should do something like the following:

Expand|Select|Wrap|Line Numbers
  1. var xml:XML = new XML();
  2. xml.ignoreWhite = true;
  3. xml.onLoad = function() {
  4.   //the methods to handle the xml
  5. }
  6.  
  7. var intervalID = setInterval(this, "loadXML",2*60*1000);
  8. //being the interval 2 minutes, since the setInterval uses milliseconds
  9.  
  10. function loadXML() {
  11.    xml.load("thefile.xml");
  12. }
  13.  
If in some point you want to stop the interval you should use clearInterval(i ntervalID); and that's it.

Kind regards.
The_Nephilim

I am using an XML document to display data in flash. I have the swf embedded in html but I now realize that this won't work. You see the xml data needs to be updated every few minutes. Does anyone know of a simple way to refresh the swf so that it can read from the updated XML and display accordingly in the browser ?
Aug 9 '07 #2
jacksoncn
14 New Member
thanks. i got it. appreciate it.
Aug 14 '07 #3
xNephilimx
213 Recognized Expert New Member
thanks. i got it. appreciate it.
You're welcome!
Good luck with your app!

Regards,
The_Nephilim
Aug 15 '07 #4
crabpot8
40 New Member
there might be a way to reload that part of the page using javascript. look up AJAX if you are still interested in doing it by re-loading the .swf

crabpot8
Aug 17 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

60
4325
by: A.Translator | last post by:
I have been struggling with a page that is based on a table structure (because that is all I am feeling comfortable with at the moment) styled with css. One of the problems I run in to is Opera (Opera 7 in my case). The weird thing is: viewing the page through Opera's eyes the first time around is OK, but after refreshing, the page gets messed up badly. I will look into the cause of the mess, but for now am really curious: what does...
9
8605
by: Keith Rowe | last post by:
Hello, I am trying to reference a Shockwave Flash Object on a vb code behind page in an ASP.NET project and I receive the following error: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). On the aspx page I have the object tag as follows:
9
4520
by: Glenn | last post by:
Is it possible to only redraw a portion of an HTML page as part of a request? With each request, I am updating number of results but do not want to lose where you were in a page. I created anchors at different parts of the page but even this is a bit jumpy. Is there any other way to implement this?
5
3487
by: Jensen Bredal | last post by:
Hello, I need to display self refreshing information on a web page written with asp.net. I would image that the info would be displayed either as part of a user control or a web control. How can this be done? The information will come from a database and the displaying should loop throug a table in the database. Many thank in advance JB
0
1414
by: CptDondo | last post by:
I am trying to get started on a page which uses a short flash movie to show status. The flash movie itself is only a few seconds long - say 15 seconds. What I want is something like this (alternative 1): The browser sends a request for the page. The php backend creates the first flash movie and sends it to the browser.
0
1481
by: sean.hpr | last post by:
Hi all- I am a vb2005 newb so apologies in advance. Essentially I am having some problems with data refreshing on some of my forms. Background: I have created a project containing a few forms. The main form is linked to a data feed which is constantly refreshing data as it is available (it checks automatically and is updating a few times per second). The other forms are essentially taking this data and
13
7457
by: honey99 | last post by:
Hi! I have to fix a problem in JSP.Actually,i have a JSP page say Ex1.jsp.In this Ex1.jsp i have an anchor tag which links into another JSP page i.e when i click on the link another pop-up window will open.My problem is the pop-up window and the parent window has same combobox.if i add data through html form in pop-up window(Ex2.jsp) it enters the combobox...but the data in the combobox of parent window(Ex1.jsp) is entering only when i refresh...
1
1576
by: Steve S | last post by:
Hey guys, I'm stuck with using a GridBagSizer (wxPython) in a GUI Dialog and am having a frustrating time with refreshing it properly. Essentially, I've got to refresh the contents of the GridBagSizer on occasion with new values. The way I'm doing it works 4 times out of 5 but on the 5th, *all* of the grid objects that are set to various positions in the GBS are set to (0,0) :|
6
1955
by: shankari07 | last post by:
hi guys, I have a form in html which has the city drop down. when clicking the drop down a javascript is called and a file(test.txt) is created and the city is written into the file. Through php i want to open the same file(test.txt), fetch the values and display it in a text box without refreshing or reloading the form. Is it possible. After refreshing it works but i want without refreshing the form. here is the code.
0
9656
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9498
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10373
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10177
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10118
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9969
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8995
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7519
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5538
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.