Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > Simple Stuff (Newbies)

Reply
 
Thread Tools Rate Thread Display Modes
Old 03-08-2006, 03:18 PM   #1
maguidhir
Registered User
 
Join Date: Mar 2006
Location: Minnesota
Posts: 6
Default Add Files to Library Programatically?

Is there a way to add external files to the library programatically in actionscript?
maguidhir is offline   Reply With Quote
Old 03-08-2006, 03:27 PM   #2
Xeef
Off-Line
 
Xeef's Avatar
 
Join Date: Aug 2004
Location: Ibiza/Spain language :Hungarian/German/ abit English
Posts: 6,539
Default

hi and welcome to As.Org


NO


search for "runtime sharing" may eventualy help
__________________

test your self -->http://www.actionscript.org/forums/s...86&postcount=8
Xeef is offline   Reply With Quote
Old 03-08-2006, 03:33 PM   #3
maguidhir
Registered User
 
Join Date: Mar 2006
Location: Minnesota
Posts: 6
Default

Quote:
Originally Posted by Xeef
hi and welcome to As.Org

NO

search for "runtime sharing" may eventualy help
Thanks for the welcome

Ok, how about instead of programatically importing to the library, would there be a way to programatically bring in several swf files to the stage and place them at particular coordinates? I'm very very new to this, so excuse me if the questions seem elementary. Though, i suppose...this is the newbie forum. Thanks for the help.
maguidhir is offline   Reply With Quote
Old 03-08-2006, 03:42 PM   #4
Xeef
Off-Line
 
Xeef's Avatar
 
Join Date: Aug 2004
Location: Ibiza/Spain language :Hungarian/German/ abit English
Posts: 6,539
Default

Lookup

"MovieClipLoader"

"MovieClip.loadMovie"

in the help

the first one is a bit more complicated but woud sugest to learn to use it !
because you get status callbacks

eg .
clip is loaded
there was an error
...
..
.
__________________

test your self -->http://www.actionscript.org/forums/s...86&postcount=8
Xeef is offline   Reply With Quote
Old 03-08-2006, 06:42 PM   #5
maguidhir
Registered User
 
Join Date: Mar 2006
Location: Minnesota
Posts: 6
Default

Thanks, I got the Load movie to work...but I have another issue. I'm trying to load multiple swf's to the stage, but I can't get them to all appear at the same time. They appear one after the other at runtime. I did a little research and then tried using createEmptyMovieClip for each swf that I want to add, and then loading the swfs to separate movieclips. This did not work, they still appear one after the other. What am I doing wrong? Also, does anyone know of a good tutorial site that could help me get through the basics? Thanks
maguidhir is offline   Reply With Quote
Old 03-08-2006, 07:49 PM   #6
Xeef
Off-Line
 
Xeef's Avatar
 
Join Date: Aug 2004
Location: Ibiza/Spain language :Hungarian/German/ abit English
Posts: 6,539
Default

as fare a movie is loaded it will apear

they never will down load at the same time

solution is to make the movie invisible and visible as fare all has loaded
(but me personaly woud like to see they apearing one after each so i have some filing what's going on)
Mc._visible=false make it invisible Mc._visible=true visible


Hmmm not sure that this isn't to much for now

ActionScript Code:
var mclListener:Object = new Object(); mclListener.onLoadInit = function(target_mc:MovieClip) {     target_mc._visible = false;     this.Loaded++;     _root.LoadedImage.push(target_mc);     if (this.Loaded == _root.ToLoad.length) {         for (a=0; a<_root.LoadedImage.length; a++) {             _root.LoadedImage[a]._visible = true;         }     } }; mclListener.Loaded = 0; var image_mcl:MovieClipLoader = new MovieClipLoader(); image_mcl.addListener(mclListener); ToLoad = ["http://www.helpexamples.com/flash/images/image1.jpg", "http://www.w3.org/Icons/w3c_main.png"]; LoadedImage = []; for (a=0; a<ToLoad.length; a++) {     _mc = this.createEmptyMovieClip("_mc"+a, this.getNextHighestDepth());     image_mcl.loadClip(ToLoad[a], _mc); }


Quote:
Also, does anyone know of a good tutorial site that could help me get through the basics?
http://www.actionscript.org/tutorials.shtml
__________________

test your self -->http://www.actionscript.org/forums/s...86&postcount=8
Xeef is offline   Reply With Quote
Old 03-09-2006, 02:59 PM   #7
maguidhir
Registered User
 
Join Date: Mar 2006
Location: Minnesota
Posts: 6
Default

Sorry, I guess I didn't mean to say that I wanted the movie clips to appear at exactly the same time. What was happening was this: they were appearing one after the other, but each one would disappear before the next would show, so at the end of the movie, only 1 would be present on the screen. I wanted them all to show up in the end. I figured out what had to be done, and have posted the code below. For each clip that i wanted to load, I needed to use createEmptyMovieClip() and use loadMovie to load each movie into a different empty movie clip. To insure that they all show on the screen in the end, the empty movie clips had to have different names and be at different depths.

Code:
for (var i:Number=1; i<=5; i++) {
        // get the depth and file location from root variables
	var depth = eval("_root.thing" + i).charAt(0);
	var swfLocation = eval("_root.thing" + i).substring(2, (eval(thing+i)).length);
	
	// load the movie in empty movie clip
	createEmptyMovieClip("container" + i, depth);
	loadMovie(swfLocation, "container" + i);
}
Thanks for all the help! Sorry that I wasn't very clear about what I needed.
maguidhir is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
shared library assets on web fail brainwater ActionScript 2.0 0 07-09-2005 03:25 AM
List files in library? Drakkon Other Flash General Questions 1 05-06-2004 06:44 AM
weirdo library issue w/ jpegs.... dzr Other Flash General Questions 1 03-01-2004 01:35 AM
runtime shared library / "source" bug dbonneville ActionScript 1.0 (and below) 0 02-20-2003 01:10 AM
Dynamic Loading of MPEG files baburaj ActionScript 1.0 (and below) 0 01-31-2003 09:30 AM


All times are GMT. The time now is 12:38 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.