Ok now heres my problem ..... u know the script in themes/(selected theme name)/header.html .. well i was going to take, "<td nowrap><font class="content">$theuser</font></td>", which displays the "Create an account" if user not logged in and also shows "Welcome ($theuser)" if user is logged in, and get a function exactly like that in flash is there any way to do this? to sum it up i want a tutorial on how to make a text on a flash header that displays "Create an account" when user isnt logged in which when clicked brings user to "modules.php?name=Your_Account&op=new_user" and also displays "Welcome (theuser)!" message when user is logged in thx for help in advance and please some1 help me .... now im not sure wut "<td nowrap><font class="content">$theuser</font></td>" does in html pages but it seems to me this is the script that is doing, wut i want done in flash, in the html version of the header. pls help mE
shrek_rock Captain
Joined: Nov 24, 2003
Posts: 709
Posted:
Tue Jun 28, 2005 4:47 pm
Hi, I am a little busy right now so I can't give you a more detailed example but I will point you in the right way. First you need to create a php file and place in your root folder(same folder where nuke is installed). Now what you need to do is to create a variable that flash can read into a dynamic text box. The variable will print the user name or create account link. Open your theme.php for the theme you are using and look inside the header function, you will see how they get the username. Copy that if statement to the phpfile. Now the variable you are interested in is the $username or whatever they use to display the username or the create account link. Now you need to print that variable. We now have our php set, now it's time for flash. Create a dynamic text field in flash and give it the same instance name as the variable from the php file. If you are using flashmx you use instance and not the variable box. Convert that text box to a symbol and place the following action script.
Code:
onClipEvent (load) {
loader = new LoadVars() // this is the new FlashMX way to load variables
loader.path = _root.vars; // this is the level on which your movie is.
loader.onLoad = function(success) {
if(success) {
trace(this.thename) // as you can see we use thename to load the variable.
this.path.text = this.thename;
}
}
loader.load('http://localhost/test.php'); // this is the link to the php file, in this case i have mine on my local computer.
}
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum