We have a VScrollBar component that you could put alongside the Loader and just listen for the scroll events to change the frame location of your SWF.  As for the mouse wheel support we haven’t exposed it super-cleanly in Flex as opposed to Flash.  You can see the ActionScript support for the mouse wheel here: http://livedocs.macromedia.com/flex/15/flex_docs_en/00001481.htm.

 

Matt

 


From: Robert Brueckmann [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 02, 2005 10:56 AM
To: [email protected]
Subject: [flexcoders] loader

 

Background:

 

I’ve built a reporting application.  The user logs in, selects criteria and I send the user’s criteria in XML format to a stored procedure, which generates an XML result set, which we send to a template-based 3rd-party reporting engine… which produces a PDF report…when the report has been generated, I make a call to another 3rd-party utility…the open-source SWFTools utility called PDF2SWF, which converts that newly generated PDF report into a single SWF file…with each page of the original PDF file being represented in a frame of the overall SWF movie…then I load the converted SWF report into my loader component for the user’s viewing pleasure, where I created a page slider component that allows the user to flip pages of the report.  (Honestly, the next version of Flex, I HOPE, really needs to focus on reporting functionality because this is one hell of a convoluted, EXPENSIVE way to get a simple multi-paged, printable report out of this system!). 

 

Question:

 

This is all working fine and great, but the main complaint is the user can’t use the mouse scroll or the vertical scroll bar to the right to scroll down the report to the next page, and then to the next page and so on…like they can in the PDF version of the report.  In the Flash-version, they can only get to the next page of the SWF report by using my nifty page slider which simply increments (or decrements) to the next frame of the report SWF movie.  Is there anyway to load that multi-framed SWF movie into the loader component and within the loader component, dynamically extract out each frame of the movie and display it in a vertical series of HBox components?  Can you do that with a multiframed movie?  I wouldn’t think so but I figured it’s worth a shot in asking.  I’ve tried using FlashPaper and embedding that into the loader component, but trying to get that to stretch and print correctly is a nightmare in and of itself…not to mention the application server is running on Linux so while in theory and development, FlashPaper works beautifully on my Windows desktop, but FlashPaper doesn’t come for Linux unfortunately. 

 

Alternatively, is there anything smartI can do with the mouse scroller that would scroll through each consecutive page of the report instead…like once I’ve gotten to the bottom of the visible report’s page, increment the report movie frame number to the next frame automatically?  How do you capture the mouse scroller as well as the vertical scrollbar itself, if the user was dragging this scrollbar with the mouse pointer, it’d need to mimic this behavior also…thoughts?

 

 

Robert L. Brueckmann

Web Developer

Merlin Securities,LLC

595 Madison Avenue

New York, NY 10022

p: 212.822.4821
f: 212.822.4820


From: Robin Hilliard [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 01, 2005 6:33 PM
To: [email protected]
Subject: Re: [flexcoders] Cairngorm + Flash

 

Hi Agha,

 

Here's the main differences:

 

1) Instead of tags, break the UI down into library symbols and link each one to a view class. Remember all the UI controls have to be declared as properties in your class.

2) You have to install the remoting components and use mx.remoting.Service

3) In delegates use mx.rpc.RelayResponder instead of mx.utils.Delegate.

4) You'll need to tweak the service locator to allow you to register services in actionscript, or just not use the service locator.

5) Use property setters, custom updateModel/updateView methods (or something more elegant) instead of binding in the UI (probably the Flex feature I miss most in Flash, closely followed by the layout containers).

 

I think there's a place for RIA development in Flash - there are always going to be projects where Flex won't be an option (although it is an option more often than you'd think :-) and in those cases frameworks like Cairngorm and ARP will make things much easier. I'd say the main drawback to Flash is that UI Component Set 2 has some serious limits to it's scalability on the current player - I wouldn't attempt anything larger than a few screens in Flash.

 

Cheers,

Robin

http://www.rocketboots.com.au

 

On 02/03/2005, at 9:44 AM, Steven Webster wrote:

 

Agha,

 

 Can Cairngorm be used with Flashand if yes, where do I find any sample that I can look at? 

 

Sure Cairngorm can be used with Flash ... the only difference is that your user experience has to be

built up in the FLA, and not using MXML; however, all the design patterns for managing response

to user gestures, business logic, service calls, etc, still apply.

 

In the ActionScript 2.0 Dictionary, we published something very similar to the Cairngorm framework

(an early incantation of) which also includes an ActionScript 2.0 ServiceLocator for Flash Remoting.

 

I know that Robin Hilliard and the team at RocketBoots have also been using Cairngorm with both

Flash and Flex projects.

 

We've not made any recommendations as to how you should build your FLA -- truth be told, in

our humble opinion, if you're building RIA, you should be building them with Flex, not Flash. 

 

However, if you want some guidance on how to structure your FLA, you couldcheck out what

Aral has done with his ARP framework, which provides a bit more prescription as to how you

should structure your FLA file on top of the same collection of design patterns as Cairngorm

is using.

 

Perhaps Robin Hilliard might be able to pipe up with some specific advice.

 

Mine would be to spare yourself unnecessary pain, trauma, performance woes and

wheel reinvention and use Flex ;-)

 

Hope that helps,

 

Steven

 

--

Steven Webster

Technical Director

iteration::two

 


This message contains information from Merlin Securities, LLC, or from one of its affiliates, that may be confidential and privileged. If you are not an intended recipient, please refrain from any disclosure, copying, distribution or use of this information and note that such actions are prohibited. If you have received this transmission in error, please notify the sender immediately by telephone orby replying to this transmission.

 

Merlin Securities, LLC is a registered broker-dealer. Services offered through Merlin Securities, LLC are notinsured by the FDIC or any other Federal Government Agency, are not deposits of or guaranteed by Merlin Securities, LLC and may lose value. Nothing in this communication shall constitute a solicitation or recommendation to buyor sell a particular security.



Reply via email to