World: r3wp
[Rebol/Flash dialect] content related to Rebol/Flash dialect
older newer | first last |
james_nak 18-Oct-2005 [88] | Thanks. |
Oldes 23-Nov-2005 [89x2] | I already posted it to rebcode group as it's rebcode which allowed me to this, but will like to post it here as well, because the main reason was to improve the Rebol/Flash dialect again.... Maybe you know that in Flash you can have embedded outlined fonts (independend on system) Most of the font's looks blury if you use them as outlines so you must use special fonts to get non blured pixel precision fonts. I was using some font editor just to see, that it's pretty difficult to make such a font so I decided it would be good to have possibility to make such a font just in any graphic editor - as a bitmap and comnvert it to pixels. Here is the result: do http://box.lebeda.ws/~hmm/rebol/projects/font-tools/latest/test.r |
sorry for my terrible english (I should read the text before I press enter:) I meant convert bitmap (pixels) to vectors | |
james_nak 23-Nov-2005 [91] | I'll check it out. Thanks. |
Alek_K 24-Nov-2005 [92] | BTW - see SimpleFont http://www.simplefont.com/(font editor) |
Oldes 24-Nov-2005 [93] | interesting, this one I haven't known, for me it's enough what I have (anyway it looks that you cannot make subpixel fonts with this editor and you must do the tracing by hand:) |
Alek_K 24-Nov-2005 [94x2] | well - there is another tool for that :) PixFont - http://www.kgroup.ru/ |
Anyway - you made great job! | |
Oldes 24-Nov-2005 [96x3] | I was thinking about making visual editor as well, but don't think it's so important, I have my font and that's enough for now:) |
maybe I could hack the trutype spac to have possibility to save the font as a TTF as well | |
(spac = specification) | |
Alek_K 24-Nov-2005 [99] | It could be good commercial product to sell :) There are many users - and most free fonts are english only (same with tools for making fonts from handwriting f.e.). |
Oldes 24-Nov-2005 [100] | hm, but you make 3 fonts and then nobody will need it:) there is not many possibilities to make something original in 7x8 pixel grid:) and yes, the main reason was, that there are no font's with diacritics for my language (even the commercial one don't have it) |
Alek_K 24-Nov-2005 [101] | I thought about tool for localization :) AFAIK both SimpleFont and PixFont are unique on market. Curious - how many software they sold? |
Oldes 24-Nov-2005 [102] | I don't know |
james_nak 28-Feb-2006 [103] | Oldes, I'm still amazed at this dialect and the sites you have created. I wonder if you have a list of the commands that are being used. I've been going through the examples to try to figure out what does what but it seems like a list would be faster. Thanks. |
Oldes 1-Mar-2006 [104x2] | i will do it one day:-) |
Interesting, just found this page: http://www.langreiter.com/exec/yahoo-vs-google.html?q=rebol | |
JaimeVargas 1-Mar-2006 [106] | Thats really cool. |
james_nak 1-Mar-2006 [107x2] | That's weird. |
Oldes, I downloaded the ActionScript pdf which seems to be the very much related to the dialect examples. Is that correct? | |
Volker 1-Mar-2006 [109] | Are there other differences between real actionscript and dialect? (syntax)? Or is it possible to write an importer? And would it make sense, or does one write anyway everything by himself? |
james_nak 1-Mar-2006 [110] | Volker, I've just begun to really get into the dialect so I can't comment on how one "translates" the actionscript into it, however, the actionscript pdf is at least a start into trying to figure out the examples. At this point, I am taking one of the examples from the flash actionscript pdf and rework it into the dialect form. Before I had this documentation I was just guessing at the whole process. |
james_nak 2-Mar-2006 [111] | Oldes, you what would be helpful is an actionscript example translated into the dialect so we could see the differences. |
Oldes 2-Mar-2006 [112] | The main difference is, that I use variable: value instead of variable= value :) and do not use commas to divide arguments |
james_nak 2-Mar-2006 [113] | is that it? |
Oldes 2-Mar-2006 [114x2] | and cannot use array[index] but must use pick array index |
and do not use for(i=0;i<sz;i++) but use for i sz 1 [] | |
james_nak 2-Mar-2006 [116] | Do you have any examples where you have translated actionscript? |
Oldes 2-Mar-2006 [117] | I don't know what you mean translated actionscript. All content of DoAction [] tag is something like action script |
james_nak 2-Mar-2006 [118] | I see. What I mean is taking an actionscript example and converting it to your dialect. Right now I'm trying to make a simple "slideshow" with fades and I found some actionscript examples. That being said, just you saying that the DoAction[] is somewhat like Actionscript takes some mystery out of the process. |
Oldes 2-Mar-2006 [119] | what do you want to convert? |
james_nak 2-Mar-2006 [120] | I'll have to look for it again...I left my memory stick at home/ |
Oldes 2-Mar-2006 [121] | And I should say, that you definitely must know the ActionScript, if you want to use my dialect. |
james_nak 2-Mar-2006 [122] | Yes, you're right. Up this point I was really looking at the wrong documentation so the Actionscript clue was helpful. Here's an example. I haven't tried to translate it yet. It looks pretty straight forward. Movieclip.prototype.fade = function(speed) { this.speed = speed; this.f_index = this._alpha; if(this.f_index >= 100) this.fade_by = -this.speed; if(this.f_index <= 0) this.fade_by = this.speed; this._alpha += this.fade_by; } Or you can use these to fadeIn() or fadeOut() Movieclip.prototype.fadeOut = function($decrement, $fadeLimit){ var $mcObject = this; //If $decrement is not defined, then define it if($decrement == undefined){ var $decrement = 11; }//End if if($fadeLimit == undefined){ var $fadeLimit = 0; }//End if if(eval($mcObject)._alpha < $fadeLimit){ return(true); } else { eval($mcObject)._alpha -= $decrement; }//End if }//End function |
Oldes 2-Mar-2006 [123x3] | Movieclip.prototype.fade: func[speed][ this.speed: speed this.f_index: this._alpha if this.f_index >= 100 [ this.fade_by: 0 - this.speed] if this.f_index <= 0 [ this.fade_by: this.speed] this._alpha: this._alpha + this.fade_by; ] |
or | |
Movieclip.prototype.fade: func[speed][ this.speed: speed tellTarget this [ f_index: _alpha if f_index >= 100 [ fade_by: 0 - speed] if f_index <= 0 [ fade_by: speed] _alpha: _alpha + fade_by ] ] | |
james_nak 2-Mar-2006 [126] | You're too good. So how then do you use this? |
james_nak 5-Mar-2006 [127] | Oldes, making some progress thanks to your help. There is one example with soem embedded rebol code (the arc example). Is there a way to have rebol do some processing then expose what it does to flash? I want to write a function in rebol to take a string and create a block of characters which I then want to pass to flash. For example, I can hardcode a_block: ["h" "e" "l" "l" "o"] but I would rather send the string "hello" to a function and have it generate that block then pass it to flash. It seems that what I do within a "rebol [ ]" block is hidden from flash. |
Oldes 5-Mar-2006 [128x9] | First of all, I must say, that there are two main parts of the dialect, one which are related to making shapes and sprites in the timelines (processed by rswf/tag-rules) and actions (in doAction and DoInitAction tags and as a part of Actions subtag in placing sprites and in button events) - This is processed by rswf/actions-parser |
you can use Rebol tag to do any Rebol evaluation, but it does not return anything, it's not meant to use something like: spr_mysprite: rebol [some code] | |
but you may use: rebol [ rswf/compile load rejoin [{spr_} spritename {: sprite shp_someshape}]] | |
but in Actions you can use: now: rebol [ rejoin [ a_block " " now]] | |
(will test it if it's working like that, I'm not using it:) | |
yes, it's working:-)) | |
doAction [ info: rebol [now] info: reform [(rebol [rejoin ["h" "e" "l" "l" "o"]]) "now is:" info] ] | |
But it's not working well with blocks, so now if you want to create varaible with block during compilation, you should use: | |
doAction [ rebol [ myRebolBlock: ["h" "e" "l" "l" "o"] ;this is Rebol's variable rswf/compile-actions compose/only [info: (myRebolBlock)] ] ] | |
james_nak 6-Mar-2006 [137] | Thanks Oldes, I will try that. The dialect and AS are becoming clearer now with all the info you have given me. I look forward to writing lots of cool things. Thanks for the hint about the two main parts. I wondered how they were connected as most of the AS tutorial have you create something with the GUI then add the AS part. |
older newer | first last |