Current location: Hot Scripts Forums » General Web Coding » Flash & ActionScript » string query


string query

Reply
  #1 (permalink)  
Old 03-10-07, 01:32 PM
kiko08 kiko08 is offline
Newbie Coder
 
Join Date: Oct 2006
Posts: 88
Thanks: 0
Thanked 0 Times in 0 Posts
string query

how can i change the font color using string query?
so other people can use the file with their own text and font color.

sample:
myflash.swf?text=Hello World!&fontcolor=0xFF0000

i also want to load a pic using string query,
sample
myflash.swf?text=Hello World!&fontcolor=0xFF0000&image=mypic

thanks, hope you can help me.
Reply With Quote
  #2 (permalink)  
Old 03-11-07, 09:18 AM
UnrealEd's Avatar
UnrealEd UnrealEd is offline
Community Liaison
 
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
you will have to use flashvars, and grab the variables in the url via php/asp:
PHP Code:

<object>
<param name="flashvars" value="text=<?=$_GET['text'];?>&fontcolor=<?=$_GET['fontcolor'];?>" />
</object>
i don't know exactly how to get the values in flash, but i think you can do it like this:
ActionScript Code:
  1. var text:String = _root.text;
  2. var fontcolor:Number = _root.fontcolor;
if this doesn't work, search the web for "load flashvars actionscript"

UnrealEd
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
code problem throws error matt001 ASP.NET 0 10-23-05 03:30 AM
retrieving specific data from parsed query string grayfox Perl 1 04-04-04 11:38 AM
Declared Functions skipper23 PHP 4 12-17-03 10:06 AM
index page not showing up skipper23 PHP 3 12-15-03 01:10 PM
ASP SQL query string problem CollinAmes ASP 2 10-24-03 11:09 AM


All times are GMT -5. The time now is 06:30 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.