PDA

View Full Version : live preview


jimburton
02-01-2003, 08:32 PM
I am having problems getting live preview to work for my component - a bar for bar graphs...trying to follow the example in the OOP for Actionscript book, I created a movie which contains my component and put a new function in the component called onUpdate, which refers to the xch object...in the lirary I changed the component definition to include this swf embedded as the live preview...but no go. my component seems to work fine...I've attached it and the attempt at live preview (called barclass and barclassLP respectively)...anyone with experience of this that can help me out? :( :) TIA

Jesse
02-02-2003, 02:39 AM
I've still not worked with Live Previews on my own components but there's a good description of how to do it here http://www.flashcomponents.net/tutorials/triangle/triangle.html ... Best I can offer. PS - The components section will be ready in a few days, I'll hope to see your stuff up there ;)

jimburton
02-02-2003, 10:45 AM
thanks jesse, it occurs to me that live preview restricts the framerate of the swf and other things, so maybe that includes calls to setInterval, which my comp. depends on...will check it out & post here,

farafiro
02-02-2003, 12:02 PM
also there is a very cool one in
http://www.ultrashock.com/link.php?id=9

buggedcom
02-02-2003, 02:45 PM
this isn't exactly related to the live preview question but it is to do with components. I've got more or less everything ready for my gallery component to be put into mxi form but i can't work out how the hell to do it. I've searched every where an haven't got a clue. All the documentation about the mxi format seems to be related to Dreamweaver.

From what i worked out you package them from the extension manager itself, but when i try to package my fla it won't let me select it. Does it have to have special code inside the fla...? Also how do i include my reference panel xml data in the package?

buggedcom
02-02-2003, 02:46 PM
Also Jesse, why not have a forum pirley for component questions etc? like on were-here before it went down. Anybody know what happened to that?

jimburton
02-02-2003, 07:58 PM
Originally posted by buggedcom
this isn't exactly related to the live preview question but it is to do with components. I've got more or less everything ready for my gallery component to be put into mxi form but i can't work out how the hell to do it. I've searched every where an haven't got a clue. All the documentation about the mxi format seems to be related to Dreamweaver.

From what i worked out you package them from the extension manager itself, but when i try to package my fla it won't let me select it. Does it have to have special code inside the fla...? Also how do i include my reference panel xml data in the package?

this doc (http://download.macromedia.com/pub/dw_exchange/mxi_file_format.pdf) describes the mxi format and there is sample one for flash docs in the folder that your extension manager is installed in ...extension manager/samples/flash/sample.mx1 - edit a copy of that then point the extension manager at it

buggedcom
02-02-2003, 08:59 PM
thanks man, i had read the pdf already but didn't quite follow it, but the example in the folder helps out a lot .

ta.

Jesse
02-02-2003, 09:11 PM
Here's a quick tutorial I wrote on building an MXP and MXI from a FLA. The sample file it mentions is attached. This is in preparation for the components section which will accept only MXP archives and will be ready by the end of the week. (Excuse the huge block of text, I lost the dot point when I copied this over)

An MPX file is the best and easiest way to distribute your new Flash MX Component. MPX files are basically a compressed archive of all the files required for your component in a specialized file format which is compatible with the Macromedia Extension Manager. Distributing your Component as an MPX file makes installation a breeze - the client only has to double click the MPX file they downloaded and your component will automatically be installed. The Macromedia Extension manager also allows easy uninstallation or updating of the component once installed. Best of all, creating an MPX archive is quick and easy. Follow these simple steps and you're done:

If you don't already have Extension Manager installed you can install it from your Flash MX CD (Goodies\Macromedia\Extension Manager\) or download it free from Macromedia Exchange (it's about 2Mb).
With Exchange installed you need to create a Macromedia Exchange Installation file (or MXI file) which is done most easily by editing a template, so grab this one and let's continue. Note this template is just an adapted version of the sample which comes with Extension Manager. All credit should go to Macromedia.
Open the template from above and change the 'name' and 'version' attributes of the root 'macromedia-extension' node.
Change the name in the 'author' node.
Enter a description of the component's purpose where the file currently has ---Description Here---.
Set up a FLA file which contains just your component(s) and the relevant Flash assets (movie clips, etc). Give this FLA a name less than about 30 characters long. Make the name descriptive because it will be the Component Suite's name in the Components Panel. Change the value of the first 'file' node (within the 'files' parent node) in the template you're editing to the exact name of the FLA file containing your component(s).
If your component requires any external files which you provide, such as a source XML file add an additional 'file' node immediately after the existing file node and enter the name of that second file in the new node. Basically you're listing all the files required to use your component, each one in a different node.
Leave everything else unchanged unless you know what you're doing. See the Extension Manager help for more advanced options.
That's it! Now just save your MPI file (in the same directory as the FLA you made above) and double click it. It will open in the Extension Manager and automatically allow you to save an MPX file which you can then upload to our site. Before uploading your MPX file please ensure that it works correctly by installing it locally yourself and verifying it installs your component within Flash. If you can't see your component in the Components Panel don't forget to select your component suite name from the small drop down menu at the top of the Components Panel.

Jesse
02-02-2003, 09:14 PM
Originally posted by jimburton
thanks jesse, it occurs to me that live preview restricts the framerate of the swf and other things, so maybe that includes calls to setInterval, which my comp. depends on...will check it out & post here,
Your wish is my command. I've moved this thread over too.

buggedcom
02-02-2003, 09:17 PM
Thanks for that Jesse. it helps a lot. I haven't looked at the zip yet but will shortly. One more question though. I have a lot of external files associated with my component. Text files and php scripts. Do i add a node with these in also? or should i bundle them in a zip?

Thanks again.

Jesse
02-02-2003, 09:24 PM
If you add them to the ZIP they will be bundled too but the user will need to know where to go to get them (they end up in your Application Data directory on Win XP). This is why we are going to accept ZIP archives also. Ignore what I said above about only accepting MXP - I meant they will be required for a successful submission. You can also change the target for your other files if you like and drop them in a more obvious directory but ppl might not apprciate that :)

buggedcom
02-02-2003, 09:33 PM
Thanks. I'll probably include them in a zip as they have to sit in a directory structure that would be best to demonstrate in an example download.

Just been doin a bit of searching.... have you seen this?

http://www.linecraft.com/download1.htm

it is a mxi 'wizard'. Haven't checked it out yet but the online example seems like it might be quite useful.

Jesse
02-02-2003, 09:46 PM
Thanks, will check it