ActionScript 3.0 :: External Asset Package - Swf - Swc?

Aug 19, 2010

When I was building apps in as2 - my main method of project distribution was to create a bunch of different swfs, each representing, probably, a timeline, some code, and a set of graphical assets. Tho cumbersome, it meant that I could progressively load large chunks of the project as needed, at runtime.

Obviously - working in as3 - this changes a bit. My last project ended up being a bit too large, even when all assets had been optimized - mostly because I just embedded them in one swf and loaded it (kinda long load time). So - new project, wondering what solid methods are available for loading packages of external assets. I could, obviously, just load everything individually, but I would like class linkage and symbols already defined - rather than doing this manually for bitmaps.

[Code]...

View 4 Replies


Similar Posts:


ActionScript 3.0 :: Access To An External Asset Of An External Asset

Jan 21, 2010

I have an externally loaded swf that contains thumbnail movieclips. When a thumbnail is clicked an external image is loaded. I would like to be able to reposition this external image. I know I can use typecasting to control a movieclip of the swf but how do I control nested externally loaded files? I have a different approach that should work fine but I was just curious about my initial attempt.

View 0 Replies

ActionScript 2.0 :: External SWF With Asset Library Possible?

Oct 25, 2009

So I've seen many a tutorial on how to do this in AS3 but I'm trying to work out if there is a way to have all my assets for a game I'm making external, so they can be shared with a level editor that resides in a different .swf and won't be loaded twice.I spent a while looking and found out about Shared Libraries, which at first I thought would solve the problem, until you find out that you can't use attachMovie to attach anything to the stage at run-time if it is an imported object, which just sucks to be frank .So I then thought of a work-around for that by adding these shared objects inside a MovieClip that wasn't shared so I could add that from the stage and access the clip inside using the instance name that I would assign it. This worked fine until I remembered that I had was using several Bitmaps and the BitmapData class, hence if I placed these bitmaps in a MovieClip I can't even assign an instance name to access them to perform the code that I wish to on them.

View 2 Replies

Flex :: Get ByteArray From External Asset Image Synchronously

Oct 22, 2011

I have a var that holds the String value for the path to an image. How can I use that to get the ByteArray from that image synchronously?

View 1 Replies

ActionScript 3.0 :: External SWF Asset Libraries - Most Efficient Method?

Jul 28, 2010

I haven't experimented with external SWF's purely as image/sound libraries etc. I generally embed assets and/or load in sound/textures/geometry etc dynamically.

However as I'm starting development on my first game, I would like to use an asset SWF per level, so all images, sounds, models etc are contained in this SWF, nice and clean, just one file loaded per level. No code, just assets.

Not only for the structure, but embedding transparent PNG's is very important, as obviously uncompressed PNG's are pretty hefty, and flash does a great job of it.

So for those with experience of asset SWFs, what do you think is the best method of loading/removing/accessing/managing them?

View 9 Replies

ActionScript 3.0 :: Using Symbols In External Package?

Jun 27, 2010

I want to use symbols, that I created with Flash Authoring Tool and made available for ActionScript inside a package with my own classes.The package folder and the *.fla file are placed in the same source folder, anyway, the Symbol-Classes cannot be used out of these external Classes.

View 1 Replies

ActionScript 3.0 :: Use A Symbol Instance On The Stage In An External Package?

Jul 2, 2009

I have a symbol called s1 in the library and I also created an instance of it on the stage on the first frame, its name is myS01Before I linked the document to a class (this was for youtube player) I was able to add event listeners, such as mousevents, onto this instance in my actions panel. But, after I linked my document to the external class in a package without a name, I cannot add any code into Actions panel, because it gives me all kinds of weird problems.Instead I am trying to use this symbol and add listeners to it in my external class file (the one linked to the document) with no luck.my external class file looks like:

package {  import flash.display.Sprite;  import flash.display.Stage;  import flash.display.StageAlign;  import flash.display.StageScaleMode;  import src.com.enefekt.tubeloc.MovieSprite;  import src.com.enefekt.tubeloc.event.*; 

[code]......

View 3 Replies

Actionscript 3 :: Package External Files Into Flash Deliverable?

Jan 22, 2010

Is it possible to package all external files, such as images and videos, into the final .swf or equivalent file? I want to keep the external files separate because it is easier to change them out while developing, but I don't want them to be external when delivering the project.

View 2 Replies

ActionScript 3.0 :: Passing X And Y Values Into A Package From Main Package

Dec 18, 2009

I am having troubles passing an x and y argument into a package function that creates a projectile on stage at the tank.gun's x and y.I have attached a zip of the code I am working on.[code]

View 6 Replies

ActionScript 3.0 :: ASDoc Only Documents 1 Package Function Per Package?

Jan 27, 2010

I'm running into this weird thing with ASDoc. It will only document one package function per package.For example.I have these two functions:

gs.util.printf
gs.util.ftrace

In these files:

gs/util/printf.as
gs/util/ftrace.as

The only function that get's documented in ASDocs is "printf". But I know it can do more than one. As an example, in the livedocs [URL] There are more than one functions documented.

View 2 Replies

ActionScript 3.0 :: Compile Package File - Error: A File Found In A Source-path Must Have The Same Package Structure?

Dec 19, 2011

I have an actionscript file,it has a package name,it locate C:demo directory,like follows:

package demo{
import flash.display.*;
public class ABC extends Sprite{[code]............

Then I compile above code like following command,but it raise following error:

C:>mxmlc demoABC.as
Loading configuration file C:sdkframeworksflex-config.xml

C:demoABC.as: Error: A file found in a source-path must have the same package structure '', as the definition's package, 'demo'.Where is wrong above command?

View 1 Replies

Eclipse :: Flex Compiler Error: "put Definition In A Package" For Classes That ARE In A Package

Oct 13, 2009

This is with Flexbuilder 3.2, Eclipse 3.3.2.I am moving my development environment to a new machine. Actionscript classes that compiled in the old environment now get a compile error:

A file found in a source-path must have an externally visible definition. If a definition in the file is meant to be externally visible, please put the definition in a package.I do declare the package in these classes - I think failure to declare the package is the usual reason for this error.To add to the mystery, many classes in this project compile without errors.

View 1 Replies

Flash :: Reference The Default `this` Reference In Actionscript3 From An External Package?

Jul 7, 2011

My code is an external .as file. Google provides this code on their demo, which contains the this keyword:

[Code]...

Notice that I have 4 calls to console.log. The first 3 fire, but after the new GATracker statement, the 4th does not fire. I have a feeling that I'm overriding the entire package with the object created from new GATracker when I should be passing a different context. I believe the correct context I should pass is whatever this defaults to when not inside of a package/external file, I assume it references the main stage object.

View 2 Replies

ActionScript 3.0 :: X Asset Of An Object?

Jan 8, 2011

I'm changing scalex of an object over time.

Code:
function onLoop(){
angle+=1;
obj.scalex=Math.cos(angle*3.14/180);
}

The object becomes thiner and thiner. Is there any way how to know where(x,y) is the top left corner of the object?

View 2 Replies

ActionScript 2.0 :: Check To See If Asset Is There Before LoadMovie?

Apr 10, 2010

I know just loading the movie and then using getBytesLoaded will check to see if it is actually loading, but I'd rather run of test of say, 10 assets to see which are present and then start loading them after I know which ones are there.

View 2 Replies

Flex :: Class Of An Embedded Asset?

Mar 1, 2010

What is the class of an embedded asset?

[Embed(source="picture.png")] public static const picture:Class;

what is the class of:

new picture();

what superclasses does it inherit? i thought it would be Sprite, but it gave me a TypeError.

View 1 Replies

Actionscript 3 :: Loading A SWC Asset By Variable Name?

May 23, 2011

I am trying to load assets from an SWC into a SWF at compile time, in as3. I'm getting the information about which assets to load from a JSON file. I can do so statically, but when I try to define the names dynamically, I'm running into problems. So for example I can do this:onemech[+ tmpObj.id] = new mech3 as MovieClip;And it loads the asset named mech3. But what I would like to be able to do is something like

var mechtype:String = "mech" + mechtypenumber;
onemech[+ tmpObj.id] = new mechtype as MovieClip;

Obviously, that doesn't work.I looked around a bit and I found this here, which seems to be angling toward what I need, but I can't figure out how to apply what's said there to my specific situation.

View 1 Replies

Flex :: Extracting Asset From Swf File?

May 22, 2009

As I am building a Flex framework for minigames, I plan to bundle a bunch of graphic assets (movieclip symbols) into a single swf file, which I will load into my Flex application, before extracting the symbols from the swf file for use in my application

View 3 Replies

ActionScript 3.0 :: Embed Asset Without Flex?

Jun 28, 2011

I am trying to implement a card game using Flash Professional CS5. Since flex makes the final size bigger, I do not want to use Flex for now. I have some difficulties to bind code logic with assets. I have a Deck class and Card Class and 52 card images which are converted to movie clips.

Option 1: I can create linkage to those movie clips means that I will have 52 different classes for each card and I have to create 52 different classes to put my functionality for each card.However I do not want to create 52 classes so is there any other solution?

Option 2: I found embedding asset paths to classes in Flex like that;

Code:
[Embed(source="xxx")]
public var customClass:Class;

So is there a way to make it without using flex in action script code?

View 3 Replies

ActionScript 2.0 :: Resizing A MC According To The Loaded Asset?

Jun 9, 2008

I have tried many things but when i load my external jpg inside a MC (thru the use of a MovieCliploader which then load the jpg inside that MC in an empty MC). I have put my code in the onLoadInit() and did something like

MC._width = target._width;

My MC has a specified width and height in the library. is it because of that or should i put it smaller.

View 1 Replies

ActionScript 2.0 :: Load One Class From That Package In Another Class In The Same Package

Dec 14, 2004

I have classes witch resides in this package :com.network.interface_as. When I try to load one class from that package in another class in the same package like this:

[Code]...

View 2 Replies

ActionScript 3.0 :: Draw An Asset If Want To Change The Colour Of It?

Dec 15, 2009

If I draw something manually, can I still change the colour by actionscript? I want to draw a cat, and the cat colour depends on the the user choice in the previous 'screen'. How should I go about this?

View 7 Replies

As3 :: Flash - Add Multi Custom Class Into One Asset?

Aug 2, 2010

I have a Symbol in Library with linkage name: box_mc

import flash.display.MovieClip;
import flash.events.Event;
import Src.smoothAnimate;

[Code]...

but when run is make error:

1151: A conflict exists with definition box_is in namespace internal.

i want when flash run, the box_is will be add in stage, resize by function changesize.

View 1 Replies

Actionscript 3 :: FullScreen Flash Asset Dimensions

Jan 20, 2011

I'm creating a media player (mostly video but with some graphical interfaces) that has a full-screen mode. However, before going fullscreen it's relatively small (about 620x340) and going fullscreen would typically be about double the resolution. What is the best way to prepare the videos and assets in the file so they look good at fullscreen and at the smaller size? I want to also keep the file size to a minimum (within reason).

View 2 Replies

ActionScript :: BeginBitmapFill With BitmapData Library Asset?

Mar 14, 2011

i've imported an image asset (Background.jpg) to my Flash CS5 library and exported it to ActionScript as class Bitmap with a base type of BitmapData. the following code returns the following error:

backgroundTexture = new Shape();
backgroundTexture.graphics.beginBitmapFill(Background);
backgroundTexture.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
backgroundTexture.graphics.endFill();

View 2 Replies

Flash - Asset Management In Adobe Air For 2D Game

Jun 1, 2011

I'm building an Adobe AIR application (2d platformer adventure game), utilizing the Flash Builder 4 IDE, which will be packaged on a CD for installation. I've embed the majority of the game assets into a static class to keep it simple and organized. This way I can reuse assets and swap them without much digging.

Example:
[Embed(source = "../data/gfx/spritesheets/boyHero.png")] public static var boyHero:Class;

In the early days of the projects, everything went to plan. However as the project has grown to be over 28MB, I've started to run into Out Of Memory errors. These occur when I add new assets, refactor for a while, or add new classes. Once I get this error, I can restart FB and then work for another 15-20 minutes. I've modified my .ini file bump up Flash Builder 4's memory allocation. It's currently set at:
-Xms512m
-Xmx1024m

While I'm at it, here are the specs/plug-ins that I've got installed:
Flash Builder v 4.0 (build 272416)
JNA Library 3.2.7
subclipse plugin 1.6.17
subversion client adapter 1.6.12
subversion JavaHL Native Lib 1.6.15
SVNKit lib 1.3.5.7406

Mac OSx v 10.6.7
2.53 GHz Intel Core 2 Duo
4GB DDR

My Questions:
1) Is the issue with the path that I've chosen for the way I'm handling in-game assets? I am streaming in some assets such as tutorial swfs which are loaded via the SWFLoader. I could go this route for all assets... but, should I? Is this the right way to handle a disk game? (The game runs without a hitch when installed on QA machines...)
2) Provided the embedding of static assets isn't an issue, Is this a FB4 bug? Where should I head for more information?

View 1 Replies

Flash - Rescale An Asset That's A Hierarchy Of Bitmaps?

Jan 25, 2012

I have some FLA/SWF assets which are hierarchies of bitmaps.They have timelines which page-flip through different bitmaps.I'd like to scale these assets down in pixel-size, including the bitmaps they're composed of.I'm not a Flash Animator, but the artist i'm working with doesn't know of an automated way to achieve this. ie, that it's a long a laborious manual process.Does anyone know of a tool which can simplify the re-scaling of bitmap-based FLAs ?

View 1 Replies

ActionScript 3 :: Selecting Asset / UI Element Hidden Behind Another?

Feb 21, 2012

I have two or more graphic elements (bitmap, control) on stage. All of them are listening to mouse events. Some times they can be overlapped by other elements completely or partially. (think of scrambled pieces of jigsaw puzzle). When I click on an element, the click event should by passed on the element if there is something underneath it at that point. If there is nothing underneath the mouse point, the move event should trigger.

For example: Look at the boxes below. Say box A drawn with "=" sign is overlapping box B drawn with "-" sign. The collusion area is drawn with "#" sign. If the mouse is clicked on "#" area, then the event should trigger the box B's click event instead of the box "A" and respective events if the mouse is clicked on non colluding areas of A and B.
========
= =
= ####----
= #### -
====#### -
- -
- -
--------
I want to able to bypass all the element's mouse events until the element in the bottom has reached.

View 1 Replies

ActionScript 3.0 :: Flash Equivalent For Bitmap Asset?

Oct 8, 2010

Im trying to fix some as classes that are importing from mx.core.* and have defined a Class that extended the BitmapAsset class--I dont believe that class exists in the Flash library, so I replaced them all with BitmapData--Can someone explain what mx.core is and what is the Flash equivalent of BitmapAsset?

View 3 Replies

ActionScript 3.0 :: GUI And Game - Loading SWF And Passing Asset

May 12, 2011

I'm currently having a problem with preloading. What I have is:
1. Preloader -> an SWF preloader, made in Adobe Flash CS5
2. GUI -> an SWF file containing the user interface, made in Adobe Flash CS5
3. Game -> an SWF containing actual game logic, made in Flash Develop

The preloader SWF should preload both GUI and Game. I can do this, no problem. The problem however is: I need to be able to control the GUI from the Game. So how can I access the GUI from the Game? In particular the main movieclip in the GUI which contains every interface screen. How can a script inside a SWF communicate with another SWF (all in the same file)?

View 7 Replies







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