Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: [FLA] How to load from PHP?  (Read 1539 times)

0 Members and 1 Guest are viewing this topic.

PoeFacedKilla

Prussian Killer Bee
[FLA] How to load from PHP?
« on: April 15, 2009, 07:40:49 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 269
I don't know if this is where to post this.  I'm really trying to load from MySQL, but I think it has to go through PHP first.  I want to load 2 things from a mysql table.  Title, and url.  I want the title to display but it be a link to whatever is the `url` column?  Does anyone know how?
Logged
the Indyboard - User Generated Social Forum | Now With Even More Discussion!
Poe, The Independent Programmer
  • Zelda Shrine
Re: [FLA] How to load from PHP?
« Reply #1 on: April 16, 2009, 12:05:02 am »
  • *
  • Reputation: +2/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1767
Try something like this:
Code: [Select]
<?php
echo &#39;<span><a href="&#39;.$row[&#39;url&#39;].&#39;">&#39;.$row[&#39;Title&#39;].&#39;</a></span>&#39;
?>

Output should be look like this on the page:
*WHATEVER TITLE*
Logged
  • https://colbydude.com

PoeFacedKilla

Prussian Killer Bee
Re: [FLA] How to load from PHP?
« Reply #2 on: April 16, 2009, 01:12:09 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 269
in flash i know php
Logged
the Indyboard - User Generated Social Forum | Now With Even More Discussion!
Poe, The Independent Programmer
  • Zelda Shrine
Re: [FLA] How to load from PHP?
« Reply #3 on: April 16, 2009, 01:15:51 am »
  • *
  • Reputation: +2/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1767
in flash i know php

Ah ok my bad. Sorry can't help ya then. =\
Logged
  • https://colbydude.com

PoeFacedKilla

Prussian Killer Bee
Re: [FLA] How to load from PHP?
« Reply #4 on: April 16, 2009, 01:56:33 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 269
yeah, every tutorial i've found is way over my head.  They don't even explain it.
Logged
the Indyboard - User Generated Social Forum | Now With Even More Discussion!
Poe, The Independent Programmer
  • Zelda Shrine

Xiphirx

wat
Re: [FLA] How to load from PHP?
« Reply #5 on: April 16, 2009, 03:13:11 am »
  • Xiphirx
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3007
1. Create PHP page that loads the variables from the data base and echos them on the page like so:
echo "TheTitle=".$row['title'];
2. In flash
Code: [Select]
loadVariables("http://localhost/test.php", this, "GET");



You NEED to have "varname=" in the echo because when flash reads the page and encounters a line like that, it sets the variable "varname" in the SWF to whatever it is set to on the page. So, for example
PHP:
Code: [Select]
<?PHP
Echo "TheTitle=Test";
?>

Then using loadvariables, the SWF will set the variable (variable in the SWF) "TheTitle" to "Test".

Let me know if it works.
Logged
  • For The Swarm
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.255 seconds with 49 queries.