[flexcoders] Re: Global error handling in Flex

2009-03-06 Thread Kevin Fauth
Unfortunately no.  Take a look at http://bugs.adobe.com/jira/browse/FP-1499

--- In flexcoders@yahoogroups.com, oneworld95 oneworl...@... wrote:

 Is there a way to trap and handle any exceptions that a Flex app throws at a 
 global level? Thanks.





[flexcoders] Re: Smooth scrolling when setting verticalScrollPosition on TextArea

2008-10-13 Thread Kevin Fauth
That's funny, I JUST did that same thing last week on Wednesday.
AnimateProperty is the right choice.  Mine looks smooth during the
movement, is yours doing something weird or choppy?

You could also look at using an easing function and see what that does
for you.

- Kevin

--- In flexcoders@yahoogroups.com, Mark Carter [EMAIL PROTECTED] wrote:

 
 In AS3, I set the vertical scroll position of the text area, but
would like
 the area to smoothly scroll to that area rather than jump to it
 (disorientating the user).
 
 I've done this using the AnimateProperty class on the
verticalScrollPosition
 property.
 
 Is there a more standard way?
 -- 
 View this message in context:
http://www.nabble.com/Smooth-scrolling-when-setting-verticalScrollPosition-on-TextArea-tp19930681p19930681.html
 Sent from the FlexCoders mailing list archive at Nabble.com.





[flexcoders] Re: WSDL SOAP

2008-08-28 Thread Kevin Fauth
basicasm-

You have your calls in the base of the class, you need to move it into
a method.  You should also put your add event listener into an
onInit() type of call.  Here's a quick example:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute creationComplete=onInit()
mx:Script
![CDATA[
import mx.rpc.events.FaultEvent;
import net.webservicex.GetWeatherResultEvent;
import net.webservicex.GlobalWeather;
  
private var weather : GlobalWeather = new GlobalWeather;
  
private function onInit():void {
  weather.addgetWeatherEventListener(handleWeather);
  weather.addGlobalWeatherFaultEventListener(onFault);
}
private function onClick():void {
  weather.getWeather(Spokane,United States);
}
  
private function handleWeather(e:GetWeatherResultEvent):void {
  trace(e.result.toString());
}
  
private function onFault(e:FaultEvent):void {
  trace(Fault:  + e.message);
}
]]
  /mx:Script
  mx:Button click=onClick() label=Click Me /
/mx:Application


--- In flexcoders@yahoogroups.com, basicasm [EMAIL PROTECTED] wrote:

 I am trying to access a web service with Flex. So far I can import the
 WSDL just fine using the webservice import wizard. (File-Import-Web
 Service) But when I try to use one of the methods from the WSDL Flex
 tells me that I am trying to access an undefined property of the
service.
 
 /* code
 
   import net.webservicex.BaseGlobalWeather;
   import mx.rpc.events.ResultEvent;
   import net.webservicex.GetWeatherResultEvent;
   import net.webservicex.GlobalWeather;
 
   private var weather:GlobalWeather = new GlobalWeather;
 # weather.getWeather(Spokane, United States);
 # weather.addgetWeatherEventListener(handleWeather);
   private function handleWeather(event:ResultEvent):void
   {
trace(event.result);
   }
 */
 
 The lines causing the problem are marked with '#'. You can view the
 WSDL that I am working with at
 http://www.webservicex.net/globalweather.asmx?wsdl
 
 and I am trying to follow the example from http://www.flexlive.net/?p=79
 
 Any help is appreciated, thank you.





[flexcoders] Re: Flex and Flash 9 movies in Firefox

2008-06-19 Thread Kevin Fauth
I'm pretty sure you can't do anything about that.  I've found that
setting focus to the SWF only works in IE; e.g. - where you do a
javascript .setFocus() to the swf object and the text box in the Flex
app already has focus.

It's just a difference between IE/FF unfortunately...

It's a little 'hacky' in my opinion, but if you absolutely need keyboard
events from a non-focused swf, check out Gary Bishop's blog about a
creative way of doing this by capturing keyboard events with Javascript.
I've had to do it for a number of things I've worked on and it works for
me, but only on those browsers with Javascript enabled...

 
http://wwwx.cs.unc.edu/~gb/wp/blog/2007/06/08/fixing-firefox-flash-fooli\
shness/
http://wwwx.cs.unc.edu/%7Egb/wp/blog/2007/06/08/fixing-firefox-flash-fo\
olishness/

- Kevin

--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 For me, it happens in every browser.



 

 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
 Behalf Of Michelle Grigg
 Sent: Wednesday, June 18, 2008 10:36 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Flex and Flash 9 movies in Firefox



 Hi guys!

 I'm perplexed.

 I have a Flex 2 application that runs a little Flash 9 movie within it
 at one point. This SWF requires user interaction in the form of
 typing a letter into a textbox.

 Strange things occur in Firefox when, once you get to the frame with
 the textbox (focus is set to it so that the cursor is blinking), then
 alt-tab to another window and go back, you cannot interact with the
 textbox at all. The cursor has gone, and clicking on the control does
 nothing. Clicking on a button works, however.

 Anyone know how to fix this? Anyone even had this problem themselves?
 It ONLY happens in Firefox.

 Cheers,
 Michelle




[flexcoders] Re: Question regarding EventDispatcher

2008-06-17 Thread Kevin Fauth
Bubbling is funny that way.  If you don't need it to bubble, and can
reference the object that's dispatching the event directly, you might
be better off to set the listener on the object itself:

var test:TestComponent = new TestComponent();
test.addEventListener (MyEvent.EVENT_GOOD, doGood);
test.addEventListener (MyEvent.EVENT_BAD, doBad);
...

- Kevin

--- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote:

 Also keep in mind that events bubble up the display hierarchy, not
 necessarily your object graph hierarchy, even though they're often
closely
 related. If B is not a direct (display list) descendant of A, A will
never
 receive events bubbled from B, even if
 A.something.somethingElse.anotherField == B.
 
 -Josh
 
 On Wed, Jun 18, 2008 at 9:04 AM, Tracy Spratt [EMAIL PROTECTED] wrote:
 
   Unless a listener is assigned directly to the dispatching
component, you
  need to set the bubbles argument when you dispatch the event
 
  dispatchEvent( new MyEvent (MyEvent.RESULT,true) );
 
 
 
  Tracy
   --
 
  *From:* flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] *On
  Behalf Of *LazerWonder
  *Sent:* Tuesday, June 17, 2008 6:26 PM
  *To:* flexcoders@yahoogroups.com
  *Subject:* [flexcoders] Question regarding EventDispatcher
 
 
 
  Here's the scenerio:
 
  - In a component, I'm dispatching an event. Let's call it: MyEvent
  - In the main application, there is an EventDispatcher that's
  listening for the component event.
 
  None of this is Cairnogorm for many reasons. (Although I have
  nothing against that framework).
 
  However, this is not working. Would someone be able to explain why
  and how I can go about solving this? Thanks!
 
  ===
  Sample code: (Assume all imports are there).
  ===
 
  public class MyClass extends EventDispatcher {
  //stuff
 
  public function myFunction():void {
  //more stuff... then...
  this.addEventListener (MyEvent.EVENT_GOOD, doGood);
  this.addEventListener (MyEvent.EVENT_BAD, doBad);
 
  var test:TestComponent = new TestComponent();
  }
 
  public function doGood(e:MyEvent):void {
  //do other stuff
  }
 
  public function doBad(e:MyEvent):void {
  //do stuff
  }
  }
 
  ---
  In component:
 
  package com.mystuff.test {
  public class TestComponent {
  public function TestComponent() {
  //do stuff here
  var t:TestDispatcher = new TestDispatcher();
  t.dispatchMyEvent();
  }
  }
  }
 
  package com.mystuff.test {
  public class TestDispatcher extends EventDispatcher {
  public function TestDispatcher() {
  super();
  }
 
  public function dispatchMyEvent():void {
  dispatchEvent( new MyEvent (MyEvent.RESULT) );
  }
  }
  }
 
  package com.mystuff.test.events {
  public class MyEvent extends Events {
  public static var EVENT_GOOD= goodStuff;
  public static var EVENT_BAD = badStuff;
 
  public function MyEvent (type:String) {
  super(type);
  }
  }
  }
 
  
 
 
 
 
 -- 
 Therefore, send not to know For whom the bell tolls. It tolls for
thee.
 
 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]





[flexcoders] Re: Weird URLloader problem

2008-05-21 Thread Kevin Fauth
If you're just loading the SWF from the hard drive (double-clicking
it), then you need to tell the Flash Player that you'll allow the
flash file to run and access the net or external files.

Go to:
http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html

And do Always Ask and go to the Edit Locations to add the new path
(or put your root drive in - not recommended, but do what you gotta).

That website will store the security settings into your local player.
If you plan on distributing the SWF on a CD/DVD or whatever, then
click the link on the page for Global security settings for content
creators

- Kevin



[flexcoders] Re: SWF Cache

2008-05-21 Thread Kevin Fauth
Hey Don-

It's a quick and dirty trick to prevent caching, but if you're just
writing a single Flex app (1 swf, no modules) then you can append some
random GET data to the tail end of the swf extension.

For instance, instead of doing:
EMBED src=effect.swf quality=high ...
you would do:
EMBED src=effect.swf?v=1.1.05 quality=high ...

If you're using the AC_OETags.js file, then you'll have to modify line
180 in Flex 2 or 187 in Flex 3 to include your versions (think of
escaping Date() or something like that).

That *should* ensure a clean version coming down.  Keep in mind that
even a 300k Flex app can take a good amount of time to d/l for dial-up
users, so caching isn't necessarily a bad thing.  Otherwise, just make
sure your meta tags are in the HEAD section of your HTML.

- Kevin

--- In flexcoders@yahoogroups.com, Don Kerr [EMAIL PROTECTED] wrote:

 BTW, I've tried all the html tricks and none work in IE or Firefox...
 
 META HTTP-EQUIV=Cache-Control CONTENT=no-store
 META HTTP-EQUIV=Expires CONTENT=Mon, 04 Dec 1999 21:29:02 GMT
 META HTTP-EQUIV=Pragma CONTENT=no-cache
 META HTTP-EQUIV=Expires CONTENT=-1
 
 I need a browser-independent solution for always ensuring my flex apps
 load the current version. Maybe there is something in Actionscipt that
 I can do to force reload of the swf from the server? I don't know. Any
 suggestions?
 
 --- In flexcoders@yahoogroups.com, Don Kerr fusionpage@ wrote:
 
  How can I prevent my Flex app swf from being cached? When I release a
  new version, I want to ensure the user is using the latest swf.
  
  Thanks,
  Don