[Flashcoders] create a movie clip out of an image and text overlay, then control both in AS
Hi - I need to programmatically create a series of boxes with labels. The goal is to make a custom set of Tabs that are configured by a list of tab names, can be clicked, etc. I'm a pretty basic AS / Flash user w/ a programming background, and inherited this project in the current state, which I'll call basic tabs and need to get it to fancy tabs. Right now I have this working with simple text boxes, but I'm trying to make it look better. Specifically, I have an image for a tab that I can 9-slice as the background, and then want to draw the name for the Tab on top of this image. Currently, the AS for the creation, label setting, and resizing looks like this (Entryset is a tabular data structure that we use): var columns:Array = entryset.getColumns(); var rows:Array = entryset.getRows(); rowLength = rows.length; //For every row in the Entryset, create a tab, give it a label of the value in the current row, //change its width to fit its label, displace it horizontally to fit next to adjacent tab, and //then set its y coord. this.mcContent = this.createEmptyMovieClip(mcContent, this.getNextHighestDepth()); for (var i = 0; i rowLength; i++) { mcContent.attachMovie(Tab_MC, mov + i + _mc, i); mcContent[mov+i+_mc].label_txt.text = rows[i][columns[0].name]; newColumns[i] = new ProtoEntrysetColumn(mcContent[mov+i+_mc].label_txt.text, Any); mcContent[mov+i+_mc]._width = mcContent[mov+i+_mc].label_txt.length*8 + 40; mcContent[mov+i+_mc]._x = mcContent[mov+i+_mc]._width/2 + spacing; spacing = mcContent[mov+i+_mc]._x + mcContent[mov+i+_mc]._width/2; mcContent[mov+i+_mc]._y = mcContent[mov+i+_mc]._height/2; } I can't seem to find the right tutorial or info that will show me how to make a new movie clip that has 1) an image and 2) some text overlay. I'd like to be able to make this clip, stretch the image as needed, center the text overlay, and set the text with a few lines similar to those above. Do I need to group a textbox and image and then convert that to a clip? Or make a class with more than one movie clip in it? If anyone either has the right guidance / steps or possibly a link to a tutorial that covers wrapping multiple movie clips into one so that they can be worked with together through AS, that would be awesome. Thanks in advance for your help, Byron Byron Binkley Proto | 140 W. 30th St. | 3rd floor New York, New York 10001 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Outlook and Flash
Jason - Depending on your constraints for the runtime / player of the application you could use Proto to host the Flash files as sort of an integration and scaffolding layer, then use VBA to integrate w/ office apps. Here's two links if you want to check that out: 1. Proto flash integration: http://www.protosw.com/products/features/flash 2. a movie/ demo showing Outlook contacts pulled and put onto a Yahoo! map (that is just a SWF running in Proto. sort of like you would do w/ the calendar): http://www.protosw.com/products/intro-movie I'm happy to answer questions that are non-flash related about Proto off-list too if you want to email me directly. Cheers, Byron Proto Software http://www.protosw.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Friday, December 15, 2006 5:08 PM To: Flashcoders mailing list Subject: [Flashcoders] Outlook and Flash I know with the security of the Flash player, it's probably not possible or easy (unless MS has some sort of webservice for Exchange servers built in or something) to grab a person's Outlook Calendar or Task list - but what about a Flash desktop application - is that information available through some API? Can a third party app for Flash be used to call an application which will retrieve this data? I know there would be security issues on that too, but I was tasked to investigate this. I might have some resources to write that application, but wouldn't know what the possibilities would be on the Flash end. Anyone done any integration with Outlook before? Thanks. Jason Merrill Bank of America Learning Organizational Effectiveness ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] connecting excel spread sheet to Flash
Hey Nik - I work with Proto, and depending on what you're constraints are for delivering the app (there's a free download and install of the Proto viewer, but users would need that), it could work well for you. http://www.protosw.com/products/features/flash It's not exactly designed as a flash delivery mechanism, but could work that way. Proto does have really good integration with other stuff like Excel, databases, csvs, and has a built in Db. We use flash to extend Proto's user interface and there's a pretty sophisticated proto-flash execution and data bridge, so you can use SWF files in Proto apps. Proto isn't exactly designed to be the business logic for Flash apps, but you could certainly use it that way. Anyway - hth. If you have questions that are more appropriate off-list, feel free to use the forum at protosw.com too. Cheers, Byron -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of nik crosina Sent: Wednesday, November 22, 2006 7:19 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] connecting excel spread sheet to Flash HI Nick, I havcen't fully spec'ed the app yet, but as it is a re-work of an existing rather cumbersome thing, we are thinking of having a 'zinc'ed' swf, that accesses various excel files for information as and when this is needed for display in the app (the data will consist of prices, model numbers, are images possible here? I know Excel too little to know if you can store images in teh cells as well theses days ... must look it up). I am planning to use the same excel files to be printed out as a brochure sheets of the products. In other words if the user clicks on a print button, the swf sends the respective .xls to the printer. In teh past we had 2 documents for each product: one for display on screen (powerpoint), and the same - with slightly differnet design - as a PDF that could be printed. Pretty ambitous rject I am beginning to realise! Thaks, Nik On 11/22/06, Nick Weekes [EMAIL PROTECTED] wrote: Just out of interest, whats the architecture of your Excel/Flash app? Is it Excel for data and Flash for reporting? Do you need the Excel file to be an Excel file (i.e. xls) or can it be 'dumb' xml (i.e. an xml file with Excel attributes)? Are all the files stored in the same folder (i.e. xls + swf)? Is your app code stored in the swf or swf + xls? Easier to point you in the right direction if you answer some of these questions! Cheers, Nick -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: 22 November 2006 16:26 To: Flashcoders mailing list Subject: RE: [Flashcoders] connecting excel spread sheet to Flash OK for CD then. So For the XML idea Nick suggested, that's not going to be easy if it's on CD. It would be to have the user save as XML from Excel (File Save As save as XML data) to their local drive, and then use a third party projector like Zinc or mProjector to browse to the file they saved and then load that XML into flash (not sure about what security restrictions you would encounter with a third party and loading XML in the project at that point). If you also need help loading and getting data from XML, that's another topic altogether. Hope that helps. Jason Merrill Bank of America Learning Organizational Effectiveness -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of nik crosina Sent: Wednesday, November 22, 2006 11:18 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] connecting excel spread sheet to Flash Thanks, Jason, I should have explained better, this is going to be for a CD based app, so it'll need to work without any server side scripts or use of database. But what you suggest is certainly something to consider for any future on-line brochures / pricelists - especially since it seem to requrie NO special saving of the spread shets frmo the sales peoples point of view (to explain to them even the most basic of XML will be futile... ;) Thanks, Nik On 11/22/06, Merrill, Jason [EMAIL PROTECTED] wrote: You can also use server-side apps to convert an uploaded Excel doc to XML and then do whatever with it - run SQL statements, other server side scripts, or back into Flash - no manual save as XML required, but it does require some savy backend stuff and/or third party components. Jason Merrill Bank of America Learning Organizational Effectiveness -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Nick Weekes Sent: Wednesday, November 22, 2006 11:09 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] connecting excel spread sheet to Flash Look into the possibilities of using xml with Excel (by either saving the file as xml or exporting sheets/ranges as xml). This can then be used as the data source