ActionScript 3.0 :: Building And Using SWCs?

Oct 3, 2011

building and using a SWC.Essentially, my only goal is to put a bunch of assets in a library, and have those assets included when a different swf is compiled. Compile-time, not runtime.

In my assets FLA, I add an FLV to the timeline of a movieclip. In the movieclip properties, I select Export for ActionScript and give it a unique classname ("FLV_intro"). In Publish Settings, I choose "Export SWC" and click Publish.

In my main FLA, I goto Actionscript Settings, Library Path, and add the SWC. In the code for my main FLA's document class, I do this:

var VideoClass:Class = getDefinitionByName("FLV_intro") as Class;
_video = new VideoClass();
_videoHolder.addChild(_video);

The result is a SWF that does not have the increased filesize of the assets SWC (~30mb), and obviously, the video doesn't show up.Again, the goal here is to have large media assets, such as FLVs, external from the main FLA code, but the resulting SWF to contain everything when compiled - no external SWFs at runtime. The client requires a singe SWF. Additionally, I can use a different, smaller set of assets when developing to make development faster.

View 3 Replies


Similar Posts:


ActionScript 3.0 :: Create SWCs Using Cs4?

Jan 5, 2011

How can I create SWCs using cs4.how to create SWC files that can be embedded in my code? I use CS4 under win XP, and hope to be able to create an SWC file containing my code and media files that is to be embedded in my final code.

View 0 Replies

ActionScript 3.0 :: How To Create SWCs Using Cs4

Jan 5, 2011

How can I create SWCs using cs4 inspired by a thread on code protection, I would like to learn how to create SWC files that can be embedded in my code? Googling gave me rather odd and useless results...I use CS4 under win XP, and hope to be able to create an SWC file containing my AS3 code and some media files that is to be embedded in my final code.

View 4 Replies

Flash :: Working With SWCs - GetDefinitionByName?

Nov 5, 2010

I have a bunch of graphics assets in a fla, the MovieClips are linked to some classes. I export the fla as a swc , which I add to my library with the option "Merged into Code".All works great, I can create instances of my MovieClips , just by calling their classes like this.

example 1
var newMc:BaseClass = new GraphicAsset();

Now if I want do the following , Flash throws an error , GraphicsAssetClass is null!

//example 2
var GraphicsAssetClass:Class = getDefinitionByName("GraphicAsset") as Class;


The only way I can get the above line to work is to do this

//example 3
var newMc:GraphicAsset;
var GraphicsAssetClass:Class = getDefinitionByName("GraphicAsset") as Class;[code]....

where I could simply get the class by calling getDefinitionByName()like I do on example 2 , without having to resort to example 3 solution.

View 2 Replies

ActionScript 3.0 :: SWCs Created In Flash Not Working

Mar 1, 2010

I cannot seem to accomplish what I thought would be a trivial task. I installed the SWC commands extension for CS3/CS4 and I am using it exactly as prescribed to create SWC files. When I point to them through the 'build path' prefs UI of my Flex project, one of two things happens:

1. If I created the SWC in CS4, Flex immediately crashes when it reads the file. When I re-open Flex it either crashes immediately or does so when I switch to design view and try to have access to the components panel where the new SWC should appear.

2. If I created the SWC in CS3, I perform the steps in Flex, and it seems like everything is OK, but the new component simply doesn't appear in the components panel at all. Flex behaves normally otherwise.

I can import third-party SWCs just fine in Flex otherwise.

Does anyone know what may be going on? I've even dumbed down my SWC to just a single movieclip containing a fill instead of something containing Actionscript, and it still behaves the same way.

View 13 Replies

Flash :: Embed The Same Font In Multiple SWCs?

May 27, 2009

I have the following project structure: A Flex Project (SDK 3.3) Multiple SWCs with grafics and textfields that are used as components in the Flex project.

Since I have a lot of SWCs that all use the same font in dynamic textfields, I do not want to embed the font in every SWC.Instead I want to have a library (RSL?) with the font from where all the SWCs load the font.

I tried to build a library file with the fonts using the "Export for runtime sharing" feature in Flash.While it works perfectly when I stay in Flash, Flex throws an "internal build error" when I try to use these SWCs in Flex.

View 1 Replies

ActionScript 3.0 :: What Is The Optimal Way Of Exporting SWCs From Flash CS

Mar 3, 2011

I got a question in need of somebody who knows a lot more internals of the Flash system than I do. My artist designs the objects I use in my games as Movie Clips in Flash CS 4. I export those Movie Clips from Flash CS 4 to Flash Builder 4 via a SWC file. In order to do this, I select "export for ActionScript" in Flash CS 4, and "Export in Frame 1".

1. If a Movie Clip has 20 frames, does Flash export 20 drawings, 1 for each frame? If not, how does it do it?

2. I heard that if I have scripts in the frames, I will definitely get more objects instantiated, thus, for many instances of the Movie Clip in my game, I will get a performance hit.

3. Is it ok to add my scripts via "addFrameScript" in the Flash Builder-side, rather than put them in Flash CS 4?

View 4 Replies

ActionScript 3.0 :: Flash Load In SWCs At Runtime?

Jan 6, 2011

Beginners Intro to SWC files SWCs are ZIP archives with two files in them: catalog.xml - Lists all classes contained in the SWC along with their dependencies.library.swf - Contains all the actual classes So theoretically... It should be possible to load in SWC files at run time and use the classes from them, right?

You may have to unzip it first and extract out the SWF, but this arduous process could be made easier with a few helper classes. In fact, having the "catalog.xml" there may also make it easier to identify which classes are contained within (which means you don't need to guess or assume which classes are in it). Has anyone tried this yet or know of anyone else who has?

I searched Google for a bit, but most results actually were actually mislabeled, and loading the SWC in at compile time. I found nothing relevant, so asking here is much easier.

View 4 Replies

ActionScript 3.0 :: Using Flash Components In Multiple SWCs Inside Only Project?

Feb 8, 2010

Ok, this is a somewhat complicated issue dealing with SWCs and compilers. I've outlined steps to reproduce the problem below. I'm using the method outlined here to bring in Flash content to my project. I have 15-20 SWCs already, and it's working fine for those assets, the problem is specifically related to Flash's components (ComboBox, RadioButton etc.) If anyone has *any* advice on this, please let me know as we are completely stumped at this point!
 
The issue we're having involves using multiple external SWC files which contain AS3 components from Flash CS4. When two SWCs are linked to an ActionScript project (using Flash Builder 4 Beta (build 4.0.0)) there are collisions in the referenced classes which cause the most recently published SWC to knock out any duplicate classes in the other SWCs. A simple way to replicate this is as follows:

[Code]...

View 3 Replies

ActionScript 3.0 :: [Flex] Workflow - Dynamically Choose Swfs / Swcs

Apr 16, 2010

I'm in the process of planning a banner project, where I want to being able to output all banner formats (about 10+ of them) from the same flex project. They will all contain pretty much the same content but with some variation, and because of the size limit I want to load only the necessary assets for each format.

I wonder if there's a way to dynamically load different assets (in form of swf or swc) depending on some setting? I can of course load different swf:s into the main swf but I want only one swf per format. How about launch configurations, is there a way to choose different swc:s there?

View 1 Replies

Actionscript 3 :: Create Relative Paths To Swcs In Module Dependencies For Flex?

Dec 6, 2010

Can someone tell me if its possible to create relative as opposed to absolute paths to swcs in module dependencies for Flex or actionscript modules?In Flex Builder i would simply edit the swc path as'../lib/.swc..But there doesn't seem to be a way to edit the path in IntelliJ once you've defined it.

View 1 Replies

Flex :: Specify Swc When Building A Swf?

Jul 7, 2010

I have implemented some utility classes in Flex that I want to use in multiple AIR projects. I have created a swc which contain these classes. I am working on a Linux machine and do not have FlashBuilder. So I am using the compc and mxmlc command line SDK tools. My problem is that I have not been able to find a way to specify the swc when building the standalone project. A tutorial suggested the following command: mxmlc -load-config /opt/flex/4.1.0/frameworks/air-config.xml -library-path=/path/to/utility.swc hello.mxml. However, using that gives me the error hello.mxml: Error: Unable to locate specified base class 'mx.core.WindowedApplication' for component class 'hello'. Everything works fine if I move all code from the swc to a single monolithic pro ject. The code for the standalone project is:

<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" windowComplete="completeHandler();">

[Code].....

View 1 Replies

ActionScript 3.0 :: Building A XML File?

Nov 25, 2009

I am creating a tool for use at the office. It has, at this point, about a dozen text fileds. From these textfields I want to build an XML document using AS. The way it needs to work is when a user enters text into these fields and hits the submit button that text is put into the propper tags. Each time the user hits the submit button another block of XML code is added to the file.

Here is most of the code. I am building this on another computer which is not online so I am only showing the important stuff here. It works so far but the only output I have seen is a trace. I could have the user manually copy and paste this output to the XML document but I would rather have the document built by the program each time the user hits the submit button. Am I even on the right track here? I have the correct output, now how do I add this output to an existing XML file?

function loadFile(){
var fileName:TextField = docName; //loading an existing XML file.
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.Complete, loadXML);

[code]....

View 2 Replies

Building An Item In Flash

Aug 18, 2009

I have no idea what to call it or where to start looking, so I am putting it in the generic and hopefully someone can point me to the right forum or area. Here is my project and I am trying to teach myself how to do these things. I had great help in making buttons on here a while back, now I am trying to build an object right in flash. The easiest thing for most to relate to is a computer that is being built from scratch. So, You start with a base picture of an open sided computer with a list of components underneath. By draggin those components to the box, it snaps them in place. You can also remove them the same way. When done, you click a tally button and it shows a list of all the components you added with product numbers.

View 2 Replies

ActionScript 3.0 :: Building An MP3 Player?

Sep 25, 2009

I have the below actionscript almost working for playing mp3s. This isn't dynamic or anything. Just links to songs (from buttons) that should null each other out when clicked on. The first song loads fine. However, the second song will not load. I must be missing something. Or maybe I took the wrong approach? Any help would be great.

[Code]...

View 2 Replies

ActionScript 3.0 :: Add Variables Building On The Fly?

Oct 16, 2010

I remember reading somewhere how you can add variables building on the fly but can't find any references. What I have is a MovieClip in my library. I will use it to create several Menu Items.
 
This is what I have written:
LessonButton = new mcLessonBtn();LessonButton.name = "menuLesson"+i;this.addChild(LessonButton);

View 6 Replies

Media :: Building Server For FMS?

Nov 30, 2010

I have built a flash app that utilizes an rtmp feed to stream video and I want to be able to stream my own content. I am looking into building the machine that will run Flash Media Server and was looking for some pointers before I get started.
 
My flash based application runs independently on a large touch screen and is going to be the only pc accessing this server, so I was wondering how beefed up the server needed to be. I would like to get it stream three live hd feeds. Can I run Flash Media Live Encoder and Flash Media Server on the same machine?

View 2 Replies

Building An App To Call A .swf Game?

Aug 7, 2011

I'm looking to build a flash application that acts as a "shell" around a flash game.I only need it to do some pretty basic functions:

1) Calls a PHP script I wrote to determine a few things (if user is logged in, what their userid is)

2) If the php file says the user is logged in, the "shell" should let the user play a .swf flash game that I wrote. And, after they are done playing my .swf game, I want the game to pass out a parameter (score). Again, the "shell" will call a prewritten php script to store the score.

3) If the php file says the user is NOT logged in, the "shell" should display a login box (username/password).

My main challenges have been getting one flash application to call another. (ie: the shell app calling my game). Is this possible?

View 1 Replies

How To Implement Interactive Building Map

Dec 16, 2009

I need to build an "interactive floorplan" for a shopping centre (or two). Many shopping centre websites already have this (eg Bluewater in the UK). Traditionally, the way to build such a floorplan / map is to do it in Flash. The actual floorplan is a Flash asset and the data that describes which retailer is in each location is fetched from the webserver as XML. That way editors can update the location of retailers without having to edit and recompile the SWF file. However if the floorplan itself changes (for example, a larger shop is split into two smaller ones) then the map has to be edited. Another disadvantage is that the data isn't readily available to third parties for mashups etc. So apart from Flash what would you consider using to achieve the same effect? I know of SVG but IE doesn't support it.

View 1 Replies

Actionscript 3 :: Building A New Dictionary Out Of An Old One?

Aug 31, 2010

I'm working with a large set of hierarchical taxonomic terms, where each term ("203") has a matching "term203" movie clip on the stage, and am having trouble getting a recursive function to return all of a given term's descendants.There is a main Dictionary() object with the following nested organization for each term:

{ [object Movie Clip] : { "tid":203, "parent":99, "name":"Culture", selected:false, "otherData":"etc" } }

...where the [object Movie Clip]'s instance name would be "term203". All of these object:subObjectArray items ("terms") are stored in a master taxonomy:Dictionary() object.I've been trying to make a recursive function (which is in itself already a little above my head) that takes the click.target of a movie clip and returns a new Dictionary() object with all of the children and grandchildren and great grandchildren (etc) of that term, in the same, nested organization described above.

The code below traces the right number of recursive loops, but the returned Dictionary() object only contains the first run's terms (only the immediate children of the requested term).

var taxonomy:Dictionary = new Dictionary();
// ...Term info is loaded into taxonomy from a JSON-style text file)
// ...MOUSE_OVER event listeners are added to each

[code]....

I certainly do not claim to be the most efficient AS3 programmer, so I am open to alternative configurations. However, after trying static and nested Arrays, I would prefer to continue using the Dictionary() object as my main pool.As noted, only the immediate children end up animating in the revealChildren() function. It's mystifying to me then, that in the getAllChildren() function, all of the descendants trace sequentially (well in no particular order) in the output window.Also I can't get any sort of name or property out of the subSet Object. That could be the problem.I've only tested it as far as 'two generations,' but it seems that only the first round of calling the function successfully adds those terms to the new Dictionary() object and returns it intact to the animating function.

View 1 Replies

Flash :: Building Exe And App Applications From Swf

Aug 20, 2011

converting my swf to exe and app. I know that there are several options available. My application will be frequently updated so update feature is essentions for me.

p.s. As another option, I can make app and exe out of a loader app that will load main application module every time it is updated.

my main concern is about build in update feature inside projector eg. Mac app will be able to check for new version of my app automatically...

View 4 Replies

ActionScript 2.0 :: Building Array From XML?

Jun 27, 2006

I'm trying to dynamically build this structure from my XML file:

[Code]....

Now I know how to parse the XML file, but I'm just confused how I should build the array described above using this XML file.

View 8 Replies

ActionScript 2.0 :: Building Or Setting Up A Web-cam?

Mar 13, 2007

has anyone had any experience building or setting up a web-cam? i feel like this is old technology and should be easy to do. however i dont really even know where to start as far as company to go through for streaming it what to buy etc. this will be something that at points there could be 30,000 or more people watching because it is for a radio station in chicago. so i have to think about traffic?

View 2 Replies

ActionScript 3.0 :: Building RSS 2.0 Reader?

Oct 23, 2007

I'm building a RSS 2.0 reader and have only a vague idea of how to do it except use URLLoader and URLRequest to start everything. Can anyone point to a good tutorial?

View 1 Replies

IDE :: Building A Preloader In Flash?

Jan 2, 2009

building a preloader in Flash. It's about pre-loading swf files in the background while the visitor is watching a page. For instance, I have a start page built in HTML. It will have links to various swf-clips. I would like for those swf-clips to start caching immediately once the HTML page is loaded so that there is no (or little) delay once the visitor clicks on any of the links.

View 1 Replies

IDE :: Building A Site From Scratch

May 4, 2009

I need help building a site entirely on Flash from scratch. I am a beginner at the software, I know what most tools do, I know how to create basic tweens and stuff, but well, all in all, I'm a beginner. I know absolutely nothing on Action Script (be it 2 or 3), and I want very much to learn Flash now. To do so, I want to put online a portfolio site for me. I already know Photoshop, Illustrator and After Effects quite well, so I think now's the time to give it a shoot. On to business:

1. So, first, what size should it be? I wanted it to be something around 1024 x 768 maybe? Is it possible to set an adapative resolution for the site? (I don't know if that's the correct term, what I meant is that the site changes resolution according to the users who are accessing it.)

2. I heard that if you don't use ActionScript to animate things, the site gets mega heavy. Is that true? What should I use ActionScript for when building this website?

3. Is it possible to organize the loading priorities? As in, the order in which things load, so that the site gets a bit more dynamic allocating the user's connection?

4. Are there global standards for Flash-based websites?

For now, I guess this is it. I'm starting this project today, so I'm still not quite sure what other doubts may pop up.

View 1 Replies

ActionScript 3.0 :: Building An XML File ?

Nov 25, 2009

I am creating a tool for use at the office. It has, at this point, about a dozen text fileds. From these textfields I want to build an XML document using AS. The way it needs to work is when a user enters text into these fields and hits the submit button that text is put into the propper tags. Each time the user hits the submit button another block of XML code is added to the file.

Here is most of the code. I am building this on another computer which is not online so I am only showing the important stuff here. It works so far but the only output I have seen is a trace. I could have the user manually copy and paste this output to the XML document but I would rather have the document built by the program each time the user hits the submit button. Am I even on the right track here? I have the correct output, now how do I add this output to an existing XML file?

function loadFile(){
var fileName:TextField = docName; //loading an existing XML file.
var loader:URLLoader = new URLLoader();[code].......

View 1 Replies

IDE :: Building A Menu In Flash?

Jan 10, 2010

I'm trying to figure out where to get started on a menu like the one found at:There are several links, and as you rollover each of them, it changes the image above them. However, the image above them has links in it as well.I'm completely lost on where to get started as it seems like rolling over opens another page right above it.

View 4 Replies

Building A Flash Drop Down Menu?

Oct 12, 2009

HOW do I go about doing it?Ive tried...buttonon "over" create to movie clipinside movie clip have my animations and sublink buttonsit works fine, but there's one problem, The hit area of the main button HAS to cover the hidden sublinks, so even if you scrolled your mouse over the bottom of the button (in the invisible area) it will still show since its in the hit area).How can I create a simple nav drop down? I seriously have went through almost all tutorials, both video and text, and nothing has worked! I am using Actionscript 3, or whatever the tutorial says to use.edit: Here is something I'm working on. Its a button, and on the rollover it creates the animation. Obviously it doesnt work, because you cant have a button inside a button, so I don't know the actionscript to do this.

View 2 Replies

ActionScript 3.0 :: Building A Search Application?

Aug 1, 2010

I am supposed to design a Flash application. Part of this application consists of a search window. It is similar to your search window on a DVR. When you want to find a specific show or movie to record, you cycle through the letters and type it into the search box. As you type, results are instantly posted. Once you see the one you want, you can simply scroll over and select it. You can move in and out of the search box as needed.

View 6 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved