Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 13th, 2003, 10:38 AM
rsquared rsquared is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 1 rsquared User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Load Variables into Buttons

Can anyone tell me how to load a variable from PHP into a button. For example; I want to get a value from a PHP file and load it in the getURL values within a Flash Button.
Since I cannot seem to give a button a variable name I cannot loadVariablesNum and have it read it correctly.

Thanks for your help.

Reply With Quote
  #2  
Old January 13th, 2003, 09:51 PM
bambam's Avatar
bambam bambam is offline
macho member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Posts: 207 bambam User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 40 sec
Reputation Power: 7
you probably know this part:

/********************************

// inside a movie clip i placed this ...
onClipEvent(data
{
// let say your var name is ... dynaLink
// I passed it to a bunch of variable holders on _root
// I hear inserting data into objects will make code much more modular

dynaLink = _root.dynaURL;
}

onClipEvent(load)
{
loadVariables("processMe.php",this);
}

*********************************/

then, then on your button just do this

/*********************************
// if its a folder and not a file
// eg: http://www.abc.com/flash/
on(press)
{
getURL("http://www.macromedia.com/"+_root.dynaURL+"/");
}


// if its a file - the difference is the trailing slash
// eg: http://www.abc.com/flash/gallery.html

on(press)
{
getURL("http://www.macromedia.com/"+_root.dynaURL);
}


// the trailing slash has cause me some trouble last time, so i empahsise here, you probably know ...

*********************************/

cheers~

Reply With Quote
  #3  
Old January 13th, 2003, 10:00 PM
bambam's Avatar
bambam bambam is offline
macho member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Posts: 207 bambam User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 40 sec
Reputation Power: 7
oops, the trailing slash thing could be quite an issue if u use my example above ...

beter way is just to pass a proper value. eg:

// use this
on(press)
{
getURL("http://www.macromedia.com/"+_root.dynaURL);
}

then dynaURL value should already have the trailing slash if its needed ...
this is the easiest way i can think of.


Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > Load Variables into Buttons


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT