PDA

View Full Version : using java in <mx:htmltext>



tic
June 10th, 2009, 06:04 PM
Im my html webpage I'm using this code

<div id="example"></div>

<script type="text/javascript">
flashembed("example",
{
src:'filmpjes/FlowPlayerDark.swf',
width: 640,
height: 400
},
{config: {
autoPlay: false,
loop: false,
autoBuffering: true,
initialScale: 'scale',
videoFile: 'filmpjes/candlelight.flv'
}}
);
</script>

No, i'm transferring my html site to flash..

and I wonder if i could still get this effect trough htmltext. or does it has to be done in another way

wvxvw
June 10th, 2009, 07:41 PM
I guess you mean <mx:HTMLLoader/> and it is available only in AIR, meaning, no, you cannot use JavaScript (nothing to do with Java) in AS, only invoke it from the wrapper, if it happened to be HTML.

tic
June 11th, 2009, 04:22 AM
Nope I do mean <mx:htmlText/> :)
(you can do some basic html in that like makings links and adding images)

Hmm, *still goes to try and find a way*.

Otherwise ill just make a movieplayer that I call upon if nothing works.

thanks voor he reply though :)

wvxvw
June 11th, 2009, 01:12 PM
This isn't a component then, component cannot have lowercase names, this must be a property of some other component, like <mx:Test/> <mx:TextArea/> etc... In which case - no, again, all those components until SDK 3.X rely upon TextField rendering capabilities, which includes only some small subset of HTML tags for styling text, since SDK 4.X those components utilize new text engine, but the limitations on rendering HTML text remain.

tic
June 11th, 2009, 04:21 PM
Yes, htmlText is part of TextArea.

I had to many errors with this problem already so i fixed it by loading an external videofile into a player.
And again thnx for the reply. :)