The Joyent Community

A place where the Joyent community can gather, help each other out, and stay informed.

You are not logged in.

  • Index
  •  » sIFR
  •  » How to control letter spacing using sIFR v2 (requires Flash 8)

#1 2006-09-20 16:45:58

InvaderZim
New member
Registered: 2006-09-20
Posts: 1
Expertise

How to control letter spacing using sIFR v2 (requires Flash 8)

Here's how I control the letter spacing between characters using sIFR v2 and Flash v8.

First, edit "dont_customize_me.as" and place the following code at line 92:
if (letterSpacing != null) fmt.letterSpacing = Number(letterSpacing);

Next, edit "sifr.js" on line 7:
Where it says "var a=6;" change the 6 to an 8. This ensures that you're detecting for Flash v8.

Where you make your replacement calls (currently line 119 of "index.html") add the following to sFlashVars:
sFlashVars:"textalign=center&offsetTop=6&letterSpacing=3"

Lastly, be sure to save your font SWFs as Flash 8, with Actionscript 2.0 enabled using the "Publish Settings..." menu.

Offline

 

#2 2007-01-26 18:19:17

botono9
New member
Registered: 2005-02-02
Posts: 25
Expertise

Re: How to control letter spacing using sIFR v2 (requires Flash 8)

You rock.

Offline

 

#3 2007-04-17 08:49:51

MikeyP
New member
Registered: 2007-04-17
Posts: 13
Expertise

Re: How to control letter spacing using sIFR v2 (requires Flash 8)

Can you do this with sifr 3? If so how?

Thanks,

Mike

Offline

 

#4 2007-04-17 09:05:03

Mark Wubben
sIFR dev
From: Copenhagen
Registered: 2004-08-17
Posts: 6271
Website  Expertise

Re: How to control letter spacing using sIFR v2 (requires Flash 8)

See letter-spacing under Styling

The ".sIFR-root" class that's described is the one you use for styling in sifr-config.js.


"The angels stole my phone box" – The Tenth Doctor

Offline

 

#5 2007-04-17 18:22:19

MikeyP
New member
Registered: 2007-04-17
Posts: 13
Expertise

Re: How to control letter spacing using sIFR v2 (requires Flash 8)

How would this code look? I read through the styling, but Im not exactly sure how it is suppose to be done? Any examples?

Offline

 

#6 2007-04-17 19:55:59

MikeyP
New member
Registered: 2007-04-17
Posts: 13
Expertise

Re: How to control letter spacing using sIFR v2 (requires Flash 8)

Sweet, I figured it out.

For anyone else looking for a solution to this, here is an example using the sifr-config.js file:

sIFR.replace(angelina, {

selector: 'h1' ,css: [ '.sIFR-root { font-weight: bold; letter-spacing: 2; color:#888888; z-index:0; position:absolute }' ,'a { color:#0099ff }' ,'a:link { color: #0099ff; }' ,'a:hover { color: #0099ff; }' ] , wmode: 'transparent'
});

Offline

 

#7 2007-04-17 20:16:08

Mark Wubben
sIFR dev
From: Copenhagen
Registered: 2004-08-17
Posts: 6271
Website  Expertise

Re: How to control letter spacing using sIFR v2 (requires Flash 8)

Aye. The z-index and position won't have any effect, by the way.


"The angels stole my phone box" – The Tenth Doctor

Offline

 

#8 2007-04-17 20:25:51

MikeyP
New member
Registered: 2007-04-17
Posts: 13
Expertise

Re: How to control letter spacing using sIFR v2 (requires Flash 8)

Oh thanks! I will get rid of them :)

Offline

 

#9 2007-07-19 20:49:10

HiKirsch
New member
Registered: 2007-07-19
Posts: 2
Expertise

Re: How to control letter spacing using sIFR v2 (requires Flash 8)

Hey Guys -

When I compile the swf into Flash 8, the SWF looses the ability to wrap. It basically shrinks the text to make it fit on the one line.

Any ideas? Been looking at this for days wondering what the problem could be, and so far, no luck.

--Adam

Offline

 

#10 2007-07-20 07:15:27

Mark Wubben
sIFR dev
From: Copenhagen
Registered: 2004-08-17
Posts: 6271
Website  Expertise

Re: How to control letter spacing using sIFR v2 (requires Flash 8)

If you're going after Flash 8, sIFR 3 would be a better fit.


"The angels stole my phone box" – The Tenth Doctor

Offline

 

#11 2007-10-04 15:14:41

fcogtzd
New member
Registered: 2007-10-04
Posts: 1
Expertise

Re: How to control letter spacing using sIFR v2 (requires Flash 8)

Hi, listen, this is a fantastic tool!

Well, I need to use FLASH 8 also because my font (Glypha) needs "Anti-alias for readability", if not it's very difficult to read.

The problem is that when I export the movie ant test it, the font-size is reduced and the whole content of H1 is displayed in just 1 line. In other words, it's not growing-down. As you might imagine I have some H1 very large, and therefore the font-size is reduced to the minimum (not even 9px!)

What can I do?

Regards,
Francisco

Offline

 

#12 2007-10-04 21:23:43

Mark Wubben
sIFR dev
From: Copenhagen
Registered: 2004-08-17
Posts: 6271
Website  Expertise

Re: How to control letter spacing using sIFR v2 (requires Flash 8)

You should be using sIFR 3


"The angels stole my phone box" – The Tenth Doctor

Offline

 

#13 2007-10-30 14:48:11

JEGribben
New member
Registered: 2007-10-30
Posts: 1
Expertise

Re: How to control letter spacing using sIFR v2 (requires Flash 8)

Hi,

I'm having trouble getting the letterSpacing attribute to take. I've followed the instructions, but still no dice:

http://windows.pedrera.com/clients/ncc/visitlanding.aspx

I'm trying to apply letter spaceing to the H2 and H3 tags that the top of the page (visitor information & exhibit experience).

Can anybody see what I am doing wrong?

Thanks,
John

Offline

 

#14 2007-10-30 17:13:48

Mark Wubben
sIFR dev
From: Copenhagen
Registered: 2004-08-17
Posts: 6271
Website  Expertise

Re: How to control letter spacing using sIFR v2 (requires Flash 8)

You might want to try with sIFR 3


"The angels stole my phone box" – The Tenth Doctor

Offline

 

#15 2008-06-06 19:22:33

360wichita
New member
Registered: 2006-12-13
Posts: 3
Expertise

Re: How to control letter spacing using sIFR v2 (requires Flash 8)

Nicely done. Works perfect!

Offline

 
  • Index
  •  » sIFR
  •  » How to control letter spacing using sIFR v2 (requires Flash 8)

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson