homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
Forum Library, Charter, Moderator: open

Flash and Shockwave Forum

populate textarea with php variable(s)

 9:14 pm on Jan 24, 2009 (gmt 0)

I have created a simple .swf with a "copy" button on the bottom.
the textarea I am trying to populate with variables from a processed.php file in which the .swf will be placed.

the "processed" php file that has the variables has:
Figure 1.)

<FORM action="non" method="post">
HTML: <input type="text" name="datext" size="40" value="<a href='<?php echo $siteurl; ?>view/<?php echo $id; ?>'><img src='<?php echo $siteurl; ?>image/<?php echo $id; ?>.jpeg'></a>">
<br/>CODE: <input type="text" name="datext" size="40" value="[url=<?php echo $siteurl; ?>view/<?php echo $id; ?>][img]<?php echo $siteurl; ?>image/<?php echo $id; ?>.jpeg[/img][/url]"></FORM>
<br/>URL: <a href='<?php echo $siteurl; ?>view/<?php echo $id; ?>'><?php echo $siteurl; ?>view/<?php echo $id; ?></a>

I am trying to load the generated Code:

[url=<?php echo $siteurl; ?>view/<?php echo $idz; ?>][img]<?php echo $siteurl; ?>image/<?php echo $idz; ?>.jpeg[/img][/url]

into the .swf so it can be copied onto their clipboard easily.

here is the actionscript i am using to try and load the above string into the .swf:
mylv = new LoadVars();
textBox.textBox.text =mylv.variable1;

the textBox.textBox.text = ""; can have text added into it no problem, but I am trying to load a variable since the code changes per picture.

I try to assign a value to the variable1 on the processed.php page(where the .swf will be placed)
print "&variable1=<a href='<?php echo $siteurl; ?>view/<?php echo $id; ?>'><img src='<?php echo $siteurl; ?>image/<?php echo $id; ?>.jpeg'></a>&"

this comes nowhere near close to working.

I need to assign figure 1. (above) or part of figure 1. to textBox.textBox.text = "FIGURE 1.";

any light on this would be greatly appreciated!

TY regards, frogz



 9:40 pm on Jan 24, 2009 (gmt 0)

say I want to retrieve variable $id from a .php page, so I can make
textBox.textBox.text = $id; in actionscript. How can I get actionscript to get the $id variable from the processed.php page?


 5:11 pm on Jan 25, 2009 (gmt 0)

Frogsz, have you looked at the flashVars approach?

<param name="flashvars" value="id=<?php echo $id; ?>">
flashvars="id=<?php echo $id; ?>"

Anoother is to use an XML file and import the XML into Flash, which gives you more control over nested attributes and associative values, but for a single value, FlashVars will work.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved