Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash








Reference External Library Movieclip In Library With AS3


Hello, i am able to load at runtime a library asset in flash cs3. i do this by setting up its linkage property and setting its base class. for eg

Class: MyButton
Base: flash.display.MovieClip

then in my document class, say i had com.kofi.InitializeTemplate, my class looks like this

package com.kofi
{
import flash.display.MovieClip;
import MyButton;

public class InitializeTemplate extends MovieClip
{
var testButton:MyButton;

public function InitializeTemplate():void
{
trace("the button class has been called");
testButton = new MyButton();
addChild(testButton);
}
}
}

however, once i bring in an external library asset(which i have already exported and set it base class etc), i am unable to call this shared library asset with as3. anyone know what i am talking about?




Adobe > ActionScript 1 and 2
Posted on: 06/25/2007 09:57:08 PM


View Complete Forum Thread with Replies

Sponsored Links:

Loading External Movieclip From An External Movieclip Library Into Main Movie?
How do you load an external movieclip from an external movieclip library into a main movie?

I have an external movieclip loaded within a main movie. I then want the external movieclip to be able to take a movieclip from its own library and the load this into another container ind the main movie.

In other words:

A contains B

B contains C

I want a button in B to place C directly in A

How is this done?

View Replies !    View Related
FocusManager Not In The Reference Library
Anyone knows why focusManager cant be found in the flash reference library? and also when i used it, the word "focusManager" is not highlited as the rest of the reserved words in flash (for example focusManager.defaultPushButton=addURL_btn). Is it something new??

will really appreciate it if someone can reply

cheers

View Replies !    View Related
How To Tell What Class A Library Reference Is?
I want to be able to pass in a String parameter "icon" to a function, and have the function instantiate an icon graphic from the Library based on the that reference.

The problem is that I can't figure out how to tell if that icon in the Library is a BitmapData or a MovieClip. I get the reference like this:


ActionScript Code:
// icon = "thingyIcon";
var iconRef = getDefinitionByName(icon) as Class;

Now I can't simply do new iconRef() because if it is a BitmapData, it needs two parameters (though the parameters are ignored... confusing), but if it's a MovieClip, it needs 0 arguments. Because AS3 does not tolerate argument mismatch, I can't figure out how to do this.

How should this be done?

View Replies !    View Related
How To Tell What Class A Library Reference Is?
I want to be able to pass in a String parameter "icon" to a function, and have the function instantiate an icon graphic from the Library based on the that reference.

The problem is that I can't figure out how to tell if that icon in the Library is a BitmapData or a MovieClip. I get the reference like this:

// icon = "thingyIcon";
var iconRef = getDefinitionByName(icon) as Class;

Now I can't simply do new iconRef() because if it is a BitmapData, it needs two parameters (though the parameters are ignored... confusing), but if it's a MovieClip, it needs 0 arguments. Because AS3 does not tolerate argument mismatch, I can't figure out how to do this.

How should this be done?

An additional problem is how do I know whether or not the item actually exists in the Library?

View Replies !    View Related
How Do I Add The File Reference Library To My Server?
exactly as the title says... I saw in the forum that exact same cuestion unanswered and I have the same problem...

it's for the file reference class...

any hints would be good...

View Replies !    View Related
Sound Only Attaching From Preloader Library Not Main Movie Library
Hi guys, i've got my main movie with sounds used in classes attached from the library via attachSound. works fine when run on its own, but when run through a seperate preloader swf it only works when the sound is in the preloaders library.

Any help would be much appreciated.

View Replies !    View Related
Shared Library Problem (Library File Loads Twice)
What I'm trying to do:
Share a button in one Flash file for use in an imported Flash file.

The problem:
My first Flash file is loaded twice for some reason: once for the initial load, and again when the second, imported file calls on the shared library items.

The players:
FLA/SWF - <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">tour</span> (104k)
FLA/SWF - <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">main-entrance</span> (54k)
SWF - <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">loading</span> (5k, preloader)
BT - <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">travel-button</span>, with MC <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">travel-ani</span> inside the button

The details:
The preloader, <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">loading</span> loads 104k worth of data, all of <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">tour</span> shows up. It is sharing a button (see below) in its library, <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">travel-button</span>.
Within <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">tour</span>, <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">main-entrance</span> then loads. The preloader loads 54k worth of data, the entirety of <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">main-entrance</span>.

Here's where the problem occurs:
<span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">main-entrance</span> has loaded correctly; the preloader is in the first frame, so we know this to be true.
<span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">main-entrance</span> is completely loaded; the file is 54k, and 54k are shown to be loaded as seen in the preloader.
However, after loading, when <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">main-entrance</span> is to go to Frame 2, it chokes. It takes twice as long as <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">main-entrance</span> to load (therefore roughly 108k), before Frame 2 shows up.
After about 20 seconds on a 56k modem, everthing shows up and procedes normally, happily ever after.

What I'm pretty sure is causing the problem:
When <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">main-entrance</span> goes to display the shared button on Frame 2, I'm pretty sure it's loading <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">tour</span> again (104k), in order to get access to its shared library. (Even when I delete the large image so <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">main-entrance</span> is only mere bytes, it still acts like its loading about 104k.) This is obviously no good.

Therefore, the million-dollar question is:
Why is my shared library loading twice, when it's shared? In other words: How can I share the library items in <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">tour</span> so that they can be used in <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">main-entrance</span> without loading the first file all over again?

Symbol linkage:
<span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">travel-button</span> in <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">tour</span>:
[x]Export for runtime sharing
[x]Export in first frame
URL: tour.swf

<span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">travel-ani</span> in <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">tour</span> (<span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">travel-ani</span> is an animation that plays when the user rolls over <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">travel-button</span>):
[x]Export for runtime sharing
[x]Export in first frame
URL: tour.swf

<span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">travel-button</span> in <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">main-entrance</span>:
[x]Import for runtime sharing
URL: tour.swf

<span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">travel-ani</span> in <span style="font-family:'bitstream vera sans mono', 'courier new', courier, fixedsys; background-color:#ccc;">tour</span>:
[x]Import for runtime sharing
URL: tour.swf

View Replies !    View Related
Movieclip From Library
hi

how to call a movieclip from library to the define target area.

sarfaraz

View Replies !    View Related
Add Movieclip From The Library With As3
Hi,

I'm working on an application that has 2 classes:

Main, which is the DocumentClass. In this class I create an instance of my 2nd class, called WidgetDataProvider.

In this 2nd class, WidgetDataProvider, I want to add a movieclip ('Progressbar') from my library to the stage.

When I use this code:

Code:
var pb:Progressbar = new Progressbar();
addChild(pb);
nothing happens..

When I use the same code in my DocumentClass, my movieclip appears.
Can anyone explain this?

Thnx!

View Replies !    View Related
Add MovieClip From Library By Name?
I have a bunch of movieclips in the library to Export for ActionScript with a unique name.

Now, how do I add one of these from a function based on passing in a String?


Code:

AddMovieClipFromLibrary("nameOfMovieClipInLibrary");

function AddMovieClipFromLibrary(id:String):void
{
var mc:MovieClip = new id(); // Pseudo code
addChild(id);
}

View Replies !    View Related
Add MovieClip From Library By Name?
I have a bunch of movieclip in the library to Export for ActionScript with a unique name.

Now, how do I add one of these from a function based on passing in a String?


Code:

AddMovieClipFromLibrary("nameOfMovieClipInLibrary");

function AddMovieClipFromLibrary(id:String):void
{
var mc:MovieClip = new id(); // Pseudo code
addChild(mc);
}

View Replies !    View Related
Library Size / Library Optimization
I have a large .fla. My library appears to max out because I am using a lot of bitmap images (trying to create a 9/11 tribute) I convert many of the bitmaps to symbols to get tween / fading effects. Some questions:

1. Does my Flash 4.0 Library have a size limit per .fla ?
If so, is it measured in items (like every time I get close to 120 it seems I can not add anymore) or is it measured in size / KB?

2. Does a symbol require the bitmap? If I delete my JPG the corresponding symbol goes away, should it?

3. How can I get more bitmaps used in my movie? I have a ways to go, and I am fighting the apparent library limit a lot right now.

4. Any tips on how to use a lot of bitmaps? I realize this adds to my movie size.

Any other tips in general would be appreciated.

Thanks...

View Replies !    View Related
Help With Loading Movieclip From Library
I have a movieclip called NRX and i am trying to load it from the library at runtime. It has a linkage of NRX. The thing is it is not loading, when I run the movie, the second trace is coming back as undefined, so I suppose this is telling me there is a problem somewhere but I dont know where it is. Here is my code on first frame level_o.

trace(this);
var depth = this.getNextHighestDepth();
var io = {_x: 100, _y: 1, _visible: true}
this.attachMovie("NRX", "NRX1", 5, io);
trace(this.NRX1);

View Replies !    View Related
Add Code To MovieClip (library)
Hello, I wonder if it's possible to add code for MovieClips that's in the
library and have not been placed. Like if I create MovieClip using
createEmptyMovieClip(); or attachMovie(); can I add specified code
for those MovieClips?

View Replies !    View Related
To Istance A Library Movieclip
Hi all, i got one simple question.
I have a mc in library called "mark_true", if i want to istance the mc via actionscript how can i do?

Im trying with:

PHP Code:



var mark_true:MovieClip = new MovieClip();
mark_true.y = 30;
mark_true.x = 30;
this.addChild(mark_true); 




But it doesnt work...
can someone help me?

View Replies !    View Related
Calling A Movieclip From The Library
Hello everyone.

I'm going through the Actionscript 3 Animation, Making Things Move book. I'm working with the IK examples in Chapter 14. I want to replace the graphic of an IK chain segment with my own. The example uses an AS file which uses the Drawing API, I want to use a graphic from Illustrator. I can't figure out how to call a Movieclip from the Library in AS. The code for the files is:


ActionScript Code:
package {
    import flash.display.Sprite;
    import flash.display.StageAlign;
    import flash.display.StageScaleMode;
    import flash.events.Event;

    public class OneSegment extends Sprite
    {
        private var segment0:Segment;
       
        public function OneSegment()
        {
            init();
        }
       
        private function init():void
        {
            stage.align = StageAlign.TOP_LEFT;
            stage.scaleMode = StageScaleMode.NO_SCALE;
            segment0 = new Segment(100, 20);
            addChild(segment0);
            segment0.x = stage.stageWidth / 2;
            segment0.y = stage.stageHeight / 2;
           
            addEventListener(Event.ENTER_FRAME, onEnterFrame);
        }
       
        private function onEnterFrame(event:Event):void
        {
            var dx:Number = mouseX - segment0.x;
            var dy:Number = mouseY - segment0.y;
            var angle:Number = Math.atan2(dy, dx);
            segment0.rotation = angle * 180 / Math.PI;
        }
    }
}

I want to replace Segment with my movie clip.

Any ideas? Thanks, A.

View Replies !    View Related
Instance Name For Movieclip In The Library
hey guys,

i think my question will be silly for you but i'm really having a problom in this anyways,

i have 9 movieclips (frame1 to frame9 )in my library which will be attached to single movieclip, i had created a butten on the first movieclip frame1 which plays a movieclip (A) and in the timeline for this (A) movieclip there is a code which hides a movieclip (B) (_root.b._visible = false) but it's not working the problem is for what i know i should put
(_root.frame1.b.visible = false) but the problem is that movieclip (frame1) is in the library how i can put an instance name to it . if that is the solution?

please help me

View Replies !    View Related
Call A Movieclip From The Library?
hi!
i'm using a rollover, rollout script that i'm using on a lot of movieclips and it's a simple visible true/false script, though now i'm wondering if there's a way to call a movieclip from the library?


ActionScript Code:
//RollOver - Fade = true - START
mcT1.onRollOver = function() {
    mcFade1._visible = true; //would like to call mcFade1 from the library instead where it has the name mcFade
};
mcT1.onRollOut = function() {
    mcFade1._visible = false; //would like to call mcFade1 from the library instead where it has the name mcFade
};
//RollOut - Fade = false - END

I like the mc that I namned mcFade in the library (i got a couple of them on the stage for each movieclip called mcFade1, mcFade2 etc) to be called from the library so i don't have to have like tons of mcFades on the stage.

is this possible?

thanks in advance, you guys rules ^^

View Replies !    View Related
Call MovieClip From One Swf Library To Other Swf
Please help me how to call a movieClip from the library of a swf file from a different swf using action script.
For example, if I have flash1.swf and it contains mov1 as movieClip. I want to call mov1 from another swf flash2.swf by using action script 2.

Thanks
Kalyan P

View Replies !    View Related
HELP~ Need A Button To Add A MovieClip From Library
I have 2 movieClips in the library which holds text box.

Description 1
Description 2

I need two buttons 1. loads movieClip Description 1 the other loads movieClip description 2 from the library.

View Replies !    View Related
How To Create A MovieClip From Library
In my fla file, I created a movieclip in library which links to class MyMovieClip. I add some functions in the class. I fla file, when I drag the movieclip to stage, all the functions are working well. But I want to dynamic create the movieclip in stage( not dragging from library). This is the codes in my first frame of fla:
var tf:MovieClip= new MyMovieClip();
addChild(tf);
but all the time it display those error information:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at MyMovieClip()
at dragExample_fla::MainTimeline/frame1()

anybody can tell me what the problem is and how to dynamically create a movieclip which link to a class. Is there any sample links?

Thanks!






























Edited: 10/24/2008 at 12:58:08 PM by luckycool

View Replies !    View Related
Loading Movieclip In Library
Ok I feel stupid because I can load an external movie but I can't load a movieclip from within the library...can anyone help me out please...


Code:
stop();
_root.onEnterFrame = function(){
_root.load_nav.loadMovie("box_buttons");
}
That's the code I used, but for reason I can't get it to work...

Thank you,

Boon

View Replies !    View Related
LoadMovie If MovieClip Is In Library
Is there any way to load a external .swf into a movieclip that is in the library?

Such as

img0_mc.loader_mc.loadMovie("movie.swf") while img0_mc is in the library and not on the scene.

Thanks,
Saveth

View Replies !    View Related
How To Load A Movieclip Into Another One From Library
Thanks for looking into my post. Hope you can help me.

I'm trying to load a movieclip into a "movieclipholder" in the Flash project.
I don't want any external SWF's, everything is put together in the same
project. And that's where my problem starts.

I have got no idea how to load one movieclip from the library into another
movieclip. Is it possible? I feel it should be. - Please guide me.

Thanks alot in advance.
Chethan

View Replies !    View Related
Attaching MovieClip From Library (Please Help)
Hello

I have created a textfield and then attached a movieclip as a background on top of which I wanna place the text field just like a button.

Here is the code

var txt:TextField = new TextField();

var bg:MovieClipClass = new MovieClipClass( );
bg.addChild( txt );

txt.text = "Hello World!!";
addChild(bg);

The movieclip and text field are displayed on the stage but the text field is not on top of the background clip it is always away from the clip I have even tried

assigning the moviclip x and y coordinate to text field but does not work.

Any help will be well appreciated

Thank in advance

View Replies !    View Related
Referencing A MovieClip From The Library...
Hello:

Is possible to reference a MovieClip that lives in the library from a Class linked to another movieclip?

If so, how can be done?

Thanks in advance

View Replies !    View Related
Attaching MovieClip From Library (Please Help)
Hello

I have created a textfield and then attached a movieclip as a background on top of which I wanna place the text field just like a button.

Here is the code

var txt:TextField = new TextField();

var bg:MovieClipClass = new MovieClipClass( );
bg.addChild( txt );
txt.text = "Hello World!!";
addChild(bg);

The movieclip and text field are displayed on the stage but the text field is not on top of the background clip it is always away from the clip I have even tried
assigning the moviclip x and y coordinate to text field but does not work.

Any help will be well appreciated
Thank in advance

View Replies !    View Related
Load Movieclip From Library Into A Movieclip On The Stage?
Alright I am losing my mind trying to figure out something so simple, I can load external swfs no problem, but How do you access a movieclip from the library?

I have a main swf, and a movieclip in the library named feb93_mov. Basically I want to on MOUSE_DOWN load the library item "feb93_mov" into swfloader_mc on the stage. But I cant write an instance name for "feb93_mov" cause it's not supported, so how do I access it then?

Here is my code what is wrong with it?:


ActionScript Code:
feb93_btn.addEventListener(MouseEvent.MOUSE_DOWN, feb93down);
function feb93down(event:MouseEvent):void
{
    loadMe4();
}

var loadMe4 = function():void
{
        var feb93_mov:MovieClip = new MovieClip();
    swfloader_mc.addChild(feb93_mov);
}

View Replies !    View Related
Asset Library - Any Way To Dynamically "read" All Linked Items Within A Library
I've been meaning to ask this question for some time - hope it makes sense.

Basically - I'm using an asset library for fonts and other items. When that asset swf loads, is there a way to burn through all available linked items within that applicationDomain library and have their class names returned? It almost most makes sense to me that this capability could be a bad thing. I'm not complaining here, because using this method of shared assets sure beats the AS2 systems - but, currently, its a two step process: 1) add item to library, set linkage and 2) declare reference to that item whether within the asset fla Document class, or some other manager class that will be used to retrieve assets.

This is in lew of a post I replied to earlier: http://www.kirupa.com/forum/showthread.php?p=2379337

View Replies !    View Related
Dynamically Instantiate A MovieClip I Have In Library?
Hi,
i try to make a standalone application where the user can create dynamicly (by pressing a button for example) a dragable component in the page.
I've made a movieClip called "postit" in my library, and activated the option "export for actionscript" and i give the linkage name "postit".

on the code of my button, i have :
attachMovie("postit","mypostit",1000);

but i want to create a different instance each time i click the button!

even if i do something like
attachMovie("postit","mypostit"+x,1000);
where x change at each click, the component seems to override the one created before, and only one appear at a time.

Does anyone have idea how i can correct that?
or where i can find a good tutorial for advanced actionscripting?

Thanks a lot (and sorry for bad english!)

View Replies !    View Related
Loading Pictures Into Movieclip From Library
Hi

Anyone know how to load pictures from the library into the movieclip using actions.

I've used
loadMovie("image"+whichPic+".jpg", "square");
where "square" is the movieclip container and whichpic is a number,
pointing to one of the 175 pictures outside of the swf file.

It works fine but now i've imported them into the library and can't figure out how to load them from there instead.

I trying not to put them in a frame by frame order, just to call them from the library instead.

View Replies !    View Related
Loading Movieclip Outta Library...
Basically I have 10 different movie clips, all hold in them a different image of a car. They have titles like blackcar, redcar, etc etc...

Can someone use blackcar as an example and tell me the code to show a blackcar when my black button is pressed?

I've tried

on (release) {
with ("blackcar") {
gotoAndPlay(1);
}

However the screen just flashes, even after a stop(); in the movieclip.

Thanks!

View Replies !    View Related
How To Loadmovie And Attach A Certain Movieclip From Itīs Library
Hi!
I have a problem that I havenīt been able to solve.
From a button in a main movie:
How do you tell a loaded movie to attach a certain movieclip "attachmovieclip" from itīs library. Itīs seams that the loaded movie has to be completly loaded before it can "remember" which attached movieclip it should attach.
I would be very thankful for comments.

/sune

View Replies !    View Related
Calling Library Movieclip At Runtime
Hi,

How to call movieclip from the library at runtime? I have created many movieclip and keep it in library. I need to call them one by one at runtime.

View Replies !    View Related
[F8] Attaching Movieclip From Library In A Class?
This is really stupid but I've never used external classes (.as) files before and I'm having some trouble attaching movieclips from inside the class.
I have a movieclip in my library and just want to attach it from the Testing class, why isn't it working?


PHP Code:




mytest.fla

var blah:Testing = new Testing();








PHP Code:




Testing.as

class Testing extends MovieClip{
    function Testing(){
        attachMovie("photo_mc", "photo", this.getNextHighestDepth());
    }
        
}

View Replies !    View Related
Extending MovieClip Without Linkage In Library
Hi all,
playing around with object oriented programming in AS2 I wondered how to extend the MovieClip Class in a useful way.
As I have read one way is to not extend the MovieClip class and write a class which is wrapping a movieclip instead. The other one is to create a AS file and create a symbol which is linked to this AS file.
But since I am familar with Java I want to know if it is also possible to have a class, which is extending MovieClip, that will be constructed like new MyExtendedMovieClip(); or something.

The thing I tried, is written below. The constructor is called but nothing is shown to the stage:


Code:
class Entity extends MovieClip
{
private var w:Number;
private var h:Number;


function Entity (target:MovieClip, x:Number, y:Number, w:Number, h:Number)
{
this.w = w;
this.h = h;

this._parent = target;

this.clear();
this._x = x;
this._y = y;

this.beginFill(0x000000, 100);
this.moveTo(x, y);
this.lineTo(x + w, y);
this.lineTo(x + w, y + h);
this.lineTo(x, y + h);
this.lineTo(x, y);
this.endFill();
}

}

The instance should be build using:

Code:
var e:Entity = new Entity(_root, 200, 250, 20, 100);
But as I already said. Nothing is show. Are there ways to get this working to or do I have to use the linkage way?

thx in advance

deviation

View Replies !    View Related
How To Instantiate A MovieClip From The Library At RunTime?
Hello,

For my application I have several MovieClip items I have created with different animations and similar stored in the library. I need (at runtime) a way to create / instantiate these clips. Something like:

var mc:MovieClip = new MovieClip();
addChild(mc);

but a specific item from my library. Something like this would be perfect:

var bottle:MovieClip = new MovieClip("GatoradeBottle");
addChild(bottle)

Of course that does not works. I am using Flash CS3 and ActionScript 3.

Thanks,
Jorge

View Replies !    View Related
Load Random Movieclip From Library
Greetings,

Can any help me understand how I can load random movieclips from the library without having to create separate SWFs to load randomly.

The situation:
I have a movie that has separate "areas" (not scenes or button activated content) but portions that require a movieclip to randomly be selected from a pool of movieclips from the library. These movieclips in conjunction make up for the final piece that can't easliy be broken into separate SWFs.

I visualize an array of some sort that simply selects from this array and places it into an empty movieclip (there are actually three "areas" or empty movieclips that need the randomizing, but due to overlapping shared graphics, I was hoping to avoid the separate SWF approach) - I'm stuck on the array and the randomizing of this array.

Any help would be greatly appreciated - and any suggestions to a different approach if someone knows a better away. Hopefully this wasn't to vague of a description.

Thanks for the help!!

View Replies !    View Related
Load A Movieclip From Library With Script
Is there any way to load a movie-clip from the library with action script, without placing the clip on the stage first?

View Replies !    View Related
Is It Possible To Create A Movieclip Dynamically In The Library
hi everbody,

i am working on a flash project can anybody tell me tht is it possible to create a movieclip dynamically so tht i can i include tht in my library and further use it.... i need to know this cuz i dont have enough time... plz anybody help me.....

i repeat is it possible to create a movieclip dynamically in the libraray... and i m working on Flash MX 2004...

see u....

View Replies !    View Related
Attaching Movieclips From Library Into A Movieclip
I have a MC shape, its actually a parallelogram and so its slanted and the perspective is tilted a bit (not sure if this matters).

I also have a few different MCs in the library the same shape which I want to place into the MC shape when different buttons are pressed.

For button one, I used this code:

on (release) {
myShape.attachMovie("firstMC");
}

Am I doing something wrong or using the wrong code? In the library, I named the first MC "firstMC" as you can see. I also put the linkage as "export as actionscript".

Any clues?

View Replies !    View Related
Extend Movieclip Without Library/attachMovie
Greetings:

Is there a way to extend the movieclip class without using a library item and attachMovie? Any hints greatly appreciated.

View Replies !    View Related
How To Read The Actionscript In The Movieclip Of The Library?
Hi, I had a problem associating with the movieClips (not swf) in the library. I dragged and put all these movieclips on the stage. As u could see from my attached file, all the actionscripts are written inside the movieclips itself individually and none on the stage. The actionscript written in the movieclip is actually to load my CSS file so that the movieclip can change with the css. However, when I first run the fla file as swf, the movieclip appeared initially without css (color change), but after a few sec, the css appeared, which resulted in the "jerky" action. I know this may sounds confusing but if u could take a look at my attached file and run t urself, u'll see wad I mean. Anyone can help? Any help is greatly appreciated!

View Replies !    View Related
Attaching A Movieclip From The Library To The Stage.
Hey Guys,

Sorry about the noobish question...it's been a while since i've attached something from the library to the stage.

But basically i have my blank document (no movieclips on the stage). I ahve my library item which is a movieclip and i want to attach this directly to the stage NOT into another movieclip.

Any ideas on how to do this??

Thanks in advance guys

View Replies !    View Related
Can I Add Dynamic Properties To Movieclip In Library?
Can I add dynamic properties to movieclips i attached from the library?
like:
my_mc.customProperty:Number = 100;
my_mc.customProperty += 10;

i tried doing it that way, i got an error, but maybe i'm just doing it wrong.

View Replies !    View Related
Load A Movieclip From Library With Script
Is there any way to load a movie-clip from the library with action script, without placing the clip on the stage first?

View Replies !    View Related
Is It Possible To Create A Movieclip Dynamically In The Library
hi everbody,

i am working on a flash project can anybody tell me tht is it possible to create a movieclip dynamically so tht i can i include tht in my library and further use it.... i need to know this cuz i dont have enough time... plz anybody help me.....

i repeat is it possible to create a movieclip dynamically in the libraray... and i m working on Flash MX 2004...

see u....

View Replies !    View Related
How Can I Load A Movieclip From Library To Stage?
Hi everyone,

It makes me so confuse between AS2 and AS3. In AS2, I use linkage and identifier to identify the name of movie in library and then use the attachMovieClip to load it in stage.

Now, it's changed in AS3, I'm very confuse how to identify movieclip and how to add them to stage.

Could someone give some sample for me?
Thank you so much.

View Replies !    View Related
Replace Image In Movieclip From Library
Hi

I have a symbol (converted to a movieclip) and a button. When you click the button I want to load a image from the library into that movieclip. But cant for the life of me get it to do it.

Tried:

Code:


on(press){
this.attachMovie("Image1.gif", "ImageHolder_mc", 0);
}

on(press){
loadMovie("Image1.gif", "ImageHolder_mc");
}


The loadMovie gives an error of

Error opening URL "file:///C|/DOCUME%7E1/USERNAME/LOCALS%7E1/Temp/Image1.gif"

Image1.gif is in the Library with a Linkage name of Image1.gif too.

I want to be able to insert the images in the Library into the MovieClip on the Stage when the user clicks buttons.

Thanks.

View Replies !    View Related
How Do I Reference Objects Inside Of Exported Library Objects ?
Hi,

I am having trouble figuring out what seems to be a simple fix? I have created a movieClip in Flash that contains 3 button clips. I want all to be accessible to actionscript, so I gave the movieClip and the 3 buttons a Linkage Identifier. I deleted them from the stage.

In actionscript, I have instantiated the movieClip and, thankfully, the buttons inside went along.

The trouble I'm having is figuring out how to target those buttons. Since they're on the stage already, I shouldn't have to create a new instance right? When I trace the buttons I get an undefined return in the out put.

Anybody know this one??

Thanks for the help!

Brian

View Replies !    View Related
External Mc, Library
Is it possible to make a file that contains mc's in its library.
Another file with the navigation and when pushed on one of the buttons it load an mc out of the library from the other file.

View Replies !    View Related
Copyright Đ 2005-08 www.BigResource.com, All rights reserved