I think I wasn’t very clear (sorry). I am not planning to create a new image exporter for Fireworks. My idea is to read Fireworks canvas and export a “main.lua” file according all elements found. For example: 1) consider you have an image, in a layer called “back”, as background.
2) Over this image you have a text “Hello World”, in bold, at position 30,20 (layer name myText).
3) At position 0,50, you have a blue rectangle with size of 320x50 (layer name myRect).
4) A little below, at coordinates 250, 50, a button (layer name button).
5) After that, an image (layer name myPicture), with opacity of .60, at position 300,250.
6) Lastly, a text “See more”, aligned to right, at 420,200 (layer name seeMore):
With the Fireworks to Corona exporter, a main.lua file will be created with the following code:
local ui = require("ui"); --because found button and label in the code
local background = display newImage("back.png
local buttonPress = function( event )
--your code here
end
local buttonRelease = function( event )
--your code here
end
local myText = display.newText("Hello World", 30, 20, native.systemFontBold, 18)
myText:setTextColor(255,255,255)
local myRect = display.newRect(0,50,320,50)
myRect:setFillColor(0,51,204)
local button = ui.newButton{
-- (if applicable) name = "button"..i;
default="button.png",
rollover="button\_roll.png",
onPress=buttonPress,
onRelease=buttonRelease,
x = 250,
y = 50
};
local myPicture = display newImage("myPicture.png")
myPicture.alpha = 0.6
myPicture.x = 300
myPicture.y = 250
local seeMore = ui.newLabel {
text = "See More",
textColor = {255, 255, 255, 255},
size = 14,
align = "right",
bounds = {420, 200, 100, 40},
};
will it speed up your development process?
Alex [import]uid: 4883 topic_id: 1145 reply_id: 2978[/import]