[flexcoders] pdf in flash/flex alternative to flexpaper?

2013-02-15 Thread grimmwerks
Does anyone have any recommended ways of bringing pdfs into a flash interface 
where the user cannot get to the actual pdf file?




Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/






[flexcoders] video - setting multi bitrate via actionscript? or 'how does youtube do it'

2013-02-08 Thread grimmwerks
Hey if someone can give me the answer to either of the questions, I'd 
appreciate it.

I've got a spark videoDisplay object that I'm setting the source via 
actionscript.  I'm trying to figure out how to fullscreen it where I can still 
display an overlay - much like youtube does with their ads - where the video 
itself isn't scaled from a small rect up (so it's pixelated) but displaying the 
HD content much like youtube is doing.

I can fullscreen it fine, but then I can't show anything OVER it, which kills 
what I need. 




Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/






[flexcoders] been awhile: spark.components.VideoDisplay fullscreen with an overlay?

2013-02-07 Thread grimmwerks
Hey all - coming back to a flash project after being away for a year in php / 
jquery world and trying to get myself acclaimated again -- I've got a 
videoDisplay showinging a video, and going fullscreen, but I want to be able to 
display a small spark group above/over/on it but the video is going fullscreen 
'above' everything -- assuming direct to video card?

Do I have to do the old 'scaling the group with the video in it so that the 
video is playing at a lower resolution' in order to get any kind of overlay to 
function?




Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/






Re: [flexcoders] Flex 4.6 Image Panning and Zooming

2012-08-11 Thread grimmwerks
Laurence did you ever find anything?

I had done something similar using bitmapData in Flex3 but now I want to handle 
it differently and am having a heck of a time; if I scale the image within it's 
holder, it's clipping, so you pan around and you've got just a piece of the 
original image.



On Jul 2, 2012, at 6:12 PM, Laurence lmacne...@comcast.net wrote:

 I'm working with Flex 4.6, and I'm trying to allow a user to pan and zoom an 
 image that's larger than the display-window...
 
 I've found a couple of Pan|Zoom utilities (Adobe FIG Pan|Zoom and OpenZoom), 
 but they're both written for versions of Flex that long pre-date Flex 4.6...
 
 Anyone know where I can find information on how to do this in Flex 4.6?
 
 Thanks,
 Laurence MacNeill
 Mableton, Georgia, USA
 
 
 
 
 
 
 
 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location: 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
 
 
 



Re: [flexcoders] Setting transformX, transformY from mouseUp event?

2012-08-11 Thread grimmwerks
Any chance you can share some of this code? I did it in Flex3 with bitmap data, 
am trying it now with spark components and am only getting the image to scale 
but upon panning I've only got a clip of the image...
On May 31, 2011, at 2:14 PM, yoohoo r...@goodlux.com wrote:

 Hello all -
 
 I'm working on an application where I'd like to have a pannable/zoomable 
 image inside of a group. I'd like to be able to zoom from the point where I 
 drop the image after dragging it around.
 
 I've got everything working well except for one problem.
 
 
 In the mouseUp handler, I set the transformX and tranformY properties to the 
 event.stageX and event.stageY coordinates of the mouse event.
 
 This should set the zoom point to whereever the mouse lifted up. However, it 
 seems to jump the image back to where the drag started.
 
 I've tried everything I can think of, I'm just wondering if anyone out there 
 recognizes this problem and remembers what they did to work around.
 
 
 Thanks!
 
 
 
 
 
 
 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location: 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
 
 
 



[flexcoders] going crazy: custom tooltip positioning

2012-07-24 Thread grimmwerks
I honestly honestly don't get why I'm having problems positioning this thing;  
I can set the alpha but can NEVER set the position -- in this example I'm 
trying to set it to 0,0 (and then moving it to -100,-100) just to see SOMETHING 
happen - but it never does:

Just so you understand as well - I created my own event so that I could get a 
proper bubble up from an itemrenderer in a list - (ie a slideshow thumbnail).  
I want to pop over a larger image of this slideshow (hence the class 
SlidePreviewPopup) - and am passing the original toolTipEvent along.

var spp:SlidePreviewPopup = new SlidePreviewPopup();
spp.image.source = event.item.thumbnail;
var pt:Point  = new 
Point(event.toolTipEvent.currentTarget.x, event.toolTipEvent.currentTarget.y);
var npt:Point = 
event.toolTipEvent.currentTarget.contentToGlobal(pt);
spp.x = 0; spp.y= 0;
spp.alpha = .5;
event.toolTipEvent.toolTip = spp;
trace(spp.x + ' ' + spp.y);
spp.move(-100,-100); 
trace(spp.x + ' '+ spp.y);



I'm starting to think that perhaps I *should* do a popup rather than a 
tooltip...wondering if that will be able to be positioned - but why can't I, 
for the sake of argument GET this damn tooltip to position?

Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/






[flexcoders] going crazy: custom tooltip positioning

2012-07-24 Thread grimmwerks


I honestly honestly don't get why I'm having problems positioning this thing;  
I can set the alpha but can NEVER set the position -- in this example I'm 
trying to set it to 0,0 (and then moving it to -100,-100) just to see SOMETHING 
happen - but it never does:

Just so you understand as well - I created my own event so that I could get a 
proper bubble up from an itemrenderer in a list - (ie a slideshow thumbnail).  
I want to pop over a larger image of this slideshow (hence the class 
SlidePreviewPopup) - and am passing the original toolTipEvent along.

var spp:SlidePreviewPopup = new SlidePreviewPopup();
spp.image.source = event.item.thumbnail;
var pt:Point  = new 
Point(event.toolTipEvent.currentTarget.x, event.toolTipEvent.currentTarget.y);
var npt:Point = 
event.toolTipEvent.currentTarget.contentToGlobal(pt);
spp.x = 0; spp.y= 0;
spp.alpha = .5;
event.toolTipEvent.toolTip = spp;
trace(spp.x + ' ' + spp.y);
spp.move(-100,-100); 
trace(spp.x + ' '+ spp.y);



I'm starting to think that perhaps I *should* do a popup rather t han a 
tooltip...wondering if that will be able to be positioned - but why can't I, 
for the sake of argument GET this   tooltip to position?  (got a profanity 
warning?)

Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/








[flexcoders] matrix math examples / scaling + transforming an image...

2012-04-02 Thread grimmwerks
Ok I'm going nuts trying to update something that was working in F3 to 4.6 and 
it's just not working as expected;  I've two images, one being a smaller 
navigator view of the larger image.   

The user can change the scale of the area to be viewed, and on the smaller 
'map' view there's a little draggable bounding box to show the area that you're 
viewing on the larger image that has now scaled up - complicated explanation, 
but it's exactly the way photoshop works in terms of showing where you are on a 
scaled -in image. The scaling bit works fine.

I'm allowing the user to drag the small navigator and as it moves the larger 
image tries doing a transform so that you see -- scaled in again - exactly what 
is to be seen in the smaller bounded area.  It's not exactly right.

Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/






[flexcoders] scaling images flex3 vs flex4 problem - help?

2012-03-28 Thread grimmwerks
Hey all - I have an old player that sort of does the Photoshop navigator / 
current doc thing -- a smaller example of an image is shown with a larger 
image, and when the larger image scales UP there's a box that scales down on 
the navigator image that shows you what part of the zoom you're in.

I had this working in F3 with mx components and basically having a slider scale 
a matrix.transform, the navigator getting the inverse of the transform; it was 
working great.   I've since dropped the mx:Canvas scale I was doing for a spark 
Group (thinking it's going to migrate to an iPad app in the future) -- and now 
images aren't scaling correctly.  Originally if an image was loaded in that 
wasn't the exact height/width, the image would be letterboxed with the largest 
direction being pinned to the sides.  When I letterbox the image and try to 
scale the group holding it in the spark version it doesn't work properly.  When 
the scaling works, the image isn't letterboxed and so the navigator and zoomed 
in image don't appear the same.


Here's the Flex 3 version (partial):

mx:Canvas width=100% height=100% id=bigBox
mx:Canvas id=big width=100% height=100% 
mx:Image x=0 y=0 id=bigImage width=100% 
height=100%  scaleContent=true horizontalAlign=center /
/mx:Canvas

mx:Button right=10 bottom=19 styleName=creativityLogo/
/mx:Canvas

and the function for it:

public function zoomChange(e:SliderEvent):void{
currentScale = 
Number(Number(e.value).toFixed(2));
var scaleBig:Matrix = new Matrix();
scaleBig.scale(e.value, e.value);
var scaleSmall:Matrix = scaleBig.clone();
scaleSmall.invert();

big.transform.matrix = scaleBig;
box.transform.matrix = scaleSmall;
borderBox.transform.matrix= 
box.transform.matrix.clone();
if(e.value1){box.mouseEnabled; 
box.buttonMode=true};
}



and for the Flex 4.6 version:

s:SkinnableContainer width=100% height=100%
s:Group id=imgLargeGroup width=100% height=100%
 left=0 top=0 right=0 bottom=0  
resizeMode=scale  
s:Image id=imgLarge width=100% height=100% 
 scaleMode=letterbox
 smoothingQuality=high
 horizontalCenter=0 verticalCenter=0
 verticalAlign=middle
 top=0 left=0 right=0 bottom=0 /
/s:Group
/s:SkinnableContainer


and the function for it:

public function reactToZoomSlider$Change(ev:Event):void{
var sliderVal:Number = view.zoomSlider.value;
maskOutline.visible = (sliderVal  1);
currentScale = Number(Number(sliderVal).toFixed(2));
var scaleBig:Matrix = new Matrix();
scaleBig.scale(sliderVal, sliderVal);
var scaleSmall:Matrix = scaleBig.clone();
scaleSmall.invert();

//large.content.matrix = scaleBig;
//large.transform.matrix = scaleBig;
view.imgLargeGroup.transform.matrix = scaleBig;
trace(view.imgLargeGroup.transform.matrix);
mask.transform.matrix = maskOutline.transform.matrix = 
scaleSmall;
//large.scaleX = view.zoomSlider.value; large.scaleY = 
view.zoomSlider.value;
}




Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/







Re: [flexcoders] scaling images flex3 vs flex4 problem - help?

2012-03-28 Thread grimmwerks
Hmm wondering if I can use a Scale effect instead and set it via the slider...


On Mar 28, 2012, at 1:10 PM, grimmwerks wrote:

 
 
 Hey all - I have an old player that sort of does the Photoshop navigator / 
 current doc thing -- a smaller example of an image is shown with a larger 
 image, and when the larger image scales UP there's a box that scales down on 
 the navigator image that shows you what part of the zoom you're in.
 
 I had this working in F3 with mx components and basically having a slider 
 scale a matrix.transform, the navigator getting the inverse of the transform; 
 it was working great.   I've since dropped the mx:Canvas scale I was doing 
 for a spark Group (thinking it's going to migrate to an iPad app in the 
 future) -- and now images aren't scaling correctly.  Originally if an image 
 was loaded in that wasn't the exact height/width, the image would be 
 letterboxed with the largest direction being pinned to the sides.  When I 
 letterbox the image and try to scale the group holding it in the spark 
 version it doesn't work properly.  When the scaling works , the image isn't 
 letterboxed and so the navigator and zoomed in image don't appear the same.
 
 
 Here's the Flex 3 version (partial):
 
 mx:Canvas width=100% height=100% id=bigBox
   mx:Canvas id=big width=100% height=100% 
   mx:Image x=0 y=0 id=bigImage width=100% 
 height=100%  scaleContent=true horizontalAlign=center /
   /mx:Canvas
   
   mx:Button right=10 bottom=19 styleName=creativityLogo/
   /mx:Canvas
 
 and the function for it:
 
 public function zoomChange(e:SliderEvent):void {
   currentScale = 
 Number(Number(e.value).toFixed(2));
   var scaleBig:Matrix = new Matrix();
   scaleBig.scale(e.value, e.value);
 var scaleSmall:Matrix = scaleBig.clone();
   scaleSmall.invert();
   
   big.transform.matrix = scaleBig;
   box.transform.matrix = scaleSmall;
   borderBox.transform.matrix= 
 box.transform.matrix.clone();
   if(e.value1){box.mouseEnabled; 
 box.buttonMode=true};
   }
 
 
 
 and for the Flex 4.6 version:
 
 s:SkinnableContainer width=100% height=100%
   s:Group id=imgLargeGroup width=100% height=100%
left=0 top=0 right=0 bottom=0  
 resizeMode=scale  
   s:Image id=imgLarge width=100% height=100% 
 scaleMode=letterbox
smoothingQuality=high
horizontalCenter=0 verticalCenter=0
verticalAlign=middle
top=0 left=0 right=0 bottom=0 /
   /s:Group
   /s:SkinnableContainer
 
 
 and the function for it:
 
 public function reactToZoomSlider$Change(ev:Event):void{
   var sliderVal:Number = view.zoomSlider.value;
   maskOutline.visible = (sliderVal  1);
   currentScale = Number(Number(sliderVal).toFixed(2));
   var scaleBig:Matrix = new Matrix();
   scaleBig.scale(sliderVal, sliderVal);
   var scaleSmall:Matrix = scaleBig.clone();
   scaleSmall.invert();
   
   //large.content.matrix = scaleBig;
   //large.transform.matrix = scaleBig;
   view.imgLargeGroup.transform.matrix = scaleBig;
   trace(view.imgLargeGroup.transform.matrix);
   mask.transform.matrix = maskOutline.transform.matrix = 
 scaleSmall;
   //large.scaleX = view.zoomSlider.value; large.scaleY = 
 view.zoomSlider.value;
   }
 
 
 
 
 Garry Schafer
 grimmwerks
 gr...@grimmwerks.com
 portfolio: www.grimmwerks.com/
 
 
 
 
 
 
 
 

Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/







[flexcoders] Adding a button in VideoPlayer

2012-02-23 Thread grimmwerks
Ok I don't know if I'm going absolutely crazy  -- I'm trying to add a button to 
the VideoPlayer -- not the stopButton which is already written in the spark 
VideoPlayer, but a new button to do something I want and will listen for 
outside of the class.

I create a VideoPlayer skin and add my button. I create a new class and extend 
VideoPlayer.as.  I add a public myButton (say) and override static partAdded -- 
I trace out the partName / instance and myButton is always null, never added.  
Hmm.

I duplicate the VideoPlayer classes into my own, add the same public myButton 
and this time my button is being traced out.

Now I could do it this way but it's 10k difference in the swf - from 253 to 
264.  Ok 11.  


What's the deal?

Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/






Re: [flexcoders] Adding a button in VideoPlayer

2012-02-23 Thread grimmwerks
*cough* well I *did* -- but for some reason I had 

public var overlayButton:ButtonBase;
[SkinPart(required=false)]


rather than

[SkinPart(required=false)]
public var overlayButton:ButtonBase;


I *knew* it was something stupid… Thanks!

On Feb 23, 2012, at 2:47 PM, claudiu ursica wrote:

 
 
 Can you show code, I assume you marked the button as skinPart.
 
 C
 
 From: grimmwerks gr...@grimmwerks.com
 To: flexcoders@yahoogroups.com 
 Sent: Thursday, February 23, 2012 8:41 PM
 Subject: [flexcoders] Adding a button in VideoPlayer
 
 Ok I don't know if I'm going absolutely crazy  -- I'm trying to add a button 
 to the VideoPlayer -- not the stopButton which is already written in the 
 spark VideoPlayer, but a new button to do something I want and will listen 
 for outside of the class.
 
 I create a VideoPlayer skin and add my button. I create a new class and 
 extend VideoPlayer.as.  I add a public myButton (say) and override static 
 partAdded -- I trace out the partName / instance and myButton is always null, 
 never added.  Hmm.
 
 I duplicate the VideoPlayer classes into my own, add the same public myButton 
 and this time my button is being traced out.
 
 Now I could do it this way but it's 10k difference in the swf - from 253 to 
 264.  Ok 11.  
 
 
 What's the deal?
 
 Garry Schafer
 grimmwerks
 gr...@grimmwerks.com
 portfolio: www.grimmwerks.com/
 
 
 
 
 
 
 
 
 


Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/






[flexcoders] Air Controlling InDesign?

2011-12-21 Thread grimmwerks
I know there's a few apps out there to control Photoshop and the like, but I'm 
wondering if anyone has any information as to how to go about it?  Trying to 
find out from the client exactly 'how' they want to control InDesign; I'd 
imagine calling a native process on a script for it...?


Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/







[flexcoders] help with anonymous functions...

2011-09-22 Thread grimmwerks
OK I don't mean to make this a bit convoluted - but I guess the basics of the 
question is regarding using anonymous functions within a member class and being 
able to set variables within that member class.

The convoluted question is this:  I've got in my app an Interface class that 
has pointers to scala/java functions and are passed in callbacks like so:



function echoOrderEvent(callback:Function):void ;   

[UriParams(p1=correlationId)]
function echoOrderCacheEvent(callback:Function,extension:Object):void ;

 

Now in my class I create vars as functions for callbacks like so:

private var echoOrderCacheEvent:Function = function(jstr:String):void{
Alert.show(GOT ORDER EVENT );
}  

I set up the call back to this function as such:

interfaceClass.echoOrderCacheEvent(echoOrderCacheEvent, {correlationId: 
sessionId});   

 
Now, this works great except in the anonymous function I don't have any access 
to the public or private member vars of the class - only of course if I make 
the vars static, which is not what I want to do.

What I *can't* figure out is how to make the callback a regular member function 
such as:

public function echoEvent(str:String):void{
blah blah
}

And have that work with the interface class -- as 
interfaceClass.echoOrderCacheEvent(echoEvent, {correlationId: sessionId}) won't 
work; what I was thinking was perhaps .call or .apply methods but not sure how 
best to use them here...



Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/







Re: [flexcoders] help with anonymous functions...

2011-09-22 Thread grimmwerks
Not getting an error, just getting ignored and the function is never called.


var scope:Object = this;
private var echoOrderCacheEvent:Function = 
function(jstr:String):void{
Alert.show(this);
trace(scope);

}

I've tried the old pass through - but it's definitely not working properly; the 
'this' that's getting called within the function is NOT the function  - it's a 
SubscriptionListener in the stomp framework as that's what's calling the 
callback through the interface; something another dev has created and just want 
to come back with enough ammunition that the callbacks aren't being set 
properly:

It seems to me that he's creating another anonymous function as part of the 
stomp dispatching and then everything is getting lost:

ReferenceError: Error #1069: Property com.investlab.mix.common.model::scope not 
found on interbahn.SubscriptionListener and there is no default value.
at 
Function/anonymous()[/Users/grimm/Documents/__WORK/__INVESTLAB/MIX/src/com/investlab/mix/common/model/OrderProxyNew.as:142]
at 
interbahn::SubscriptionListener/apply()[C:\transfer\IdeaProjects\as3-interbahn\main\as3\src\interbahn\SubscriptionListener.as:59]
at 
Function/anonymous()[C:\transfer\IdeaProjects\as3-interbahn\main\as3\src\interbahn\stomp\StompConnection.as:35]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at 
org.codehaus.stomp::Stomp/dispatchFrame()[/Users/grimm/Documents/__WORK/__INVESTLAB/MIX/src/org/codehaus/stomp/Stomp.as:350]
at 
org.codehaus.stomp::Stomp/processFrame()[/Users/grimm/Documents/__WORK/__INVESTLAB/MIX/src/org/codehaus/stomp/Stomp.as:326]
at 
org.codehaus.stomp::Stomp/onData()[/Users/grimm/Documents/__WORK/__INVESTLAB/MIX/src/org/codehaus/stomp/Stomp.as:312]



On Sep 22, 2011, at 1:32 PM, Alex Harui wrote:

 
 
 I don’t know why passing in echoEvent wouldn’t work.  What error did you get?
 
 Another options are to pass in a third parameter as the object for use in 
 call or apply.
 
 You can theoretically do this as well in the constructor of the class:
 Public function MyClassConstructor()
 {
 var thisObject:Object = this;
 echoOrderCacheEvent = function(jstr:String):void{
 trace(thisObject);  // use ‘thisObject’ instead of ‘this’
 }
 }
 
 
 On 9/22/11 9:50 AM, grimmwerks gr...@grimmwerks.com wrote:
 
 
  
  

 
 OK I don't mean to make this a bit convoluted - but I guess the basics of 
 the question is regarding using anonymous functions within a member class 
 and being able to set variables within that member class.
 
 The convoluted question is this:  I've got in my app an Interface class that 
 has pointers to scala/java functions and are passed in callbacks like so:
 
 
 
 function echoOrderEvent(callback:Function):void ; 
 
 [UriParams(p1=correlationId)]
 function echoOrderCacheEvent(callback:Function,extension:Object):void ;
 n! bsp; 
   
 
 Now in my class I create vars as functions for callbacks like so:
 
 private var echoOrderCacheEvent:Function = function(jstr:String):void{
 Alert.show(GOT ORDER EVENT );
 }  
 
 I set up the call back to this function as such:
 
 interfaceClass.echoOrderCacheEvent(echoOrderCacheEvent, {correlationId: 
 sessionId});  
   !  
 ! ; 
 Now, this works great except in the anonymous function I don't have any 
 access to the public or private member vars of the class - only of course if 
 I make the vars static, which is not what I want to do.
 
 What I *can't* figure out is how to make the callback a regular member 
 function such as:
 
 public function echoEvent(str:String):void{
 blah blah
 }
 
 And have that work with the interface class -- as 
 interfaceClass.echoOrderCacheEvent(echoEvent, {correlationId: sessionId}) 
 won't work; what I was thinking was perhaps .call or .apply methods but not 
 sure how best to use them here...
 
 
 
 Garry Schafer
 grimmwerks
 gr...@grimmwerks.com
 portfolio: www.grimmwerks.com/ http://www.grimmwerks.com/ 
 
 
 
 
 
  

 
 
 
 -- 
 Alex Harui
 Flex SDK Team
 Adobe System, Inc.
 http://blogs.adobe.com/aharui
 
 
 

Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/







Re: [flexcoders] help with anonymous functions...

2011-09-22 Thread grimmwerks
Thanks  -- yeah it seems like the something's happening on the stomp / callback 
before it's getting to me.

Have another quickie about itemrenderers and factory properties, but going to 
ask on another thread.

On Sep 22, 2011, at 2:11 PM, Alex Harui wrote:

 
 
 IMHO anonymous  functions are way more trouble than they are worth.  If I had 
 the time, I would eliminate them from all framework code.
 
 Looks from the stacktrace that someone is using apply() to change the this 
 pointer.
 
 
 On 9/22/11 10:46 AM, grimmwerks gr...@grimmwerks.com wrote:
 
 
  
  

 
 Not getting an error, just getting ignored and the function is never called.
 
 
 var scope:Object = this;
 private var echoOrderCacheEvent:Function = function(jstr:String):void{
 Alert.show(this);
 trace(scope);
 
 }
 
 I've tried the old pass through - but it's definitely not working properly; 
 the 'this' that's getting called within the function is NOT the function  - 
 it's a SubscriptionListener in the stomp framework as that's what's calling 
 the callback through the interface; something another dev has created and 
 just want to come back with enough ammunition that the callbacks aren't 
 being set properly:
 
 It seems to me that he's creating another anonymous function as part of the 
 stomp dispatching and then everything is getting lost:
 
 ReferenceError: Error #1069: Property com.investlab.mix.common.model::scope 
 not found on interbahn.SubscriptionListener and there is no default value.
 at 
 Function/anonymous()[/Users/grimm/Documents/__WORK/__INVESTLAB/MIX/src/com/investlab/mix/common/model/OrderProxyNew.as:142]
 at 
 interbahn::SubscriptionListener/apply()[C:\transfer\IdeaProjects\as3-interbahn\main\as3\src\interbahn\SubscriptionListener.as:59]
 at 
 Function/anonymous()[C:\transfer\IdeaProjects\as3-interbahn\main\as3\src\interbahn\stomp\StompConnection.as:35]
 at flash.events::EventDispatcher/dispatchEventFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at 
 org.codehaus.stomp::Stomp/dispatchFrame()[/Users/grimm/Documents/__WORK/__INVESTLAB/MIX/src/org/codehaus/stomp/Stomp.as:350]
 at 
 org.codehaus.stomp::Stomp/processFrame()[/Users/grimm/Documents/__WORK/__INVESTLAB/MIX/src/org/codehaus/stomp/Stomp.as:326]
 at 
 org.codehaus.stomp::Stomp/onData()[/Users/grimm/Documents/__WORK/__INVESTLAB/MIX/src/org/codehaus/stomp/Stomp.as:312]
 
 
 
 On Sep 22, 2011, at 1:32 PM, Alex Harui wrote:
 
 
 
 I don’t know why passing in echoEvent wouldn’t work.  What error did you 
 get?
 
 Another options are to pass in a third parameter as the object for use in 
 call or apply.
 
 You can theoretically do this as well in the constructor of the class:
 Public function MyClassConstructor()
 {
 var thisObject:Object = this;
 echoOrderCacheEvent = function(jstr:String):void{
 trace(thisObject);  // use ‘thisObject’ instead of ‘this’
 }
 }
 
 
 On 9/22/11 9:50 AM, grimmwerks gr...@grimmwerks.com wrote:
 
 
  
  

 
 OK I don't mean to make this a bit convoluted - but I guess the basics of 
 the question is regarding using anonymous functions within a member class 
 and being able to set variables within that member class.
 
 The convoluted question is this:  I've got in my app an Interface class 
 that has pointers to scala/java functions and are passed in callbacks like 
 so:
 
 
 
 function echoOrderEvent(callback:Function):void ; 
 
 [UriParams(p1=correlationId)]
 function echoOrderCacheEvent(callback:Function,extension:Object):void ;
n! bsp;

 
 Now in my class I create vars as functions for callbacks like so:
 
 private var echoOrderCacheEvent:Function = function(jstr:String):void{
 Alert.show(GOT ORDER EVENT );
 }  
 
 I set up the call back to this function as such:
 
 interfaceClass.echoOrderCacheEvent(echoOrderCacheEvent, {correlationId: 
 sessionId});  
   !
   ! ; 
 Now, this works great except in the anonymous function I don't have any 
 access to the public or private member vars of the class - only of course 
 if I make the vars static, which is not what I want to do.
 
 What I *can't* figure out is how to make the callback a regular member 
 function such as:
 
 public function echoEvent(str:String):void{
 blah blah
 }
 
 And have that work with the interface class -- 
 asinterfaceClass.echoOrderCacheEvent(echoEvent, {correlationId: 
 sessionId}) won't work; what I was thinking was perhaps .call or .apply 
 methods but not sure how best to use them here...
 
 
 
 Garry Schafer
 grimmwerks
 gr...@grimmwerks.com
 portfolio: www.grimmwerks.com/ http://www.grimmwerks.com/  
 http://www.grimmwerks.com/ 
 
 
 
 
 
  

 
 
 
 -- 
 Alex Harui
 Flex SDK Team
 Adobe System, Inc.
 http://blogs.adobe.com/aharui
 
 
 

Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio

[flexcoders] ClassFactory, properties, itemrenderers and changing prop dynamically

2011-09-22 Thread grimmwerks
Here's another convoluted question -- I've got a list that is bound to an array 
of a certain Class - let's cal them Permissions.  In the Permissions class 
you've got userId, read and write (booleans there, id for userId, normal stuff).

I'm using the same itemrenderer in two lists - a source list which is not 
editable and a drop list which is;  the itemrenderer has an 'editable' variable 
and I'm setting each list's ClassFactory to this same itemrenderer, with one 
ClassFactory's properties setting editable to false, one to true.  All that is 
good.

Now the strange request I JUST had from someone here is that once an item is 
dragged and dropped from the source list to the drop list, the item in the 
source list should dim to show that it's already been chosen, unable to choose 
again.   I've created a property called itemEnabled in the itemrenderer, 
defaulting to true (so it's ignored in the droplist basically).

Here's the thing; it would be simple enough to set a particular item's 
'itemenabled' property in the dataproviider and it would trickle down; but 
since this is a list of cast objects that don't have the itemEnabled property 
it's a no go...

So is there a way of selecting an itemrenderer or item at a certain position in 
the sourcelist and setting IT's itemEnabled to false? Is it something with the 
classfactory for a specific item?


Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/







Re: [flexcoders] Is it possible to add Flex components to the Stage?

2011-09-22 Thread grimmwerks
Try stage.addElement  rather than addChild?


On Sep 22, 2011, at 2:30 PM, Hogs Haven wrote:

 From everything I've read, Flex components can only be added to Flex 
 Components (ie: VBox to Application, VGroup to Panel, etc)
 
 I'm working in an AS3 view library (no Flex, just Sprites) where I need to 
 add a Scrollable container component to the Stage on a click event. There's 
 no way to do this as I see it unless I write my own Scroll container, use 
 Flex SDK (don't think this works), or use fl.containers.ScrollPane (which is 
 not an option since we're not using a .fla)
 
 So basically, I'm trying to accomplish this, as simple runnable example, but 
 it fails silently and nothing appears...any ideas? Thanks.
 
 
 ?xml version=1.0 encoding=utf-8?
 s:Application xmlns:fx=http://ns.adobe.com/mxml/2009; 
  xmlns:s=library://ns.adobe.com/flex/spark 
  xmlns:mx=library://ns.adobe.com/flex/mx
 creationComplete=application1_creationCompleteHandler(event)
   fx:Script
   ![CDATA[
   import mx.containers.Panel;
   import mx.core.UIComponent;
   import mx.events.FlexEvent;
   
   
 protected function application1_creationCompleteHandler(event:FlexEvent):void
 {
  addEventListener(Event.ADDED_TO_STAGE, onAdded);
 }
   
 private function onAdded(e:Event):void 
 {
var myPanel : Panel = new Panel();
myPanel.width=100;
myPanel.height=100;
stage.addChild(myPanel); //nothing happens
 }
   ]]
   /fx:Script
   fx:Declarations/fx:Declarations
   
 /s:Application
 
 
 
 
 
 
 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location: 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
 
 
 

Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/







Re: [flexcoders] Re: ClassFactory, properties, itemrenderers and changing prop dynamically

2011-09-22 Thread grimmwerks
I hear you - but the thing is these are more CHOICES that one can make - like a 
menu of items.  If one can only get a hamburger it's not the only hamburger the 
store has...


On Sep 22, 2011, at 3:08 PM, valdhor wrote:

 I don't know about others here but IMHO a better user experience would be to 
 remove the selected item from the source list. This way it is not even there 
 to be selected. Just a simple matter of removing it from the dataprovider.

Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/







Re: [flexcoders] ClassFactory, properties, itemrenderers and changing prop dynamically

2011-09-22 Thread grimmwerks
I see your point -- I'm already doing an object / hashmap of items; what would 
be the best way of having the itemrenderer's check said list though?  I'm 
actually working with PureMVC and all code is in the mediator, everything in 
the view - ie list and of course itemrenderers... so it's not even something 
that an itemrenderer would be privy to...  plus if I'm using the same 
itemrenderer for the source and the drop list I'd almost have to tell  
hmmm;  could I *pass* the list each itemrenderer watches through the factory 
properties.?



On Sep 22, 2011, at 3:18 PM, Alex Harui wrote:

 
 
 Because renderers get recycled, it is not recommended to access a renderer 
 instance and change properties on it.  There is a indexToItemRenderer() 
 method, but I wouldn’t use it for this.
 
 The recommended practice is an “associated list”, essentially a 
 weak-reference dictionary or object map that stores additional information 
 associated with the data objects (not the renderers).  In this case, I would 
 probably use a dictionary and stuff each dropped object in the dictionary.  
 Each renderer will compare its data property to see if it is in the 
 dictionary and set the itemEnabled accordingly.
 
 
 On 9/22/11 11:33 AM, grimmwerks gr...@grimmwerks.com wrote:
 
 
  
  

 
 Here's another convoluted question -- I've got a list that is bound to an 
 array of a certain Class - let's cal them Permissions.  In the Permissions 
 class you've got userId, read and write (booleans there, id for userId, 
 normal stuff).
 
 I'm using the same itemrenderer in two lists - a source list which is not 
 editable and a drop list which is;  the itemrenderer has an 'editable' 
 variable and I'm setting each list's ClassFactory to this same itemrenderer, 
 with one ClassFactory's properties setting editable to false, one to true.  
 All that is good.
 
 Now the strange request I JUST had from someone here is that once an item is 
 dragged and dropped from the source list to the drop list, the item in the 
 source list should dim to show that it's already been chosen, unable to 
 choose again.   I've created a property called itemEnabled in the 
 itemrenderer,! defaulting to true (so it's ignored in the droplist 
 basically).
 
 Here's the thing; it would be simple enough to set a particular item's 
 'itemenabled' property in the dataproviider and it would trickle down; but 
 since this is a list of cast objects that don't have the itemEnabled 
 property it's a no go...
 
 So is there a way of selecting an itemrenderer or item at a certain position 
 in the sourcelist and setting IT's itemEnabled to false? Is it something 
 with the classfactory for a specific item?
 
 
 Garry Schafer
 grimmwerks
 gr...@grimmwerks.com
 portfolio: www.grimmwerks.com/ http://www.grimmwerks.com/ 
 
 
 
 
 
  

 
 
 
 -- 
 Alex Harui
 Flex SDK Team
 Adobe System, Inc.
 http://blogs.adobe.com/aharui
 
 
 

Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/







[flexcoders] dragging itemrenderer with checkbox -- error?

2011-09-15 Thread grimmwerks
Hey all - can't see why but I'm getting an error when I'm trying to drag a 
simple item / itemrenderer in a spark list - itemrenderer consists of one label 
and two checkboxes -- I get this:

rror: Skin for 
DragProxy1531.ListItemDragProxy1530.ManageAccountsExchangeItemPermissions1532.checkTradable
 cannot be found.
at 
spark.components.supportClasses::SkinnableComponent/attachSkin()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\supportClasses\SkinnableComponent.as:698]
at 
spark.components.supportClasses::SkinnableComponent/validateSkinChange()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\supportClasses\SkinnableComponent.as:443]
at 
spark.components.supportClasses::SkinnableComponent/createChildren()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\supportClasses\SkinnableComponent.as:406]
at 
mx.core::UIComponent/initialize()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:7624]
at 
mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:7485]
at 
mx.core::UIComponent/addChildAt()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:7189]
at 
spark.components::Group/addDisplayObjectToDisplayList()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Group.as:2037]
at 
spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementAdded()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Group.as:1628]
at 
spark.components::Group/setMXMLContent()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Group.as:633]
at 
spark.components::Group/createChildren()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Group.as:855]
at 
mx.core::UIComponent/initialize()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:7624]
at 
com.investlab.mix.common.components.itemrenderers::ManageAccountsExchangeItemPermissions/initialize()
at 
mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:7485]
at 
mx.core::UIComponent/addChildAt()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:7189]
at 
spark.components::Group/addDisplayObjectToDisplayList()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Group.as:2037]
at 
spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementAdded()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Group.as:1628]
at 
spark.components::Group/addElementAt()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Group.as:1387]
at 
spark.components::Group/addElement()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Group.as:1345]
at 
spark.components.supportClasses::ListItemDragProxy/createChildren()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\supportClasses\ListItemDragProxy.as:166]
at 
mx.core::UIComponent/initialize()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:7624]
at 
mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:7485]
at 
mx.core::UIComponent/addChild()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:7166]
at 
mx.managers::DragManagerImpl/doDrag()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\DragManagerImpl.as:290]
at 
mx.managers::DragManager$/doDrag()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\DragManager.as:303]
at 
spark.components::List/dragStartHandler()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\List.as:1635]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at 
mx.core::UIComponent/dispatchEvent()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:13128]
at 
spark.components::List/mouseMoveHandler()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\List.as:1907]




Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/







Re: [flexcoders] dragging itemrenderer with checkbox -- error?

2011-09-15 Thread grimmwerks

Strange - just tested and got the same problem - like a checkbox in an 
itemRenderer can't be dragged?! What the...





On Sep 16, 2011, at 1:43 AM, grimmwerks wrote:

 
 
 Hey all - can't see why but I'm getting an error when I'm trying to drag a 
 simple item / itemrenderer in a spark list - itemrenderer consists of one 
 label and two checkboxes -- I get this:
 
 rror: Skin for 
 DragProxy1531.ListItemDragProxy1530.ManageAccountsExchangeItemPermissions1532.checkTradable
  cannot be found.
   at 
 spark.components.supportClasses::SkinnableComponent/attachSkin()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\supportClasses\SkinnableComponent.as:698]
   at 
 spark.components.supportClasses::SkinnableComponent/validateSkinChange()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\supportClasses\SkinnableComponent.as:443]
   at 
 spark.components.supportClasses::SkinnableComponent/createChildren()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\supportClasses\SkinnableComponent.as:406]
   at 
 mx.core::UIComponent/initialize()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:7624]
   at 
 mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:7485]
   at 
 mx.core::UIComponent/addChildAt()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:7189]
   at 
 spark.components::Group/addDisplayObjectToDisplayList()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Group.as:2037]
   at 
 spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementAdded()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Group.as:1628]
   at 
 spark.components::Group/setMXMLContent()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Group.as:633]
   at 
 spark.components::Group/createChildren()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Group.as:855]
  /div
   at 
 mx.core::UIComponent/initialize()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:7624]
   at 
 com.investlab.mix.common.components.itemrenderers::ManageAccountsExchangeItemPermissions/initialize()
   at 
 mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:7485]
   at 
 mx.core::UIComponent/addChildAt()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:7189]
   at 
 spark.components::Group/addDisplayObjectToDisplayList()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Group.as:2037]
   at 
 spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementAdded()[E:\dev\4.5.1\frameworks\projects\spark\src\spa
  rk\components\Group.as:1628]
   at 
 spark.components::Group/addElementAt()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Group.as:1387]
   at 
 spark.components::Group/addElement()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Group.as:1345]
   at 
 spark.components.supportClasses::ListItemDragProxy/createChildren()[E:\dev\4.5.1\frameworks\projects\spark\src\sp
  ark\components\supportClasses\ListItemDragProxy.as:166]
   at 
 mx.core::UIComponent/initialize()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:7624]
   at 
 mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:7485]
   at mx.core::UIComponent/addChild()[E:\dev\4.5.1\fra 
 meworks\projects\framework\src\mx\core\UIComponent.as:7166]
   at 
 mx.managers::DragManagerImpl/doDrag()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\DragManagerImpl.as:290]
   at 
 mx.managers::DragManager$/doDrag()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\DragManager.as:303]
   at 
 spark.components::List/dragStartHandler()[E:\dev\4.5.1\frameworks\project 
 s\spark\src\spark\components\List.as:1635]
   at flash.events::EventDispatcher/dispatchEventFunction()
   at flash.events::EventDispatcher/dispatchEvent()
   at 
 mx.core::UIComponent/dispatchEvent()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:13128]
   at 
 spark.components::List/mouseMoveHandler()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\List.as:1907]
 
 
 
 
 Garry Schafer
 grimmwerks
 gr...@grimmwerks.com
 portfolio: www.grimmwerks.com/
 
 
 
 
 
 
 
 

Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/







Re: [flexcoders] dragging itemrenderer with checkbox -- error?

2011-09-15 Thread grimmwerks
Stranger still the mx checkbox works fine, spark checkbox no go.
Going to see if I can create a custom skin and try again.



On Sep 16, 2011, at 1:51 AM, grimmwerks wrote:

 
 
 
 Strange - just tested and got the same problem - like a checkbox in an 
 itemRenderer can't be dragged?! What the...
 
 
 
 
 
 On Sep 16, 2011, at 1:43 AM, grimmwerks wrote:
 
 
 
 Hey all - can't see why but I'm getting an error when I'm trying to drag a 
 simple item / itemrenderer in a spark list - itemrenderer consists of one 
 label and two checkboxes -- I get this:
 
 rror: Skin for 
 DragProxy1531.ListItemDragProxy1530.ManageAccountsExchangeItemPermissions1532.checkTradable
  cannot be found.
  at 
 spark.components.supportClasses::SkinnableComponent/attachSkin()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\supportClasses\SkinnableComponent.as:698]
 at 
 spark.components.supportClasses::SkinnableComponent/validateSkinChange()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\supportClasses\SkinnableComponent.as:443]
  at 
 spark.components.supportClasses::SkinnableComponent/createChildren()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\supportClasses\SkinnableComponent.as:406]
  at 
 mx.core::UIComponent/initialize()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:7624]
  at 
 mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:7485]
  at 
 mx.core::UIComponent/addChildAt()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:7189]
  at 
 spark.components::Group/addDisplayObjectToDisplayList()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Group.as:2037]
  at 
 spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementAdded()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Group.as:1628]
  at 
 spark.components::Group/setMXMLContent()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Group.as:633]
  at 
 spark.components::Group/createChildren()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Group.as:855]
  /div
  at 
 mx.core::UIComponent/initialize()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:7624]
  at 
 com.investlab.mix.common.components.itemrenderers::ManageAccountsExchangeItemPermissions/initialize()
  at 
 mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:7485]
  at 
 mx.core::UIComponent/addChildAt()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:7189]
  at 
 spark.components::Group/addDisplayObjectToDisplayList()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Group.as:2037]
  at 
 spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementAdded()[E:\dev\4.5.1\frameworks\projects\spark\src\spa
  rk\compone nts\Group.as:1628]
  at 
 spark.components::Group/addElementAt()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Group.as:1387]
  at 
 spark.components::Group/addElement()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Group.as:1345]
  at 
 spark.components.supportClasses::ListItemDragProxy/createChildren()[E:\dev\4.5.1\frameworks\projects\spark\src\sp
  ark\components\supportClasses\ListItemDragProxy.as:166]
  at 
 mx.core::UIComponent/initialize()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:7624]
  at 
 mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:7485]
  at mx.core::UIComponent/addChild()[E:\dev\ 4.5.1\fra 
 meworks\projects\framework\src\mx\core\UIComponent.as:7166]
  at 
 mx.managers::DragManagerImpl/doDrag()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\DragManagerImpl.as:290]
  at 
 mx.managers::DragManager$/doDrag()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\DragManager.as:303]
  at spark.components::List/dragStartHandler()[E:\dev\4.5.1 
 \frameworks\project s\spark\src\spark\components\List.as:1635]
  at flash.events::EventDispatcher/dispatchEventFunction()
  at flash.events::EventDispatcher/dispatchEvent()
  at 
 mx.core::UIComponent/dispatchEvent()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:13128]
  at 
 spark.components::List/mouseMoveHandler()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\List.as:1907]
 
 
 
 
 Garry Schafer
 grimmwerks
 gr...@grimmwerks.com
 portfolio: www.grimmwerks.com/
 
 
 
 
 
 
 
 
 Garry Schafer
 grimmwerks
 gr...@grimmwerks.com
 portfolio: www .grimmwerks.com/
 
 
 
 
 
 
 
 

Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/







[flexcoders] question regarding ports and crossdomain / security

2011-08-04 Thread grimmwerks
Ok - so far we've had an application that uses stomp for messaging over port 
61616 -- with a crossdomain being served at 843 as it should because the socket 
connection was in the higher range;  now we want to shift it so that we use 
stomp over 443 (https) because some companies block the upper ports -- should 
then the crossdomain be set at 80 with secure=true?




Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/







[flexcoders] loading socket policy files from port 80.

2011-08-04 Thread grimmwerks
Ok - slight modification to original question.

Can I load a socket policy file (usually served on port 843) via port 80?  ie

Security.loadPolicyFile(http:domain.com/crossdomain.xml);

And this will allow connectivity to ports 61613


Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/







[flexcoders] urgent: socket communications at port 443?

2011-08-04 Thread grimmwerks

Is it possible to use a normal socket at 443 (apache not binding the port) 
while loading a crossdomain at 80 such as this:

cross-domain-policy
site-control permitted-cross-domain-policies=master-only/
allow-access-from domain=* to-ports=*/
/cross-domain-policy


We can't seem to get a connection:

grimmwerks
Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox 
violation: http://mix.investlab.com/demo/MixClient.swf cannot load data from 
mix.investlab.com:443.

Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/







Re: [flexcoders] Re: urgent: socket communications at port 443?

2011-08-04 Thread grimmwerks
Yes set it to be false:


OK: Root-level SWF loaded: http://mix.investlab.com/demo/MixClient.swf
OK: Searching for allow-access-from in policy files to authorize data loading 
from resource at xmlsocket://mix.investlab.com:443 by requestor from 
http://mix.investlab.com/demo/MixClient.swf
Warning: Ignoring 'secure' attribute in policy file from 
http://mix.investlab.com/crossdomain.xml.  The 'secure' attribute is only 
permitted in HTTPS and socket policy files.  See 
http://www.adobe.com/go/strict_policy_files for details.
OK: Policy file accepted: http://mix.investlab.com/crossdomain.xml
Warning: Timeout on xmlsocket://mix.investlab.com:443 (at 3 seconds) while 
waiting for socket policy file.  This should not cause any problems, but see 
http://www.adobe.com/go/strict_policy_files for an explanation.
Error: Request for resource at xmlsocket://mix.investlab.com:443 by requestor 
from http://mix.investlab.com/demo/MixClient.swf is denied due to lack of 
policy file permissions.
OK: Root-level SWF loaded: file:///Users/grimm/Library/Application 
Support/Firefox/Profiles/nw7lgsi8.default/extensions/flash...@coursevector.com/chrome/content/flashbug/version.swf
OK: Root-level SWF loaded: file:///Users/grimm/Library/Application 
Support/Firefox/Profiles/nw7lgsi8.default/extensions/flash...@coursevector.com/chrome/content/flashbug/version.swf
OK: Root-level SWF loaded: http://community.adobe.com/help/badge/proxy/proxy.swf



On Aug 4, 2011, at 6:21 PM, nagaofthesea wrote:

 Howdy-
 
 A pure shot in the dark:  Have you tried also explicitly setting the secure 
 attribute to what you it to be?
 
 Cheers,
 Naga
 
 --- In flexcoders@yahoogroups.com, grimmwerks grimm@... wrote:
 
 
 Is it possible to use a normal socket at 443 (apache not binding the port) 
 while loading a crossdomain at 80 such as this:
 
 cross-domain-policy
 site-control permitted-cross-domain-policies=master-only/
 allow-access-from domain=* to-ports=*/
 /cross-domain-policy
 
 
 We can't seem to get a connection:
 
 grimmwerks
 Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox 
 violation: http://mix.investlab.com/demo/MixClient.swf cannot load data from 
 mix.investlab.com:443.
 
 Garry Schafer
 grimmwerks
 grimm@...
 portfolio: www.grimmwerks.com/
 
 
 
 
 
 
 
 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location: 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
 
 
 

Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/







[flexcoders] Flash to iPhone now?

2010-09-09 Thread grimmwerks
http://www.tuaw.com/2010/09/09/apple-loosens-reigns-allows-3rd-party-ios-dev-tools-with-caveat/


Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/







[flexcoders] couple questions about android / air

2010-09-02 Thread grimmwerks
I have been trying to code an android app in java and decided to take a look at 
air; I've read some things and need to be clarified about a few items:

1) does the android phone need to have some sort of 'air' installed on it?  It 
seems as if compiling makes a regular .apk but I've also read that there was 
something necessary on a phone...

2) Flex 4 can or can't create the necessary projects? Awhile back it was 
necessary to start with a flash project but unsure where that stands now.

3) does an android / air app have all the same framework intents that a java 
app would? For example, I'm dealing specifically with something that works with 
Alarm Manager; I'd normally set up an intent that would repond to my 
Alarmmanager setup, and it would respond when fired; air projects work the same 
way?

Appreciate any quick answers; as these things sometimes go am under the gun 
with multiple projects.

Thanks!


Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/






[flexcoders] TextFlow CSSFormat Resolver...

2010-08-28 Thread grimmwerks
I've got a lot of little TextFormats sprinkled throughout an application in 
other components, itemRenderers and the like.. 

is there a way I can use the application's css as the css for a 
CSSFormatResolver?  How does one get what external css is attributed to an app?

Thanks all



Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/







[flexcoders] RichText: setting divs to css styleNames?

2010-08-26 Thread grimmwerks
Hey - I've got a Richtext item that I'd like to have sections of text attribute 
to styleNames within the main css file -- how exactly would I do that? Set a 
div clas='myText'  and then have a .myText{}  item in the css?


Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/







Re: [flexcoders] intro + good Flex reference book?

2010-08-10 Thread grimmwerks
Roy! Just noticed you man.


On Jun 9, 2010, at 1:41 PM, Roy Pardi wrote:

 Hi all,
 
 Just joined this group/list and am getting up to speed with Flex 4 + AIR.
 I'm coming from many years working with Director/Lingo, along with a fair
 amount of experience with AS3 + C++. I like Flex so far but am still
 figuring out working methods that are flexible and make logical sense to
 me. I'm using Flash Builder trial for now.
 
 I was wondering if anyone can recommend a good Flex book that is on the
 level of Colin Moock's Essential Actionscript 3? In other words,
 something that isn't primarily project building tutorial-based but instead
 presents in-depth discussion of components and classes, the various
 frameworks (PureMVC, etc.) why choose one approach over another, best
 practices, etc. I ask because the thing that is hardest to get my head
 around is more architectural than syntax etc.
 
 Also, do most people use some form of code behind rather than loading code
 into CDATA script blocks?
 
 
 thanks for any pointers,
 
 --Roy
 
 
 -- 
 -
 http://www.roypardi.com/
 
 
 
 
 
 
 
 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location: 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
 
 
 

Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/







[flexcoders] flex 4 TabBar skinning...

2010-08-10 Thread grimmwerks
Trying to find a few examples for skinning the Buttons in a Tab bar, but the 
ones I've found don't seem to do it...


Anyone have an idea?

Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/







[flexcoders] Flash Builder: CSS design view?

2010-06-07 Thread grimmwerks
In Flex 3 while working on a CSS file we could see the design view and get a 
preview of the component we were setting properties on; in Flash Builder that 
view seems to be gone?



Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/







Re: [flexcoders] Flash Builder: CSS design view?

2010-06-07 Thread grimmwerks
Ah - just realized; if you have the CSS already set as style, all changes 
happen automatically...


On Jun 7, 2010, at 11:08 AM, grimmwerks wrote:

 
 
 In Flex 3 while working on a CSS file we could see the design view and get a 
 preview of the component we were setting properties on; in Flash Builder that 
 view seems to be gone?
 
 
 
 Garry Schafer
 grimmwerks
 gr...@grimmwerks.com
 portfolio: www .grimmwerks.com/
 
 
 
 
 
 
 
 

Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/







Re: [flexcoders] Flash Builder: CSS design view?

2010-06-07 Thread grimmwerks
Actually - seems odd to me; seems like I have to set properties on a component 
itself to see it 'live' then I hit 'save to CSS' -- and it's only *then* that 
it's getting written to a CSS file?

CSS files have no code hinting so of course I've got NO clue what is CSS-able 
in a component in that view?!?

On Jun 7, 2010, at 11:19 AM, grimmwerks wrote:

 
 
 Ah - just realized; if you have the CSS already set as style, all changes 
 happen automatically...
 
 
 On Jun 7, 2010, at 11:08 AM, grimmwerks wrote:
 
 
 
 In Flex 3 while working on a CSS file we could see the design view and get a 
 preview of the component we were setting propert ies on; in Flash Builder 
 that view seems to be gone?
 
 
 
 Garry Schafer
 grimmwerks
 gr...@grimmwerks.com
 portfolio: www .grimmwerks.com/
 
 
 
 
 
 
 
 
 Garry Schafer
 grimmwerks
 gr...@grimmwerks.com
 portfolio: www .grimmwerks.com/
 
 
 
 
 
 
 
 

Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/







[flexcoders] no autocomplete for CSS in external file?

2010-06-07 Thread grimmwerks
Ok, maybe it's me. 

I'm used to working in the CSS Design View in FB3 and being able to create CSS 
on a class and see it right there...

Now it seems that if I'm working with an external CSS file, I can't 
autocomplete ANYTHING... so my choice is to go into the regular design view, 
futz with whatever elements I want to change and then hit 'external CSS' -- but 
I want to be sure that anything I do there DOESN'T get saved with the regular 
MXML code if the application is already tied to that file?

I just am amazed to be the only person who's had this issue.


Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/







Re: [flexcoders] no autocomplete for CSS in external file?

2010-06-07 Thread grimmwerks
Unbelievable that no one used the CSS Design view...

On Jun 7, 2010, at 2:26 PM, grimmwerks wrote:

 
 
 Ok, maybe it's me. 
 
 I'm used to working in the CSS Design View in FB3 and being able to create 
 CSS on a class and see it right there...
 
 Now it seems that if I'm working with an external CSS file, I can't 
 autocomplete ANYTHING... so my choice is to go into the regular design view, 
 futz with whatever elements I want to change and then hit 'external CSS' -- 
 but I want to be sure that anything I do there DOESN'T get saved with the 
 regular MXML code if the application is already tied to that file?
 
 I just am amazed to be the only person who's had this issue.
 
 
 Garry Schafer
 grimmwerks
 gr...@grimmwerks.com
 portfolio: www.grimmwerks.com/
 
 
 
 
 
 
 
 

Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/







[flexcoders] FMS install issues....

2010-03-17 Thread grimmwerks
Not quite Flex but related...


I'm having issues with installing my FMS setup on gnu linux -- I'm getting the 
old nspr libraries not found... the strange thing is that I *do* have them 
installed, and can find them via locate...
..but for some reason ldd fmscore does not find them at all 

[ps22094]$ sudo updatedb 
[ps22094]$ locate libnspr4.so 
/usr/lib /libnspr4.so 
/usr/lib /libnspr4.so.0d 
[ps22094]$ locate libplc4.so 
/usr/lib /libplc4.so 
/usr/lib /libplc4.so.0d 
[ps22094]$ locate libasneu.so.1 
/home/grimmwerks/FMS_3_5_1_r516 /libasneu.so.1 
/lib /libasneu.so.1 
/opt/adobe/fms /libasneu.so.1 
/usr/lib /libasneu.so.1 
[ps22094]$ locate libplds4.so 
/usr/lib /libplds4.so 
/usr/lib /libplds4.so.0d 
[ps22094]$ ldd fmscore 
linux-gate.so.1 = (0xe000) 
libpthread.so.0 = /lib32 /libpthread.so.0 (0xf76ed000) 
libnspr4.so = not found 
libplc4.so = not found 
libplds4.so = not found 
libasneu.so.1 = not found 
librt.so.1 = /lib32 /librt.so.1 (0xf76e4000) 
libdl.so.2 = /lib32 /libdl.so.2 (0xf76e) 
libstdc++.so.6 = /usr/lib32/libstdc++.so.6 (0xf75fd000) 
libm.so.6 = /lib32 /libm.so.6 (0xf75d8000) 
libgcc_s.so.1 = /usr/lib32 /libgcc_s.so.1 (0xf75cd000) 
libc.so.6 = /lib32 /libc.so.6 (0xf74a2000) 
/lib /ld-linux.so.2 (0xf770c000)



Garry Schafer
grimmwerks
gr...@grimmwerks.com
portfolio: www.grimmwerks.com/







Re: [flexcoders] Re: Flex/Flash dev without FlexBuilder / FDT

2009-12-26 Thread grimmwerks
Hmm -- I'm actually digging this myself... thanks guys; the projectsprouts 
looks really interesting, having been dabbling in ror myself





[flexcoders] help with a php call

2009-10-29 Thread grimmwerks
Ok - an app I'm working on needs to have a watermarked image; if you  
click on this in the browser:


http://creativity-online.com/api/image_watermark.php?workId=17593

It works fine.  But I can't figure out how to setup the same thing in  
Flex, preferably using an HttpService..?


I mean I could pop open a new browser window with the constructed ip  
in order to force downloadin -- but am I incorrect that I should be  
able to do it with httpService?



Thanks

Re: [flexcoders] help with a php call

2009-10-29 Thread grimmwerks
Argh.  Still can't figure this out; seems really simple to call a php  
file which forces download -- why can't I then do the same thing in  
httpService?



On Oct 29, 2009, at 4:44 PM, grimmwerks wrote:




Ok - an app I'm working on needs to have a watermarked image; if you  
click on this in the browser:


http://creativity-online.com/api/image_watermark.php?workId=17593

It works fine.  But I can't figure out how to setup the same thing  
in Flex, preferably using an HttpService..?


I mean I could pop open a new browser window with the constructed ip  
in order to force downloadin -- but am I incorrect that I should be  
able to do it with httpService?



Thanks







Re: [flexcoders] Re: embeding fonts of a style (Interstate RegularCondensed)

2009-10-07 Thread grimmwerks
Found this about embedding font families and how using the Embed tag  
might not be seen by CSS:


http://www.kirupa.com/forum/archive/index.php/t-257913.html

On Oct 7, 2009, at 9:04 AM, artur_desig2dev wrote:




we are having the same issue but with applying styles to Interstate  
Light:

but we're trying to get this to work in AS3 ..and not FLEX..

first we tried doing it this way..

[Embed(source=../fonts/Interstate-Light.ttf, fontName=Interstate- 
Light, mimeType=application/x-font-truetype)]

public static const InterstateTTF:String;

[Embed(source=../fonts/Interstate-Bold.ttf, fontWeight=bold,  
fontName=Interstate-Bold, mimeType=application/x-font-truetype)]

public static const InterstateBoldTTF:String;

[Embed(source=../fonts/Interstate-Italic.ttf, fontStyle=italic,  
fontName=Interstate-Italic, mimeType=application/x-font-truetype)]

public static const InterstateItalicTTF:String;


var defaultStyle:Object = new Object();
defaultStyle.fontFamily = Interstate;

var style:StyleSheet = new StyleSheet();
style.setStyle(.defaultStyle, defaultStyle);

var t:TextField = new TextField();
t.embedFonts = true;
t.styleSheet = style;
t.htmlText = span class='defaultStyle'My bbold/b text/span;


then we also tried it using CSS and embedding the font in a swf:


package
{
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.text.*;

[SWF(width='955', height='600', backgroundColor='#FF',  
framerate='24')]


public class Index extends Sprite
{
[Embed(
source=font.swf,
symbol=InterstateLight
)]
 nb sp;  private var Interstate:Class;

public function Index()
{

Font.registerFont(Interstate-Light);

var style:StyleSheet = new StyleSheet();

  var normal:Object = new Object();
normal.color = #FF4900;
normal.fontFamily = Interstate-Light;
   nbs p;normal.fontLeading = 2;
normal.fontSize = 11;

var bold:Object = new Object();
bold.color = #FF4900;
bold.fontFamily = Interstate-Bold;
bold.fontLeading = 2;
bold.fontSize = 11;
bold.fontWeight = bold;

var italic:Object = new Object();
italic.color = #FF4900;
 italic.fontFamily = Interstate-Italic;
italic.fontLeading = 2;
italic.fontSize = 11;
italic.fontStyle = italic;

style.setStyle(.normal, normal);
style.setStyle(.italic, italic);
style.setStyle(.bold, bold);

var label:TextField = new TextField();
  ;   label.antiAliasType = AntiAliasType.ADVANCED;
label.autoSize = TextFieldAutoSize.LEFT;
//label.embedFonts = true;
label.multiline = true;
label.styleSheet = style;
label.htmlText = span class='italic'HOLA HOLA HOLA  
HOLA HOLAbrHOLA  DDDbrfont  
color='#00'HOLAAA/font/span;

addChild(label);

var tf:TextForm at = new TextFormat(Interstate-Light,  
11)

var label1:TextField = new TextField();
label1.defaultTextFormat = tf;
label1.antiAliasType = AntiAliasType.ADVANCED;
label1.autoSize = TextFieldAutoSize.LEFT;
label1.embedFonts = true;
label1.multiline = true;
label1.htmlText = HOLA HOLA HOLA HOLA HOLA;
   label1.y = 100;
addChild(label1);
}
}
}


any ideas?!
time sensitive project.. thanks







Re: [flexcoders] Re: embeding fonts of a style (Interstate RegularCondensed)

2009-10-07 Thread grimmwerks
Has *no one* got any information on how to embed a font that is not a  
regular style?


I'm actually now opening up this font in FontLab and attempting to  
save it as it's own .ttf -- but it still thinks there's no 'normal'  
font for this type even though I'm saving it as such.  *REALLY*  
pissing me off.


Would appreciate a working example if anyone has one, PLEASE.


On Oct 7, 2009, at 2:09 PM, grimmwerks wrote:




Found this about embedding font families and how using the Embed tag  
might not be seen by CSS:


http://www.kirupa.com/forum/archive/index.php/t-257913.html

On Oct 7, 2009, at 9:04 AM, artur_desig2dev wrote:




we are having the same issue but with applying styles to Interstate  
Light:

but we're trying to get this to work in AS3 ..and not FLEX..

first we tried doing it this way..

[Embed(source=../fonts/Interstate-Light.ttf, fontName=Interstate- 
Light, mimeType=application/x-font-truetype)]

public static const InterstateTTF:String;

[Embed(source=../fonts/Interstate-Bold.ttf, fontWeight=bold,  
fontName=Interstate-Bold, mimeType=application/x-font-truetype)]

public static const InterstateBoldTTF:String;

[Embed(source=../fonts/Interstate-Italic.ttf, fontStyle=italic,  
fontName=Interstate-Italic, mimeType=application/x-font- 
truetype)]

public static const InterstateItalicTTF:String;


var defaultStyle:Object = new Object();
defaultStyle.fontFamily = Interstate;

var style:StyleSheet = new StyleSheet();
style.setStyle(.defaultStyle, defaultStyle);

var t:TextField = new TextField();
t.embedFonts = true;
t.styleSheet = style;
t.htmlText = span class='defaultStyle'My bbold/b text/span;


then we also tried it using CSS and embedding the font in a swf:


package
{
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.text.*;

[SWF(width='955', height='600', backgroundColor='#FF',  
framerate='24')]


public class Index extends Sprite
{
[Embed(
source=font.swf,
symbol=InterstateLight
)]
 nb sp;  private var Interstate:Class;

public function Index()
{

Font.registerFont(Interstate-Light);

var style:StyleSheet = new StyleSheet();

  var normal:Object = new Object();
normal.color = #FF4900;
normal.fontFamily = Interstate-Light;
   nbs p;normal.fontLeading = 2;
normal.fontSize = 11;

var bold:Object = new Object();
bold.color = #FF4900;
bold.fontFamily = Interstate-Bold;
bold.fontLeading = 2;
bold.fontSize = 11;
bold.fontWeight = bold;

var italic:Object = new Object();
italic.color = #FF4900;
 italic.fontFamily = Interstate-Italic;
italic.fontLeading = 2;
italic.fontSize = 11;
italic.fontStyle = italic;

style.setStyle(.normal, normal);
style.setStyle(.italic, italic);
style.setStyle(.bold, bold);

var label:TextField = new TextField();
  ;   label.antiAliasType = AntiAliasType.ADVANCED;
label.autoSize = TextFieldAutoSize.LEFT;
//label.embedFonts = true;
label.multiline = true;
label.styleSheet = style;
label.htmlText = span class='italic'HOLA HOLA HOLA  
HOLA HOLAbrHOLA  DDDbrfont  
color='#00'HOLAAA/font/span;

addChild(label);

var tf:TextForm at = new TextFormat(Interstate-Light,  
11)

var label1:TextField = new TextField();
label1.defaultTextFormat = tf;
label1.antiAliasType = AntiAliasType.ADVANCED;
label1.autoSize = TextFieldAutoSize.LEFT;
label1.embedFonts = true;
label1.multiline = true;
label1.htmlText = HOLA HOLA HOLA HOLA HOLA;
   label1.y = 100;
addChild(label1);
}
}
}


any ideas?!
time sensitive project.. thanks











Re: [flexcoders] Re: embeding fonts of a style (Interstate RegularCondensed)

2009-10-07 Thread grimmwerks
Spoke too soon - converting the font to .ttf and then embedding it did  
the trick:


 [Embed(source=styles/assets/InterRegCom.ttf,
fontName=EmbeddedFont,
mimeType=application/x-font)]
private var EmbeddedFont:Class;


On Oct 7, 2009, at 7:06 PM, grimmwerks wrote:




Found this about embedding font families and how using the Embed tag  
might not be seen by CSS:


http://www.kirupa.com/forum/archive/index.php/t-257913.html

On Oct 7, 2009, at 9:04 AM, artur_desig2dev wrote:




we are having the same issue but with applying styles to Interstate  
Light:

but we're trying to get this to work in AS3 ..and not FLEX..

first we tried doing it this way..

[Embed(source=../fonts/Interstate-Light.ttf, fontName=Interstate- 
Light, mimeType=application/x-font-truetype)]

public static const InterstateTTF:String;

[Embed(source=../fonts/Interstate-Bold.ttf, fontWeight=bold,  
fontName=Interstate-Bold, mimeType=application/x-font-truetype)]

public static const InterstateBoldTTF:String;

[Embed(source=../fonts/Interstate-Italic.ttf, fontStyle=italic,  
fontName=Interstate-Italic, mimeType=application/x-font- 
truetype)]

public static const InterstateItalicTTF:String;


var defaultStyle:Object = new Object();
defaultStyle.fontFamily = Interstate;

var style:StyleSheet = new StyleSheet();
style.setStyle(.defaultStyle, defaultStyle);

var t:TextField = new TextField();
t.embedFonts = true;
t.styleSheet = style;
t.htmlText = span class='defaultStyle'My bbold/b text/span;


then we also tried it using CSS and embedding the font in a swf:


package
{
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.text.*;

[SWF(width='955', height='600', backgroundColor='#FF',  
framerate='24')]


public class Index extends Sprite
{
[Embed(
source=font.swf,
symbol=InterstateLight
)]
 nb sp;  private var Interstate:Class;

public function Index()
{

Font.registerFont(Interstate-Light);

var style:StyleSheet = new StyleSheet();

  var normal:Object = new Object();
normal.color = #FF4900;
normal.fontFamily = Interstate-Light;
   nbs p;normal.fontLeading = 2;
normal.fontSize = 11;

var bold:Object = new Object();
bold.color = #FF4900;
bold.fontFamily = Interstate-Bold;
bold.fontLeading = 2;
bold.fontSize = 11;
bold.fontWeight = bold;

var italic:Object = new Object();
italic.color = #FF4900;
 italic.fontFamily = Interstate-Italic;
italic.fontLeading = 2;
italic.fontSize = 11;
italic.fontStyle = italic;

style.setStyle(.normal, normal);
style.setStyle(.italic, italic);
style.setStyle(.bold, bold);

var label:TextField = new TextField();
  ;   label.antiAliasType = AntiAliasType.ADVANCED;
label.autoSize = TextFieldAutoSize.LEFT;
//label.embedFonts = true;
label.multiline = true;
label.styleSheet = style;
label.htmlText = span class='italic'HOLA HOLA HOLA  
HOLA HOLAbrHOLA  DDDbrfont  
color='#00'HOLAAA/font/span;

addChild(label);

var tf:TextForm at = new TextFormat(Interstate-Light,  
11)

var label1:TextField = new TextField();
label1.defaultTextFormat = tf;
label1.antiAliasType = AntiAliasType.ADVANCED;
label1.autoSize = TextFieldAutoSize.LEFT;
label1.embedFonts = true;
label1.multiline = true;
label1.htmlText = HOLA HOLA HOLA HOLA HOLA;
   label1.y = 100;
addChild(label1);
}
}
}


any ideas?!
time sensitive project.. thanks











[flexcoders] embeding fonts of a style (Interstate RegularCondensed)

2009-10-06 Thread grimmwerks

This has been driving me crazy for quite some time.

I'm trying to embed this font:

PostScript name Interstate-RegularCondensed
Full name   Interstate-RegularCondensed
Family  Interstate
Style   RegularCondensed
KindPostScript Type1
Version 001.000
Location/Library/Fonts/Interstate RegularCondensed
Unique name Interstate-RegularCondensed

And trying to do so in various ways - both as a class and in css but  
it's just *not* working.


For example, neither this:

@font-face
{
fontFamily: Interstate;
fontWeight: normal;
fontStyle: RegularCondensed;
src: local(Interstate);
}


nor this:

 [Embed(systemFont=Interstate, fontName=Interstate,  
fontStyle=RegularCondensed, mimeType=application/x-font)]

  private var Interstate:Class;

work at all -- I just can't get this simple font to show up; not even  
as a .ttf locally.  I'd be happy to send someone the font and ask them  
to show me how best to embed it,

cause it just ain't liking me

[flexcoders] matrix math help

2009-08-21 Thread grimmwerks
I'm building a sort of image zoomer/viewer -- you've seen it all  
before -- one large image that scales with a smaller image showing the  
full image. As you zoom into the large image, the smaller 'viewer'  
shows a square showing the area that is being viewed in the larger  
view. Dig?


Ok -- so I've got the smallbox scaling down while the larger scales up  
- and the views coincide, working perfectly.


But when I have the drag able  small area move around - the larger  
view does NOT display the same area.


I've tried more extravagant ways of trying this - creating a new  
matrix, scaling to the large image, then translating the smaller rects  
negative of the x and y of the smaller view - but nothing works.


I've tried this simple example - and in this case the 'test' is a  
canvas I'm using to just make sure that the smaller matrix is sound:


private function boxMouseDrag(e:MouseEvent):void{
borderBox.transform = box.transform;
var smM:Matrix = 
borderBox.transform.matrix.clone();
smM.invert();
//logit(small:  +smM.toString());
//logit(big:  + 
big.transform.matrix.toString());
big.transform.matrix=smM;

smM.invert();
test.transform.matrix = smM;
}


But the larger one is way off.

An example can be seen at 
http://grimmwerks.com/player/creativity-online.com/player.html

I'd really appreciate any help you can offer; I don't know why it's  
off. I'm guessing that I have to scale the larger matrix even *more*.





Re: [flexcoders] matrix math help

2009-08-21 Thread grimmwerks

Argh. Sorry about that. Changed to the real link rather than dev.



On Aug 21, 2009, at 1:25 PM, Wesley Acheson wrote:




Just FYI we can't view that without a username / password

On Fri, Aug 21, 2009 at 7:03 PM, grimmwerks gr...@grimmwerks.com  
wrote:



I'm building a sort of image zoomer/viewer -- you've seen it all  
before -- one large image that scales with a smaller image showing  
the full image. As you zoom into the large image, the smaller  
'viewer' shows a square showing the area that is being viewed in the  
larger view. Dig?


Ok -- so I've got the smallbox scaling down while the larger scales  
up - and the views coincide, working perfectly.


But when I have the drag able  small area move around - the larger  
view does NOT display the same area.


I've tried more extravagant ways of trying this - creating a new  
matrix, scaling to the large image, then translating the smaller  
rects negative of the x and y of the smaller view - but nothing works.


I've tried this simple example - and in this case the 'test' is a  
canvas I'm using to just make sure that the smaller matrix is sound:


private function boxMouseDrag(e:MouseEvent):void{
borderBox.transform = box.transform;
var smM:Matrix = 
borderBox.transform.matrix.clone();
smM.invert();
//logit(small:  +smM.toString());
//logit(big:  + 
big.transform.matrix.toString());
big.transform.matrix=smM;

smM.invert();
test.transform.matrix = smM;
}


But the larger one is way off.

An example can be seen at 
http://grimmwerks.com/player/creativity-online.com/player.html

I'd really appreciate any help you can offer; I don't know why it's  
off. I'm guessing that I have to scale the larger matrix even *more*.













[flexcoders] VideoDisplay smoothing and autoPlay

2009-08-06 Thread grimmwerks
Well I've followed countless examples to add smoothing to flex by  
extending VideoDisplay, but for some reason setting the autoPlay to be  
false doesn't change the videoDisplay autoPlay.


Anybody have any ideas?

import flash.display.DisplayObject;

import mx.controls.VideoDisplay;
import mx.controls.videoClasses.VideoPlayer;
import mx.managers.IFocusManagerComponent;

	public class SmoothVideo extends VideoDisplay implements  
IFocusManagerComponent

{
public var smoothing:Boolean=false;
public var deblocking:int=0;

public function SmoothVideo()
{
super();
}

override public function 
addChild(child:DisplayObject):DisplayObject
{
var video:VideoPlayer = VideoPlayer(child);
video.smoothing=smoothing;
video.deblocking=deblocking;

return super.addChild(child);
}
}
}

Re: [flexcoders] VideoDisplay smoothing and autoPlay

2009-08-06 Thread grimmwerks


Ok I see in the original mx.controls.VideoDisplay it checks autoplay  
and either plays or loads the video -- however why can't I override  
this function?


private function autoPlaying():void
{
if (_source)
{
// Start playing or loading.
if (_autoPlay)
play();
else
load();

// Seek to playheadTime now if specified.
if (!isNaN(_playheadTime))
{
asCuePointIndexResetPending = Boolean(_playheadTime  
= 0);

videoPlayer.seek(_playheadTime);
}
}
}


















On Aug 6, 2009, at 8:39 AM, grimmwerks wrote:




Well I've followed countless examples to add smoothing to flex by  
extending VideoDisplay, but for some reason setting the autoPlay to  
be false doesn't change the videoDisplay autoPlay.


Anybody have any ideas?

import flash.display.DisplayObject;

import mx.controls.VideoDisplay;
import mx.controls.videoClasses.VideoPlayer;
import mx.managers.IFocusManagerComponent;

	public clas s SmoothVideo extends VideoDisplay implements  
IFocusManagerComponent

{
public var smoothing:Boolean=false;
public var deblock ing:int=0;

public function SmoothVideo()
{
super();
}

override public function 
addChild(child:DisplayObject):DisplayObject
{
var video:VideoPlayer = VideoPlayer(child);
video.smoothing=smoothing;
video.deblocking=deblocking;

return super.addChild(child);
}
}
}







[flexcoders] error #2032

2009-08-04 Thread grimmwerks
hey - we're building a video player that pulls from sesamevault -- and  
for some reasons people in europe are experiencing an error #2032 that  
we're not seeing in any of our testing - I've been doing some googling  
but wondering why something that works in the US might have issues  
elsewhere in terms of #2032.


[flexcoders] extending tileList - pagination

2009-07-27 Thread grimmwerks
Hey all - I'm extending tilelist and am displaying a 3x2 grid (6  
items) - I'm trying to see if there's currently a way to display the  
next/previous 6 items - ie paging back and forthrather than just  
scrolling, which will always show some items of the current view  
rather than just 1 item if it's alone on a 'page'.

I figure the easiest thing is to abscond the dataprovider and and  
parse it out internally -- but even looking through TileBase I can't  
quite figure out the best way to grab that...

thougths?


[flexcoders] html scale embed

2009-07-22 Thread grimmwerks
Hey guys - am having trouble trying to figure out the way to properly  
scale a flex/flash app.

There's an overlay that needs to be set at a pixel size within this  
rather than a percentage because it's got a tileList with items that  
are of specific size as well...

Rather than write percentages for the whole thing why can't I have  
something that's say 800x600 and scale it down in the embed 400x300 -  
but whenever I do it's only showing the corner of the 800x600.

I've tried exactfit, noborder and default -- what am I missing? Much  
appreciated.


[flexcoders] HELP problems embedding a font

2009-07-16 Thread grimmwerks
I've got a font - Interstate-RegularCondensed  -- which I've tried  
embedding in a Flex app.  I've pointed to it, I've embedded in a swf,  
etc.  It seems to be ok - but when I look at from a computer that  
doesn't have this font, it's no go.


The thing is It's part of the Interstate family but it's own font  
within it -- ie folder structure:


Interstate:
InterReg
InterRegCom
InterRegCon
Interstate Black
Interstate BlackCompressed
Interstate BlackCondensed
Interstate BlackItalic
Interstate Bold
Interstate BoldCompressed
Interstate BoldCondensed
Interstate Light
Interstate LightCompressed
Interstate LightCondensed
Interstate LightItalic
Interstate Regular
Interstate RegularCompressed
Interstate RegularCondensed


and the css was this:
@font-face
{
fontFamily: Interstate-RegularCondensed;
fontWeight: normal;
fontStyle: normal;
/*src: local(Interstate);*/
/*src: url(/styles/fonts/InterstateRegularCondensed.ttf);*/
src:url('styles/assets/overlay_items.swf');
}


I get no errors but it just doesn't show up- HELP!

[flexcoders] tilelist rowCount not working...

2009-06-24 Thread grimmwerks
I'm using FB3 and setting a tileList's rowCount=2 in the mxml - but  
then once adding data it's definately 3 rows I see.

I've even tried adding tilelist.rowCount=2 on the dataChange but it's  
just not doing a THING.

Only other option is to set the data it loads in to only 2 rows-amount  
and 'paging' through but that just seems stupid...


Re: [flexcoders] tilelist rowCount not working...

2009-06-24 Thread grimmwerks
Argh.  No one's had this issue of setting a rowCount and it not being  
honored?


On Jun 24, 2009, at 2:14 PM, grimmwerks wrote:

 I'm using FB3 and setting a tileList's rowCount=2 in the mxml - but
 then once adding data it's definately 3 rows I see.

 I've even tried adding tilelist.rowCount=2 on the dataChange but it's
 just not doing a THING.

 Only other option is to set the data it loads in to only 2 rows-amount
 and 'paging' through but that just seems stupid...


 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location: 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo 
 ! Groups Links






Re: [flexcoders] Re: tilelist rowCount not working...

2009-06-24 Thread grimmwerks
Direction is horz., and it's at 100% within another view; but why  
would it have to spill into another row? Meaning it becomes a vertical  
scroll; if I'm not setting columnCount why would it not spill to the  
right and have a horizontal scroll?
On Jun 24, 2009, at 4:53 PM, Tim Hoff wrote:


 Assuming that the direction=horizontal, the rowCount should work;
 unless you are setting an explicit width and the number of items will
 spill into an additional row.  They have to go somewhere, right?  What
 happens if you remove the width property?

 -TH

 --- In flexcoders@yahoogroups.com, grimmwerks gr...@... wrote:

 Argh. No one's had this issue of setting a rowCount and it not being
 honored?


 On Jun 24, 2009, at 2:14 PM, grimmwerks wrote:

 I'm using FB3 and setting a tileList's rowCount=2 in the mxml - but
 then once adding data it's definately 3 rows I see.

 I've even tried adding tilelist.rowCount=2 on the dataChange but
 it's
 just not doing a THING.

 Only other option is to set the data it loads in to only 2
 rows-amount
 and 'paging' through but that just seems stupid...


 

 --
 Flexcoders Mailing List
 FAQ:
 http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location:
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf- 
 \
 1e62079f6847
 Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo
 ! Groups Links









 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location: 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo 
 ! Groups Links






Re: [flexcoders] Re: tilelist rowCount not working...

2009-06-24 Thread grimmwerks
Ugh. It appears it's something inherent with Flex 3, was abandoned and  
fixed in F4.

http://bugs.adobe.com/jira/browse/SDK-15335

On Jun 24, 2009, at 5:06 PM, grimmwerks wrote:

 Direction is horz., and it's at 100% within another view; but why
 would it have to spill into another row? Meaning it becomes a vertical
 scroll; if I'm not setting columnCount why would it not spill to the
 right and have a horizontal scroll?
 On Jun 24, 2009, at 4:53 PM, Tim Hoff wrote:


 Assuming that the direction=horizontal, the rowCount should work;
 unless you are setting an explicit width and the number of items will
 spill into an additional row.  They have to go somewhere, right?   
 What
 happens if you remove the width property?

 -TH

 --- In flexcoders@yahoogroups.com, grimmwerks gr...@... wrote:

 Argh. No one's had this issue of setting a rowCount and it not being
 honored?


 On Jun 24, 2009, at 2:14 PM, grimmwerks wrote:

 I'm using FB3 and setting a tileList's rowCount=2 in the mxml - but
 then once adding data it's definately 3 rows I see.

 I've even tried adding tilelist.rowCount=2 on the dataChange but
 it's
 just not doing a THING.

 Only other option is to set the data it loads in to only 2
 rows-amount
 and 'paging' through but that just seems stupid...


 

 --
 Flexcoders Mailing List
 FAQ:
 http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location:
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-
 \
 1e62079f6847
 Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo
 ! Groups Links









 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location: 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo
 ! Groups Links






 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location: 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo 
 ! Groups Links






Re: [flexcoders] argh: matrices and dragging

2009-06-20 Thread grimmwerks
It can't possibly -- ie what you're seeing under the small viewer when  
scaled down doesn't match the large view at all.


On Jun 20, 2009, at 11:21 AM, Aaron Hardy wrote:

 I guess you figured it out? Your demo works for me.

 Aaron

 grimmwerks wrote:


 Argh -- still struggling. What am I missing?



 On Jun 19, 2009, at 5:03 PM, grimmwerks wrote:



 But I need that to get the current state of the large transform  
 matrix.

 What I'm having problems with is this idea that the smaller area  
 maps
 to the larger area; in Director there was an actual map() function
 that doesn't seem to be in flash.

 It'd be great if the adobe guys could weigh in on this; ie I can't  
 be
 the only person having trouble with Matrices / Transforms otherwise
 I'd be getting a lot more responses.

 I'll try it as you say Thomas; thanks for responding.

 On Jun 19, 2009, at 4:28 PM, thomas parquier wrote:



 I think you should move

var bigM:Matrix = big.transform.matrix.clone();

 out of your box move handler, because box.x and box.y are positive
 even when moving to left or top.

 thomas
 ---
 http://www.web-attitude.fr/ http://www.web-attitude.fr/
 msn : thomas.parqu...@web-attitude.fr
 mailto:thomas.parqu...@web-attitude.fr
 softphone : sip:webattit...@ekiga.net
 mailto:sip%3awebattit...@ekiga.net
 téléphone portable : +33601 822 056


 2009/6/19 grimmwerks gr...@grimmwerks.com
 mailto:gr...@grimmwerks.com



I've got a little app that is the same old small viewer / large
image type thing we all know and love.


I've got a slider that sets the scale - ie when the user zooms
up, the large image zooms up and the 'box' canvas does the
invert so that it shows what view the user is seeing -- dig?

Now I'm trying to allow the user to move the small box around
and see that same view with the large image; I've tried the
following which ALMOST works --when the user moves the box to
the right (ie x++ and y++) the large image goes to the left; but
when the user moves it BACK the large image doesn't move back to
the right.

private function boxMouseDrag(e:MouseEvent):void{
borderBox.transform = box.transform;
var bigM:Matrix = big.transform.matrix.clone();
var boxM:Matrix = new Matrix();
boxM.translate(box.x, box.y);
boxM.invert();
bigM.concat(boxM);
big.transform.matrix = bigM;
//big.transform.matrix.translate(box.x, box.y);
out.text = dragging  + box.transform.matrix;
}


You can see an example here:

http://grimmwerks.com/examples/matrix/
http://grimmwerks.com/examples/matrix/

**next up how to make the small view box locked to the viewer
area in the startDrag...












 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location: 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo 
 ! Groups Links






[flexcoders] argh: matrices and dragging

2009-06-19 Thread grimmwerks
I've got a little app that is the same old small viewer / large image  
type thing we all know and love.


I've got a slider that sets the scale - ie when the user zooms up, the  
large image zooms up and the 'box' canvas does the invert so that it  
shows what view the user is seeing -- dig?


Now I'm trying to allow the user to move the small box around and see  
that same view with the large image; I've tried the following which  
ALMOST works --when the user moves the box to the right (ie x++ and y+ 
+) the large image goes to the left; but when the user moves it BACK  
the large image doesn't move back to the right.



private function boxMouseDrag(e:MouseEvent):void{
borderBox.transform = box.transform;
var bigM:Matrix = big.transform.matrix.clone();
var boxM:Matrix = new Matrix();
boxM.translate(box.x, box.y);
boxM.invert();
bigM.concat(boxM);
big.transform.matrix = bigM;
//big.transform.matrix.translate(box.x, box.y);
out.text = dragging  + box.transform.matrix;
}



You can see an example here:

http://grimmwerks.com/examples/matrix/

**next up how to make the small view box locked to the viewer area in  
the startDrag...

Re: [flexcoders] argh: matrices and dragging -- anybody?!? :(

2009-06-19 Thread grimmwerks


I'm sure there must be SOMEONE on here (adobe?) that can explain how  
transforms work from one box to another scaled box...?


On Jun 19, 2009, at 1:03 PM, grimmwerks wrote:




I've got a little app that is the same old small viewer / large  
image type thing we all know and love.


I've got a slider that sets the scale - ie when the user zooms up,  
the large image zooms up and the 'box' canvas does the invert so  
that it shows what view the user is seeing -- dig?


Now I'm trying to allow the user to move the small box around and  
see that same view with the large image; I've tried the following  
which ALMOST works --when the user moves the box to the right (ie x+ 
+ and y++) the large image goes to the left; but when the user moves  
it BACK the large image doesn't move back to the right.



private function boxMouseDrag(e:MouseEvent):void{
borderBox.transform = box.transform;
var bigM:Matrix = big.transform.matrix.clone();
var boxM:Matrix = new Matrix();
boxM.translate(box.x, box.y);
boxM.invert();
bigM.concat(boxM);
big.transform.matrix = bigM;
//big.transform.matrix.translate(box.x, box.y);
out.text = dragging  + box.transform.matrix;
}



You can see an example here:

http://grimmwerks.com/examples/matrix/

**next up how to make the small view box locked to the viewer area  
in the startDrag...








Re: [flexcoders] argh: matrices and dragging

2009-06-19 Thread grimmwerks

But I need that to get the current state of the large transform matrix.

What I'm having problems with is this idea that the smaller area maps  
to the larger area; in Director there was an actual map() function  
that doesn't seem to be in flash.


It'd be great if the adobe guys could weigh in on this; ie I can't be  
the only person having trouble with Matrices / Transforms otherwise  
I'd be getting a lot more responses.


I'll try it as you say Thomas; thanks for responding.

On Jun 19, 2009, at 4:28 PM, thomas parquier wrote:




I think you should move
var bigM:Matrix = big.transform.matrix.clone();
out of your box move handler, because box.x and box.y are positive  
even when moving to left or top.


thomas
---
http://www.web-attitude.fr/
msn : thomas.parqu...@web-attitude.fr
softphone : sip:webattit...@ekiga.net
téléphone portable : +33601 822 056


2009/6/19 grimmwerks gr...@grimmwerks.com


I've got a little app that is the same old small viewer / large  
image type thing we all know and love.



I've got a slider that sets the scale - ie when the user zooms up,  
the large image zooms up and the 'box' canvas does the invert so  
that it shows what view the user is seeing -- dig?


Now I'm trying to allow the user to move the small box around and  
see that same view with the large image; I've tried the following  
which ALMOST works --when the user moves the box to the right (ie x+ 
+ and y++) the large image goes to the left; but when the user moves  
it BACK the large image doesn't move back to the right.



private function boxMouseDrag(e:MouseEvent):void{
borderBox.transform = box.transform;
var bigM:Matrix = big.transform.matrix.clone();
var boxM:Matrix = new Matrix();
boxM.translate(box.x, box.y);
boxM.invert();
bigM.concat(boxM);
big.transform.matrix = bigM;
//big.transform.matrix.translate(box.x, box.y);
out.text = dragging  + box.transform.matrix;
}



You can see an example here:

http://grimmwerks.com/examples/matrix/

**next up how to make the small view box locked to the viewer area  
in the startDrag...









Re: [flexcoders] argh: matrices and dragging

2009-06-19 Thread grimmwerks

Argh -- still struggling. What am I missing?


On Jun 19, 2009, at 5:03 PM, grimmwerks wrote:




But I need that to get the current state of the large transform  
matrix.


What I'm having problems with is this idea that the smaller area  
maps to the larger area; in Director there was an actual map()  
function that doesn't seem to be in flash.


It'd be great if the adobe guys could weigh in on this; ie I can't  
be the only person having trouble with Matrices / Transforms  
otherwise I'd be getting a lot more responses.


I'll try it as you say Thomas; thanks for responding.

On Jun 19, 2009, at 4:28 PM, thomas parquier wrote:




I think you should move
var bigM:Matrix = big.transform.matrix.clone();
out of your box move handler, because box.x and box.y are positive  
even when moving to left or top.


thomas
---
http://www.web-attitude.fr/
msn : thomas.parqu...@web-attitude.fr
softphone : sip:webattit...@ekiga.net
téléphone portable : +33601 822 056


2009/6/19 grimmwerks gr...@grimmwerks.com


I've got a little app that is the same old small viewer / large  
image type thing we all know and love.



I've got a slider that sets the scale - ie when the user zooms up,  
the large image zooms up and the 'box' canvas does the invert so  
that it shows what view the user is seeing -- dig?


Now I'm trying to allow the user to move the small box around and  
see that same view with the large image; I've tried the following  
which ALMOST works --when the user moves the box to the right (ie x+ 
+ and y++) the large image goes to the left; but when the user  
moves it BACK the large image doesn't move back to the right.



private function boxMouseDrag(e:MouseEvent):void{
borderBox.transform = box.transform;
var bigM:Matrix = big.transform.matrix.clone();
var boxM:Matrix = new Matrix();
boxM.translate(box.x, box.y);
boxM.invert();
bigM.concat(boxM);
big.transform.matrix = bigM;
//big.transform.matrix.translate(box.x, box.y);
out.text = dragging  + box.transform.matrix;
}



You can see an example here:

http://grimmwerks.com/examples/matrix/

**next up how to make the small view box locked to the viewer area  
in the startDrag...













[flexcoders] matrix help

2009-06-18 Thread grimmwerks
Ok I must be having a brain fart here.

Imagine two opposing rectangles; as one scales UP the other scales  
DOWN - ie as one scales up 10% the other scales DOWN 10%.  How's the  
best way of doing that using matrices? I seriously must be missing  
something simple...




Re: [flexcoders] matrix help

2009-06-18 Thread grimmwerks
Argh.  Still can't get it - like if I have something coming in from 1  
to 4 (ie 1.1, 1.2, 1.3 etc) - I can make the one image scale UP fine  
but can't figure out how the other image scales down the same  
percentage...


On Jun 18, 2009, at 3:38 PM, grimmwerks wrote:

 Ok I must be having a brain fart here.

 Imagine two opposing rectangles; as one scales UP the other scales
 DOWN - ie as one scales up 10% the other scales DOWN 10%.  How's the
 best way of doing that using matrices? I seriously must be missing
 something simple...




 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location: 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo 
 ! Groups Links






[flexcoders] map function on image/loader?

2009-06-15 Thread grimmwerks
I could be nuts but I'm trying to track down if there's a map function  
in BitmapAsset or Loader; I'm trying to code a pan/zoom component with  
a small display of where the large visual of the image is showing (ie  
google maps and the like) -- and I could've sworn there was an  
automatic map function to make it easier...


Re: [flexcoders] Re: problems embedding symbols from Flash

2009-06-04 Thread grimmwerks
Thanks - it turns out I was doing something not too swift at all --  
think it was just not compiling for as2 or some idiocy.



On May 27, 2009, at 1:37 AM, Rohit Sharma wrote:




Will this help?

   http://jessewarden.com/2006/08/flash-9-button-in-flex-2.html

I use flash movieclip symbols in flex by linking to an external AS  
class and provide the symbol functionality in that class only.


Regards,
Rohit

On Tue, May 26, 2009 at 11:05 PM, a.scavarelli  
a.scavare...@yahoo.com wrote:



Is the symbol exported for actionscript in it's properties? And if  
so is the name amp_ok? or is it something like someclass.amp_ok?


I could not ever figure out how to link a symbol to an external as  
class and use it's extended functionality in Flex. I ended up just  
creating a component with all the external as within teh script tags.


Hopefully it's an easy fix like this for you :)



--- In flexcoders@yahoogroups.com, grimmwerks gr...@... wrote:

 Frustrated.

 I've got tried this with an AS3 version and currently with a Flash
 player 8 version... but am trying to embed a class within a  
component

 like so:

 [Bindable]
 [Embed(source=buttonStates/multistate8.swf, symbol=amp_ok)];
 private var tmp:Class;

 I get Metadata requires an associated definition

 The component is on the same level of buttonStates, so it's not a  
path

 issue; when I've attempted to test the flash file with a Button and
 using symbol as skins, it works no problem...\

 Thoughts?










[flexcoders] flex app on losing focus...

2009-06-04 Thread grimmwerks
I've got an application I created for a chain of stores, that when  
losing focus for a moment - ie when the admin flips to another  
interface -- upon return/getting focus, it draws it's entire interface  
again and basically takes a few seconds of receiving event dispatches  
to get into shape again.

I'm not sure how best to handle this as it seems it's something  
happening at the core of a flex app; but is there a way to 'force'  
flex/flash to keep getting updates while even in the background?


[flexcoders] problems embedding symbols from Flash

2009-05-26 Thread grimmwerks

Frustrated.

I've got tried this with an AS3 version and currently with a Flash  
player 8 version... but am trying to embed a class within a component  
like so:


[Bindable]
[Embed(source=buttonStates/multistate8.swf, symbol=amp_ok)];
private var tmp:Class;

I get Metadata requires an associated definition

The component is on the same level of buttonStates, so it's not a path  
issue; when I've attempted to test the flash file with a Button and  
using symbol as skins, it works no problem...\


Thoughts?

Re: [flexcoders] Docking AIR app in upper right corner of user's monitor?

2009-05-16 Thread grimmwerks

Well here's a link to an example of centering the app window:
http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetailsproductId=4postId=10446

In it:
nativeWindow.x = (Capabilities.screenResolutionX -  
nativeWindow.width) / 2;
nativeWindow.y = (Capabilities.screenResolutionY -  
nativeWindow.height) / 2;


so wonder if you can nativeWindow.right =Capabilities.screenResolutionX


On May 15, 2009, at 1:53 PM, Jeff Hindman wrote:

... is there a way to do this? I'm pretty sure I can do it with  
Zinc ...but this is Flexcoders, not Zinc-coders :)


Thanks,
--jake





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location: 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo 
! Groups Links








Re: [flexcoders] Docking AIR app in upper right corner of user's monitor?

2009-05-16 Thread grimmwerks

Yeah turns out not so tough - upon init()

nativeWindow.x= Capabilities.screenResolutionX-nativeWindow.width;
nativeWindow.y=0;


Kind of good for me too - going to do something growl-like I think...

On May 15, 2009, at 1:53 PM, Jeff Hindman wrote:

... is there a way to do this? I'm pretty sure I can do it with  
Zinc ...but this is Flexcoders, not Zinc-coders :)


Thanks,
--jake





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location: 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo 
! Groups Links








[flexcoders] dumb question gumbo beta...

2009-05-14 Thread grimmwerks
Where's the visuals for the CSS stuff? What am I missing?

I'm *sure* I'm doing something stupid because gumbo was supposed to be  
even *more* integrated with the visual/css side; so what am I missing?

Danke


Re: [flexcoders] Application Idea

2009-05-13 Thread grimmwerks
Hey you guys - go back to your folk singing; I think Mary is looking  
for y'all.

:P


On May 13, 2009, at 8:49 AM, Paul Andrews wrote:

 Well, I'm not the OP - just someone willing to make your clients  
 dreams come
 true and let you put tour feet up..  ;-)

 I have more than enough ideas, thanks (it's just the bank balance to  
 go with
 them that's the problem..)

 Paul

 Peter

 I have a few specs for upcoming client projects. How soon do you  
 think
 you can get them completed for me?

 Peter

 Very soon now once your wire to my bank account has  
 completed... ;-)

 Paul



[flexcoders] Examples of side TabNavigator?

2009-05-12 Thread grimmwerks
Hey - has anyone any links / info on possibly making a side Tab  
Navigator?   How best to override the createChildren?

Danke


Re: [flexcoders] Re: Examples of side TabNavigator?

2009-05-12 Thread grimmwerks
WOW - thanks - much prettier than the one I'd found from Tink.


On May 12, 2009, at 3:17 PM, nathanpdaniel wrote:

 Like this? http://merhl.com/?p=172

 --- In flexcoders@yahoogroups.com, grimmwerks gr...@... wrote:

 Hey - has anyone any links / info on possibly making a side Tab
 Navigator?   How best to override the createChildren?

 Danke





 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location: 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo 
 ! Groups Links






[flexcoders] air: file upload (to sesame vault)

2009-04-15 Thread grimmwerks
hey all

I'm building an air app that will upload to sesame vault (I hope).  It  
appears to work -- shows a file progress -- but upon completion throws  
a response that the user isn't logged in.  In speaking to someone at  
Sesame Vault I was told:

 As for the body - when you are making a post request the body must  
 be filled in.  In your case, its a multi-part encoded form  
 containing the actual data of the file you are uploading.


Is this the way that File.upload() works? I've been trying to watch  
sockets using Charles on the mac but couldn't tell exactly how the  
upload is going out...

Any help is greatly appreciated.


[flexcoders] as3 .swf loaded through as2 swf - will it work?

2009-02-11 Thread grimmwerks
Well... was doing a gig working on an FMS app -- and find out now that  
it needs to load in through a parent .swf  --- but the parent .swf is  
AS2 -- so now sure now if this is going to work...?


[flexcoders] NumericStepper not displaying it's value correctly...

2009-01-09 Thread grimmwerks
I've a numericStepper bound to a value in a component. When I  
Alert.show() it's value it reports the correct value - but it's  
inputField is NOT; it's inputField is showing the last values before  
the user cancels (and flips to a different view).  Upon the user  
hitting 'New' -- this is where I'm rebinding the stepper's value (sort  
of making sure) -- and at this point when I Alert the Stepper's true  
value and the value of the item being bound to - they are correct, but  
the number is wrong visually.

This is being set by a function - can I do some sort of  
updateDisplayList() on the NumericSteppers to get them to 'reset' so  
to speak?




Re: [flexcoders] Setting NumericStepper's label?

2009-01-05 Thread grimmwerks
Well it's BETTER, still off --  but the background isn't working then  
in the NumericStepper (see attached).

I think I might have to make other CSS classes -- ie I can't just do 4  
different styles, but might have to do 4 styles of NumericStepper, etc.

inline: pastedGraphic.png





On Jan 5, 2009, at 9:59 AM, Manish Jethani wrote:

On Mon, Jan 5, 2009 at 7:08 PM, grimmwerks gr...@grimmwerks.com  
wrote:



Both have the fontSize at 12, but for some reason the text in the
numericStepper isn't bottom aligned:

[snip]

What's throwing it off is the border settings. How about if you moved
the styleName setting from the Text and NumericStepper objects up to
the HBox?

Manish



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location: 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo 
! Groups Links








[flexcoders] Setting NumericStepper's label?

2009-01-05 Thread grimmwerks
Hey all - I'm having problems setting a NumericStepper's label to be even with a text object next to it:Both have the fontSize at 12, but for some reason the text in the numericStepper isn't bottom aligned:mx:HBox styleName="workForm" width="130" horizontalAlign="center" verticalAlign="bottom" >	mx:Text text="SELF:" selectable="false" width="100%" bottom="0"styleName="selfForm"	buttonMode="true" useHandCursor="true" />	mx:NumericStepper width="38" styleName="selfForm" id="work" maximum="25"/>/mx:HBox>I took out any of the data calls just to make this clearer.The shared CSS they use is this:.selfForm{	backgroundColor: #C3B318;	textAlign: right;	color: #FF;	borderStyle: solid;	cornerRadius: 3;	borderThickness: 0;	fontWeight: bold;	fontSize: 12;	verticalCenter: 0;	baseline: 0;	bottom: 0;	fontFamily: Helvetica;}Any help is greatly appreciated as this is driving me nuts; I've been looking at labelPlacement, the baseline, etc, but nothing seems to help.

[flexcoders] doug mccune's site down

2008-12-14 Thread grimmwerks
Hey Doug -- was trying to contact you through your site but got a 500  
server error -- for some reason I just can't compile your  
BouncingFisheye, but wanted to let you know about the server issue...




[flexcoders] McCune's ZOMG RSS

2008-12-06 Thread grimmwerks
Hey all - I love the way Doug McCune's ZOMG RSS app has done the  
macosx dock-like animation and am trying to compile with Flex 3.2 but  
keep getting errors about textFormat - thought it might be the older  
flexlib.swc which I overwrote -- but still can't compile.

Anyone have something similar working for Flex 3.2.


[flexcoders] McCune's RSS Reader / Mac OS X dock

2008-12-06 Thread grimmwerks
Hey all - I love the way Doug McCune's ZOMG RSS app has done the  
macosx dock-like animation and am trying to compile with Flex 3.2 but  
keep getting errors about textFormat - thought it might be the older  
flexlib.swc which I overwrote -- but still can't compile.

Anyone have something similar working for Flex 3.2?


[flexcoders] FMS SharedObject Array problem...

2008-10-22 Thread grimmwerks
What's wrong with this:


var ev = new Object({sender: this.user.username, message: str});
trace(got chat  + ev.message);
var h = this.application.so_Chat.getProperty(history);
h.push(ev);
this.application.so_Chat.setProperty(history, h);
var q = this.application.so_Chat.getProperty(history);
trace(q  + q.length);
trace(q[q.length].message);
trace(finished chat);
}

Ok - q.length traces out properly (ie as I add an item, it gets added  
properly, the length increases by 1) -- but the history[q].message is  
throwing an error.


[flexcoders] ARGH shared object array -- getting data

2008-10-22 Thread grimmwerks
This is driving me nuts -- an onSync of a shared object where  
'history'  is an array -- I can the listing of the array, and I get  
the length of the arraly, but I can't get each object in the array --  
what am I doing wrong?!??



private function chatSync(event:SyncEvent):void{
var arr:Array = new Array();
arr = so_Chat.data.history;
Alert.show('array ' + arr);
var ln:Number = arr.length;
Alert.show(length:  + ln);
var ob:Object = arr[Number(ln)];
Alert.show(ob.message);
Alert.show('message  ' + arr[ln].message);
}





Re: [flexcoders]

2008-10-09 Thread grimmwerks
Hrmmm... thanks for the picture of the bike.


[flexcoders] Flex, remote shared objects and functions...

2008-10-08 Thread grimmwerks

Can anyone tell me if stuff like this is possible:

so_Chat = SharedObject.getRemote(so_Chat, url, false);
so_Chat.onJump = function(str:String){trace(str)}


-- I thought I could set functions on a remote object? But I get  
errors in Flex.

[flexcoders] creating component that has change event

2008-08-21 Thread grimmwerks
Hey all -

I'm creating a searchBox component that's sort of like Safari's search  
(ie a button to delete the current text input) -- I'd like it to  
implement a change event for it in the larger app (ie  
change={fireStuff(event)}

And I do have it dispatching an Event.CHANGE but it doesn't seem to be  
valid.

Can anyone point out any docs on this? I'm even trying to trawl  
through the frameworks to see what I can discover...


[flexcoders] panel with linkbutton...

2008-08-15 Thread grimmwerks
Hey all - been looking for examples of adding a custom render to a  
panel; found one that might work by extending the original Panel; does  
someone have any other way to do it or examples?


Re: [flexcoders] panel with linkbutton...

2008-08-15 Thread grimmwerks

Sorry it was late... er... early.

Basically create a panel that has a custom headerRenderer - ie a  
button and Label in the header.



On Aug 15, 2008, at 7:49 AM, Howard Fore wrote:


Huh? What exactly are you trying to do?

On Fri, Aug 15, 2008 at 2:39 AM, grimmwerks [EMAIL PROTECTED]  
wrote:

Hey all - been looking for examples of adding a custom render to a
panel; found one that might work by extending the original Panel; does
someone have any other way to do it or examples?



--
Howard Fore, [EMAIL PROTECTED]
The universe tends toward maximum irony. Don't push it. - Jeff  
Atwood






Re: [flexcoders] JSON as dataprovider

2008-08-14 Thread grimmwerks
Excellent - thanks!
On Aug 14, 2008, at 1:19 AM, Fidel Viegas wrote:

 On Thu, Aug 14, 2008 at 5:54 AM, grimmwerks [EMAIL PROTECTED]  
 wrote:

 I've got a class that gets a JSON object - and within this JSON  
 object
 is a list of items.

 I'm trying to do what I think is very simple -- but I'm missing
 something -- being able to bind a tilelist to an array of this
 returned objects.items.

 I've tried manually parsing through these items and doing an
 addItem(return.items[i]) into an arraycollection - but this doesn't
 seem to be working at all.

 Any thoughts or examples please?

 Get the as3corelib (http://code.google.com/p/as3corelib/) and do the  
 following:

 import com.adobe.serialization.json.JSON;

 // get the results as JSON
 var results:String = String(httpService.lastResult);

 // decode them into an object
 var obj:Object = JSON.decode(results);

 // get the bindings as an array
 var test:Array = obj.results.bindings as Array;

 // create a collection that can be used by the data grid
 var arrayColl:ArrayCollection = new ArrayCollection(test);

 All the best,

 Fidel.

 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo 
 ! Groups Links






Re: [flexcoders] JSON as dataprovider

2008-08-14 Thread grimmwerks
Ok I've actually had to do this slightly different - as there will be  
a lot of flipping between items; what I'd hoped to do was something  
like like a static var of 'db' as ArrayCollection and do a  
db.removeAll() -- but when I've even manually parsed the var arr and  
tried doing a db.addItem(arr[x]) it's not working...

On Aug 14, 2008, at 1:29 AM, Fidel Viegas wrote:

 private function onJSONLoad(event:ResultEvent):void
   {
   var rawData:String = String(event.result);
   var arr:Array = (JSON.decode(rawData) as Array);
   
   var dp:ArrayCollection = new 
 ArrayCollection(arr);
   
   grid.dataProvider = dp;
   }



[flexcoders] JSON as dataprovider

2008-08-13 Thread grimmwerks

I've got a class that gets a JSON object - and within this JSON object  
is a list of items.

I'm trying to do what I think is very simple -- but I'm missing  
something -- being able to bind a tilelist to an array of this  
returned objects.items.

I've tried manually parsing through these items and doing an  
addItem(return.items[i]) into an arraycollection - but this doesn't  
seem to be working at all.

Any thoughts or examples please?


[flexcoders] weird limelight fun

2008-08-01 Thread grimmwerks
Ok - now dig this - I'm attempting to connect to a video stream from  
limelight in flex.  I get a Connection.Success but no video shows up,  
and no MetaData comes through.

I attempt to the same url with our badly written AS2 Flash file (using  
FSConnection) and I get a video stream showing up in the old  
application.

Keeping that up, I try the flex one again; lo and behold it shows up  
in the flex application now, no change to code.

So what's the deal there? Why won't flex connect to it the same url on  
it's own?


[flexcoders] anyone successfully streaming video from Limelight?

2008-07-25 Thread grimmwerks
I've got code to try to stream video from Limelight that doesn't seem  
to work - but when I plug the same code into our own Flash Media  
Server setup it works perfectly.

Is there no one else trying to get video from limelight into flex?


Re: [flexcoders] NetConnection, Flex and FMS video problem.

2008-07-23 Thread grimmwerks
Weird - had someone else try this and it works for a video _file_ but  
I still can't get it to work with limelight...



On Jul 22, 2008, at 10:31 AM, grimmwerks wrote:



I'm trying to connect to an FMS video stream -- but having no luck.  
I'm popping Alerts on all the NetStatusHandlers - and I not only get  
Connection.Success but I also get NetStream.Play.Start as the final  
alert - but no video is appearing on stage.  Also even though I'm  
making a new Object for the nsClient things aren't being alerted on  
the on_msMeta stuff --


Can someone PLEASE point out what I'm doing wrong, or show me code  
that works?  Appreciated.



-- Current Code below  ---



?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;  
layout=absolute creationComplete=init()


mx:Script
![CDATA[
import mx.utils.ObjectUtil;
import flash.display.Sprite;
import flash.events.NetStatusEvent;
import flash.events.SecurityErrorEvent;
import flash.media.Video;
import flash.net.NetConnection;
import flash.net.NetStream;
import flash.events.Event;
import mx.controls.Alert;

private var connection:NetConnection;
private var stream:NetStream;
		private var streamLink:String = rtmp://scribestud.fc.llnwd.net/ 
scribestud/_definst_;

private var linkName:String = live;
private var video:Video = new Video();



public function init():void {
	NetConnection.defaultObjectEncoding =  
flash.net.ObjectEncoding.AMF0;

connection = new NetConnection();
connection.addEventListener(NetStatusEvent.NET_STATUS,  
netStatusHandler);
 
connection.addEventListener(SecurityErrorEvent.SECURITY_ERROR,  
securityErrorHandler);

connection.connect(streamLink);
}

private function netStatusHandler(event:NetStatusEvent):void {
 Alert.show(event.info.code);
switch (event.info.code) {
case NetConnection.Connect.Success:
connectStream();
break;
case NetStream.Play.StreamNotFound:
Alert.show(Stream not found:  + linkName);
break;
}
}

private function  
securityErrorHandler(event:SecurityErrorEvent):void {

trace(securityErrorHandler:  + event);
}

private function connectStream():void {
stream = new NetStream(connection);
stream.addEventListener(NetStatusEvent.NET_STATUS,  
netStatusHandler);

var nsClient:Object = {};
nsClient.onMetaData = ns_onMetaData;
nsClient.onCuePoint = ns_onCuePoint;

video.attachNetStream(stream);
stream.play(linkName);
stream.client = nsClient;
//uic.setActualSize(320,240);
uic.addChild(video);
  //  addChild(video);
}

private function ns_onMetaData(item:Object):void{
Alert.show(got meta);
video.width = item.width;
video.height = item.height;
uic.width = video.width;
uic.height = video.height;
Alert.show(video.width +   :  + video.height);

}
private function ns_onCuePoint(item:Object):void{
Alert.show(cue point);

}


]]
/mx:Script



mx:Panel id=panel visible=true width=320 height=240
mx:UIComponent id=uic width=320 height=240 /
/mx:Panel

/mx:Application





[flexcoders] NetConnection, Flex and FMS video problem.

2008-07-22 Thread grimmwerks


I'm trying to connect to an FMS video stream -- but having no luck.  
I'm popping Alerts on all the NetStatusHandlers - and I not only get  
Connection.Success but I also get NetStream.Play.Start as the final  
alert - but no video is appearing on stage.  Also even though I'm  
making a new Object for the nsClient things aren't being alerted on  
the on_msMeta stuff --


Can someone PLEASE point out what I'm doing wrong, or show me code  
that works?  Appreciated.



-- Current Code below  ---



?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;  
layout=absolute creationComplete=init()


mx:Script
![CDATA[
import mx.utils.ObjectUtil;
import flash.display.Sprite;
import flash.events.NetStatusEvent;
import flash.events.SecurityErrorEvent;
import flash.media.Video;
import flash.net.NetConnection;
import flash.net.NetStream;
import flash.events.Event;
import mx.controls.Alert;

private var connection:NetConnection;
private var stream:NetStream;
		private var streamLink:String = rtmp://scribestud.fc.llnwd.net/ 
scribestud/_definst_;

private var linkName:String = live;
private var video:Video = new Video();



public function init():void {
	NetConnection.defaultObjectEncoding =  
flash.net.ObjectEncoding.AMF0;

connection = new NetConnection();
connection.addEventListener(NetStatusEvent.NET_STATUS,  
netStatusHandler);
 
connection.addEventListener(SecurityErrorEvent.SECURITY_ERROR,  
securityErrorHandler);

connection.connect(streamLink);
}

private function netStatusHandler(event:NetStatusEvent):void {
 Alert.show(event.info.code);
switch (event.info.code) {
case NetConnection.Connect.Success:
connectStream();
break;
case NetStream.Play.StreamNotFound:
Alert.show(Stream not found:  + linkName);
break;
}
}

private function  
securityErrorHandler(event:SecurityErrorEvent):void {

trace(securityErrorHandler:  + event);
}

private function connectStream():void {
stream = new NetStream(connection);
stream.addEventListener(NetStatusEvent.NET_STATUS,  
netStatusHandler);

var nsClient:Object = {};
nsClient.onMetaData = ns_onMetaData;
nsClient.onCuePoint = ns_onCuePoint;

video.attachNetStream(stream);
stream.play(linkName);
stream.client = nsClient;
//uic.setActualSize(320,240);
uic.addChild(video);
  //  addChild(video);
}

private function ns_onMetaData(item:Object):void{
Alert.show(got meta);
video.width = item.width;
video.height = item.height;
uic.width = video.width;
uic.height = video.height;
Alert.show(video.width +   :  + video.height);

}
private function ns_onCuePoint(item:Object):void{
Alert.show(cue point);

}


]]
/mx:Script



mx:Panel id=panel visible=true width=320 height=240
mx:UIComponent id=uic width=320 height=240 /
/mx:Panel

/mx:Application

[flexcoders] rtmp, videodisplay and _definst_

2008-07-21 Thread grimmwerks
I'm curious - has anyone had any experience pulling in a limelight  
feed into flex?

I've written a flash player that uses NSConnection and successfully  
pulls in the stream; but in trying to pull this same stream into flex  
-- there's no connection/display whatsoever.




[flexcoders] toggling mouseOut/mouseOver and styleName -- or toggleButton....

2008-07-15 Thread grimmwerks
Is it possible to have a toggle button that has different font weights  
upon it's selected and over state?


All I've got to do is create a number of links that when pressed, stay  
highlighted -- and the highlight and over states just make the font  
bold. Sounds simple, right?


Well, I used a number of text areas like this:

mx:VBox id=vbox left=10 verticalCenter=0 verticalGap=3 
		mx:Text id=b0 text=What it is click={pages.selectedIndex=1;  
switchIt(0);} selectable=false useHandCursor=true  
buttonMode=true/

mx:Image source=@Embed(source='dots.png') /
		mx:Text id=b1 text=Who it's for click={pages.selectedIndex=2;  
switchIt(1)}   selectable=false  mouseOut={if(b1!=sel) 
{b1.styleName='infoLinks'}} mouseOver={b1.styleName='onLink'}   
useHandCursor=true buttonMode=true/

mx:Image source=@Embed(source='dots.png') /
		mx:Text id=b2 text=What you do click={pages.selectedIndex=3;  
switchIt(2)}   selectable=false  mouseOut={if(b2!=sel) 
{b2.styleName='infoLinks'}} mouseOver={b2.styleName='onLink'}   
useHandCursor=true buttonMode=true/

mx:Image source=@Embed(source='dots.png') /
		mx:Text id=b3 text=What you gain click={pages.selectedIndex=4;  
switchIt(3)}  selectable=false mouseOut={if(b3!=sel) 
{b3.styleName='infoLinks'}} mouseOver={b3.styleName='onLink'}   
useHandCursor=true buttonMode=true/

/mx:VBox


Well the trouble is - I want to make the selected text to be 'on' - so  
I've been trying to set the selected text styleName to be the 'onLink'  
by calling it in the switchIt function -- but this doesn't seem to be  
working:


private function switchIt(num:Number):void{
for(var i:uint=0; i4; i++){
if(vbox['b'+i] == tBut){
vbox['b'+i].styleName = 
onLink;
vbox['b'+i].mouseOver = ;
vbox['b'+i].mouseOut = ;
}else{
vbox['b'+i].mouseOut = 
(vbox['b'+i].styleName = 'infoLinks');
vbox['b'+i].mouseOver = 
(vbox['b'+i].styleName = 'onLink');
vbox['b'+i].styleName = 
infoLinks;
}
}
}

But it doesn't seem like I can set the mouseOver/mouseOut on Text  
components?




[flexcoders] dynamically referring to UIComponents...

2008-07-15 Thread grimmwerks
Ok, so I've got this Text component, k? Let's say it's name is b0.

Whereas something like Alert.show(b0.toString()); works --  
Alert.show(UIComponent('b0').toString()) does not -- can anyone point  
out what I'm missing (and yes, I'm importing UIComponent).

Thanks all


  1   2   3   >