[flexcoders] Re: Transparent AIR application over streaming video

2009-04-08 Thread Jayson
Have you had any success with this idea?

If not, this sounds like it could be a frame rate issue to me. Have you checked 
the frame rate through the whole chain? file -> streaming application -> flex




Jay



--- In flexcoders@yahoogroups.com, "ivanericksont8"  wrote:
>
> Hi there,
> 
> I am hoping to develop an AIR application that overlays a video stream
> being displayed by VLC or Quicktime.
> 
> I have been testing with the Adobe demo AIR application called
> ScreenBoard and found that VLC video comes through the transparent AIR
> window as a black box and Quicktime video passes through, but with a
> very high rate of flicker.
> 
> Has anyone else worked on this and found a workaround for the black
> box or flicker issues? Perhaps another video player is worth a try?
> 
> The ultimate goal is to display a live MPEG4 or H.264 stream behind a
> user interface without requiring video transcoding to RTMP with Flash
> Media Server.
> 
> Thanks for any advice!
>




[flexcoders] Re: dragging an object with a mask

2008-11-25 Thread Jayson
I ended up using a timer to add and remove the mask every 10
milliseconds while the object is being dragged. works great!

Thanks for the help.

--- In flexcoders@yahoogroups.com, Alex Harui <[EMAIL PROTECTED]> wrote:
>
> Show us what you did.  We dragged masked stuff successfully.  You
addChild the sprite that is the mask to the parent object that is
being dragged.
> 
> Var draggedObject:UIComponet = new UIComponent
> Var snowGlobe:UIComponent = new SnowGlobe
> Var myMask:Sprite = new Sprite
> draggedObject.addChild(snowGlobe)
> draggedObject(addChild(myMask);
> snowGlobe.mask = myMask;
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of Jayson
> Sent: Thursday, November 20, 2008 2:23 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: dragging an object with a mask
> 
> 
> No luck - I also tried using the swf of the object with the mask in
> another mxml file.. the problem is that the white mask is not
transparent.
> 
> It seems as though wherever the mask is created, it won't move from
there.
> 
> From what I've been able to find, when a mask is applied it is not
> added to the display list, so you cannot access it like you would a
> normal object. The post I found mentioned using an event listener on
> the mask, but that's pretty vague.
> 
> --- In
flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>, Alex
Harui  wrote:
> >
> > Normally, I make sure the mask and the object have the same parent
> and the parent gets dragged. Wrap everything in another UIComponent.
> >
> > From:
flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>
[mailto:flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>]
> On Behalf Of Jayson
> > Sent: Thursday, November 20, 2008 12:35 PM
> > To: flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>
> > Subject: [flexcoders] dragging an object with a mask
> >
> >
> > I have a UIComponent("snowGlobe") with a mask applied. Using the
> > UIComponent I drew a circle and added it to the application. I then
> > applied a circular Sprite mask("msk"). This works perfectly. Now
> > whenever an object is moved outside of the UIComponent it is not
> > displayed(ie. snow in a snowglobe).
> >
> > I run into trouble when I try to drag the UIComponent. When I do this,
> > the UIComponent, and its children, drag, but the Sprite I have set as
> > a mask does not. If I call .startDrag() on the mask at the same time I
> > do on the UIComponent, it doesn't allow me to drag anymore.
> >
> > I have tried things like this..
> > BindingUtils.bindProperty(msk,'x',snowGlobe,'x');
> > BindingUtils.bindProperty(msk,'y',snowGlobe,'y');
> >
> > but that doesn't seem to do anything.
> >
> > Can anyone help me out with being able to drag a UIComponent and its
> > mask at the same time?
> >
> > I thought I should be able to remove and reapply the mask as the
> > component is dragging, but I'm not sure where to do that at, or how to
> > get the x and y values of the component being dragged.
> >
> > Any insight is greatly appreciated.
> >
> > Thank you!
> >
>




[flexcoders] get the properties of an image after its loaded

2008-11-24 Thread Jayson
I have some embedded images, and I need to manipulate them with
effects. I don't want to have to explicitly specify the height and
width of these for calculations. When you don't specify a height and
width of an image, it takes its actual size, so I'm assuming there is
a way to get the width and height of an image after it is loaded.

is this done through img.loaderInfo? or img.content? I tried
img.getConstraintValue('height'); but that returns NaN. Everything
I've tried either gives me NaN or undefined. Does anyone know how to
access this?

Thank you.

Jayson



[flexcoders] Re: dragging an object with a mask

2008-11-20 Thread Jayson
No luck - I also tried using the swf of the object with the mask in
another mxml file.. the problem is that the white mask is not transparent.

It seems as though wherever the mask is created, it won't move from there.

>From what I've been able to find, when a mask is applied it is not
added to the display list, so you cannot access it like you would a
normal object. The post I found mentioned using an event listener on
the mask, but that's pretty vague.


--- In flexcoders@yahoogroups.com, Alex Harui <[EMAIL PROTECTED]> wrote:
>
> Normally, I make sure the mask and the object have the same parent
and the parent gets dragged.  Wrap everything in another UIComponent.
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of Jayson
> Sent: Thursday, November 20, 2008 12:35 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] dragging an object with a mask
> 
> 
> I have a UIComponent("snowGlobe") with a mask applied. Using the
> UIComponent I drew a circle and added it to the application. I then
> applied a circular Sprite mask("msk"). This works perfectly. Now
> whenever an object is moved outside of the UIComponent it is not
> displayed(ie. snow in a snowglobe).
> 
> I run into trouble when I try to drag the UIComponent. When I do this,
> the UIComponent, and its children, drag, but the Sprite I have set as
> a mask does not. If I call .startDrag() on the mask at the same time I
> do on the UIComponent, it doesn't allow me to drag anymore.
> 
> I have tried things like this..
> BindingUtils.bindProperty(msk,'x',snowGlobe,'x');
> BindingUtils.bindProperty(msk,'y',snowGlobe,'y');
> 
> but that doesn't seem to do anything.
> 
> Can anyone help me out with being able to drag a UIComponent and its
> mask at the same time?
> 
> I thought I should be able to remove and reapply the mask as the
> component is dragging, but I'm not sure where to do that at, or how to
> get the x and y values of the component being dragged.
> 
> Any insight is greatly appreciated.
> 
> Thank you!
>




[flexcoders] dragging an object with a mask

2008-11-20 Thread Jayson
I have a UIComponent("snowGlobe") with a mask applied. Using the
UIComponent I drew a circle and added it to the application. I then
applied a circular Sprite mask("msk"). This works perfectly. Now
whenever an object is moved outside of the UIComponent it is not
displayed(ie. snow in a snowglobe).

I run into trouble when I try to drag the UIComponent. When I do this,
the UIComponent, and its children, drag, but the Sprite I have set as
a mask does not. If I call .startDrag() on the mask at the same time I
do on the UIComponent, it doesn't allow me to drag anymore.

I have tried things like this.. 
BindingUtils.bindProperty(msk,'x',snowGlobe,'x');
BindingUtils.bindProperty(msk,'y',snowGlobe,'y');

but that doesn't seem to do anything.

Can anyone help me out with being able to drag a UIComponent and its
mask at the same time?

I thought I should be able to remove and reapply the mask as the
component is dragging, but I'm not sure where to do that at, or how to
get the x and y values of the component being dragged.

Any insight is greatly appreciated.

Thank you!



[flexcoders] Loading an image dynamically and making it a BitmapAsset

2008-10-29 Thread Jayson

I am using BitmapAssets to add to a sprite which is printed using
PrintJob.

[Embed(source="images/logo.png")]
[Bindable]
public var logo:Class;
...
var bitmapImg:BitmapAsset = new logo() as BitmapAsset;
bitmapImg.smoothing = true;
bitmapImg.setActualSize(500, 42);
sheet.addChild(bitmapImg);


This works fine when the image to be added is embedded. Some images I
need to add dynamically. How would I do this?

I've tried using a Loader and doing something like this:

var imgLdr:Loader = new Loader(imgURLReq);
imgLdr.contentLoaderInfo.addEventListener(Event.COMPLETE, imgLoaded);

function imgLoaded(e:Event):void{ 
var eventImg:BitmapAsset = new BitmapAsset;
eventImg.bitmapData = imgLdr.content as BitmapData
eventImg.smoothing = true;
eventImg.setActualSize(300, 200);
sheet.addChild(eventImg);
}


I think I need to do something similar to the static method by loading
the image with a Loader and casting it as a Class, but this is not
working out for me.

Any ideas?


Thanks!

Jayson



[flexcoders] Re: TextField with embedded font > not displaying font

2008-09-17 Thread Jayson
So I just realized this...



Would help if I uncommented the css include.

Fixed.


--- In flexcoders@yahoogroups.com, "Jayson" <[EMAIL PROTECTED]> wrote:
>
> Hello,
> 
> I'm trying to create a TextField that uses an embedded font. Please
> see my code below.
> 
> The font displays properly when I use it in MXML, but not when I try
> to create the text display object in AS.
> 
> Has anyone had success with something similar to this?
> 
> 
> CSS:
> 
> @font-face{
>   src:url("HelveticaNeueLTStd-Cn.otf");
>   fontFamily: HelveticaNeue;
>   advancedAntiAliasing: true;
> }
> 
> 
> AS:
> 
> private function createSheet(sheet:Sprite, str:String):void {
> sheet.graphics.beginFill(0xEE);
> sheet.graphics.lineStyle(1, 0x00);
> sheet.graphics.drawRect(0, 0, 100, 200);
> sheet.graphics.endFill();
>
> var txtFmt:TextFormat = new TextFormat()
> txtFmt.color = 0x00;
> txtFmt.size = 17;
> txtFmt.font = "HelveticaNeue";
> 
> var txt:TextField = new TextField();
> txt.embedFonts = true;
> txt.height = 200;
> txt.width = 100;
> txt.wordWrap = true;
> txt.defaultTextFormat = txtFmt;
> txt.text = str;
> 
> sheet.addChild(txt);
> }
>




[flexcoders] TextField with embedded font > not displaying font

2008-09-17 Thread Jayson
Hello,

I'm trying to create a TextField that uses an embedded font. Please
see my code below.

The font displays properly when I use it in MXML, but not when I try
to create the text display object in AS.

Has anyone had success with something similar to this?


CSS:

@font-face{
src:url("HelveticaNeueLTStd-Cn.otf");
fontFamily: HelveticaNeue;
advancedAntiAliasing: true;
}


AS:

private function createSheet(sheet:Sprite, str:String):void {
sheet.graphics.beginFill(0xEE);
sheet.graphics.lineStyle(1, 0x00);
sheet.graphics.drawRect(0, 0, 100, 200);
sheet.graphics.endFill();
   
var txtFmt:TextFormat = new TextFormat()
txtFmt.color = 0x00;
txtFmt.size = 17;
txtFmt.font = "HelveticaNeue";

var txt:TextField = new TextField();
txt.embedFonts = true;
txt.height = 200;
txt.width = 100;
txt.wordWrap = true;
txt.defaultTextFormat = txtFmt;
txt.text = str;

sheet.addChild(txt);
}



[flexcoders] Re: ::: uploading Fonts into a live site-->possible?

2008-08-20 Thread Jayson
I think that if you have a SWF inside an SWF, you cannot communicate
between the two. I've never needed to try this, but this is what I've
read.


--- In flexcoders@yahoogroups.com, "artur_desig2dev" <[EMAIL PROTECTED]> wrote:
>
> how so?
> 
> a - its for use for only that user's site..not to share for other
> people's site..or anywhere else.
> 
> so its no different if they made their site by themselves with that
font.
> 
> b - youtube solves this by making each user confirm they own their
> content..ie font in this case.
>




[flexcoders] Re: returning an Array from an ArrayCollection

2008-08-20 Thread Jayson
Perfect!

That makes sense.

Thank you!

Now I just have to figure out how to have the correct colors chosen
dynamically.

--- In flexcoders@yahoogroups.com, "Ralf Bokelberg"
<[EMAIL PROTECTED]> wrote:
>
> Yep, it is the initializer for the array, which isn't correct.
> Array({label: 'A', label: 'B', label: 'C', label: 'D'});
> This creates an array with one object having a label property.
> 
> If you want to create an array of four objects with a label property,
> you have to write it like that:
> Array({label: 'A'}, {label: 'B'}, {label: 'C'}, {label: 'D'});
> 
> Ralf.
> 
> On Wed, Aug 20, 2008 at 9:33 PM, Jayson <[EMAIL PROTECTED]> wrote:
> > The Array that is being passed in to the class, is in the format of
> > Object, not Array. The array is coming from an ArrayCollection, and I
> > am using getItemAt to reference it.
> >
> > Below is my PieChart class.
> >
> > It will display the first object in the array as an item in the chart
> > legend, but only the first object. Maybe my array isn't formatted
right.
> >
> > So if this is my array that is being passed in:
> > Array({label: 'A', label: 'B', label: 'C', label: 'D'});
>




[flexcoders] Re: returning an Array from an ArrayCollection

2008-08-20 Thread Jayson
The Array that is being passed in to the class, is in the format of
Object, not Array. The array is coming from an ArrayCollection, and I
am using getItemAt to reference it.

Below is my PieChart class.

It will display the first object in the array as an item in the chart
legend, but only the first object. Maybe my array isn't formatted right.

So if this is my array that is being passed in:
Array({label: 'A', label: 'B', label: 'C', label: 'D'});

..the legend is showing A, and only A

public class CustomPie extends PieChart{

public var alternateLegendData:Object;

public function CustomPie(){
super();

}

override public function get legendData():Array{

trace("CustomPie: " + 
ArrayUtil.toArray(alternateLegendData));

var tmpArray:Array = new Array();
if (alternateLegendDataArray != null){
tmpArray = alternateLegendData as Array;
}
return tmpArray;
}
}
}


--- In flexcoders@yahoogroups.com, "Ralf Bokelberg"
<[EMAIL PROTECTED]> wrote:
>
> Hi Jayson
> 
> What exactly is not working?
> 
> Ralf.
> 
> On Wed, Aug 20, 2008 at 8:32 PM, Jayson <[EMAIL PROTECTED]> wrote:
> > Yeah, Flex suggests that when you do Array(Object) - it gives you a
> > warning and suggests do to what you suggested. That didn't work for me
> > either.
> >
> > --- In flexcoders@yahoogroups.com, "Ralf Bokelberg"
> >
> >  wrote:
> >>
> >> The "as" operator might help you out, eg.
> >>
> >> var a : Array = SomethingFromSomwhere as Array;
> >>
> >> Ralf.
> >>
> >>
> >> On Wed, Aug 20, 2008 at 7:39 PM, Jayson  wrote:
> >> > I have a class that extends PieChart(I'm calling this
CustomPie) and
> >> > I'm passing in an array returned from an ArrayCollection. The new
> >> > array I've called "alternateLegendData." So I define this as a
public
> >> > variable(Object) in the class and I can now pass in a new
parameter.
> >> > My goal is to use this array being passed in as the data for the
> >> > PieChart legend.
> >> >
> >> > In mxml in CustomPie, I have
> >> > alternateLegendData="{myArrayCollection.getItemAt(x)}" - this
works,
> >> > and it passes in the right array, but for some reason it is an
Object
> >> > and not an Array and I cannot manipulate it.
> >> >
> >> > So my problem is that I built an ArrayCollection:
> >> >
> >> > myArrayCollection.addItem(array1);
> >> > myArrayCollection.addItem(array2);
> >> > myArrayCollection.addItem(array3);
> >> > myArrayCollection.addItem(array4);
> >> >
> >> > So essentially the ArrayCollection is, as the name states, a
> >> > collection of arrays.
> >> >
> >> > When I do, for example, myArrayCollection.getItemAt(1), an
Object is
> >> > returned and not an Array.
> >> >
> >> > I've tried doing Array(myArrayCollection.getItemAt(1)),
> >> > ArrayUtil.toArray(myArrayCollection.getItemAt(1)) - neither of
these
> >> > will return an array.
> >> >
> >> > Anyone have an idea?
> >> >
> >> >
> >>
> >
> >
>




[flexcoders] Re: returning an Array from an ArrayCollection

2008-08-20 Thread Jayson
Yeah, Flex suggests that when you do Array(Object) - it gives you a
warning and suggests do to what you suggested. That didn't work for me
either.

--- In flexcoders@yahoogroups.com, "Ralf Bokelberg"
<[EMAIL PROTECTED]> wrote:
>
> The "as" operator might help you out, eg.
> 
> var a : Array = SomethingFromSomwhere as Array;
> 
> Ralf.
> 
> 
> On Wed, Aug 20, 2008 at 7:39 PM, Jayson <[EMAIL PROTECTED]> wrote:
> > I have a class that extends PieChart(I'm calling this CustomPie) and
> > I'm passing in an array returned from an ArrayCollection. The new
> > array I've called "alternateLegendData." So I define this as a public
> > variable(Object) in the class and I can now pass in a new parameter.
> > My goal is to use this array being passed in as the data for the
> > PieChart legend.
> >
> > In mxml in CustomPie, I have
> > alternateLegendData="{myArrayCollection.getItemAt(x)}" - this works,
> > and it passes in the right array, but for some reason it is an Object
> > and not an Array and I cannot manipulate it.
> >
> > So my problem is that I built an ArrayCollection:
> >
> > myArrayCollection.addItem(array1);
> > myArrayCollection.addItem(array2);
> > myArrayCollection.addItem(array3);
> > myArrayCollection.addItem(array4);
> >
> > So essentially the ArrayCollection is, as the name states, a
> > collection of arrays.
> >
> > When I do, for example, myArrayCollection.getItemAt(1), an Object is
> > returned and not an Array.
> >
> > I've tried doing Array(myArrayCollection.getItemAt(1)),
> > ArrayUtil.toArray(myArrayCollection.getItemAt(1)) - neither of these
> > will return an array.
> >
> > Anyone have an idea?
> >
> >
>




[flexcoders] returning an Array from an ArrayCollection

2008-08-20 Thread Jayson
I have a class that extends PieChart(I'm calling this CustomPie) and
I'm passing in an array returned from an ArrayCollection. The new
array I've called "alternateLegendData." So I define this as a public
variable(Object) in the class and I can now pass in a new parameter.
My goal is to use this array being passed in as the data for the
PieChart legend.

In mxml in CustomPie, I have
alternateLegendData="{myArrayCollection.getItemAt(x)}" - this works,
and it passes in the right array, but for some reason it is an Object
and not an Array and I cannot manipulate it.

So my problem is that I built an ArrayCollection:

myArrayCollection.addItem(array1);
myArrayCollection.addItem(array2);
myArrayCollection.addItem(array3);
myArrayCollection.addItem(array4);

So essentially the ArrayCollection is, as the name states, a
collection of arrays.

When I do, for example, myArrayCollection.getItemAt(1), an Object is
returned and not an Array.

I've tried doing Array(myArrayCollection.getItemAt(1)),
ArrayUtil.toArray(myArrayCollection.getItemAt(1)) - neither of these
will return an array.

Anyone have an idea?



[flexcoders] Re: url request variables

2007-10-05 Thread Jayson
This is very strange.. I think I may be running into some sort of 
security issue.

I have a function called doRequests, where it takes the urlRequests 
and does whatever corresponding to the variable entered.. it works, 
but..

It only works when I map it to a button or something I have to click. 
If I want it done automatically(creationComplete).. it doesnt work. I 
thought maybe it was a timing issue.. made a timer and had it wait 5 
secs.. no go.

I'm not really sure what to do here..

anyone have some insight?

Thanks...


--- In flexcoders@yahoogroups.com, "Jayson" <[EMAIL PROTECTED]> wrote:
>
> Got it...
> 
> this is needed..
> 
> private function initVars():void{
> req1 = Application.application.parameters.req1;
> req2 = Application.application.parameters.req2;
> }
> 
> and initVars() is called on the application creationComplete.
> works like a charm...
> 
> here is the link in liveDocs
> 
http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhel
p.
> htm?context=LiveDocs_Parts&file=1003.html
> 
> Jayson
>




[flexcoders] Re: url request variables

2007-10-05 Thread Jayson
Got it...

this is needed..

private function initVars():void{
req1 = Application.application.parameters.req1;
req2 = Application.application.parameters.req2;
}

and initVars() is called on the application creationComplete.
works like a charm...

here is the link in liveDocs
http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.
htm?context=LiveDocs_Parts&file=1003.html

Jayson



[flexcoders] url request variables

2007-10-05 Thread Jayson
I stumbled upon this example posted by tracy, maybe she will see 
this :), and it's exactly what I need.. except I can't get it to work.

example link:
http://www.cflex.net/showFileDetails.cfm?
ObjectID=198&Object=File&ChannelID=1

my code:
http://www.adobe.com/2006/mxml"; 
layout="vertical">













According to the example, I should be able to do "...requestTest.mxml?
req1=test&req2=blah" and it will fill in the values for req1 and 
req2. It won't work.. I'm not sure if I'm doing something wrong.. or 
what the deal is, or if this is even possible with flex (I hope it 
is).

I'm not sure what to search for on this matter.. as everything I do 
search for turns up nothing of relevance. Can anyone shine some light 
on this for me?

Thanks!

Jayson



[flexcoders] Re: TileList controls in AS

2007-09-07 Thread Jayson
Yeah I was just trying stuff out with the style (didnt know what to 
do). I eventually stumbled upon ItemClickEvent, but that was the 
wrong type of event. ListEvent did the trick for me. Thanks for the 
reply!

Jayson


--- In flexcoders@yahoogroups.com, "Ronald Kinion" 
<[EMAIL PROTECTED]> wrote:
>
> itemClick is an event, not a property or style.  you want to write
> something like this:
>  
>  
> myTileList.addEventListener(ListEvent.ITEM_CLICK, doItemClick);
>  
>  
> public function doItemClick(event:ListEvent):void {
> Alert.show(event.currentTarget.selectedIndex.toString());
> }
>  
>  
> Note that when you pass a function handler you only use the function
> name, including the () operator will run the function and then pass 
the
> result.  The reason you were getting the alert is because your code 
was
> executing the function everytime it came to that setStyle call.
>  
> 
> -- 
> Ronald Kinion 
> Phone: 253-205-3494 
> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>  
> www.zones.com <http://www.zones.com/>  
> 
>  
> 
> ____
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
> Behalf Of Jayson
> Sent: Friday, September 07, 2007 10:20 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] TileList controls in AS
> 
> 
> 
> Maybe I'm just blind, but I cant seem to find an itemClick property 
for 
> a TileList in AS.
> 
> myTileList.itemClick doesnt appear to be there.. so.. I tried this..
> 
> myTileList.setStyle ("itemClick", doItemClick());
> 
> public function doItemClick():void{
> Alert.show(myTileList.selectedIndex.toString());
> }
> 
> Something is triggering this.. upon creation of the TL I get the 
alert 
> with -1, obviously meaning nothing is selected, but then nothing 
> happens when I click on an item. I've been searching for a while 
and 
> haven't made any progress at all.. anyone know whats going on?
> 
> Thanks,
> 
> Jayson
>




[flexcoders] Re: TileList controls in AS

2007-09-07 Thread Jayson
I also tried this..

import mx.events.ItemClickEvent;

myTileList.addEventListener(ItemClickEvent.ITEM_CLICK, doItemClick());

public function doItemClick(event:ItemClickEvent):void{
Alert.show(event.index.toString());
}

I even tried Alert.show(event.toString());

I thought for sure that would work, but nothing at all...



--- In flexcoders@yahoogroups.com, "Jayson" <[EMAIL PROTECTED]> wrote:
>
> Maybe I'm just blind, but I cant seem to find an itemClick property 
for 
> a TileList in AS.
> 
> myTileList.itemClick doesnt appear to be there.. so.. I tried this..
> 
> myTileList.setStyle ("itemClick", doItemClick());
> 
> public function doItemClick():void{
> Alert.show(myTileList.selectedIndex.toString());
> }
> 
> Something is triggering this.. upon creation of the TL I get the 
alert 
> with -1, obviously meaning nothing is selected, but then nothing 
> happens when I click on an item. I've been searching for a while 
and 
> haven't made any progress at all.. anyone know whats going on?
> 
> Thanks,
> 
> Jayson
>




[flexcoders] TileList controls in AS

2007-09-07 Thread Jayson
Maybe I'm just blind, but I cant seem to find an itemClick property for 
a TileList in AS.

myTileList.itemClick doesnt appear to be there.. so.. I tried this..

myTileList.setStyle ("itemClick", doItemClick());

public function doItemClick():void{
Alert.show(myTileList.selectedIndex.toString());
}

Something is triggering this.. upon creation of the TL I get the alert 
with -1, obviously meaning nothing is selected, but then nothing 
happens when I click on an item. I've been searching for a while and 
haven't made any progress at all.. anyone know whats going on?

Thanks,

Jayson



[flexcoders] Re: Disable scrolling via mouse wheel

2007-09-06 Thread Jayson
Awesome! Thanks a lot... that did the trick wonderfully.


--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> package
> {
> import mx.controls.TextArea;
>  
> public class JaysonTextArea extends TextArea
> {
> override protected function createChildren():void
> {
> super.createChildren();
> textField.mouseWheelEnabled = false;
> }
> }
> }
>  
> -
>  
> http://www.adobe.com"; 
xmlns:local="*" 
> />
> 
> 
>  
> ____
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
> Behalf Of Jayson
> Sent: Thursday, September 06, 2007 11:56 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Disable scrolling via mouse wheel
> 
> 
> 
> That makes sense. However, I'm not sure how to go about that.. 
haha. 
> If you could point me in the right direction, I'd appreciate it.
> 
> Thanks.
> 
> --- In flexcoders@yahoogroups.com <mailto:flexcoders%
40yahoogroups.com>
> , "Alex Harui"  wrote:
> >
> > I just realized that the player takes care of mousewheel over 
> textfields
> > and not the Flex framework which is why event blocking isn't 
going 
> to
> > work.
> > 
> > You can subclass TextArea, get to the underlying textField and set
> > mouseWheelEnabled=false.
> > 
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com <mailto:flexcoders%
40yahoogroups.com>
> 
> [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%
40yahoogroups.com>
> ] On
> > Behalf Of Jayson
> > Sent: Thursday, September 06, 2007 11:33 AM
> > To: flexcoders@yahoogroups.com <mailto:flexcoders%
40yahoogroups.com> 
> > Subject: [flexcoders] Re: Disable scrolling via mouse wheel
> > 
> > 
> > 
> > Just tried those out.. still no luck.. I'm beginning to think 
this 
> > isn't going to work.
> > 
> > I didn't know about the useCapture and priority for event 
> listeners.. 
> > thought that was going to work.
> > 
> > I don't really want to have to cut the string so it doesn't 
extend 
> out 
> > of the TextArea because I use it other places, that seems like it 
> would 
> > be a pain in the ass.
> > 
> > Do you think this might be an issue of timing? like the 
> eventListener 
> > isn't being added in time?
> > 
> > I've tried calling it in creationComplete(for the TextArea and 
> app), 
> > scroll, and mouseWheel.
> >
>




[flexcoders] Re: Disable scrolling via mouse wheel

2007-09-06 Thread Jayson
That makes sense. However, I'm not sure how to go about that.. haha. 
If you could point me in the right direction, I'd appreciate it.

Thanks.


--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> I just realized that the player takes care of mousewheel over 
textfields
> and not the Flex framework which is why event blocking isn't going 
to
> work.
>  
> You can subclass TextArea, get to the underlying textField and set
> mouseWheelEnabled=false.
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
> Behalf Of Jayson
> Sent: Thursday, September 06, 2007 11:33 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Disable scrolling via mouse wheel
> 
> 
> 
> Just tried those out.. still no luck.. I'm beginning to think this 
> isn't going to work.
> 
> I didn't know about the useCapture and priority for event 
listeners.. 
> thought that was going to work.
> 
> I don't really want to have to cut the string so it doesn't extend 
out 
> of the TextArea because I use it other places, that seems like it 
would 
> be a pain in the ass.
> 
> Do you think this might be an issue of timing? like the 
eventListener 
> isn't being added in time?
> 
> I've tried calling it in creationComplete(for the TextArea and 
app), 
> scroll, and mouseWheel.
>




[flexcoders] Re: Security Error

2007-09-06 Thread Jayson
You need a crossdomain.xml file in the root level on the domain you 
are trying to access. 

I happen to have the flex docs open, here is the example they give..









again, that should be in a file called crossdomain.xml and should be 
placed in the domain you are trying to access from the flex app.


--- In flexcoders@yahoogroups.com, "jen_bonnett" <[EMAIL PROTECTED]> wrote:
>
> I'm a newbie.  I've developed a small dashboard application based 
> upon the Sample Dashboard Application.  It works great locally; 
but, 
> when I upload it to the server, I get a security issue when I try 
to 
> run the application.  (Note: it is pulling XML data from 
Webservices.)
> 
> [RPC Fault faultString="Security error accessing url" 
> faultCode="Channel.Security.Error" faultDetail="Destination: 
> DefaultHTTP"]
>   at 
> 
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::fa
> ultHandler()
>   at mx.rpc::Responder/fault()
>   at mx.rpc::AsyncRequest/fault()
>   at private::DirectHTTPMessageResponder/securityErrorHandler()
>   at 
> 
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEv
> entFunction()
>   at flash.events::EventDispatcher/dispatchEvent()
>   at flash.net::URLLoader/flash.net:URLLoader::redirectEvent()
> 
> Technically, both the Webservices and Dashboard are in the same 
> domain.  They are in different subdirectories.  I tried adding a 
> crossdomain.xml file and it didn't help.
> 
> Dashboard: 
http://dev.mooringtech.com/fxDashboard/bin/fxDashboard.html
> WebService: 
> 
http://dev.mooringtech.com/fxWebServices/GetMonthlyQuotesBySource.aspx
> 
> The Dashboard runs fine locally against these webservices.  Any 
> suggestions?
>




[flexcoders] Re: Disable scrolling via mouse wheel

2007-09-06 Thread Jayson
Just tried those out.. still no luck.. I'm beginning to think this 
isn't going to work.

I didn't know about the useCapture and priority for event listeners.. 
thought that was going to work.

I don't really want to have to cut the string so it doesn't extend out 
of the TextArea because I use it other places, that seems like it would 
be a pain in the ass.

Do you think this might be an issue of timing? like the eventListener 
isn't being added in time?

I've tried calling it in creationComplete(for the TextArea and app), 
scroll, and mouseWheel.



[flexcoders] Re: Disable scrolling via mouse wheel

2007-09-06 Thread Jayson
no luck.. heres what i did..

public function wheelStop():void{
myTextArea.addEventListener(MouseEvent.MOUSE_WHEEL, 
mouseWheelHandler);
}

public function mouseWheelHandler(event:MouseEvent):void{
event.stopImmediatePropagation();
}

and I called wheelStop() in the creationComplete function and also 
tried it in mouseWheel & scroll in the TextArea, none worked..


also tried myTextArea.addEventListener(ScrollEvent.SCROLL, 
mouseScrollHandler); 

public function mouseWheelHandler(event:ScrollEvent):void{
event.stopImmediatePropagation();
}


am i doing something wrong?



--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> I would capture MOUSE_WHEEL and call stopImmediatePropagation.
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
> Behalf Of Jayson
> Sent: Wednesday, September 05, 2007 2:37 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Disable scrolling via mouse wheel
> 
> 
> 
> Here's my situation.
> 
> I have a TextArea that is filled with text(more text than can be 
> displayed). I have the scroll bars removed so that you can not 
scroll 
> with them, but you can still scroll with the mouse wheel. How can I 
> disable this? I've tried a number of things but nothing seems to be 
> working.
> 
> I'm thinking I need an event listener, and a function needs to be 
> performed on ScrollEvent.SCROLL, but what would it be? TextArea 
doesn't 
> have scrollPosition, so I can't do myTextArea.scrollPosition = 0; 
or 
> whatever it would be.
> 
> Any ideas?
> 
> Thanks,
> 
> Jayson
>




[flexcoders] Re: Disable scrolling via mouse wheel

2007-09-05 Thread Jayson
Not working..

Heres what I did..

public function wheelStop():void{
 myTextArea.addEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelHandler);
}

public function mouseWheelHandler(event:MouseEvent):void{
 event.stopImmediatePropagation();
}

I tried calling wheelStop() at creationComplete, and also in mouseWheel 
in the TextArea.. neither worked.

Do I have something wrong?



[flexcoders] Re: NEW FLEX WEBSITE: ManureMail.com

2007-09-05 Thread Jayson
I have a question..

I see that you have digg and reddit and all those, do you have a method 
for handling url requests? How does the site your sending it to (digg 
for example) know which page it is being sent? or are you just sending 
manuremail.com? I really like the end results of flex, it being 
interactive and all that, but search engines just dont pick it up like 
html(obviously).



[flexcoders] Disable scrolling via mouse wheel

2007-09-05 Thread Jayson
Here's my situation.

I have a TextArea that is filled with text(more text than can be 
displayed). I have the scroll bars removed so that you can not scroll 
with them, but you can still scroll with the mouse wheel. How can I 
disable this? I've tried a number of things but nothing seems to be 
working.

I'm thinking I need an event listener, and a function needs to be 
performed on ScrollEvent.SCROLL, but what would it be? TextArea doesn't 
have scrollPosition, so I can't do myTextArea.scrollPosition = 0; or 
whatever it would be.

Any ideas?

Thanks,

Jayson



[flexcoders] XML not loading.. can't see what i have wrong.

2007-02-22 Thread Jayson
After trying some things on my own, I went to the help docs... 
I have the function exactly like it is in the docs and it doesn't 
work. I don't know if I'm missing something and I just dont see it.. 
or if what i have is wrong.. heres what I have...

[Bindable]
public var articleXML:XML;
public var XMLLoader:URLLoader;
public var XMLFile:String = "articles.xml";
public var XMLReq:URLRequest = new URLRequest(XMLFile);

public function loadArticles():void{
XMLLoader.load(XMLReq);
XMLLoader.addEventListener(Event.COMPLETE, XMLLoaded);
}

public function XMLLoaded(event:Event):void{
xmltest.text = "loaded";
var loader:URLLoader = URLLoader(event.target);
articleXML = new XML(loader.data);
xmltest.text = articleXML.toXMLString(); 
}

for some reason the debug version of flash doesnt install.. err.. I 
install it but nothing changes.. so I can't use trace.

anyone see something wrong here? I think this should work.






[flexcoders] Re: FDS and licensing issues

2007-02-22 Thread Jayson
This is copied right from the Adobe download page for Flex and FDS

Flex Data Services 2 Express
A powerful solution for creating data-intensive rich applications. 
The Express edition is a free, non-expiring commercial-use product 
for applications deployed on a single machine with no more than one 
CPU.



--- In flexcoders@yahoogroups.com, "chaitanya raja" 
<[EMAIL PROTECTED]> wrote:
>
> Hmm.. I guess you could classify this as a rant. Anyways, here it 
goes.
> 
> Could someone please suggest what i could do. 
> Consider, I am a small software firm and I create a product which i
> sell to different companies. I think Flex and FDS provides me a 
really
> good implementation of part of my product. There are other options
> available  for the functionality, but I do like Flex. But then 
again,
> should i pay the huge sum that FDS costs me for every sale I make? I
> think this is not fair. 
> 
> This is my understanding of the licnesing for FDS. Let me know if 
its
> not so. Also do let me know if I have any other alternative 
licensing
> options available for FDS.
> 
> Regards,
> Chaitanya
>




[flexcoders] Re: Flex2 for mobile?

2007-02-22 Thread Jayson
I don't believe so, at least not yet. Some phones support Flash Lite, 
which is a stripped down mobile version of Flash I believe, there is 
more info on the adobe webstie.

>From what I've heard and read (I have a friend that has an SMS relay 
business) not many phones have/support Flash Lite, I think its only 
verizon phones.

Here are some links for you..
Flash Lite
http://www.adobe.com/products/flashlite/
Flash Cast
http://www.adobe.com/mobile/solutions/flashcast/
Also...
http://www.adobe.com/mobile/



--- In flexcoders@yahoogroups.com, "Mrinmoyee Sanyal" 
<[EMAIL PROTECTED]> wrote:
>
> Can a flex2 app be transformed to be used in a mobile?
> -MS
>




[flexcoders] Re: Convert ByteArray to Bitmap

2007-02-21 Thread Jayson
I'm having a problem similar to this one.. is there a way to get the 
height of an image that is being loaded?

I looked to be able to do this in the asp script I have generating 
the XML document, so I could have this in the XML, but I couldn't 
figure out how to do it. I figured I didn't need the width or height 
because the image could be scaled, but it turns out that I do need 
the height. Anyone know how to do this or is able to point me in the 
right direction?

Thanks..

Jayson


--- In flexcoders@yahoogroups.com, "dougmccune" <[EMAIL PROTECTED]> wrote:
>
> If you're loading an image type supported by Flex (gif, jpeg, png,
> swf) then you don't need to know anything about the image. You don't
> need to know the width or height.
> 
> All you do is use Loader.loadBytes(byteArray). This would load the
> image exactly the same as if you loaded from a URL.
> 
> Doug
> 
> 
> --- In flexcoders@yahoogroups.com, "dario.drome"  
wrote:
> >
> > I agree with Franto friend: You need to know something about the 
> > bytearray you are receiving, i.e. format, disposition, etc.
> > Most of image formats have a kind of header where you could find 
its 
> > width, height and so on.
> > Once you know the dimensions and the format, you would need to 
use 
> > the apropriate decoder to transform the bytearray in pixels of a 
Flex 
> > Bitmapdata object.
> > 
> > --- In flexcoders@yahoogroups.com, franto  wrote:
> > >
> > > if you dont know what is it ByteArray how you want 
todisplayit :)
> > > you have to know at least 1 parameter, width or height...
> > > 
> > > thats my opinion
> > > Franto
> > > 
> > > On 1/26/07, Steve Cox  wrote:
> > > >
> > > >All,
> > > >
> > > >
> > > >
> > > > I'm retrieving an image via remoting as a ByteArray. How can 
I 
> > convert
> > > > this to a Bitmap without knowing the width/height of the 
image? 
> > I've seen
> > > > SetPixels – but that requires me knowing the dimensions of an 
> > image – which
> > > > I don't.
> > > >
> > > >
> > > >
> > > > Any ideas?
> > > >
> > > >  
> > > >
> > > 
> > > 
> > > 
> > > -- 
> > > 

> > --

> > ---
> > > Franto
> > > 
> > > http://blog.franto.com
> > > http://www.flashcoders.sk
> > >
> >
>




[flexcoders] Re: customising preloader

2007-02-18 Thread Jayson
Progress Bar---

I came up with some code last night to make a progress bar update as 
an image is loaded in my appliction. I have a few photo galleries and 
other things, so I want the user to know that something is loading 
rather than seeing a blank spot on the page... heres my code, you 
might be able to use it.

There is then a progress bar in the application called progress and 
an image called image. Make sure the progress bar's mode is set to 
manual.



script
import flash.events.Event;
import flash.net.URLLoader;
import flash.display.Loader;
import flash.net.URLRequest;

public var file:Loader = new Loader();;
public var fileURL:String = new String();
public var fileURLReq:URLRequest;

public function imageLoader():void{
image.visible=false;
progress.setProgress(0,100);
progress.visible=true;
progress.indeterminate=true;
fileURL=galSelTL.selectedItem.full;
fileURLReq = new URLRequest(fileURL);
file.load(fileURLReq);
file.contentLoaderInfo.addEventListener
(Event.OPEN, openHandler);
file.contentLoaderInfo.addEventListener
(ProgressEvent.PROGRESS, progressHandler);
file.contentLoaderInfo.addEventListener
(Event.COMPLETE, loadCompleteHandler);
}

private function openHandler(event:Event):void{
progress.indeterminate=false;
}

private function progressHandler
(event:ProgressEvent):void{
progress.setProgress
(event.bytesLoaded,event.bytesTotal);
}

private function loadCompleteHandler(event:Event):void
{
image.load(fileURL);
image.visible=true;
progress.visible=false;
}


good luck,

Jayson


--- In flexcoders@yahoogroups.com, "Giles Roadnight" <[EMAIL PROTECTED]> 
wrote:
>
> I managed to do what I wanted in the by basing it on the examples 
that you
> list and by looking at the examples on livedocs.
> 
>  
> 
> This is what I ended up with:
> 
>  
> 
> The only thing I couldn't get it to do was to make the progress bar 
move as
> data is loaded but the file I am loading is very small so it loads 
in a
> fraction of a second.
> 
>  
> 
> package components
> 
> {
> 
> import mx.preloaders.*;
> 
> import flash.events.ProgressEvent;
> 
> import flash.events.Event;
> 
> import flash.display.Sprite;
> 
> import mx.events.FlexEvent;
> 
> import mx.events.RSLEvent;
> 
> import flash.net.URLRequest;
> 
> import flash.net.URLLoader;
> 
> import mx.core.Application;
> 
> 
> 
> public class CustomPreloader extends DownloadProgressBar
> 
> {
> 
> 
> 
> 
> 
> public function CustomPreloader()
> 
> {
> 
> super();
> 
> }
> 
> 
> 
> // Override to return true so progress bar appears
> 
> // during initialization.
> 
> override protected function showDisplayForInit(
> 
> elapsedTime:int, count:int):Boolean {
> 
> return true;
> 
> }
> 
>  
> 
> // Override to return true so progress bar appears during 
download.
> 
> 
> override protected function showDisplayForDownloading(
> 
> elapsedTime:int, event:ProgressEvent):Boolean {
> 
> return true;
> 
> }
> 
> 
> 
> private var _preloader:Sprite; 
> 
>  
> 
>  
> 
> override public function set
> preloader(value:Sprite):void
> 
> {
> 
> _preloader = value;
> 
> 
> 
>  
> value.addEventListener(ProgressEvent.PROGRESS, 
progressHandler);  
> 
> value.addEventListener
(Event.COMPLETE,
> completeHandler);
> 
> 
> 
>  
> value.addEventListener(RSLEvent.RSL_PROGRESS, rslProgressHandler);
> 
>  
> value.addEventListener(RSLEvent.RSL_COMPLETE, rslCompleteHan