[MX04] Loading A Movie From My Library Into A Blank Movie Clip
Using actionscript 1.0 how can I load a movie object from my library into a empty movie clip on my stage?
FlashKit > Flash Help > Flash ActionScript
Posted on: 06-28-2006, 06:40 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Load Movie Clip From Library Into A Blank MC On Stage
Ok so I a have a scene - Scene 1 - and in this scene I have 36 buttons with different symbols on them. Now there are 7 slots around a circle for these symbols to line up with so for example the first button that is pushed would rotate around the circle and line up in slot 1 then the second in slot 2 and so on. However, say the button pushed first is pushed second, i need it to then line up in slot 1.
So basically I want to make seven blank movie clips each in a different scene with the necessary animation and when you push a button the symbol in that button is loaded into the right MC (the first button pushed into MC 1 second into MC 2 etc).
If this is too complex to explain could you please just explain to me how to load a MC into a blank MC when a button is pressed.
I greatly appreciate your help in this matter as it would save me a great amount of time (the only other way I know how to do it would be to separatly animate every possible combination using different scenes).
Thanks so much
ASG
Having Problems Loading An External File Into A Blank Movie Clip In The Parent Movie.
alright I have a main swf. and there is an empty movie clip called window1.
I have an external swf that is loaded that contains the menu. i have the clip loaded into level 14.
i am having problems having the menu load an swf into the empty movie clip.
Code:
on (release) {
loadMovie("about.swf", _parent.window1, "GET");
}
in firefox, the code above loads the swf, but it replaces the menu. it does the same thing in ie.
Code:
on (release) {
loadMovieNum("contact.swf", _parent.window7, "POST");
}
and this bit of code makes the swf open in another browser tab in firefox, and in ie it replaces the whole parent movie.
I need the menu and the parent movie to stay intact.
i really need help with this asap.
Having Problems Loading An External File Into A Blank Movie Clip In The Parent Movie.
alright I have a main swf. and there is an empty movie clip called window1.
I have an external swf that is loaded that contains the menu. i have the clip loaded into level 14.
i am having problems having the menu load an swf into the empty movie clip.
Code:
on (release) {
loadMovie("about.swf", _parent.window1, "GET");
}
in firefox, the code above loads the swf, but it replaces the menu. it does the same thing in ie.
Code:
on (release) {
loadMovieNum("contact.swf", _parent.window7, "POST");
}
and this bit of code makes the swf open in another browser tab in firefox, and in ie it replaces the whole parent movie.
I need the menu and the parent movie to stay intact.
i really need help with this asap.
Loading An Swf Into A Blank Movie Clip...
Hi, I'm just integrating the ImageVue EX gallery into my flash file, i have a blank movie clip with the following code added - i've double and triple checked the path too... it just doesnt seem to want to load.
The following code is placed on my MC (called imageVue) within a few other movie clips, at the point in which i want the clip loaded, not sure if i need to declare this in my movies initialisation script or whether its ok where it is.
Any advice much appreciated, thanks.
Code:
onClipEvent (enterFrame) {
trace("imagevue");
imageVue._lockroot = true;
loadMovie("imagevue/imageVue.swf?globalpath=imagevue/", imageVue);
}
Loading Movieclip From Library Into Blank Clip?
NOT loadMovie();
but how would you loadMovie(); for movieclips in the library? I don't want it on the stage, but rather a blank clip that loads whatever movieclip i tell it to whenever i tell it. Make sense?
Loading External Swf Into A Blank Movie Clip
i have my main timeline that has a blank movie clip.
the main timeline loads an external swf that houses the menu.
i want the menu to be able to load external swfs in the blank movie clips in the parent time line.
say the instance title for one of the blank movie clips is window1.
the button that i want to coorespond to that movie clip has the actionscript
ActionScript Code:
on (release) {
loadMovie("about.swf", "_parent.root.window1");
}
ive tried some other variations of that with out luck as well.
help asap would be appreciated.
Loading Images Into A Blank Movie Clip
This may seem simple...but ive been watching all the Lynda tutorials and looking on Flash help..and i cant seem to figure out how to load an image into a blank movie clip on the stage from the library or using the URLRquest...any help would be greatly apreciated.
Loading External Swf Files Into Blank Movie Clip
Im having some troubles getting this to work... ive done it before but i cant remember how i did it and i no longer have work to look back on.
I set up a button with the following action script
Code:
on (release) {
movieContainer.loadMovie ("peacenews.swf",".swf")
}
The file im trying to load is peacenews.swf and the instance name of the empty movie clip is movieContainer Am i doing this wrong... this seemed like it would work logically to me but then again... im a flash trainee
Yogi
Loading External Swf Files Into Blank Movie Clip
Im having some troubles getting this to work... ive done it before but i cant remember how i did it and i no longer have work to look back on.
I set up a button with the following action script
Code:
on (release) {
movieContainer.loadMovie ("peacenews.swf",".swf")
}
The file im trying to load is peacenews.swf and the instance name of the empty movie clip is movieContainer Am i doing this wrong... this seemed like it would work logically to me but then again... im a flash trainee
Yogi
Loading Movie Clip From Library?
In the words of Droopy Dog...hello folks.
I have a button, that when clicked, would load a movie clip from the LIBRARY. I can't get it to work.
I have an empty movie clip on the stage with an instance name of 'blankMC'.
I've defined the linkage identifier for the movie clip in the library as 'myBox'.
I'm trying to load 'myBox' into 'blankMC' so 'myBox' will appear on the stage when the button is clicked.
The script I'm using is this:
on (press) {
loadMovie("myBox",_root.blankMC);
}
When I test the movie and click my button, I'm getting this error message: Error opening URL "file:///M|/mikef/einstein/myBox"
Flash is looking in the folder OUTSIDE to find 'myBox'.....I want it to look in and load from the LIBRARY.
Is this possible? Should I be defining a new level?...if so, how do I do that? AM I taking the wrong loading approach? HOW CAN I PULL THIS OFF?
Thank you for your time.
pug
Loading A Movie Clip From The Library?
Okay this is stupid but I've spent too much time trying to figure this out. How do you load a movie clip from the library?
I've got a btn that I would like to have load a mc I've got in the library. It's easy to load an external swf but it's for a portfolio site so I'd like all the images to load w/ the port section of the site.
Thanks,
[F8] Loading Movie Clip From Library
I am trying to pull a Movie Clip from the library, load it to the stage in a particular cordinate and after this how would i go about in removing this movie clip from the stage?
I want this to happen on a keyframe....i do not want it to be trigered by a button.....
Thanks
Blank Movie Clip
For some reason I cannot get my movie to load a jpg from a seperate file. I created a movie clip with nothing in it called 'logo' (it appears on the stage as a circle with a cross in the middle and is of size 0, 0). This clip has instance name 'logo' as well and is on it's own layer on top of the rest of the movie. On it's first keyframe, I have the code:
with(logo) {
loadMovie("picture.jpg");
}
picture.jpg resides in the same folder as both the .fla and a projector file of the fla. The problem is that the jpg does not appear when I test or publish the movie. What am I doing wrong?
Blank Movie Clip
Can someone tell me how to create a blank movie clip so I can import an MC into it?
Been driving me wild trying to figure it out...Hence the late hour...Oy!
Thanks guys and gals!
Bob
[MX04] Attaching Movie Not In Symbol Library
I'm trying to attach a movie that I created as an emptyMovieClip to a new path (so it loads inside a masked movie clip). The code works fine when I use an object from the symbol library, but I can't get it to take a movie clip I create in the code. How could I do this? Or should I use something other than attachMovieClip?
myPhotoMC = _root["main_"+i]["fullPhotos_"+i]["photo_"+i+"_"+j];
moveClip = _root["main_"+i]["screen_"+i].area.attachMovie(myPhotoMC, "container", 3000);
}
Is there a way to just change the target path of a movie clip instead of going through all this?
Thanks!
Load Swf From Blank Movie Clip
Hi, I am attempting to find a way to load another swf from a blank movie clip, I looked around on several tutorials but I could not find all the information that I was looking for.
I am working with an output engine that will only accept a movie that is loaded inside another blank movie, so what I need to do is find a way to create a movie clip, with the loadmovie myswf.swf, compile it as swf, and make it part of the output engine, this way I can change my output without recompiling a large engine, takes hours,
I have been searching online for two days, much of that time looking and reading through tutorials, which is great I learn a lot but no progress on what I want to do, there is a language curve present here, like I cant talk to most people about MySQL programming and PHP, (they stare blankly over your shoulder or grin like a baboon and noding)
in that same way I dont understand the language and the ever developing tech language of the flash gui, it stymies my brain somehow, becasue everything is so complex and multi facated.
I am hoping to find simple examples of this concept, and so far most of it is over my level of understanding, with multiple layers and complex scripting, basically all I want is to create the smallest possible framework for a swf file that calls and plays another swf at runtime, no connection to a parent movie is needed so no complex statments would be needed/>
anyone know of an example, (simple) that is just the base empty movie clip calling another external file, such as http://www.myswf.swf
or just in the same folder, or jus this way
loadMovie("my.swf")
I am just getting started, so bear with me and grin.
Thanks in advance for any assistance.
Target To Blank Movie Clip?
I have 12 individual .swfs that I have rendered out that all have preloaders in scene 1 of each 2 scene .swf. The problem that I just ran into is that I need a music file to be playing constantly throughout the entire project without interruption.
My first thought was that I need to create a new blank scene that will load in each .swf to a blank movie on say lvl one? I am not good at coding, but can understand a bit of what I am looking at. Is this you think the best direction, or link any tutorials that might hit on this?
Cheers,
Wes
Creating Swf For A Blank Movie Clip...?
hi all!
a quick question please.
i'm creating a swf for a blank movie clip. the blank movie clip is 130x260. all of my photoshop images were created under 130x260.
so when i create the swf for the blank movie clip should i create a fla file that is 130x260 or...
just create a regular sized fla (1024x768) and put all of my stuff in the top left corner and just have the swf fill into the blank mc by the top left corner register?
thanks!
[MX04] Imported Jpg Images Disappear From Movie & Library
I am using MX 2004. I have several jpg images (all are approx 125k) that I have imported into the library (not an external library). A few of them, I used to create motion tweens with (all on different layers), by rotating and resizing them. Others I just put on different frames to have them appear when the movie gets to those frames. Now, here's the wierd part... when I try to test the movie, all works fine... for a while. Then something seems to "hang up" and when I try to test the movie again, as the .swf is building, the (swf) file size just continues to grows. At one point, the swf was over 42MB before I finally killed it using task manager... the fla file is only 2M. Then when I go back into the fla file and try to look at the jpgs in the library, the names show up there, but when you click on it no image displays and if you go to the frame of the movie, the image is no longer there either. I tried converting all of the jpgs into graphics and then doing everything above with the flash graphics instead of the jpg, but the same thing happens. Any ideas?
Filling A Blank Movie Clip With A Texture
Ok I wondering whether there is anyway to dynamically fill a movie clip which is created dynamically using the method below.
_root.createEmptyMovieClip.
I am using markers that can be dragged and using beginFill andf l;ineTo the movieclip can be changed in the way of shape and size. At the moment I am using a variable to specify which colour is used when it is dynamically created.
Is there any way of filling it with some type of repeating texture and if so where and how should the texture be created.
Please help!!
Blank Movie Clip/target Problem
I built an swf file (new_file.swf) which has a navigation movie clip to bring in jpg's into the file via a target and a blank movie clip.
Actions for the buttons on the movie clip are:
on (release) {
loadMovie("images/pic1.jpg", "/target1");
}
This file works by itself, no problem.
I then built a controller.swf which brings in a nav.swf, and has layers for a background, and a contents1 and contents2 (where additional swf files will be loaded.
on (release) {
_root.contents2.loadMovie("new_file.swf");
}
When the same original file is loaded into the contents2 layer, the pictures (eg. pic1.jpg as above) do not get loaded into the target1 area.
I am sure this is simple, but what do I have to do to make it work?
Duplicate Movie Clip - Mind Blank
Hey, I used to be able to do this... but I haven't used it in so long and I've somehow completely forgotten.
I am trying to get a movieclip (offstage) to duplicate onstage on the same parameters as my another movieclip, which moves around, when a key is pressed on the keyboard.
Help please! I feel stupid!
Loading Of Swf Into A Blank Movie
Hello
I have a main swf file where there are menu buttons when you click it loads another swf into a blank movie. In the second swf there is a sub menu where after i click it should load something. I have tried but when it loads, it clears everything in the second swf. (no more sub menu). I have included my .FLA files. Please help me someone.
Thanks a million
Joann3
Loading Movie Is Blank
i have a main movie that loads two other movie, it loads one fine, no proplem but it can not load the other movie i know it works becasue when i accsess it it loads fine the exapel is here http://webzine.dragongamer.net/modules.php?name=GandF it preloades but the does nothing, if yoy clike add glitch it lkoads that and it comes up and loads. the asction script for the main loader is
ActionScript Code:
myProgressBarListener = new Object();
myProgressBarListener = function (eventObject) {
myProgressBar._visible = false;
};
_root.createEmptyMovieClip("holder", 2);
holder._x = "0";
holder._y = "0";
holder.loadMovie("modules/GandF/globes.swf", 1);
myProgressBar.addEventListener("complete", myProgressBarListener);
myProgressBar.mode = "polled";
myProgressBar.source = "holder";
myProgressBar.conversion = "1";
myProgressBar.label = "LOADING %3%%";
myProgressBar.direction = "right";
myProgressBar.labelPlacement = "bottom";
but that should not effect it loading other movies
files can be found here http://webzine.dragongamer.net/modules/GandF/files.zip
Help.... Trying To Make A Movie Clip Play Every Blank Seconds.... Help Please
Hey everyone.... this is kinda urgent.. so here goes:
I've been trying to play a movieclip every blank amount of seconds (lets just say its every 30 seconds) and ive tried using an if loop and the getTimer command, blah blah blah but it just isn't working. Some help please?
come on u actionscript wizzes, help
Thanx in advance
Jordan
Movie Loading Into Bankmc Is Loading Blank After Its Been Published
I created this site where it loads movies into a blankmc on in the main Fla file. It works fine when I view it on my computer. And Broadband connections show no problem. But on dial up connection. when you click a bar on the navigation. The fla movie loads in blank. You have to click another button then click on the previous but to load. Why is that?
here is the site (its for some community developer)
Doubletree Lake Estates
Thanks for you time..Let me know if you need to see the file and I'll attach it.
Patrick
Loading 2 Seperate Movies Into A Blank Movie
can some flash master figure this one out?
I have a main movie with a blank movie called "blankclip" to load movies into. I have a frame where the movie stops which has a layer which loads the "menustrips.swf" animation in the main movie:
_root.blankclip.loadMovie("menustrips.swf");
and also another layer/frame which loads "kanim.swf" which is also an animation
_root.blankclip.loadMovie("kanim.swf");
My problem is that only one of the movies load?
How can I load both these movies in my movie?
thanks
[MX04] Error: Clip Events Are Permitted Only For Movie Clip Instances
Hey all,
I have loaded a movieclip dynamically from my library using:
Code:
attachMovie('enter_button','enter_button',5)
This works fine. On the first frame of that loaded mc I have an onClipEvent(load) event and some commands inside it. When I run the .swf the following error appears:
**Error** : Clip events are permitted only for movie clip instances
onClipEvent(load)
Why is it trying to tell me this is not a movieclip? It's a movieclip in the library and I've set the linkage settings to export during the first frame. I'm not sure what to try next.
Thanks for your time,
Greenham.
Attach Movie Clip To Clip Linked In The Library
I am using Flash MX
I have a scrollbar component that is set as the scroller to another movieclip in the library that has a linkage name of "listing"
Now, what I would like to be able to do id use attachMovie() and attach other movieclips to that movieclip in the library. It's not actually attached to the stage, so is this even possible? It only has a linkage name.
Loading External Movie Clip With A Button Inside Another Movie Clip Help
Hi,
I am working on a scrolling thumbnail movie clip, that when you click on the thumbnail button inside the movie clip it will load an external movie clip. I have an empty movie clip on the main stage, and have been trying all sorts of code, but for some reason it doesn't like that I am inside a movie clip using buttons. It can't seem to find the external swf.
I have tried:
on (release) {
loadMovie (ithink.swf, "loader");
and
on (release) }
if (firstTime == true) {
loadMovie("ithink.swf", _root.loader);
firstTime = false;
} else {
_root.clicked = "ithink.swf";
_root.loader.gotoAndPlay("goback");
}
}
and so far nothing, for some reaosn when I click on a button outside of the movie clip with the above code it loads... and than the other works too, but if I click on the buttons inside the scolling movie clip first they won't work.
Any suggests or ideas!!?
I would really appreciate it... I am beyond frusterated!!
Movie Clip In LIbrary
Hello
Can someone help me out in knowing how can I make 10 copies of the movie clip which is there in the library with the help of action scripting
Thanx
Movie Clip In Library
In Kirupa's "Preloader that displays Load Progress" tutorial he has the movie in the library and introduced in the time line on one frame. http://www.kirupa.com/developer/mx/preloader.htm
When I try to import an existing movie to the library to do this, I lose all of its funcions (ie buttons, actionscript). I want to be able to do this preloader, but it appears I can't do it unless the movie clip is an object in the library. Any help is much appreciated.
Thanks
Loading Movie When Movie Is In Library
Im relatively new to Flash.. My problem is that I want to load a movie that I finished (ie. Contact Page)when on release happens. I cant seem to get it where i can tell flash to bring up the contact page (which is the seperate movie) that is in the library. how do i tell flash to load that movie, which is in the library? im so lost on this and have tried a lot and cant get it to work. help would be much appreciated!
thank you!
Playing A Movie Clip From The Library?
I have a movie clip called mvMain in the library (not in the timeline by default). On the rollover of a button I want it to play.
Not sure how to do the action script, something like:
on (release)
{
gotoAndPlay ("mvMain");
}
but it doesn't work. Any tips?
Reloading A Movie Clip In The Library
I'm creating an interface that uses nested SWF clips as components. I've imported each SWF into the library and have placed them throughout the stage and performed various keyframed transformations on them. Typical stuff.
After using some of these nested clips, however, I've made changes to the original FLAs. I'd like re-publish the FLA, then update/refresh the SWF in the library so I can retain the animations and transitions I've created for them in the parent clip. Is this possible? I can't find any way to do this, but it seems pretty basic.
Is my only option to delete the clips within the parent, load the new version into the library, create an instance of the new clip, and then redo all the animation/transition work from scratch?
[CS3] Using [AS2] Calling Out A Movie Clip From The Library
Okay, I did a search and didn't find the answer i'm looking for. Maybe I don't know what i'm looking for (on so many levels).
so here's my problem:
i have a cloud in my library and not on my stage (could be if i need it to be). i also have a movie clip that infinitely generates random numbers from 1 to 100. When different numbers come up a creature on the stage does different things.
what i'd like to do is everytime my radom generater hits, say 50, to have a new cloud appear on my stage in a random location (i'll then later make it float across the stage).
i sent up the linkage to export of action script with the identifier of "cloud".
so far this is what i have:
//randomizer runs and...
if (randomNumer == 50)
{
randomXpos = Math.ceil(Math.random() * 100);
randomYpos = Math.ceil(Math.random() * 100);
"cloud"._x = randomXpos;
"cloud"._y = randomYpos;
}
i know that this part is wrong:
"cloud"._x = randomXpos;
"cloud"._y = randomYpos;
but i'm sure don't know what right is! lol
thanks!
Accessing A Movie Clip In The Library
Say, I have a movieclip/Sprite in my library by name sample.
So, the statement
Code:
var x:sample=new sample();
will instantiate the movieclip which I can display using addChild.
Now, can I load the movieclip using a String containing the name of the movieclip, i.e "sample"? Is there a method for achieving this?
Attaching Movie Clip From Library
I am having trouble loading a movieclip from the library.
This is the script I have
attachMovie(logo, logo1, 5)
What am i doing wrong?
How To Export Movie Clip From Library As Swf?
I've created a complicated movie clip in my library that contains about 500 frames and 25 layers. I'm now thinking I should have made it as it's own swf file a imported it into my main movie. How can I take my movie clip in the library and export just that clip as its own swf file?
Library Movie Clip Not Readable
I apologize if this seems like a stupid question, but I've only been using flash for a month, and I've been teaching myself how. I'm attempting to make a simple interactive clip where an onscreen icon performs an action when clicked on. Since it's a graphic, I created the movie clip in the library. When I go to reference it in actionscript (AS3), the code doesn't seem to recognize what I'm doing. The code being used is this:
function onclick(event:MouseEvent):void{
gotoAndPlay('Click');
}
your_mc.addEventListener(MouseEvent.CLICK, onclick);
'Click' is the label of the frame I want it to jump to. If necessary, I could convert it into Actionscript 2. Thanks in advanced!
Getting _width Of A Movie Clip - In The Library.
The question is so simple i could fit it in the Title.
I know I can get the _width and _height from a movie clip by typing
mc_name._width
But only with existing movie clips. What if I want to get the width of a movie clip I have stored in my library?
Load Movie Clip From Library..
Can someone show me an example of loading a movieclip from the library into another movie clip on the stage as the movie loads, not called from a button.
When I say example not the fla just a code example is all I need.
I thought it would just be loadmovie with the clips properties set to export for actionscript but that doesnt work it looks for the movie in the directory not the library.
So is there an attach movie command or something?
Thanks in advance,
Carl
----------------------------------------
www.orlandomediasolutions.com
www.fcss.org
www.woodsgroup.com
[MX04] Load Movie Clip...wait...load Another Movie Clip
ok...i'd like to do this all in actionscript if possible...on one frame.
one character (headshot). at timed intervals, the character would do something different...repeat.
[code]function antics() {
mc_Antics.start(0,0);
clearInterval(anticstime);
}
anticstime= setInterval(antics, 1000);
function antics2() {
mc_Antics2.start(0,0);
clearInterval(anticstime2);
}
anticstime2= setInterval(antics2, 2000);[code]
I don't know actionscript well at all, so is this just stupid? Any ideas on how to do this? It's not working right now...
[MX04] Movie CLip Array?
u guys know that game brickout, alleyway....type game where u move the "ship" and bounce the ball into the blocks.
All all those blocks movie clips. Or is there like an array where i can control all of them at once from one movie clip. AKA. How would i make that game?
|