The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Web Design
> Flash Help
|
Var won't load from PHP within symbol / scrollbar's screwed
Discuss Var won't load from PHP within symbol / scrollbar's screwed in the Flash Help forum on Dev Shed. Var won't load from PHP within symbol / scrollbar's screwed Flash Help forum discussing all products originally created by Macromedia including DreamWeaver, Contribute, Flash, Fireworks, Freehand, Director, Authorware and HomeSite. Adobe bought Macromedia in 2005.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

March 8th, 2003, 09:03 PM
|
|
Junior Member
|
|
Join Date: Mar 2003
Posts: 4
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
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.
|

March 8th, 2003, 10:16 PM
|
|
Junior Member
|
|
Join Date: Mar 2003
Posts: 4
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
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.
|

March 9th, 2003, 01:31 PM
|
|
Junior Member
|
|
Join Date: Mar 2003
Posts: 4
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
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.
|

March 11th, 2003, 09:50 AM
|
|
flash junkie
|
|
Join Date: Jan 2003
Location: CO, USA
Posts: 172
Time spent in forums: 5 m 38 sec
Reputation Power: 11
|
|
|
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
|

March 11th, 2003, 11:15 AM
|
|
Junior Member
|
|
Join Date: Mar 2003
Posts: 4
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
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.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|