|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Var won't load from PHP within symbol / scrollbar's screwed
Hi,
I have a problem that I was unable to find a solution to by browsing the boards. I want to have a flash movie that loads a string of text from a php file and presents it in a scrollable textbox. I have been messing around with various scrollbar solutions that others have made available, but have not been able to get them to work. If I have the flash movie call a text file holding the variable, it works fine. However, if I try to call the php file (which is outputting the exact same value for the variable), it won't work - the textbox shows up empty. I eventually figured out that if I moved the textbox onto a frame on the main stage (instead of having it within a symbol, as it was when I started), the text loads and displays from the php file just fine. However, the scrolling functionality doesn't work. I'm assuming because the way the actionscript relates to the textbox, it's probably assuming that it's going to be located within the symbol, rather than on the main stage, where I put it. So, can anybody tell me either 1) how to get my php file to load correctly in the textbox while keeping the textbox within a symbol, or 2) how to make the actionscript know to point to the textbox on the main stage, rather than within a symbol instance? Thanks in advance. |
|
#2
|
|||
|
|||
|
Oh yeah, I forgot to mention, I would like to make this accessible for Flash 5, but would settle on Flash 6 functionality if 5 won't do the trick.
|
|
#3
|
|||
|
|||
|
Well, cancel that, I figured it out. I had to put "_root." before the variable name in the textbox's var setting. I suck at actionscript, so this wasn't apparent to me until I saw someone do it in an example I stumbled across.
Now, my question is this: how can I make it so that a fresh copy of the file is downloaded every time? The php file outputs a list of links in random order, so I need a new copy to be retrieved every time the page is loaded or refreshed. I know that Flash stuff relies heavily on the browser cache, and when I load my variables, I used "listings.php?rnd="+random(999), but it still won't retrieve a fresh copy every time. It works perfectly in Opera, but not IE. If I spawn a new window containing the swf, it apparently retrieves a new version from the server, because it will refresh as expected, and any windows containing the swf, when refreshed, will also show the latest version, but will not load a new one when refreshed again. Any tips? Last edited by illflux : March 9th, 2003 at 01:40 PM. |
|
#4
|
|||
|
|||
|
so something like
...loadVariables("myPHP.php?" + Math.random()*100000, "POST"); or ......load("myPHP.php?" + Math.random()*100000); doesn't work at all? to my knoweldge, that is the only way to avoid the chache problem... cheers, bret |
|
#5
|
|||
|
|||
|
Actually, after testing it at work, I've found that it does refresh every time after all. As long as it works when my boss is looking at it - that's all I care about.
|
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > Var won't load from PHP within symbol / scrollbar's screwed |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|