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




Library Symbols Height



Is there anyway that you can get the _height of an object in the Library. i.e., I want to attach a whole lot of buttons one under each other to form a menu, is there some way I can do an attachMovie but have it do it 100% dynamically so I don't have to put into my AS a specific value for _height for it to increment for each button?



Ultrashock Forums > Flash > ActionScript
Posted on: 2003-02-20


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Symbols + Library
If you have the let's say a tween from one box to another and delete the tween from the library, is there any way you can take whats on the stage and place back into the library and how.

Library Symbols Ignored
I am trying to instantiate and position a library asset (MovieClip) programmatically. The classpath setting and import directives, which work as expected for all other custom classes (those which are not in the library), do not seem to affect library symbols. It appears that the compiler works with its automatically generated class for this (exported) symbol, while completely ignoring my custom class for it. It is only when the custom class resides in the root folder that it's respected; otherwise it's ignored... This is not likely the result of some trivial error in folder naming/hierarchy, or classpath/import settings/statements, as I've meticulously ascertained this. But perhaps there is a conceptual issue here that I miss. Although I've arrived at an acceptable workaround to this problem, I'd love to understand the reasons for this behaviour...
Many thanks for any comments!





























Edited: 10/29/2007 at 12:04:34 PM by AV8|

Library Symbols
I downloaded the 3d spiral .FLA and notced that on the library, the "Move3d" movie clip is a different icon than regular movie clips. Is this due to the amount of action script in it?

Loading Symbols From Library
I would like to know how to load symbols from the library into a target or instance just like we load external movies using loadMovie.

Question About Symbols In The Library...
Can symbols be shuffled in and out of folders in the library without messing up my movie?

Library Of Symbols - Output To CD
hey there

we are doing annual reports for various clients

and have been using flash (for the full screen / scaleable use)

we have been using seperate files for each page (otherwise it would be one
huge file)

now i was wondering if there was a way to have a library of symbols so that
they could be easily updated without having to make changes page by page

output will be to cd (so we can't use the web based library system that
flash has, ie you need a url and we can't use layers because there will be
buttons on each page going to other specific pages)

any help would be most appreciated

thanx

Loading Library Of Symbols In An SWF, Help
Hi all,

Im somewhat stuck in trying to figure out how to do this. I want to create a library of symbols (circles, squares, rectangles, odd shapes, whatever) and store them in an SWF file call lets say "mylibrary.swf". (this is just for an example, i know i could use the flash api to draw the shapes im talking about, but this is based on custom work and it would be much more complex things, etc)

Now I have the main application and id like to use the things in "mylibrary.swf". You can assume that the items in mylibrary.swf are all separate movie clips, and can be stored inside anyhow (either 1 per frame or whatever).

Now, if i have more then one library, can i load them into flash and assign them to specific objects somehow, so i can use them at later points in the flash application?

I guess im just stuck on what all i can do once i load the SWF into my main application.

Also, i though about having the mylibrary.swf's library contain the individual movie clips with assigned "linkage" names which then i could call once ive loaded the SWF but this seems like its not working so i assume that "linkage" ID names do not transfer over as to not interfear with the main library?

What would be a solution to this?

I do not want to create individual SWF files for all the library pieces of course since there may be 100's but if that is the ONLY way then il figure out an automated process (perhaps store the names in an xml file, and parse quickly, i dont know, ill figure it out when i get there i guess)

Any suggestions?

Thanks so much in advance!
Nino

Convert Two Library Symbols Into One SWF
Well, I must be stupid. Everytime I think I understand a teeny-tiny part of Flash... bloody nose.

Here is my "statusWindow" library symbols and test code. This works. What I want is to end up with Two FLA's
1) The tester FLA that does statusWindow.addStatus(....)
2) The statusWindow FLA complete and "self-contained" and compile-able into a single SWF

The tester will have to "_global.statusWindow = this.loadMovie("statusWindow.swf") " or something similar, so that other SWFs will have access to the "newest & best" statusWindow at runtime.

I will then be able to add features to statusWindow.fla anytime I want, and it's newest version will always be loaded by all SWFs, no matter which of 50 SWF's loads it first.

Is this possible? Show me the proper procedure and/or code AND EXPLAIN why, Please !

Current working test & (library mc*2) statusWindow code at
http://www.armchair-travel.com/exper...Window.fla.zip

Using Library Symbols Vs. Using Pure AS3
Hey,

I have a pretty general question about Flash CS3/ AS3. I'm creating an application that has several windows (forms) that will be visible at different times, and I've been able to successfully implement them using both pure AS3 (creating classes that build the windows and populate them all with AS3 addChild...), and also using the "old" author time way (create the symbols for them in the library and populate and control them with the getChildByName() methodology).

My question is pretty simple, and in many ways it is probably opinion. Is there a significant difference in performance one way or the other ? On the one hand, using the coded approach makes for smaller file sizes, but then using the symbol approach seems to make designing the visuals much faster and easier to edit.

File size isn't that big of a consideration, only because the app is going to be run on a LAN most of the time, where loading times are not that much of a concern.

In using the coding approach, I find myself 'mocking up' the appearance of the windows anyway, and then just translating that into code, but is there a real reason to do this, or should I just make the symbols up and pull them from the library when I need them.

I'm sure that there is a happy medium to be found, but I wanted to see if there is a definitive 'best practice' for this type of thing and I figured others might have questioned it as well.

Thanks in advance.

Library Symbols In Class
I'm trying to use .attachMovie in a class but I can't figure out how to reference the library symbol I want to attach.

Here's the code in the class:

__sceneMC.attachMovie("ATM", "ATM_mc", __sceneMC.getNextHighestDepth, {_x:0, _y:0});

The symbol, "ATM" is exported for ActionScript and I've tried linking it to the class. What am I doing wrong?

Thanks.
~t

Loading Symbols From The Library
I've just recently made the switch to 3.0 from 2.0 and one problem that I have is learning how to load symbols from the library. Doesn't anyone know how to do that in 3.0?

Symbols Found In Library
I am trying to deconstruct a complex Flash presentation that I did not create and was not well documented by the original author. Is there a way to determine where a library symbol is used (if at all) in a presentation? For example, I am trying to remove a sound effect that I've found in the Library, but I'm not sure where it is being used in the authoring architecture.

-Jim Epler
San Diego
http://www.mytechmusings.com

Manage Library Symbols Via AS2?
Yeah I need to add new movie clip symbol to flash library via actionscript 2 during movie playback to be able to call it with attachMovie(). I heard there is class in AS3 that can do this but I need it for AS2, please help.

Converting Jpeg (s) In The Library To Symbols
Hi guys, I am currently working on a virtual yearbook...I have 1500 pics (jpeg) in the library, I was wondering if there is a code (actionscript) or anymethod of converting them to simples all automatically...please help!!!

Manage Load Of Symbols In Library
Hello there again!

I have a big movie (180KB) that shows several images that i'd like to load proportionally in each frame to control the load with a progress bar.

Any help? Guess it's easy but I've never done anything like that before.

Thanks,

marlowe

How To Delete Unused Symbols In Library?
Hello! After making a movie a lot of unused symbols are still in the library. How can I delete them without deleting every single symbol and then have a look if it was used?

My Flash Mx Crashes When Using Library Symbols
hi there, something weird happened to my flash MX (well actually it only happened to a particular file).
everytime I try to bring a symbol from the library to the stage, the program freezes and theres a whole mess.
the library in this file has a LOT of symbols of every kind (like 800 symbols aprox.) maybe thats the reason but Im not sure.

please help
thanks

Shared Library Symbols Not Importing
Ok, I made a whole site without using shared libraries.

Then I went in afterward, created the shared library, and changed the linkage on all the common symbols so they would import instead to improve the loading time.

The .swf's are still using the MCs that are in the .fla, and not what's in the Shared Library. I edited a symbol in the shared library so I'd be able to tell the difference, but it's not showing up.

What am I missing here?

How To Convert Bitmaps To Symbols In Library
I have 160 .png files in the flash library needing to be converted to movie symbols but the option to do this doesnt appear. Why is it that .wmf files can be right clicked in the library and converted to movie symbols but bitmap files cant? Please some one help us out

Class Extension And Library Symbols
Hi,

I've got a question which is primarily an OOP question, but it is specific to AS3 in it's implementation.

I writing an interface which consists of displaying a (circuit) card rack which holds twenty cards of various types. Some of the properties of the cards are common to all cards such as slot number, card type, id, etc. They also behave similar when clicked on, taking you to another view.

It seems to make sense to create an abstract class (Card) that has all the common properties and behavior of all the cards, and then extend that class to create the specific card types, but the problem is that the display objects representing the cards are movie clip symbols in the library.

It boils down to this question: How do I extend a class that is already extending the movie clip class (a symbol in the library)? I know that AS3 doesn't allow it, but I figured someone has probably run in to something like this before.

I'm not asking for a specific solution to my problem, just a little shove in the right direction to find it myself. Sorry to be so long winded, but I thought some specifics might help in answering my question.

Thanks in advance.

[CS3] Loading Symbols On Stage From The Library.
I have a bunch of graphic files that I want to load to the stage during runtime. I can't figure out what the code is to allow me to do this. I know how to load separate .swf's but have never worked with just loading something within the actual swf. Can someone give me at least a push in the right direction?

edit- wait so would the best way to do this is to make it a MC and add a linkage identifier? Is that the only way?

Searching Library Symbols For Code
With my current project, there are multiple symbols in the library that have code nested inside them somewhere.

I've noticed the main Search command only searches symbols on the stage or actionscript in frames on the _root (and it searches recursively).

Is there any way to search through symbols in the library (for code), without inspecting them manually one by one?

Is There A Maximum Number Of Symbols That Can Be In My Library?
I'm working on an AS3.0 project developing an interactive map. There are a lot of interactive items on the map -- my Library has just climbed above 1500 items, almost all of which are linked to one external class file (.as) or another. I just added about 700 new map symbols to the Library (previously my library had contained about 800 symbols) and now the thing chokes on publish.

The publish takes about a minute, and when it's done, Actionscript doesn't even seem to run -- I get no compiler errors, no trace actions, no runtime errors, nothing being placed onstage by Actionscript, nothing.

I've found some documentation elsewhere that in Flash MX, the maximum number of symbols you could have in the library was 16,000. I'd be surprised if that number would have dropped, especially if it had dropped by a factor of 10+.

It's almost like the publish is timing out on me. Any other ideas as to what might be going on, and how to work around or fix it? Any help would be greatly appreciated. Thanks.

Duplicate MC And Child Symbols From Library
Hi, guys

I'm in the middle of a project in wich I cannot use Actionscript to generate some content because first there is no Database and two the information its kind of unpredictible.

The project its a Directory Like movie where you can find a List of Poeple and Details.

what I want is:
Duplicate an MC I have in the Library but at the same time make a Duplicate of all the Child Symbols

That would make me things a lot easier.

I haven't found a way to do something like that, I hope there is.

thanks a bunch in advance
alex

Exporting And Importing Library Symbols
If I have a movieclip that contains an image, and I want to export the movieclip to be used by another library externally, do I need to do the linkage for both the movieclip AND the image?

AS 3.0: Loading Library Symbols Dynamically...
Hello, everyone
So i've spent the entire day looking for a solution, but unfortunately, could find anything relevant. Here's the brief description:
There are several movie clips, that are exported for 'Exported for Actionscript'. Each clip has a unique name, but a naming pattern is followed, i.e.:
clip0: inst_0
clip1: inst_1
...
Now, the idea in the beginning was to imitate the AS2 'identifier capability' in AS3, like it is mentioned in a number of sources i was able to find on this issue.
Basically, i wanted the script to pull random movie clips using their unique class name as the reference. Here's the script:

var rand:Number = Math.floor(Math.random() * 10) % n_instances; //generate random number
var inst = 'inst_'+rand;
var instance = new inst();

No matter how hard i tried, i was not able to make Flash interpret "inst" as a name of a class, not a string. Implicit/explicit coercion (or whatever it's called), variable declaration - nothing works. My only hope was the 'eval' function, but that one got deprecated and has no equivalent. Thus, the issue is that, 'the names of the classes initialized are known', but regardless of that - they can not be called by using some sort of function, that uses a certain scheme for referencing the names.

So, has anyone stumbled upon such a problem? (am i not the only dumb@ss with AS3 difficulties?)

Drag And Drop Symbols In Library
Hi everyone,
i have got a problem with actionscripting.That is i created 3 tab buttons and each tab buttons has got its symbols.I want to drag and drop them onto the canvas ,using drag and drop,but however when i click the second tab button the first symbol that i drag to the stage dissapears?Anyone knows how to make it stay .Is like a Signage developer for LTA(Land Transport Authority) Designer.


Anyway if u want the flash file for reference i can send it to u just leave your email.Thanks !

Adding Library Symbols In A For Loop
please mind the confused question, but this used to be very easy to do in AS2.
let's assume that i have 10 symbols in my library called _mc0,_mc1, _mc2......_mc9
and i want to attach them dynamically to the stage

this is what I'm trying to do written in AS2


Code:
for (var i:Number=0; i<10; i++){
this["movieReference_"+i] = _root.attachMovie("_mc"+i , "newMC"+i , _root.getNextHighestDepth() );
}
now, when ported to AS3, the form in which we append the incremented variables to the class name looks weird (and of course it throws error 1007..
this is the version that produces the error:


Code:
for (var i:uint=0; i<10; i++){
var _mc = new this["_mc"+i]();
stage.addChild(_mc)
}
how on earth do you rewrite the phrase var _mc = new _mc1() in a dynamic form?

thanks for the help in advance

How To Load Library Symbols From .as File?
Hi there, I want to load symbols from the library in Flash using a .as file. I have a custom class that should trigger this to happen but I am not sure of the syntax to do it.

I have checked a tutorial:
http://www.bit-101.com/blog/?p=853

Which explains what to do but this does not seem to work when using flash alone.

Currently I have objects in my library names 'star', 'square' and 'circle. Here is my .as file:


ActionScript Code:
package{    import flash.display.Sprite;    import flash.display.StageAlign;    import flash.display.StageScaleMode;     public class App extends Sprite    {        [Embed(source="library.swf", symbol="star")]        private var Star:Class;         [Embed(source="library.swf", symbol="square")]        private var Square:Class;         [Embed(source="library.swf", symbol="circle")]        private var Circle:Class;         public function App()        {            init();        }         private function init():void        {            stage.scaleMode = StageScaleMode.NO_SCALE;            stage.align=StageAlign.TOP_LEFT;             var star:Sprite = new Star();            addChild(star);            star.x = 100;            star.y = 100;             var square:Sprite = new Square();            addChild(square);            square.x = 200;            square.y = 100;             var circle:Sprite = new Circle();            addChild(circle);            circle.x = 300;            circle.y = 100;        }    }}

This runs but I can't see my symbols,if someone could let me know the syntax to do this I would be very grateful

Thanks in advance
Schm

Calling Fns In Instantiated Symbols From Library
Hi,

I'm having some trouble getting a function to be called in a newly instantiated movieClip. The function will work if called seperately, so I assume that its a problem with the function not having been recognized by the time it gets called. I can only think to get around this using a setInterval which checks _framesloaded and then calls a function, but that's messy.

For example:

new_win="window_"+_parent._name;
_root.attachMovie("drag_out",new_win,_root.windows);
_root[new_win].setWindow();

I'd really like a neater way because I use this kind of method a lot.

Thanks,

Withnail.

Dynamically Load Symbols In Library (Linkage)
Here's the problem:
I've written some design/media software(exe) using MX.

I'd like to distribute graphic packages that the user could load in. Say 40 or 50 graphics in one swf file.

My thought is to use Shared Library linkage to accomplish this. Is it possible for the end user software to select the Shared Library file and read in all linked symbols in a drop down box of some kind?

Symbols (MC, Buttons, Etc ) Missing When Share Library Is Used.
Currently, I'm having this Problem :
Symbols (MC, buttons, etc ) linked from shared library are missing when the swf is 1st loaded on the web.

I suspect that it maybe due to the way I implement the share library.

This was how I did it:
1) I created a "MelogoMotion" Movie Clip in a "Logo" Flash Movie file.
2) I changed the linkage option to "Export", identifier
-> "LogoMe". then I published this "Logo" Flash Movie into .html & .exe. Then I closed this file.
3) I opened this Logo Flash Movie as Share Library. I dragged the MeLogoMotion MC into the my current Flash Movie's ("Sophia.fla") library which I am working on.
4) Then I embedded this Linked MC (MeLogoMotion) inside a button symbol, after which I place on stage and ebedded this button into another MC.

The result on the web is: The whole movie clip went missing during 1st loading.

What shld I do to prevent this from happening, so that next time I'll know how to used stuffs fr a shared library???

Hope that my question and descriptions are clear to everyone. Pls help me with this long time confusion!!! Thank you!!!

Accessing Library Symbols Contained In External Swf's
I'm building a dynamic application frontend in flash. I'm pleased that I can use external swf files, loaded into a main movie dynamically, which contain actionScript that I can easily access from the main movie (mostly by creating _global functions). This allows me to selectivly load actionScript without a re-compile.

My remaining issue is: being able to attach symbols from libraries that are contained in an external swf.

I can load an external swf into a level, but my access to the loaded swf's symbol library is limited to that level.

For example; I have an external swf that contains the symbol "testClip" with the linkage name "testClip". From my main movie I load this external swf into _level1. If I want to use attachMovie, I can only do this with _level1.someClip.attachMovie("testClip",dynName,i) I cannot reference the symbol from the _root (_root.attachMovie("testClip",dynName,i) Any suggestions or workarounds?

(CS3 AS2) Deleting Symbols From Library & File Size Help
Hello,

I've got a fairly large and complex file going on (it's about 123 MB). There are 2 movie clips within it that I need help with. I want to send the file to a friend to look over those movie clips, but since it's so large I want to send something much smaller.

I saved another version of the file and deleted everything from the movie that doesn't involve the two problematic movie clips. First I dragged unrelated layers into the trash, and then in my library I picked "Select Unused Items" and dragged those into the trash.

However, the file's size only decreased by a few hundred KB. I probably deleted a good 85% of the information from the file, and there are no obtrusively large symbols left in the library that could account for such a large size.

How can I get my file size to accurately show how much is going on in the file? The only thing I can think to compare this to is putting files in the trash and not being able to figure out how to empty the trash... I'm clearly missing some important step, probably something glaringly obvious, too. Thanks!

Do Library Symbols Count Toward Loading Time?
I want to know if symbols in the library are loaded just like if they were placed on the stage? As it pertains to me, I want to make sure that a symbol exported for AS doesn't have to have a preloader just to load because I'm thinking it should already be loaded once the main timeline loads, correct?

Pasting Library Symbols: Replace Prompt?
It seems like Flash, when copying symbols from one movie to the other (say two different versions of the same file) does not prompt you asking if you want to replace existing symbols or not if the symbols are exactly the same. Can someone verify/debunk this myth?

Why is it that sometimes the prompt appears, and sometimes it doesn't?

Library Symbols Are Making My File HUGE
Hey everyone,

Im struggling in my conversion to AS 3.0 from 2.0. Ive been thrown into a project built by someone else and done in 3.0. The file is HUGE because they have included all of their custom built components in the library. They have built classes for the functionality of each component such as the videoplayer, audioplayer, etc. contained within external .as files.

My question is....is this the best way of setting up a project in 3.0. The reason I am asking is because Im trying to decrease the size of the main interface file and back in my 2.0 projects I would simply load any elements from external .swfs that I wished to appear on the stage when needed. The symbols I left in the library would be attached with attachMovie and were usually part of the look and feel or navigation.

Any suggestions to how best set up this project in a way that will keep the file size small and not embed so many of its components?

P.S. I have optimized to the best of my ability the symbols in the library already.

Adding Library Symbols To The Display List
With my current knowledge of AS3... Whenever I wish to add MovieClip from the library to the display list via a NON document Class the only way I can see to attach the asset is by passing in a reference to the document Class then using that reference as a target for addChild(). Like this:


ActionScript Code:
package  {
   
    import DocumentClass;
    import flash.display.*;
   
    public class ThisIsNotTheDocumnetClass {
   
        private var _DocumentClass:DocumentClass;
        private var _LibrarySymbol:MovieClip;
   
      public function ThisIsNotTheDocumnetClass (value:DocumentClass) {
           
            _DocumentClass = value;
           
            // This is an MC from the library
            _LibrarySymbol = new LibrarySymbol();
            _DocumentClass.addChild(_LibrarySymbol);
          }
    }
}

Is there a better or more efficient way to do this?

Thanks

Accessing Library Symbols Through LocalConnection Object?
Is it possible to get a MovieClip symbol or instance from another swf through a LocalConnection object, so I can use attachMovie?

I just found something about shared libraries, but I don't understand how to use them. I think they are what I want.

Any help is appreciated.

Accessing Library Symbols With Action Script
I know you can access conponents in libraries through Action Script.
But can you do the same for symbols such as buttons I created, (With out having to put them on stage).
Thanks
-T

Adding Symbols From The Library Without Knowing There Class Name?
Hi guys, In AS2, i could do something like this:

[pseudocode]
for(i=0;i < array.length; i++){
clip = _root.attachMovie(array[i].linkage_name, array[i].new_name,nextHighestDepth);
}


In AS3:

I want to be able to dynamically loop through
var rock:BlueRock = new BlueRock();
var stone:BlueStone = new BlueStone();
etc.

any ideas?

Thanks.

Exported Library Symbols Refuse Constructor Parameters?
Regarding exporting a movieclip asset in the library, to be used as a class through actionscript, say you have this class (taken from the help example) for a Circle movieclip in the library:


Code:

package
{
import flash.display.MovieClip;

public class Circle extends MovieClip
{
public function Circle()
{
}

public function getArea():Number
{
return Math.PI * Math.pow((width / 2), 2);
}

}
}
Now I want the Circle() constructor to take a parameter (so replaced the function with another one which takes a parameter).


Code:

public function Circle(x:Number)
{
trace(x);
}
This has been causing me problems. In the linkage settings, when I chose the Class: DefaultCircle , and Base Class: Circle ,
and in the maintimeline I put something like var myCircle = new DefaultCircle(1) it gives this error:
1136: Incorrect number of arguments. Expected 0.

It basically does not want to take any other parameters for the constructor. It only works when I set the linkage settings to
Class: Circle , and Base Class: flash.display.MovieClip , and change the code in the maintimeline to var myCircle = new
Circle(1) . In this case it works. I want to know why the first scenario doesnt work!
Thanks!

Beginner's Question: How To Access Properties Of Library Symbols With Indexed Names?
Apologies for the simplicity of this qestion (I assume) but I've not been able to find out how to achieve what I want yet and I've done a bit of searching. I reckoned it must be so simple, I'll just ask the question, get an answer and move on - fingers crossed!

I have a library Symbol - it is called "Core" and it is a simple rectangle with a Dynamic Text Field inside it, called "Name". On my scene, I place a number of these "Core" symbols and give them instance names of "Core1", "Core2" and "Core3".

I would like to change the name of each of these - by that I mean I would like to change the text displayed in each rectangle. I can do this quite easily via:


Code:
Core1.Name.text = Name;
Core2.Name.text = Name;
Core3.Name.text = Name;
...but I want to access these in a loop... so I want to access them like:


Code:
[Core + LoopIndex].Name.text = Name;
or something like that... but I can't seem to figure out the syntax. I need something like "FindComponent" that I use in Delphi, if it exists... FindObjectByName or whatever...

Am I missing something obvious here? Any help appreciated.

Problems Whit Font Symbols Imported From A Shared Library In A Dynamic TextField
I got some Font Symbols that are imported in my library from a Shared Library.

When I use the font in my Main movie whit the Flash IDE, there is no problem ( in a textField created by hand ). But, when I wanna use this font in a Dynamic textField it doesnt work. Ive tryed to use a TextFormat or in a TextField.StyleSheet but it doesnt work. Same thing for the UI Components ( button or TextArea)

How I can do that ?

regards
mark

Editing Graphic Symbols By Copying And Pasting To Make Slightly Dif Symbols
Hi!

I am using flash to create moving people symbols. I created a "singular person" symbol and saved it, I then copyed a few to make a "bunch of people" symbol, when I go to edit these copyed and pasted symbols each saved symbol changes. Also I am saving them as graphic symbols at the moment.

thanks,

Helen

Overlapping Symbols Inside Symbols With An Alpha Tween
Hello,

In the attached example, Is it possible to prevent the purple overlap area from showing and just be red since red's on top? I have characters that use symbols for arms, legs, etc. and I want to fade them in and out sometimes. The problem is, the areas where the limbs overlap look weird so I have to resort to converting them to shapes on one keyframe. This seems limiting and annoying. I was wondering if there's a command, extension, or property to fix this. Thanks in advance.

Is It Not Possible To Assign Instance Names To Symbols Within Symbols In Flash CS3?
Detail question on nha khoa Adobe group

OK, so I have a player object. I created a symbol that is linked to the player. Inside the symbol I have 2 symbols. 1 is the sprite that displays the player, the other is a rectangle box that is used for collision detection.

I tried giving the collision box an instance name in the property editor so I could reference the collision box from code. The Player symbol is linked to a Player class I wrote earlier so it creates an instance of the Player class. The error I get is this:

ReferenceError: Error #1056: Cannot create property myCollBox on Player.

myCollBox was the instance name I gave that collision box symbol. I thought maybe I had to make the collision box also linked to a class to be exported for action script, but that didn't seem to help.

Height Of DisplayObject Doesn't Equal Sum Height Of Child Objects
Ok, I create a new object like so:

ActionScript Code:
_container = _target.addChild(new Sprite()) as Sprite;

I then run a loop to add children to it, then do this:

ActionScript Code:
var lastChild:DisplayObject = _container.getChildAt(_container.numChildren-1);
trace("container height: " + _container.height);
trace("lastChild: y=" + lastChild.y + " height=" + lastChild.height);

And I get the following output:
container height: 237.5
lastChild: y=200 height=50

Now, the child is top-left aligned, so if it's at y 200 and has a height of 50, surely the height of the container must be at least 250. So why does it say 237.5? Can anyone offer an explanation?

Graphic Symbols And Movie Clip Symbols
what is the difference between creating a graphic symbol from an image with it's own timeline animation and creating a movie clip symbol from the same image that can be animated in the main timeline?

Or do I totally misunderstand the difference between the two?

Copyright © 2005-08 www.BigResource.com, All rights reserved