Shared Libraries Memory Allocation
Does anybody know how Flash calls shared library data into another flash movie as far as ordering and memory? In my shared library, i export my assets for runtime sharing. My sharedfonts.swf is 38k. If I have a second swf file that calls the fonts from the sharedfonts.swf, does it open the entire 38k to get the fonts into the second swf? If so, does it load before the first frame, even if I didn't specify it? I hope I am not too confusing... I just want to know the proper way to optimize data, especially shared fonts.
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 03-29-2004, 11:57 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Shared Libraries Memory Allocation
Does anybody know how Flash calls shared library data into another flash movie as far as ordering and memory? In my shared library, i export my assets for runtime sharing. My sharedfonts.swf is 38k. If I have a second swf file that calls the fonts from the sharedfonts.swf, does it open the entire 38k to get the fonts into the second swf? If so, does it load before the first frame, even if I didn't specify it? I hope I am not too confusing... I just want to know the proper way to optimize data, especially shared fonts.
Memory Allocation
Hi
does anyone know how to allocate more memory to flash MX 2004.
I am using windows XP on my laptop and can't seem to fix the problem.
Thanks
Umar
Memory Allocation? What?
I didn't know where to post this.
I drew a page of comic on flash using the WACOM tablet with absolutely no external jpgs of pngs. I drew it all, saved it and I tried to open the FLA file again to change something and instead I keep getting this message saying
"There is not enough memory to open this scene. Your document is not damaged and may be safely saved. To increase available memory, close open documents or quit and use Get Info command in the Finder to allocate more memory to Flash."
Which is a load of bull because I use a PC, not a mac, so there is no such thing as Get Info command. So I looked this up on google and apparently people have found a solution. But the solution involves going into the flash library and deleting whatever png or jpg it is that's corrupted. Now as I said before, I didn't use a png of jpg; I just drew everything up in Flash so that's obviously not the problem.
So my question is, does anyone know what I can do to recover this file? Or if not, tell me a good place to post this question so I can get some answers?
I Need More Memory Allocation To Flash
I can not publish my latest project because it has reached a size where upon publication I get the following.
"Error creating flash movie, there was not enough memory available"
This occures in both my flash MX and flash 5 versions........
How can I allocate more memory to flash? (both versions if there is a difference)
I am on a PC with 128 RAM ............
Another question as long as I am here. When publishing in MX I get a background hiss/popping when streaming sound, so I've been forced to save as Flash 5 and publish in my old program where the streaming sound comes out clear....
Any Ideas? Is this a bug in MX?
Thanks,,,,,
Memory Allocation And Arrays
Let's say I have 10 movieclips on my stage, all that instantiate a number of variables and objects that belong to that particular instance.
Let's say I want to push them all into an array. Does the array store just a reference to the movieclip, or does each index take up the amount of memory resources that the movieclip that it holds does?
That is, if I have 10 movieclips, then put them all in an array, am I using twice the system resources?
Also, on an unrelated note. I've made a search function that makes an RPC to Yahoo and returns an RSS feed. It works when I test it locally, but as soon as I put it on the web, I'm not getting anything back from the call to Yahoo. I've tried including System.security.allowDomain("yahoo.com") but that doesn't change anything. Suggestions?
Please and thank you!
Memory Allocation & Append To SO?
Hi,
I'm new to this and there's so much to learn, so...
Is it true that there's no manual memory allocation in Flash? (Does a Number type variable always occupy 8 bytes in memory?)
And can I append to a previously stored SharedObjects file? I tried flush() but haven't got anywhere.
Thanks.
RAM Memory Allocation Question
I have an all Flash CD-ROM project that I'll use a projector to run several SWF files. The intro has music and voice-over, as does a bunch of other sections. The interface has a bunch of icons and some logos that I want to use in the intro as well and thought I'd have the interface build during the intro and then stay on screen in level 8, then all the other sections will be loaded into level 6 (the interface ends up being a frame of sorts for the content so it needs to be in front of the content).
My concern is that while I'd like all these elements to remain on screen from the intro, I don't want the voice and music audio files to remain in memory while having to pull in all the other sections that have voice and music audio files. Can you tell me how Flash handles this? When the intro SWF finishes playing the audio and goes to a frame at the end of that timeline without any audio, will the audio stay in memory and adversely affect performance if I don't unload that swf/movieclip?
Thanks,
Brian
Edited: 05/02/2007 at 02:16:05 PM by yevri
Huge Memory Allocation For SWF
Hello Gurus!
I have a SWF file that has no ActionScript in it and consists only of a series of JPEGs (350 frames from a 3D Max animation) inserted into the main timeline. So, when I play the SWF, the 350 frame animation just plays and loops over. Works as expected.
The size of the SWF is approx. 10MB (makes sense since the total file size of all 350 frames is about 10MB -- so no suprises there).
The problem is: When I play the SWF, it takes a total of nearly 900MB (nearly 1GB!) of RAM as it plays. Remember, there is no ActionScript, so I am not "doing" anything else in the SWF (No Listeners, Intervals, or such going beserk and eating RAM...) Just a bunch of frames on the main timeline. Also, the total RAM that gets eaten does so only as the SWF plays through all 350 frames the first time, so it is not like it takes more with every loop played...
What gives? Doesn't seem right that a SWF like this should take up so much in resources. Anyone else experienced this? Any tricks that I need to do when embedding frames like this?
BTW, I know that a better way to view animation is to stream in an FLV with the NetConnection, but for this project, I am currently stuck with the "frames-embedded-on-the-timeline" method.
Any sort of input into this would be most appreciated.
-john
[AS2] EventDispatcher Memory Allocation Question
In AS2 when using the EventDispatcher component, If I register listeners to a movieclip, then remove the movieclip from the stage, are the objects registered as listeners now registered to an undefined value? Or, does the registration no longer exist in memory? I read in AS3, you have to perform cleanup and unregister or removeEventListener() to be more precise. However AS3 has a whole different event model, so I'm not sure.
Example:
Code:
// register listener
someMovieClip.addEventListener("eventName" listenerObj);
//clip removal
someMovieClip.unloadMovie()
This is what I am currently doing. So I need to know if I am chewing up memory with a bunch of undefined listener registrations.
Thanks!
TJ
Strange Memory Allocation By ActionScript3
I use system.totalMemory to listen the memory-allocation
1)
I made a button and when clicked the button it would new a Shape and call its graphics method to draw vector lines and then addChild. But it is strange that when I click it first and the lines are drawn, the memory difference is 0. Then another more click, 0 too, and the third one will bring a "0.00390625M"(I divided the number by 1024*1024 to turn it to "M") cost.
2)
I add a mc to a dynamic class, as:
public function UploadDoc ()
{
init ();
}
private function init ():void
{
var button:CustomSimpleButton = new CustomSimpleButton();
trace(System.totalMemory);
button.aw1 = new MovieClip();
trace(button.aw1);
trace(System.totalMemory);
delete button.aw1;
trace(button.aw1);
trace(System.totalMemory);
addChild (button);
button.addEventListener(MouseEvent.CLICK, doUpload);
}
The output is
8724480
[object MovieClip]
8728576
undefined
8728576
Why after adding a MC, the memory is even more !?
and delete the MC did not make more....
It's so strange that I don't know what is wrong !
Anyone talks about it ? Thanks in advance!
Dynamic Libraries(shared Libraries)
Hi,
I'm a total AS3 noob, so bare with my learning curve please.
I would be interested to load multiple swf files in the main movie and use the libraries from each swf file.
Can I do that with AS3. I know it's impossible to do that in AS2, where you can have only one shared library, but how about AS3 and FP9?
I've found some threads + posts on the internet, but they are not really helping as I need to understand the foundation and how to and what it means, so I'm hoping for a really helpful soul out there to enlighten me...
Pages I read:
http://www.flash-db.com/Tutorials/lo...ata.php?page=1
http://www.ultrashock.com/forums/act...swf-92007.html
http://www.scottgmorgan.com/blog/ind...-swf-with-as3/
Thanks in advance,
Eddie
Shared Libraries
i heard that you can link an mp3 or wav file to use in your flash movie from a shared library that would be outside your movie. So the loading time will be cut down.
Maybe i don't understand the shared library concept but my problem is i have to use an mp3 for background sound and if i load it in directly my movie will be too big.
any ideas on how to solve this?
thanks for you help in advance...
Shared Libraries
Can anyone give me some insight into shared libraries and how they work. Right now I have a window "class" that I drag from swf to swf to use. If I open up a shared library will that in effect keep classes from being duplicated?
Shared Libraries
hi
i'm looking to better understand shared libraries. my impression is that utilizing them offers the potential to save loads of time when dealing with, for example, a presentation that contains similarly structered but different (in the details) swfs...
i'm even just looking to be pointed in the direction of a good explanation.
thanks
Shared Libraries
OK here goes...
I have 2 movies, A and B. A is the main movie. B has nothing on the stage, just some objects in its library which I want to dynamically load onto movie A's stage. Movie A is on level 2 and Movie B is on level 1.
What is the syntax for loading an object from movie B's library onto Movie A's stage? I suppose attachMovieClip comes in somewhere, but what are the arguments and the prefix?
cheers,
Darkwhiteorange
Shared Libraries
Hi,
I have set up a common shared library that will
hold things like my icons, and other movie clips that
I may decide to change at a later date.
It seems to work ok for the movie clips, but not for variables stored inside the movie clip.
In my test movie that loads the shared library, all the
movie clips come in fine. I placed a piece of dynamic text
and set it to _root.myclip.myvar and it correctly displayed the string set by that variable.
However when I try something like
trace("var = " + _root.myclip.myvar);
It doesn't display anything. I need to be able to swap in libraries with different values for that variable.
So the question is, how come the dynamic text pick up the variable, but the action script doesn't?
Cheers
Shared Libraries
I am trying to use a shared library that holds navigation buttons, and it's acting a little strange... I made the buttons in a separate .fla file, and set them all to export for runtime sharing, and then published that movie, and then i dragged each one into a test movie, and it automatically set them to "import for runtime sharing," but when i publish the movie, the actions on the buttons aren't executed, but the look right, and the over and hit states work fine... any ideas?
dave
Shared Libraries
I am trying to create some swfs using the shared library function. My problem is that I expect that when I change a symbol in the shared library swf that it should change in all movies that use that symbol. I republish the shared file and my original movie still shows the original symbol. I must be doing something wrong.
Oh yeah v.5
Shared Libraries
If I decide to use shared libraries, when are they downloaded? When I need them or in the first frame?
Shared Libraries
I have a file folder full of sounds which I want to download into the shared library sound folder.
It looks like the only way to do this is to laboriously take each sound WAV file and load into the main library and then transfer that to the shared library. Is that right or is there a way that i can take the whole folder and dump it right into the share library.
Would appreciate any help on this.
Dave
Shared Libraries
Hello, I am designing a flash site which should be as streamed as possible. I was noticing that utilizing some of the components provided by Flash MX 2004 adds to file size considerably. Thus, I have attempted to better utilize shared libraries containing common components such as Buttons, Labels, and TextInput fields.
The problem I have is that the shared library is attempting to load twice. I am loading the shared library into _level1 at the beginning. However, when I later load in the flash file which contains the links to the shared library components, it loads the shared library again. The problem is that I don't want it to load twice, and it is also causing functions which I am calling on a clip which is supposed to be loaded to fail (because it is re-loading the shared library instead of using the shared library already loaded into _level1).
I was under the impression from the various books and tutorials I have consulted that once a shared library has been properly loaded, it will not need to be loaded again by swfs or clips which contain linked components.
By loading a "dummy" clip which has a link to the shared library, I am able to load the shared library first. Later, when the actual swf which has the links I care about loads, it does not reload the library. However, it seems like there must be a better way to do this. In order to create a loading bar for the shared library, the only thing I can think of would be to put the actionscript code inside of the shared library itself, and then it would have to call a known function at the root level to have its information displayed. Either that or I could just put the loading bar into the shared library. Both of those seem like hacks and I am trying to keep my app nice and cleanly designed. I don't understand why the shared library can't only have the shared library components (instead of the actionscript or loader bar I described above).
Please help me!!!!
Keith
Shared Libraries
Is there any way to use shared libraries in an application that will run from CD. I have a presentation that shows a technical assembly and I was hoping to use a single component library for all the separate animated movies. I have tried to use the readme files with flash but I am not having any success.
Can anyone shed any light onthis matter for me.
TIA
Rob H
How To Use Shared Libraries
Hey guys, I imagine that no one will answer this in any one post, but I'd like to ask if anyone can point me in the right direction of a tutorial for shared libraries.
Also, the pros of using a shared library are obvious, how about the cons? Anyone know?
Shared Libraries
Does anyone know if Shared Libraries are still permitted in AS 3.0, and if so, have an example of how to use them.
This is one area that I really don't understand, well actually haven't really used much. I have several SWF files that may require components which are currently stored in a single swf file. I want to access those components without copying the files to different libraries.
Thanks in advance.
Shared Libraries
This is probably a stupide question and I am ashamed to pose it but I need some better understanding.
I am using a shared library for all my graphics which are used by many movies.
I was wondering about the size of the shared library and how I could have a visual that tells the user some assets are loading. I suppose that the movie that contains all the graphics has to be totally downloaded before the other movies can use the graphics. So, what would be the max size recommanded for it? and how do I show the loading of the shared library in the main movie?
Shared Libraries
please someone show me a good tutorial on doing this..... I can't find one.
Shared Libraries
Hi all,
Ok, so here's my problem:
I have a main flash, with many mc's in my library, everyone with an identifier relating to an object (in this case, sounds) exported from others swf's... I make it work nice, and I can play the sounds, make them stop and everything, nicely.
The problem I have is that all the swf containing my sounds are loaded on the first frame on my main flash... which I don't want.
Is there a way to load these external swf only when... let's say the user presses a button? Or define when the "sharing the libraries" starts?
Is it clear?
I really need help on this one.
Thanks in advance
Shared Libraries
Hi all,
I read through the Technote by Macromedia Flash Web and sort of found jhow to do this sharing of MCs from a shared Library. However, I found out that a MC can only be shared to 1 .swf. How to make the MC shared to unlimited swfs?
When I check the box for export for runtime sharing, Im required to type in the targeted swf which I want the MC to be exported to. If i have 3 or 4 swf that needs this MC to to be exported to, how am I to do it?
Regards
Shared Libraries
I am working on 3 different projects right now and all of them I am including a .as file that has alot of generic functions that I reuse. How do I make this a shared library when I cannot specify 1 url as the projects wont be on the same server and wont have access to the web?
How do I make a shared library file so when I build a project it pulls in the specified file for deployment without me having to manually update a copy of the source .as file.
Frusterated. please enlighten me!
Shared Libraries
Is it possible to store a component(and it's necessary skins/symbols etc) in a shared library?
I've tried and it seems to work until i try and modify a component's parameter.
Steps to recreate error:
1. store a Button component and it's symbols in a shared library, with relevant 'export for runtime sharing' and URL fields set up.
2. Add the button from this shared library into another flash file and drag it to the stage.
3. Compile the file and everything works okay.
4. Change a parameter of the Button instance - change the label to something other than 'Label'
5. Compile the file again.
This time the error messages appear:
tempInit, Line 1 1172: Definition fl.controls:Button could not be found.
tempInit, Line 1 1172: Definition fl.controls:Button could not be found.
Scene 1: 1046: Type was not found or was not a compile-time constant: Button.
Edited: 02/05/2008 at 06:00:39 PM by Craig Grummitt
Shared Libraries In AS3
Hi guys,
I want to know if you know any article or something like that where I can read about share libraries in AS3, I mean usually we can have shared libraries in AS2 as images, movies and fonts... I know that we can have fonts in order to use and change in run time and we need to use or extends a Font Class... but I'd like have more information in order to be clear, specially with other kind of assets as Movies or images.
Any way... any article about these topics will be great!!!
:)
Shared Libraries: How To?
Hi,
How do shared libraries work? I read the Flash help file and it wasn't very clear.
Is it possible to have one external .swf file "LIBRARY.swf" including all the library files I need, load it once onto a root movie._level2, then have all subsequent loaded movies rootmovie._level1 use the library from LIBRARY.swf?
Shared Libraries: How To?
Hi,
How do shared libraries work? I read the Flash help file and it wasn't very clear.
Is it possible to have one external .swf file "LIBRARY.swf" including all the library files I need, load it once onto a root movie._level2, then have all subsequent loaded movies rootmovie._level1 use the library from LIBRARY.swf?
Shared Libraries...
Has anyone had good luck using shared libraries? I've had countless problems with them - sometimes the shared element disappears altogether, and sometimes, when a shared object is moved, the wrong symbol appears.
The lessons I've learned are to: 1) put the shared symbols on the stage of the .swf before publishing; 2) Don't use any moving shared symbols.
Does anyone know the trick to shared symbols in Flash?
Thanks!
Shared Libraries
I'm fairly new to Flash, less than a year in addition to my other responsibilities as a designer.
The site I'm working on is pretty expansive. There's more than 150 pages (swf files) and there's the likelihood that the navigation will need to change at several points during the year as new products are designed, so I need a way to update the navigation on every page as a separate linked item.
I've read a bit about shared libraries, but nothing that's helped.
Here's a link to the site: http://origin-8.com/site/index.htm
Thanks in advance.
Shared Libraries?
i'd like to share movieclips across a number of swf's.
is that accomplished with the linkage checkboxes from the "Covert to Symbol pane"?
i really don't even know what i'm asking for. perhaps someone could direct me to an online tutorial or something?
thanks ultrashockers!
Shared Libraries
Shared libraries, do they make a big difference to KB size or isn't it worth borthering? Just thought I'd ask before I got myself into a whole load of unneccesary work.
Using Shared Libraries (F5)
Hi,
I'm about to use Shared Libraries in Flash 5. I have been warned that this is bad though, that it doesn't always work, and that I should rather use LoadMovie instead.
I would appreciate any input ASAP.
Also, how does one preload shared libraries? Is there anyway to getBytesTotal() the shared asset?
Thanks
Shared Libraries And Preloaders
can anyone save me?
I'm trying to get a simple preloader to work with an .swf that's linked to a Shared Library (I know, bad move, but I'm a bit commited now...).
Problem is, it looks as if the Shared Library stuff loads itself before allowing the preloader to kick in, resulting in centuries of blank screen before anything happens. Does anyone know a workaround for this?
Any help would be mosted appreciated - ta.
Are Shared Libraries Reliable?
I have just finished learning the basics of flash through the book Flash 5 bible and have started my first proper flash site. However I would like to use the shared library feature as several of my .swf files will use the same graphic symbols and movie clips, thus I only want to download them once. However in the flash 5 bible there is a warning that the shared library feature of flash has proven to work very inconsistently, so I just wanted to know if anyone knows exactly what the problems are with using shared libraries and if they can be avoided or is it simply not advisable to use a shared library at the moment?
thanks for any help
Shared Libraries And RAM Usage
This is a bit complex to explain but ill try my best.
Im making a course, and this course is big.
Originally it consisted of a main.fla file that contains all the menus, functions etc etc, and a content.fla file that on each frame in master timeline contains one MC that is one "page" in the content. This file was loaded into a "holder" mc in the main.fla file.
When the user navigated around in the main.fla file, the content file would jump to the appropriate frame on the timeline and display that.
This system worked pretty good until the content got _large_. And i noticed that if one took the whole course, the complete content of the content file would be loaded into RAM.
So i then decided what if i split up the content file into several swf files, one for each page, then whenever i load the appropriate swf file into the holder MC in the main file, the previous content of the holder mc would get unloaded, freeing up ram (since only one of the several content swf's is loaded at a time).
However no the total filesize will increase since several of the content files uses alot of the same elements. So i was thinking, and here is the question, If all the content files use the same shared library and i keep all the elements in there, will the elements unload from RAM when i unload the swf file that uses that element from the shared library ?
(im not talking about unloading the library itself)
Another way of phrasing the question: In this scenario, at the end of the course, will the entire content of the shared library be loaded into RAM ? or will the elements beeing used in the last content swf that was loaded be in ram and the other elements in the library only exist in the actual file on the disc ?
Loading Swf's And Shared Libraries
this is my first time using loaded movieclips, so i'm having a hard time understanding what happens with libraries and symbols.
i've read the flash help, and i understand i can share a library across .fla's but for doing this do i just open the main fla as a shared library in the movieclip .fla's?
or do i need to export the symbols from the library? (read this in a tutorial)
any help would be very much appreciated,as i am a bit confused...
Tell Targeting/Shared Libraries
Hello.
I am having quite a problem with a Flash file I am currently developing.
I am using a shared library for my re-occurring graphics and buttons.
The buttons in the main flash file have tell targeting scripts on them.
However since I put these buttons in the shared library the tell targeting has ceased to work.
The library and the main flash file are in seperate directories, could it be that this is my problem?
The buttons are appearing in the file, so I have the shared-library working and referenced correctly, but they do not perform the tell targeting function.
If you have any ideas I would love to hear from you.
.:: Shared Libraries Problem ::.
Hello evrybody :
I have a streeming problem
i have used a shared library for images but the problem is that i need to pre load all the swf for the shared library so that i can use it .
Does anyone have any idea on how to load just one object from that shared swf ??
Help Shared Libraries Problems
Situation: I'm using a button in a project. I gave to that button a verry simple AS :
on (rollOver) {
tellTarget ("_root.selectname") {
gotoAndStop ("eda-eq 3100");
}
}
Shared Libraries Prob
Situation: I'm using a button in a project. I gave to that button a verry simple AS (Roll Over action that crontroled a MC)
And the AS was doing the job verry well. I decided to replace that button with a Shared Library Button... To replace the button without redoing all the resize and inputing the AS again (cause i have 20 of that button in my project), I used the "Swap Symbol" function, and it works too!!! The size stay the same and all the Action Scripting stayed also (for each button).
But once I export my SWF, the button no longer control the "selectname" mc.
Can someon explain what is the problem with this?
And if theres a solution for this problem?
Thank you in advance!!!!
Components In Shared Libraries?
Is it possible to define a component and use it
from a shared library. I try but can't make it work.
Please help me.
"Diplomacy is the art of saying 'F**k you' and make
it sound polite"
Flash Mx Shared Libraries
hi everyone!
sorry to bother everyone. but if you could please take a look at http://www.ionami.com/momentsinbetween/ and perhaps give me insight to why the shared libraries i have do not work on browsers other than ie? basically the index.htm is the main file. and when you click on services, about, etc. you will get the secondary files which refer to the flash file embedded in the index.htm.
any help welcome!
thanks!
if you could email me at jhu@ionami.com that would be cool too. thanks
Shared Libraries And Levels...
If I use lv0 as my main movie AND share it - can i load the shared library from any other level???
Plz someone - just a simple yes or no!
|