hi,
I have a movieclip with instance name dummy.This movieclip has a button myMovie with instance name myMovie.
what i have is something like this for the movieclip:
onClipEvent (enterFrame) {
myColor = new Color(dummy.myMovie);
myColor.setRGB(0x993366);
}
& for button:
on (release) {
myColor = new Color(myMovie);
myColor.setRGB(0x336699);
}
This script works for button but does’nt work with the movieclip on load.
What i want is the functionality for button to be applicable for the movieclip on load.
I want the color of the movieclip to change to the hexRGB value set(0x336699) on load of the movie.
Can you please tell me what’s the problem with my script?
First of all… ‘color’ is reserved word in Flash so it should not be used as a variable name… Let’s just call it ‘theColor’ instead… and assuming that you are getting the new color value from the ASP page and saves the value to the variable theColor…
The main thing is that you don’t know if the ASP string has been fully loaded or not with loadVariablesNum() function… So, I have used LoadVars() object to do that… And since the variable, theColor, doesn’t get to get loaded in the first place, onClipEvent (load) won’t work… so I had to use onClipEvent (enterFrame) to apply the new color… (You need to change the paht for the ASP file so that it will call yours properly…)
Hm… I don’t know why you are not able to open the file… I have saved another file and posting it again… This better work cuz I am off to bed… It’s 6am here… :beam: Let me know if it worked for you or not…
hi,
thanks for the reply. I managed getting the color change on run time but still have a problem and that is of a mouseover toolltip which also has to appear dynamically.
Now that we’ve set a RGB value for the movieclip, even the button mouseover tooltip which is embedded within this movieclip picks the same RGB value set.
I just want the tooltip to have a differnt graphical base & the content of the tooltip can appear in the dynamic txt field which loads variables from the same asp file(getdetails.asp)
Is there a way to acheive this functionalty.
Please provide further assistance for the same.
hi,
Basically i am looking for a mouseover descripiton to appear when somebody mouseovers the button which is embedded within the movieclip dummy as u must have seen in my .fla file.
The description of the tooltip should come dynamically as it will be a txt field with some variable name “XYZ” given which picks up from the asp file as we’ve done with “theColor” variable.
This movieclip inturn has a button embedded with instance name myMovie.The actionscript for the same is:
on (release) {
getURL("#", “_self”, “POST”);
}
on (rollover) {
dummy.attachMovie(“att1”, “newname1”, 1);
}
Getdetails.asp looks something like this
<%
My flash library has a movieclip MC_attach1 with linkage given as “att1” which is having the tootlip movieclip embedded within it.This should pick up the variable label from the asp file as mentioned above.
Can u please help me in acheiving this functionality.
Please find the zip file attached herewith.
I have two .fla files script1.fla & script2.fla.What i want is the kind of mouseover happening in script2.fla to be incorporated in script1.fla keeping all the code intact.
hi,
thanks for the reply.
I rectified the script & the tooltip appears on mouseover but the description txt of the tooltip which needs to be picked up from the asp file does’nt seem to appear & also the color which was changing on runtime yesterday is now lost.
My asp file looks something like this: