fluby 0.5.5 → 0.5.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/fluby.rb +1 -1
- data/lib/templates/README +34 -4
- data/lib/templates/Rakefile +1 -1
- data/lib/templates/project.rxml +1 -1
- metadata +2 -2
data/lib/fluby.rb
CHANGED
data/lib/templates/README
CHANGED
@@ -12,10 +12,40 @@ Compilation
|
|
12
12
|
$ rake
|
13
13
|
|
14
14
|
There are some additional rake tasks available:
|
15
|
-
<% if RUBY_PLATFORM =~ /mswin32/ %>
|
16
|
-
<%= %x(cmd.exe /c rake -f "#{@project_folder}/Rakefile" -T -s) %>
|
17
|
-
<% else %>
|
18
|
-
<%= %x(rake -f "#{@project_folder}/Rakefile" -T -s) %>
|
15
|
+
<% if RUBY_PLATFORM =~ /mswin32/ %>
|
16
|
+
<%= %x(cmd.exe /c rake -f "#{@project_folder}/Rakefile" -T -s) %>
|
17
|
+
<% else %>
|
18
|
+
<%= %x(rake -f "#{@project_folder}/Rakefile" -T -s) %>
|
19
19
|
<% end %>
|
20
|
+
|
21
|
+
Assets
|
22
|
+
------
|
23
|
+
When compiling, fluby imports all assets in the 'assets' directory.
|
24
|
+
|
25
|
+
PNG files are imported as MovieClips, with their name (minus extension) as an ID. Thus, if you have a 'background.png' file, you can use it on your code with:
|
26
|
+
|
27
|
+
var my_clip = attachMovie("background","my_clip_name",1);
|
28
|
+
|
29
|
+
TTF fonts are also imported. If you need to use multiple weights of the same family (i.e: regular, bold, italics...) you should name your fonts like this:
|
30
|
+
|
31
|
+
family_name-font_weight.ttf
|
32
|
+
|
33
|
+
So, if you were to use Arial, you'd use:
|
34
|
+
|
35
|
+
arial-regular.ttf
|
36
|
+
arial-bold.ttf
|
37
|
+
arial-italic.ttf
|
38
|
+
arial-bold_italic.ttf
|
39
|
+
|
40
|
+
Then, in your code, you'd use the fonts like this:
|
41
|
+
|
42
|
+
createTextField("txtest",1,0,0,200,30);
|
43
|
+
txtest.embedFonts = true;
|
44
|
+
var tf = new TextFormat();
|
45
|
+
tf.font = "arial";
|
46
|
+
tf.italic = true;
|
47
|
+
txtest.setNewTextFormat(tf);
|
48
|
+
txtest.text = "This is italics";
|
49
|
+
|
20
50
|
---
|
21
51
|
Created: <%= Time.now %>
|
data/lib/templates/Rakefile
CHANGED
@@ -37,7 +37,7 @@ task :compile do
|
|
37
37
|
end
|
38
38
|
puts %x(swfmill simple #{APP}.xml #{APP}.swf)
|
39
39
|
rm "#{APP}.xml"
|
40
|
-
puts %x(mtasc -swf #{APP}.swf -
|
40
|
+
puts %x(mtasc -swf #{APP}.swf -main -mx -version #{PLAYER} #{trace} #{APP}.as)
|
41
41
|
@end = Time.now
|
42
42
|
|
43
43
|
["*.html","*.swf"].each do |list|
|
data/lib/templates/project.rxml
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
<clip id="<%= File.basename(file,'.png') %>" import="<%= file %>"/>
|
8
8
|
<% end %>
|
9
9
|
<% Dir["assets/*.ttf"].each do |file| %>
|
10
|
-
<font id="<%= File.basename(file,'.ttf') %>" import="<%= file %>" glyphs="abcdefghijklmnñopqrstuvwxyzABCDEFGHIJKLMNÑOPQRSTUVWXYZ01234567890,.-_
|
10
|
+
<font id="<%= File.basename(file,'.ttf') %>" import="<%= file %>" name="<%= File.basename(file,'.ttf').split('-')[0] %>" glyphs="abcdefghijklmnñopqrstuvwxyzABCDEFGHIJKLMNÑOPQRSTUVWXYZ01234567890,.-_¡!áéíóúÁÉÍÓÚüÜ\/• :;()¿?<>" />
|
11
11
|
<% end %>
|
12
12
|
</library>
|
13
13
|
</frame>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Ale Mu\xC3\xB1oz"
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-04-19 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|