Custom Superscript Font
Just curious if anyone has created a custom superscript font to use dynamically in flash - for Mac? I know I can get superscript 1,2,3 via unicode, but I need the full set 0-9. I'd like to avoid purchasing a font app and would be happy to pay for the set if someone had them.
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 02-15-2007, 05:57 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Superscript Font For Dynamic Html Text Field
Hello Forum
I am loading in a bunch of text and format them in flash into a newspaper-like layout.
The problem I am running into and can't seem to solve are superscript characters. I've used the GG superscript fonts from this website: http://blog.ggshow.com/index.php/reference?cat=121
Tthe example works fine. But once I try to implement it into my application it fails to work or simply doesn't show up.
Here's my code:
--------------------------------------------
External XML file:
--------------------------------------------
[...]
<item type="text"><![CDATA[.This is a sample text <i>Italic Font here shows up right</i><font face="GG Superscript">superscript here doesn't work</font>, ]]>
</item>
</p>
[...]
--------------------------------------------
Reading the Texfield:
--------------------------------------------
[...]
public static function getNodeContent(_xml:XML):String{
return String(_xml.firstChild.nodeValue);
}
[...]
--------------------------------------------------
creating the textfield:
--------------------------------------------------
txtHolder = itemMC.createEmptyMovieClip("txt",1);
Textfield.create(txtHolder,XmlArticleData.getNodeContent(itemNode),"articleText")
--------------------------------------------------
The Textfield class:
-------------------------------------------------
public static function create(_movieClip:MovieClip,_str:String,_type:String){
switch (_type) {
case "articleText":
_movieClip.createTextField("txtMC", 1, 0,0, 1, 1);
_movieClip.txtMC.autoSize = "left";
_movieClip.txtMC.type = "dynamic";
_movieClip.txtMC.border = false;
_movieClip.txtMC.multiline = true;
_movieClip.txtMC.html = true;
_movieClip.txtMC.embedFonts = true;
_movieClip.txtMC.selectable = false;
_movieClip.txtMC.wordWrap = true;
_movieClip.txtMC.antiAliasType = "advanced";
_movieClip.txtMC.thickness = 1.2;
_movieClip.txtMC.sharpness = 0;
var fmt:TextFormat = new TextFormat();
fmt.font = "ArticleTextFont";
fmt.indent = 10;
fmt.bold = false;
fmt.italic = false;
fmt.size = 11.5;
fmt.leading = 10;
fmt.color = 0x000000;
fmt.align = "justify";
}
_movieClip.txtMC.htmlText = _str;
_movieClip.txtMC.setTextFormat(fmt);
-----------------------------------------------------------
Any ideas?
Thanks!
Cheers
StephanK
Dynamic Txt, Custom Font
Salut les Amis
I have a dynamically created textfield. I have a Font included in my libary for runtime sharing. How do I apply the included font to the textfield?
I tried this.styleObj.font = "Eurostyle";, with no luck. Also tried this.styleObj.font = Eurostyle;, also no good. Anyone? The faster the better. One big smile up for grabs as a reward...
Custom Bullets Via Font - NOT Via CSS
Folks,
Pulling my hair out... after much searching I've come to the realization that Flash didn't intend for us to be able to use custom bullets via CSS.
What I'm attempting to do is split/join a string brought in from an external XML file. What I'd like to do is split where I find a <li> and replace it with <span class='check'>R</span>.
In my CSS I define the check class as having font-family: Wingdings 2;
Of course, Flash only displays an "R" where it should be displaying the Wingdings 2 symbol for "R", which happens to be a box with a check in it.
What am I doing wrong? Even trying <font face="Wingdings 2">R</font> in place of the <span...> isn't working.
Thank in advance.
Steve
Add Custom Font To Component
Alright this is messed up. If you apply a global Style to format all UI components, the Datefield Popup doesnt get formatted. Im not sure if this is a bug yet until someone else plays with it too. So in order to see what im talkin about:
1.Drag a Datefield Component onto the Stage.
Add this into the first keyframe and replace the font type with a specialty font you have on your system.
_global.style.setStyle("fontFamily" , "standard 07_53");
Notice it doesnt work. What am I doing wrong. This updates all the components I have in my application, BUT the subComponent of the DateField doesnt get updated...
Now if you give the DateField Component an instance name "df", then it works fine. But thats a pain in the #$%^ to have to update all the instances in my app.
df.setStyle("fontFamily", "Standard 07_53");
I sure wish I could figure this out. Lemme know if any of you know what Im doing wrong.
Thanks,
-Runnerman
Custom Font For Dynamic Text
how can i insert a FONT into the SWF file? works fine if the text file is static... but on INPUT and DYNAMIC dosen't works shows the ugly times new roman.... can any1 help?
i have tried NEW FONT in the library but i don't know what to do next
Html Text With Custom Font
Does anybody know how I can load in html formatted text and display it with a custom font?
I don't think its possible but would be happy to be proved wrong...
cheers
RadioButton Label Custom Font?
Hi all,
I'm using the RadioButton a lot (hundreds of instances) in my current projext.
And I want the Label to always have the font Verdana 16.
How can I change the font for every instance?
I understood neither the built in help nor the pdf's.
Am I supposed to edit the file RadioButton.as ?
if so, how?
Thank you
Cheers
Using Pixel Font With Custom Scroller?
Hi Peeps,
Havent posted in a while here. Anyhoo, I paid money to use my damb "FFF Professional" Pixel Font and I'm stressing trying to get it working with a scroller I used. It works wen I preview it on my pc, but on others it doesnt work, and shows up as one of the main fonts. You know, Veranda, Times New Roman, Arial; one of those. Heres the Tutorial I used to do it:
http://www.actionscripts.org/tutoria...ox/index.shtml
Basically, The font ONLY shows up correctly on my pc, offline and when I upload it online. I figure that's, because I have the font installed. But it should still work for others right? What am I doing wrong? How do you use my paid for Pixel Font with a custom scroller. And Dont recommend me those damb $35 scrolling thingys, I've spent enough money already. There must be a way to do it without Spend Spend Spend.
Please if you can help me, asap please. Thanks guys
How Do Use A Custom Font For Dynamic Text?
If I put a special font for my dynamic text, it will only show up on people who have that font installed. Is there a way to load the font into the flash or something that will let me use a custom font?
Use Embedded Font In A Custom Component
Hi
I am currently working on some textfiled components. Both input and dynamic. I'd like a parameter where the user can chose which font to use...
As an extra option i'd like to be able to use an embedded font.
My goal is to build a shared library so that i can use it in my future flash projects.
Is is also possible to refer to an embeddes font via. flash css ?
I hope there is someone out there that can help me out
Thanks
Custom Font In List Component
I want to make custom font in list Component
I'm trying to make this work but I see this is not working in any way
Right now I have this code and is not working:
Code:
videoList.setStyle("fontSize", 8);
videoList.setStyle("fontFamily", "font 08_53");
videoList.setStyle("embedFonts", "true");
What I can do to make this work in Flash 8 ?
Add New Custom Font Sets Dynamically To Flash
Hello all,
I would like to create a Flash application that obtain new fonts sets dynamically on the client side. However the only way generally described is through embed the custom fonts into the client application at compile time.
I have thought of three ways to do this, however hope it is a way to make the first alternative work:
Alternative A
The flash application will query the server for providing a list of available fonts, the server respond with a list of alternative fonts at this moment. The flash client then query the server for a specific font, and the server send back the a xml dataset containing the binary content of the ttf file, or re-encoded in a form Flash can read.
Alternative B
Generate a flash include file (.swc) that holds the Font using swfmill or similar on server side, then dynamically including that file in the flash client.
Alternative C
Loading the css separately through the use of javascript and css inclusion of alternative character sets.
I would really hope to avoid using method C, and do favor method A to method B.
HTML Formatting In Textfield With Custom Font
Hello,
I am trying to get the following HTML formatted text to display properly in a dynamic text field with HTML enabled.
test = "<B>This is bold,</B> and this is not.";
In order to have the text anti-aliased, I embed the fonts. But by doing so all of a sudden all text within the <B></B> tag is gone. If I do not embed any fonts, it will display all text, but nothing will be anti-aliased and basically look like crap.
All I want is to have both bold and regular text within the same textfield, using a non-system or non-standard font.
In flash 6 this works by just embedding the fonts and ticking the Bold B. But in 2004 it doesn't. It seems as if it will only embed the regular OR the bold, but not both.
Thanks beforehand boys n girls
Font Embedding In Custom MX04 Component
What is the best way to embed fonts for use in custom components?
I've made a custom component and i add to Library a FONT is this case a pixel font.
Since most users dont have these fonts on their system i need to embed that font with my component for distribuition.
The problem is when i make the SWC file when when i install the component with Extension Manager, when trying out that component the fonts doesnt appear.
ActionScript Code:
myformat = new TextFormat();
myformat.color = 0xFF0000
myformat.size = 10;
myformat.embedFonts = true;
myformat.font = 'myEmbeddedFont';
myEmbeddedFont is the font that i embed
the font is set to "export for actionscript", etc..
How can i embedd a font...
I have the same problem when trying to embed a image file that i want to use.
What is the best way to embed assets!!?
Best regards to you all
Attaching Custom Font To Dynamically Generated Textfield...?
Hi,
I want to create a textfield like this:
_root.createTextField("mytext",1,100,100,300,100);
mytext.multiline = true;
mytext.wordWrap = true;
mytext.border = false;
myformat = new TextFormat();
myformat.color = 0xff0000;
myformat.bullet = false;
myformat.underline = true;
mytext.text = "Text bla bla bla";
mytext.setTextFormat(myformat);
Now... How can I use a font which I can embed in my movie and use it in this field... Also with anti-alasing...
Thanks in advance!
Weird Text Wrapping Problem With Custom Font...
i'm having a weird problem with a dynamic text field. i'm populating it with text from a php file that pulls from mysql. there are no special characters ("
" "<*BR*>" etc.) and i have tried both html enabled and disabled, with no luck. anyway, what's happening is that some lines of text are not wrapping the way they should. i've sort of pin-pointed the problem to a custom font that was once used in the movie, but no longer is...
when i clear that custom font out of my fonts directory that i know for certain shows up nowhere in the .swf, my text looks like this:
|----------text box width----------|
when i clear a certain custom font
out of my fonts directory that i
know for certain shows up nowhere
in the .swf, my text looks like
this
|----------------------------------|
i.e. it wraps the way it should. as soon as i put that font back in the directory:
|----------text box width----------|
when i clear a certain custom font
out of my fonts directory that i
know for certain shows up nowhere in the .swf, my text looks like
this
|----------------------------------|
the weird thing is that the text comes back... just a few words will extend beyond the edge of the text box. this doesn't make any sense to me and i've lost a lot of sleep and hair over this
surely someone must have seen this before???
this is driving me absolutely crazy.
thanks for any help...
Custom Font Not Working In Input Text Field
Ok guys i am in need some either some hints tips or if u feel like it a walk threw on what ive got to do to make the input text field i got use the custom font i want that is a font i downloaded some where of the net.
Below are the things i have done and tried but havnt worked.
1 = added font BankGothic Md BT to libary and set its identifier name as BankGothic Md BT and also have made it set to export for action scripting and export in first frame.
2 = made a layer called input text, made one input text box on that layer and gave it the instance name of maininput_txt and set the font to the same thing as the one in the libary.
3 = i set the options of that maininput.txt as follows below
textfield type = input
font = BankGothic Md BT
multiline
selectecable
bitmap text (no anti alias)
4 - ive also embeded the following
Uppercase a -z 27 glyphs
Lowercase a- z 27 glyphs
numerals 0 - 9 11 glyphs
punctuations 52 glyphs
5 - and have got auto kern unticked.
6 - added the following action script code to the first frame the input field is in
this.createTextField("mainimput_txt",1,2,2,550,50) ;
mainimput_txt.text="compiler active.....>";
style=new TextFormat();
style.font="BankGothic Md BT";
mainimput_txt.setTextFormat(style);
mainimput_txt.embedFonts=false;
================================================== =
Ok the thing is when i preview it as flash that setup works and it displays the font i want but when i actually have published it it changes the font to times new roman or some other one not the one i want.
I have also tried without that action script code ==== did not work
i have also tried change the embedFonts=flase statement to true - did not work
i have also tried removing that maininput_txt.text= "compiler active...>"
that also did not work
so please guys im at my wits end here, i wanna use this font and im running out of ideas to try.
the reason i made this so detailed post is to help u understand what ive done and what ive tried that hasnt worked so u dont just tell me to do things ive all ready tried which would just be wasting ur time and mine.
Hope someone here can help me cause i cant continue working on this untill i fix this problem.
Many thanks in advanced
Custom Font Not Working In Input Text Field
Ok guys i am in need some either some hints tips or if u feel like it a walk threw on what ive got to do to make the input text field i got use the custom font i want that is a font i downloaded some where of the net.
Below are the things i have done and tried but havnt worked.
1 = added font BankGothic Md BT to libary and set its identifier name as BankGothic Md BT and also have made it set to export for action scripting and export in first frame.
2 = made a layer called input text, made one input text box on that layer and gave it the instance name of maininput_txt and set the font to the same thing as the one in the libary.
3 = i set the options of that maininput.txt as follows below
textfield type = input
font = BankGothic Md BT
multiline
selectecable
bitmap text (no anti alias)
4 - ive also embeded the following
Uppercase a -z 27 glyphs
Lowercase a- z 27 glyphs
numerals 0 - 9 11 glyphs
punctuations 52 glyphs
5 - and have got auto kern unticked.
6 - added the following action script code to the first frame the input field is in
this.createTextField("mainimput_txt",1,2,2,550,50) ;
mainimput_txt.text="compiler active.....>";
style=new TextFormat();
style.font="BankGothic Md BT";
mainimput_txt.setTextFormat(style);
mainimput_txt.embedFonts=false;
================================================== =
Ok the thing is when i preview it as flash that setup works and it displays the font i want but when i actually have published it it changes the font to times new roman or some other one not the one i want.
I have also tried without that action script code ==== did not work
i have also tried change the embedFonts=flase statement to true - did not work
i have also tried removing that maininput_txt.text= "compiler active...>"
that also did not work
so please guys im at my wits end here, i wanna use this font and im running out of ideas to try.
the reason i made this so detailed post is to help u understand what ive done and what ive tried that hasnt worked so u dont just tell me to do things ive all ready tried which would just be wasting ur time and mine.
Hope someone here can help me cause i cant continue working on this untill i fix this problem.
Many thanks in advanced
Custom Font Not Working In Input Text Field
Ok guys i am in need some either some hints tips or if u feel like it a walk threw on what ive got to do to make the input text field i got use the custom font i want that is a font i downloaded some where of the net.
Below are the things i have done and tried but havnt worked.
1 = added font BankGothic Md BT to libary and set its identifier name as BankGothic Md BT and also have made it set to export for action scripting and export in first frame.
2 = made a layer called input text, made one input text box on that layer and gave it the instance name of maininput_txt and set the font to the same thing as the one in the libary.
3 = i set the options of that maininput.txt as follows below
textfield type = input
font = BankGothic Md BT
multiline
selectecable
bitmap text (no anti alias)
4 - ive also embeded the following
Uppercase a -z 27 glyphs
Lowercase a- z 27 glyphs
numerals 0 - 9 11 glyphs
punctuations 52 glyphs
5 - and have got auto kern unticked.
6 - added the following action script code to the first frame the input field is in
this.createTextField("mainimput_txt",1,2,2,550,50) ;
mainimput_txt.text="compiler active.....>";
style=new TextFormat();
style.font="BankGothic Md BT";
mainimput_txt.setTextFormat(style);
mainimput_txt.embedFonts=false;
================================================== =
Ok the thing is when i preview it as flash that setup works and it displays the font i want but when i actually have published it it changes the font to times new roman or some other one not the one i want.
I have also tried without that action script code ==== did not work
i have also tried change the embedFonts=flase statement to true - did not work
i have also tried removing that maininput_txt.text= "compiler active...>"
that also did not work
so please guys im at my wits end here, i wanna use this font and im running out of ideas to try.
the reason i made this so detailed post is to help u understand what ive done and what ive tried that hasnt worked so u dont just tell me to do things ive all ready tried which would just be wasting ur time and mine.
Hope someone here can help me cause i cant continue working on this untill i fix this problem.
Many thanks in advanced
Superscript
Does anybody know how to make superscript on dynamic text in flash?
Like this: <b>Areal</b><br>2.184.700 km2<br>
Only I need some of the text to be superscript instead of bold...
Thanks in advance =)
Superscript
Anyone know how to install, if its even possible, superscripted numbers within dynamic text boxes?
ex: 10 to the 8th....
Many thanks in advance!
XML And Superscript?
Hi all.
I am creating a slideshow in Flash, following the tutorial here: http://www.kirupa.com/developer/mx2004/xml_slideshow.htm. My movie inports an xml file which has a list of photos (fine), each with an annotation.
In one of the annotations, I have a French MC: the French version of TM so it needs to be superscript. I haven't been able to figure out how to make the MC superscript.
Thoughts?
Thanks
Superscript
Is there any way to dynamicaly set the text to superscript?
I have dynamic text box that usualy holds normal text, but I would like to place ® and © symbols when used, to superscript?
Is there any way to do this in some easy way?
Superscript With Generator
Hi,
I am working on a project that requires generator to take external text files and convert them to swf files. The problem is that the text files incoude many superscript letters. So far it hasn't been able to.
Any suggestions or thoughts on this would be appreciated.
Best,
Wantan Soup
The Sub/superscript Revisited
ok, adobe sez: http://www.adobe.com/cfusion/knowled...fm?id=1959eceb
but if you code:
Code:
my_tf.htmltext="COu2080"
you'll get the correct CO2 symbol
also for example e=mcu2070 works.
now this only works when the font is not embedded...
when you embed fonts, the sub or superscript symbols vanish...
even when you code:
Code:
my_tf.htmltext="CO<font face='Arial'>u2080</font>"
does anyone have an idea for a workaround ?
Superscript Subscript
Hi all techies...
I have to display superscript and subscript text in dynamic text fields using html <sup> and <sub> tags.
Is there any method to acheive it . Its urgent.
In some blogs o have read that making smaller font and vertical offset we can acheive dis. Can any one please help me wat needs to be done.
Thanx in advance
Typing Superscript In AS2
hey guys, I wanna display area units through a dynamic text box , but the only way I know to show it is by using ^ operator, eg in^2 .. how can I display it like we write it by superscripting the 2?
Edited: 06/11/2007 at 04:03:51 PM by thunder_storm
Superscript And Subscript
We are also having some questions on superscript and subscript. We are trying to implment the superscript and subscript for the dynamic text in a text area. We have tried even with antialaising and still the super script is not visible properly. Can we have some source code on how we can implement this.
Best regards,
Vijay
Superscript In TextField
Is there any way of raising a character in a textField programmatically to appear like an exponent?
Superscript And Subscript
Anyone know how to make superscript and subscript show up in dynamic text fields that have .txt file load the text externally? They just show up as squares when I view them.
Superscript/Subscript With AS1.0/2.0
Hi everyone,
Does anyone out there know how to apply superscript or subscript to a dynamic textfield using AS1.0 or AS2.0? I tried looking for an example code but couldn't find any.
Thanks in advance.
regards,
Mike
External Text In Superscript---how?
12
i am trying to have superscript in external text. i checked the available tags, and i found that <sup> cannot be read by flash player. so what should i do?? anybody helps?? thanks you soooooo much!
LoadVariables --- (parts In Superscript)
i have this problem when loading a txt variable
html superscript is
Code:
<sup>value</sup>
and i stuck that in the text file...
my usual technique for making text bold etc, but i have'nt found a way to superscript, or subscript txt yet, it keeps the number or whatever the same size as the rest of the text.
i can get 1,2,3 in superscript with a hex value, but thats about it and i need numbers like 20, 30.
Is anyone able to help me out please? im stuck.
Matt
thanks
[MX04] Superscript Subscript
Hi buddies,
As u all know very well dat we can mak any string/char which is in a static text field, to be superscript or subscript by applying from the property inpector panel.
Is there any other way to acheive the same to a string/char which is applied to an dynamic text field... where the text for dat field is dynamic.... thru code...
Can we acheive thru the html tag <sup> & <sub>
Its urgent.. please any one know dat let me know
thanx in advance
Add A Style That Mimicks Superscript?
Any suggestions on how I can add a style in flash that mimics superscript since that's a tag it won't support?
I'm pulling in the content from an xml file:
<?xml version="1.0" encode="UTF-8"?>
<!DOCTYPE data[
<!ELEMENT daTextBox(daTitle, daContent)>
<!ATTLIST daTextBox daTitle CDATA #REQUIRED>
<!ELEMENT daContent (#PCDATA)>
]>
<daTextBox>
<daTitle><p class="title">Here is the title</p></daTitle>
<daContent><p class="content">Wow. I would love to have this be a superscript 2</p></daContent>
</daTextBox>
Displaying Superscript Characters
Hey all
I'm using an FFF pixel font which contains 1,2 and 3 in superscript characters.
The thing is - how do I display these characters in a dynamic html text box?
Thanks
Dynamic Text And Superscript
HI all,
I'm trying to get superscript for numbers to work using the unicodes of the font.
Anyone know of a hack to achieve this ?
I managed to get it to work with unicodes and if i create a dynamic textfield and within flash specify the characters i want to embed and then did this:
myText.html= "testing /u2074";
off the top of my head /u2074 will display 2 in superscript.
The font i'm using is palatino which has all the superscript codes for numbers 1-9.
The problem is i need to read the text from an external xml file. I've put the text i want in cdata so /u2074 will be read.
I'm reading the node with the cdata into myText.html and what it displays is:
testing /u2074 instead of testing 2.(that 2 should be superscript)
Anyone have any ideas or managed to achieve this ?
Xml Entities Like Superscript Won't Show Up
Can someone help with xml entities showing up.
I have file that imports external xml, but can't get the supscript to work, nor most xml entities.
I found a workaround for italic and bold (<i>word</i> but not for others like <sub>
Would appreciate any help on this matter.
Thanks.
Xml & Trademark Symbol (superscript)
I'm pulling in some text from an xml file, however I am also listing some company names that need to have the trademark symbol next to them (preferably as a superscript). I know the html for it is ™ but even when I make the text box read as html it doesn't parse through correctly. Any ideas on how to do this?
Subscript And Superscript In Textfield
hai to all,
i am a macromedia director developer . atpresent i am learning the flash actionscript. i am very happy to join in ultrashock. it helps me to develop a flash developer.
i want to set superscript and superscript in dynamic textfield at runtime. actually i tried to set sub ans sup using htmltext options. but it doesn't set. anybody knows how to set. please help me. thanks in advance.
How To Write Subscript & Superscript Dynamically
I have a problem. I am generating text from the text file into the swf. How do i display subscript and superscript text in it. one way i guesss is usinh HTML text box, but have tried it with <SUB> and <SUP> tags, but it does not work.
Also, i know i am being stupid but is there a way we can input superscript and subscript in input text field.
Thankz in advance,
Abhishek
Can Flash Read Superscript Tags In Xml Please Help
How can I Import a superscripted 3 in xml to a dianiamic text box in flash? I have tried two ways to format my xml so flash would recongize my 3 as superscript. Is this possible? I tried rendering my text box as html also that didnt work.
my xml code is below neither one has work for the import.
<answer2 correct="false" txt="39 x 10^3/ul" /> ^3thought it would render that as html
<answer2 correct="false" txt="39 x 10²/ul" /> used this code & #178 ;
How can i format my xml so flash will render it as superscript
[MX04] Pbm With Superscript And Subscript Text
Hi buddies,
I jus have to display some text which having superscript and subscript values inside dat. I wanna display the text in a dynamic text field. How can i do dat.
If it is a Static Text, i know how to.... But the text content are dynamic. So need it dynamically....
Note : The htmlText doesnt support <sub> and <sup> html tags it seems. Else i cud use dat.
Its urgent. Any other alternate solution will be greately welcome....
[MX04] Pbm With Superscript And Subscript Text
Hi buddies,
I jus have to display some text which having superscript and subscript values inside dat. I wanna display the text in a dynamic text field. How can i do dat.
If it is a Static Text, i know how to.... But the text content are dynamic. So need it dynamically....
Note : The htmlText doesnt support <sub> and <sup> html tags it seems. Else i cud use dat.
Its urgent. Any other alternate solution will be greately welcome....
Create A Superscript Test *within* A Tooltip
'Sup guys,
I'm in need of some urgent help, I know how to use the superscript in simple dynamic/input fields, but I have this script of a tooltip and I'm unable to write superscript text within the bubble!
I've included the .html and .htmlText properties in the text field script but with no use, please guys help me out FAST and I'm willing to reward anyone that helps (I have a free copy of Day of Defeat Source that I'm willing to part with if someone here give me the solution!)
I've included the .fla file and here's the script for the tooltip:
Code:
import com.mosesSupposes.fuse.*;
ZigoEngine.register(PennerEasing,FuseItem,FuseFMP);
var tipFormat:TextFormat = new TextFormat();
tipFormat.font = "Verdana";
tipFormat.size = 11;
tipFormat.color = 0x000;
var blankTip = " ";
this.createEmptyMovieClip("tiptool",this.getNextHighestDepth());
tiptool.createTextField("tip",3,0,0,100,100);
tiptool.tip.html = true;
tiptool.tip.htmlText = true;
tiptool.tip.wordWrap = false;
tiptool.tip.multiline = false;
tiptool.tip.autoSize = true;
tiptool.tip.embedFonts = true;
tiptool.tip.selectable = false;
FuseFMP.setFilterProps(tiptool,'DropShadow',{distance:0, alpha:.5, blurY:10, blurX:10});
tiptool.onEnterFrame = function() {
this.createEmptyMovieClip("box",1);
this.box.beginFill(0xFFFFFF,100);
this.box.lineStyle(1,0xFFFFFF,100);
this.box.moveTo(-10,-10);
this.box.lineTo(this.tip._width + 10,-10);
this.box.lineTo(this.tip._width + 10,this.tip._height + 10);
this.box.lineTo(-10,this.tip._height + 10);
this.box.moveTo(-10,-10);
this.box.endFill();
this.createEmptyMovieClip("pointer",0);
this.pointer.beginFill(0xFFFFFF,100);
this.pointer.lineStyle(1,0xFFFFFF,100);
var boxXedge = this._x + (this._width - 20);
if (this._parent._xmouse < Stage.width / 2) {
this.pointer.moveTo(0,this.box._height - 11);
this.pointer.lineTo(this._xmouse,this._ymouse);
this.pointer.lineTo(20,this.box._height - 11);
this.pointer.endFill();
this._x -= Math.round(((this._x) - (this._parent._xmouse)) / 7);
this._y -= Math.round(((this._y) - (this._parent._ymouse - 40)) / 7);
} else {
this.pointer.moveTo((this.box._width - 20),this.box._height - 11);
this.pointer.lineTo(this._xmouse,this._ymouse);
this.pointer.lineTo((this.box._width - 40),this.box._height - 11);
this.pointer.endFill();
this._x -= Math.round(((this._x) - (this._parent._xmouse - (this.box._width - 20))) / 7);
this._y -= Math.round(((this._y) - (this._parent._ymouse - 40)) / 7);
}
};
/*-----------------------------------------------------------------
Tip Show/Hide Function
-----------------------------------------------------------------*/
function showTip(txt,flip) {
tiptool.tip.text = txt;
tiptool.tip.setTextFormat(tipFormat);
tiptool._visible = flip;
ZigoEngine.doTween({target:tiptool,start_rotation:45,start_scale:0,time:1,ease:"easeOutElastic"});
if(flip){
clickSound.start();
}
}
showTip(blankTip,false);
/*-----------------------------------------------------------------
Button Functions
-----------------------------------------------------------------*/
btn1.onRollOver = function(){
showTip("Quit",true);
}
btn1.onRollOut = function(){
showTip(blankTip,false);
}
btn2.onRollOver = function(){
showTip("Contact Us",true);
}
btn2.onRollOut = function(){
showTip(blankTip,false);
}
btn3.onRollOver = function(){
showTip("About Us",true);
}
btn3.onRollOut = function(){
showTip(blankTip,false);
}
btn4.onRollOver = function(){
showTip("Home",true);
}
btn4.onRollOut = function(){
showTip(blankTip,false);
}
Thanks in advance,
|