Phoenix Hawk | 1 Jun 14:51 2010
Picon

Openlaszlo + Flash 10 + Fusion Charts (or any other charts)

Hi guys,


I need a simple line charting solution to do a proof of concept to demo that OpenLaszlo is the platform a potential project can be built on (to help a non-profit org helping patients with terminal illnesses) - the admins to track the case history and display some data like temp, pulse, etc.

I am a total n00b to Flash, have been working on OpenLaszlo a little, mainly working on the java xmlrpc part to retrieve the dataset for OL.

I am trying to port spoco2's code here so that it can compile to swf10:

I got stuck with the error:
"ERROR <at> lib/fusioncharts.lzx≈39: TypeError: Error #1034: Type Coercion failed: cannot convert global <at> c6fa731 to LzEventable. "

My code for lib\fusioncharts.lzx is here:

The error occurs here:
var delLoadNext = new LzDelegate( this, "_loadNext" ); 

I have no idea how to reference a flash script in the LzDelegate, or is this even possible? 

I would appreciate if someone could help take a look. 

Sample codes that works would really help too, I have been stuck on this for a couple of days. It's really driving me nuts :P

I have taken a look at open flash charts but have no clue how to get that to work in OL. 

Any pointers/criticisms is really appreciated.

Thank you.

pH.
cem sonmez | 1 Jun 15:10 2010
Picon

Re: While publishing stream, if microphone captures any sound , subrcriber flash player crashes

The problem does not exist anymore ;)
For a long time I have been using as3 classes in my A/V class
definitions. Yesterday I decided to change all of them with the
openlaszlo built-in A/V classes (although they do the same things with
my classes, they are more understandable of course).
So, now everthing works fine.
Thanks

2010/5/31 cem sonmez <cemosonmez@...>:
> thanks michaela,
> I found that there is already an opened bug report  about this
> problem. He uses mediastream and the workaround is to attach the
> mediastream to the videoview, but sound echoes very much. Anyway I see
> that there is a workaround via using mediastream.
> I will give a try with mediastream.
> Thanks
>
>
> 2010/5/31 Michaela Merz <mm@...>:
>>
>> Cem:
>>
>> I am using mediastream:
>>
>> <rtmpconnection name="rtmpc" id="rtmpc"
>> src="rtmp://www.sigme.us/oflaDemo/" autoconnect="false">
>>      <handler name="oninit">
>>              startUp();
>>              canvas.rtmpc.setAttribute("connectionparams",canvas.secid);
>>              rtmpc.connect();
>>       </handler>
>> </rtmpconnection>
>> <mediastream name="s1"
>>       type="rtmp"
>> />
>> <mediastream name="s2" type="rtmp">
>>     <handler name="oninit">
>>      StartReceive();
>>      StartStream();
>>     </handler>
>> </mediastream>
>>
>> [...]
>>
>> <videoview id="live" width="0" height="0" name="nlive" type="rtmp"
>> stream="$once{canvas.s1}" debug="true" playvolume="0">
>>      <microphone id="mic" name="nmic" capturing="false"
>>            silencelevel="100"
>>            silencetimeout="50">
>>            <method name="_makeDevice"><![CDATA[
>>                  var dev = super._makeDevice();
>>                  // dev is the microphone
>>                  dev.codec = 'Speex';
>>                  dev.soundTransform = this._sound;
>>                  dev.setUseEchoSuppression(true);
>>                  ]]>
>>             </method>
>>        </microphone>
>> </videoview>
>>
>>
>> No crashes. Just garbled sounds on the receiver. I bet it's an FlashPlayer
>> BETA issue.
>>
>>
>> Michaela
>>
>>
>>
>
>
>
> --
> Cem SONMEZ
>

--

-- 
Cem SONMEZ

cem sonmez | 1 Jun 15:38 2010
Picon

rounrectbutton width and height is not being set right depend on it's text

please give a try with this test

<canvas>	
	<include href="incubator/roundrectbutton.lzx" />
	<view x="50" y="50">
		<simplelayout spacing="5" />
		<roundrectbutton name="roundButton">hello</roundrectbutton>
		<button>change text
			<handler name="onclick">
				if (parent.roundButton.text=='hello')
					parent.roundButton.setAttribute("text","hello there");
				else
					parent.roundButton.setAttribute("text","hello");
			</handler>
		</button>
	</view>	
</canvas>

button text height is greater than the button height. And the width of
the button is not as expected, it returns to normalcy if I click the
"change text" button at least one time.
But button height is not changes anymore, have to set the height manually.

Regards

--

-- 
Cem SONMEZ

ason | 3 Jun 08:36 2010

print,upload in dhtml

hi all,

There are ways to print, upload and download in swf using by as.
But are there ways to do them in dhtml?

regards,
ason

cem sonmez | 3 Jun 16:12 2010
Picon

Error: unable to build font on swf10

Hi all

<canvas>
   <font name="serifFont" src="ariosob.ttf"/>
   <text x="50" y="50" text="Merhaba" font="serifFont" fontsize="40"
fgcolor="#BB0000"/>
</canvas>

for the code above works properly on swf8, but for swf9 and 10 I get
this error :

org.openlaszlo.sc.CompilerError: myfont.lzx: 5: : Error: unable to
build font 'serifFont', in line:
[Embed(mimeType='application/x-font-truetype',
source='/home/cem/Masaüstü/lps-4.8.0/Server/lps-4.8.0/lps/fonts/ariosob.ttf',
fontName='serifFont',
fontWeight='plain',fontStyle='plain',advancedAntiAliasing='true')]
myfont.lzx: 5: : Error: Unable to transcode
/home/cem/Masaüstü/lps-4.8.0/Server/lps-4.8.0/lps/fonts/ariosob.ttf,
in line: . The font may be a bold or italic style, try adding
style="bold" or "italic" attribute to font tag

I have see these reports:
http://jira.openlaszlo.org/jira/browse/LPP-7055
http://jira.openlaszlo.org/jira/browse/LPP-7038

they say that is no longer reproducible with the latest trunk. I have
also tried it with 4.8.0 candidate. But nothing changes.
Do you have any idea about that? Thanks.

--

-- 
Cem SONMEZ

Max Carlson | 3 Jun 17:52 2010

Re: Openlaszlo + Flash 10 + Fusion Charts (or any other charts)

I think the problem is, you're trying to use a Delegate in the global 
scope.  On that line, 'this' == 'global'.  I'd try rewriting your 
<script/> into an LZX <class/> that uses <method/> instead of function() 
{...} - then it should work much better.  Let me know how it goes!

Regards,
Max Carlson
OpenLaszlo.org

On 6/1/10 5:51 AM, Phoenix Hawk wrote:
> Hi guys,
>
> I need a simple line charting solution to do a proof of concept to demo
> that OpenLaszlo is the platform a potential project can be built on (to
> help a non-profit org helping patients with terminal illnesses) - the
> admins to track the case history and display some data like temp, pulse,
> etc.
>
> I am a total n00b to Flash, have been working on OpenLaszlo a little,
> mainly working on the java xmlrpc part to retrieve the dataset for OL.
>
> I am trying to port spoco2's code here so that it can compile to swf10:
> http://forum.openlaszlo.org/showpost.php?p=42682&postcount=55
> <http://forum.openlaszlo.org/showpost.php?p=42682&postcount=55>
>
> I got stuck with the error:
> "ERROR  <at> lib/fusioncharts.lzx≈39: TypeError: Error #1034: Type Coercion
> failed: cannot convert global <at> c6fa731 to LzEventable. "
>
> My code for lib\fusioncharts.lzx is here:
> http://textsnip.com/035139
>
> The error occurs here:
> var delLoadNext = new LzDelegate( this, "_loadNext" );
>
> I have no idea how to reference a flash script in the LzDelegate, or is
> this even possible?
>
> I would appreciate if someone could help take a look.
>
> Sample codes that works would really help too, I have been stuck on this
> for a couple of days. It's really driving me nuts :P
>
> I have taken a look at open flash charts but have no clue how to get
> that to work in OL.
>
> Any pointers/criticisms is really appreciated.
>
> Thank you.
>
> pH.

Max Carlson | 3 Jun 17:53 2010

Re: While publishing stream, if microphone captures any sound , subrcriber flash player crashes

Yay!  I'm so glad to hear the OL classes work better for you.  Are there 
any relevant bugs in JIRA that I should close?

Regards,
Max Carlson
OpenLaszlo.org

On 6/1/10 6:10 AM, cem sonmez wrote:
> The problem does not exist anymore ;)
> For a long time I have been using as3 classes in my A/V class
> definitions. Yesterday I decided to change all of them with the
> openlaszlo built-in A/V classes (although they do the same things with
> my classes, they are more understandable of course).
> So, now everthing works fine.
> Thanks
>
>
> 2010/5/31 cem sonmez<cemosonmez@...>:
>> thanks michaela,
>> I found that there is already an opened bug report  about this
>> problem. He uses mediastream and the workaround is to attach the
>> mediastream to the videoview, but sound echoes very much. Anyway I see
>> that there is a workaround via using mediastream.
>> I will give a try with mediastream.
>> Thanks
>>
>>
>> 2010/5/31 Michaela Merz<mm@...>:
>>>
>>> Cem:
>>>
>>> I am using mediastream:
>>>
>>> <rtmpconnection name="rtmpc" id="rtmpc"
>>> src="rtmp://www.sigme.us/oflaDemo/" autoconnect="false">
>>>       <handler name="oninit">
>>>               startUp();
>>>               canvas.rtmpc.setAttribute("connectionparams",canvas.secid);
>>>               rtmpc.connect();
>>>        </handler>
>>> </rtmpconnection>
>>> <mediastream name="s1"
>>>        type="rtmp"
>>> />
>>> <mediastream name="s2" type="rtmp">
>>>      <handler name="oninit">
>>>       StartReceive();
>>>       StartStream();
>>>      </handler>
>>> </mediastream>
>>>
>>> [...]
>>>
>>> <videoview id="live" width="0" height="0" name="nlive" type="rtmp"
>>> stream="$once{canvas.s1}" debug="true" playvolume="0">
>>>       <microphone id="mic" name="nmic" capturing="false"
>>>             silencelevel="100"
>>>             silencetimeout="50">
>>>             <method name="_makeDevice"><![CDATA[
>>>                   var dev = super._makeDevice();
>>>                   // dev is the microphone
>>>                   dev.codec = 'Speex';
>>>                   dev.soundTransform = this._sound;
>>>                   dev.setUseEchoSuppression(true);
>>>                   ]]>
>>>              </method>
>>>         </microphone>
>>> </videoview>
>>>
>>>
>>> No crashes. Just garbled sounds on the receiver. I bet it's an FlashPlayer
>>> BETA issue.
>>>
>>>
>>> Michaela
>>>
>>>
>>>
>>
>>
>>
>> --
>> Cem SONMEZ
>>
>
>
>

Max Carlson | 3 Jun 17:57 2010

Re: Error: unable to build font on swf10

I'm guessing you need to tell the <font/> that its' bold.  Try thins:

<canvas>
     <font name="serifFont" src="ariosob.ttf" style="bold"/>
     <text x="50" y="50" text="Merhaba" font="serifFont" 
fontstyle="bold" fontsize="40"
fgcolor="#BB0000"/>
</canvas>

More info here:
http://labs.openlaszlo.org/trunk-nightly/docs/reference/lz.font.html

Let me know how it goes!

Regards,
Max Carlson
OpenLaszlo.org

On 6/3/10 7:12 AM, cem sonmez wrote:
> Hi all
>
> <canvas>
>     <font name="serifFont" src="ariosob.ttf"/>
>     <text x="50" y="50" text="Merhaba" font="serifFont" fontsize="40"
> fgcolor="#BB0000"/>
> </canvas>
>
> for the code above works properly on swf8, but for swf9 and 10 I get
> this error :
>
> org.openlaszlo.sc.CompilerError: myfont.lzx: 5: : Error: unable to
> build font 'serifFont', in line:
> [Embed(mimeType='application/x-font-truetype',
> source='/home/cem/Masaüstü/lps-4.8.0/Server/lps-4.8.0/lps/fonts/ariosob.ttf',
> fontName='serifFont',
> fontWeight='plain',fontStyle='plain',advancedAntiAliasing='true')]
> myfont.lzx: 5: : Error: Unable to transcode
> /home/cem/Masaüstü/lps-4.8.0/Server/lps-4.8.0/lps/fonts/ariosob.ttf,
> in line: . The font may be a bold or italic style, try adding
> style="bold" or "italic" attribute to font tag
>
> I have see these reports:
> http://jira.openlaszlo.org/jira/browse/LPP-7055
> http://jira.openlaszlo.org/jira/browse/LPP-7038
>
> they say that is no longer reproducible with the latest trunk. I have
> also tried it with 4.8.0 candidate. But nothing changes.
> Do you have any idea about that? Thanks.
>

Max Carlson | 3 Jun 17:59 2010

Re: print,upload in dhtml

There isn't any really good file upload support in OL for DHTML yet, but 
we just put printing support in - see: 
lps/components/extensions/printer.lzx.  As for downloading, you should 
be able to do that in DHTML - what do you need for that?

Regards,
Max Carlson
OpenLaszlo.org

On 6/2/10 11:36 PM, ason wrote:
> hi all,
>
> There are ways to print, upload and download in swf using by as.
> But are there ways to do them in dhtml?
>
> regards,
> ason

cem sonmez | 4 Jun 10:57 2010
Picon

Re: While publishing stream, if microphone captures any sound , subrcriber flash player crashes

I havenT seen any same bug on JIRA yet. But there is one [1],
application behaviour is the same (when microphone captures any sound
flash player crashes), but this bug arises from not attaching the
stream to the videoview.

http://jira.openlaszlo.org/jira/browse/LPP-8760

Regards

2010/6/3 Max Carlson <max@...>:
> Yay!  I'm so glad to hear the OL classes work better for you.  Are there any
> relevant bugs in JIRA that I should close?
>
> Regards,
> Max Carlson
> OpenLaszlo.org
>
> On 6/1/10 6:10 AM, cem sonmez wrote:
>>
>> The problem does not exist anymore ;)
>> For a long time I have been using as3 classes in my A/V class
>> definitions. Yesterday I decided to change all of them with the
>> openlaszlo built-in A/V classes (although they do the same things with
>> my classes, they are more understandable of course).
>> So, now everthing works fine.
>> Thanks
>>
>>
>> 2010/5/31 cem sonmez<cemosonmez@...>:
>>>
>>> thanks michaela,
>>> I found that there is already an opened bug report  about this
>>> problem. He uses mediastream and the workaround is to attach the
>>> mediastream to the videoview, but sound echoes very much. Anyway I see
>>> that there is a workaround via using mediastream.
>>> I will give a try with mediastream.
>>> Thanks
>>>
>>>
>>> 2010/5/31 Michaela Merz<mm@...>:
>>>>
>>>> Cem:
>>>>
>>>> I am using mediastream:
>>>>
>>>> <rtmpconnection name="rtmpc" id="rtmpc"
>>>> src="rtmp://www.sigme.us/oflaDemo/" autoconnect="false">
>>>>      <handler name="oninit">
>>>>              startUp();
>>>>              canvas.rtmpc.setAttribute("connectionparams",canvas.secid);
>>>>              rtmpc.connect();
>>>>       </handler>
>>>> </rtmpconnection>
>>>> <mediastream name="s1"
>>>>       type="rtmp"
>>>> />
>>>> <mediastream name="s2" type="rtmp">
>>>>     <handler name="oninit">
>>>>      StartReceive();
>>>>      StartStream();
>>>>     </handler>
>>>> </mediastream>
>>>>
>>>> [...]
>>>>
>>>> <videoview id="live" width="0" height="0" name="nlive" type="rtmp"
>>>> stream="$once{canvas.s1}" debug="true" playvolume="0">
>>>>      <microphone id="mic" name="nmic" capturing="false"
>>>>            silencelevel="100"
>>>>            silencetimeout="50">
>>>>            <method name="_makeDevice"><![CDATA[
>>>>                  var dev = super._makeDevice();
>>>>                  // dev is the microphone
>>>>                  dev.codec = 'Speex';
>>>>                  dev.soundTransform = this._sound;
>>>>                  dev.setUseEchoSuppression(true);
>>>>                  ]]>
>>>>             </method>
>>>>        </microphone>
>>>> </videoview>
>>>>
>>>>
>>>> No crashes. Just garbled sounds on the receiver. I bet it's an
>>>> FlashPlayer
>>>> BETA issue.
>>>>
>>>>
>>>> Michaela
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Cem SONMEZ
>>>
>>
>>
>>
>

--

-- 
Cem SONMEZ


Gmane