PDA

View Full Version : CSS in Flash 8 - Can it be done and how?


kaytookreations
08-09-2006, 07:30 AM
Hi everyone!

I have a strong web-development/php/html/CSS working history, and what I need is to use CSS the same way in Flash 8.

I'm not even sure if it can be done.

I know that it has been mentioned in the features when we bought Flash 8 - but I can't seem to find any straight forward info on how to use it.


I need it to work on a standalone flash product, in a bunch of movie clips I have in the library that each have lots of text. I need some global formatting features.


Can someone explain to me how to use it in Flash 8? (or 7)


or can you say whether it can actually be done or not?




thanks heaps!
*clueless***


cheers
Kaytoo

cdu
08-09-2006, 02:36 PM
CSS can be done easily in Flash 8 (just check out the tutorial section). The only thing is that it's pretty limited... as is using HTML files in Flash. You can read up on it in Flash's help. It's well documented and pretty straight forward. Formatting the text to be nice and crisp in Windows is proving to be a challange for me right now. :( Good luck! ;)

XDudedotcom
08-09-2006, 07:29 PM
I saw this site (http://www.bantrel.com/) the other day and it totally farked me up. iframes in Flash. Even worked in Opera! :eek:

kaytookreations
08-09-2006, 11:15 PM
Thanks guys!

yeah I felt like a bit of a goofball - after I posted yesterday I tried just looking in the help & voila - sample files and everything

haven't quite got it working however - and from how it looks it's reading the text to be formatted externally

I need it to apply to text that is already in the Flash movie....



how do I do this? when I use the code within the text field (rather than calling out to the macromedia website)e.g.

&content=<p class="headline">Macromedia Flash 8 features new features</p>
<p><img src="<A href="http://www.helpexamples.com/flash/images/logo.png"><i>by">http://www.helpexamples.com/flash/images/logo.png"><i>by Flash Team</i><br>
<li><b>Software:</b> 100+ MB</li>
<li><b>Publisher:</b> Macromedia; (September, 2005)</li>


the formatting no longer appears, and it publishes showing exactly what i've just pasted above....

I'm still using the Flash template thingo - so yes all the little boxes for "Render text as HTML" etc are all checked...



nothing changed - just the place where the text is coming from




this also happens when I change the path to the .txt file and put it in the same dir as the FLA.



i don't get it.....



can anyone explain it simply to me?


thanks heaps in advance....



cheers
Kaytooooooo

kaytookreations
08-09-2006, 11:18 PM
Thanks guys!

yeah I felt like a bit of a goofball - after I posted yesterday I tried just looking in the help & voila - sample files and everything

haven't quite got it working however - and from how it looks it's reading the text to be formatted externally

I need it to apply to text that is already in the Flash movie....



how do I do this? when I use the code within the text field (rather than calling out to the macromedia website)e.g.

&content=<p class="headline">Macromedia Flash 8 features new features</p>
<p><img src="<A href="http://www.helpexamples.com/flash/images/logo.png"><i>by">http://www.helpexamples.com/flash/images/logo.png"><i>by Flash Team</i><br>
<li><b>Software:</b> 100+ MB</li>
<li><b>Publisher:</b> Macromedia; (September, 2005)</li>


the formatting no longer appears, and it publishes showing exactly what i've just pasted above....

I'm still using the Flash template thingo - so yes all the little boxes for "Render text as HTML" etc are all checked...



nothing changed - just the place where the text is coming from




this also happens when I change the path to the .txt file and put it in the same dir as the FLA.



i don't get it.....



can anyone explain it simply to me?


thanks heaps in advance....



cheers
Kaytooooooo

kaytookreations
08-09-2006, 11:24 PM
Hmmmm!!!!


OK - I found this http://www.kirupa.com/developer/mx2004/css.htm

It appears to be a wonderful tutorial that will expose all the secrets behind this Flash CSS thing........


Righto - i'm into it.....


cheers
Kaytoooooooooooooooo

XDudedotcom
08-09-2006, 11:35 PM
Neat-o! That looks pretty similar to sIFR (http://www.mikeindustries.com/sifr/), but with less hassle.

Example: http://www.mikeindustries.com/blog/files/sifr/2.0/

kaytookreations
08-10-2006, 12:49 AM
Righto

took the tutorial


there still appears to be no way to format text without calling it in from an external txt file


This just isn't suitable as it will double or triple the work time to have to publish every single time to view how the text is laying out on the Flash page.

I guess I have a situation where every page is going to be a little bit different - I just wanted a universal control for example, where if I needed to globally change all "body" text from size 12 to size 14, I could do it just by changing the CSS.


It doesn't look like it's going to be that simple in my case.

*dissapointed*



please let me know if you know otherwise.....




cheers to all out there in the big wide world


Kaytooooo

XDudedotcom
08-10-2006, 01:05 AM
there still appears to be no way to format text without calling it in from an external txt fileerr.... isn't that what CSS is?

fortelle
08-12-2006, 10:57 PM
CSS can be written inline, also, saving, switching to a browser and hitting F5 is typically faster than publishing and previewing a flash.