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 CHANGED
@@ -1,6 +1,6 @@
1
1
  module Fluby
2
2
  NAME = 'fluby'
3
- VERSION = '0.5.5'
3
+ VERSION = '0.5.6'
4
4
 
5
5
  def self.create_project(name)
6
6
  require "fileutils"
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 %>
@@ -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 -header #{WIDTH}:#{HEIGHT}:#{FPS} -main -mx -version #{PLAYER} #{trace} #{APP}.as)
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|
@@ -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,.-_¡!áéíóúÁÉÍÓÚüÜ\/• :;()¿?&lt;&gt;" />
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.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-03-18 00:00:00 +01:00
12
+ date: 2008-04-19 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies: []
15
15