Results 1 to 7 of 7

Thread: Flex project into a single SWC file

  1. #1
    Join Date
    Apr 2010
    Posts
    275

    Flex project into a single SWC file

    I produced an image gallery using actionscript 3.0 classes in Flash CS4. In one of the classes, I used a mask Movieclip to mask the thumbnails in the gallery this mask movieclip is a rectangle Movieclip representation in the library that is exported for actionscript. In organize to work my application in Flex 3, I did the following. I positioned the classes in a folder called "com". I positioned my assets (the images) in database called "images". Then positioned together "com" & "images" folders in the "src" database of my Flex project. I exported the mask movieclip representation from the Flash library as a SWC file, and positioned the SWC file in the "lib" folder of my Flex project. I dragged my convention component (image gallery) onto the stage. In the most important MXML submission file, I went to "Design Mode" and originated my convention component beneath the "Custom" folder. I dragged the component on the stage. It does not work what I had done wrong.

  2. #2
    Join Date
    Apr 2009
    Posts
    460

    Re: Flex project into a single SWC file

    For this you have to go to the project then you have to go to the Properties after that to Flex Library Build Path then on the "Classes" tab, you have to comprised and create certain the ("com") database which contains the entire of the classes. On the "Assets" tab, I checkered the ("images") database which contains the entire of the images. And on the "Library Path" tab, I clicked the "Add SWC" button, browsed to my mask movieclip SWC file (that I generated earlier from the mask movieclip representation in the library in Flash CS4) and selected it.

  3. #3
    Join Date
    Apr 2009
    Posts
    586

    Re: Flex project into a single SWC file

    I generated an innovative Flex project, and in the "lib" directory I positioned the SWC file that was generated in the Flex Library project. In the most important MXML submission file, I had gone to "Design Mode" and originated my custom component beneath the "Custom" folder. I dragged the constituent on the stage I then pressed OK, and at present a SWC file that represents my project was generated in the "bin" directory of my Flex library project.

  4. #4
    Join Date
    Apr 2009
    Posts
    745

    Re: Flex project into a single SWC file

    When I first started using Flex for my moderately huge submission, which comprised up more than a few dissimilar swf files, I originate lots of explanation in regards to using SWCs. Placing common code in a SWC project and compiling them independently to eliminate redundancy. On the other hand through hours of carrying out tests I noticed that additional than the code that you explicitly compiled in, SWCs did not assist in eliminating common resources required (images, styles) connecting swfs. The compiler tranquil insisted on placing that embedded background jpeg in the entire of my swfs as an alternative of having it live merely in the swc file. Be unsuccessful. On top of that the hefty Flex SDK, which adds minimum 120 KB to your local swf, I predictable those common dependencies to be positioned in the SWC file and not in every individual SWF. Additional than to this day I have not originated any way of doing that.

  5. #5
    Join Date
    Apr 2009
    Posts
    515

    Re: Flex project into a single SWC file

    The Enter modules seems that I might be capable to drag off the comparable sort of performance my having a skeleton frame swf, which holds merely the Flex SDK dependencies, and then load the entire additional functionality necessary as separate modules at runtime, whether it be innovative logic and/or embedded resources. As far as I understand the merely caveat is memory management. I have seen various versions or descriptions of the Flash player leak from version to version. I have in addition read that when you try to unload modules it's complicated to rip that out from Flash. So consequently it's additional suitable, albeit not as elegant, to immediately "reboot" by restarting the swf in a dissimilar state. I am wondering which the superior approach is, and if anybody provides any insight on this previous to I desire which method to implement my subsequently big Flex project.

  6. #6
    Join Date
    May 2009
    Posts
    970

    Re: Flex project into a single SWC file

    If you are trying to acquire the framework code out of your SWFs, make use of the runtime-shared-library (RSL) alternatives. Observe the modules appearance on my blog for when RSLs are helpful previously doing that. Even presently a plain, empty submission class linked to RSL libraries the swf without debug information in sequence is tranquil a whopping 65KB. Using an AIR based connection report tool off the internet demonstrate an insane amount of classes that are pulled in presently for the reason that you are using the Flex libraries.

  7. #7
    Join Date
    May 2009
    Posts
    1,010

    Re: Flex project into a single SWC file

    Be supposed to be less important in Flex 4 they tranquil require several classes in organized to get things bootstrapped in the right order. It determines to by no means be 1k. If you necessitate being that diminutive you determine to encompass to hand code the whole thing you determine to necessitate and if your app is complex sufficient in the end it determine to take longer so you determine to have to consider the tradeoff. In Flex builder I created an ActionScript project (I do not desire to mess by means of Flex yet) and I tried to create the SWC able to be seen to the project, I copied it to the LIB folder and I added it to the project by means of the project/ properties/ actionscript build path/ library path , and I added the SWC file.

Similar Threads

  1. How to convert a Project 95 file to Project 2007
    By VauGhna in forum Microsoft Project
    Replies: 9
    Last Post: 02-05-2012, 08:25 PM
  2. How to open a MS project 2007 file in MS project 2010
    By pqmot in forum Windows Software
    Replies: 3
    Last Post: 30-12-2010, 04:41 PM
  3. Replies: 3
    Last Post: 10-11-2010, 07:27 PM
  4. Embedding Flex SDK .jar files inside a Java Project
    By Tanveer Joshi in forum Software Development
    Replies: 6
    Last Post: 14-07-2010, 12:07 AM
  5. Replies: 6
    Last Post: 12-07-2010, 04:26 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,147,977.41525 seconds with 16 queries