Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Flash MX and PHP

Status
Not open for further replies.

HuggerFanta

Technical User
Apr 22, 2002
87
SE
Hello group!
I have tried to create a flash movie to load info from a php file.

I used a tutorial from ( but I just can´t display the text in the text field when loading the page with the swf and loadVar calling!

I´ve found a litle bug in the PHP script that are copy and paste material (print "$myVar=$x";, it was without $!!!

And suggestions to whats wrong or where to find info about where to find a tutorial that works???

/ huggerFanta --------------------------------------
Kind regards;
HuggerFanta
 
Like this:

Regards
David Byng
spider.gif

davidbyng@hotmail.com
 
Thanks, this realy worked!!!

Can you answer some more questions???

1. Why can´t I use the Scroller Component in F MX to scroll the dynamic text field???

2. How do I get it to understand <br> and other HTML coding??

3. How do I get it to understand Swedish characters like ÅÄÖ???

Thanks for helping out!!!
--------------------------------------
Kind regards;
HuggerFanta
 
1- The scrollbar component should work!

2- Is the html tab ( looks like this: <>) set in your textfield's properties?

3- As for special characters, try adding the following on your movi'e first frame:

System.UseCodePage=true; Regards,

oldman3.gif
 
Also...

1. The easiest way to get the scrollbar component to work properly is to attach it to a dynamic textbox and refer to it's instance property rather than a variable name. They both work (kind of) but the scrollbar reads the text's properties better via the instance.

3. If you're running the text out through PHP you'll have to encode the characters to enable Flash to read them properly...

<?php

$myText=urlencode(..whatever, variable or string...);
echo $myText;

?>

...then when the data is read into Flash use unescape() to decode the encoded text.
 
Can I use HTML links (<a href...) in dynamic fields in flash to link to information and then display this links inside flash!!!

PLZ / Help!!! --------------------------------------
Kind regards;
HuggerFanta
 
You can use <a href=&quot;&quot;> to link to external html files like this <a href=&quot; target=&quot;_blank&quot;> which will pop up a new window or you can link to functions within the Flash application itself via <a href=&quot;asfunction:_root.myFunction,parameter&quot;>
 
OK!

Lets say that in my database i have a few headlines thet I whant to link inside my flash, and then display more text about them in a dynamic textfield, is this possible to and how do I do it???

Thank for answering stupid Q!!!
--------------------------------------
Kind regards;
HuggerFanta
 
It's possible.

Add the following to the headline text stored in the DB:

<a href=&quot;asfunction:_root.displayText,story1&quot;> headline1</a> then the same for story2/headline2 etc...

Then in the _root of your Flash file a function like this:

function displayText(story){
textBoxClip.variable=story;
}

Bearing in mind that you must also have already loaded in data called story1, story2 etc when you loaded your headlines.

I'm assuming that your dynamic textbox is in a movieclip called 'textBoxClip' and has a variable name of 'variable'.

This will work in Flash 5 or MX.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top