ActionScript 2.0 :: Loading Movie From Target In Another File?
Nov 12, 2009how to loadmovie into a target that is located in another file that is loaded onto the stage.
View 2 Replieshow to loadmovie into a target that is located in another file that is loaded onto the stage.
View 2 RepliesIve got 2 swf files. A.swf and B.swf A.swf is my main page. When a button is pushed, B.swf is loaded into a target in A.swf.That's no problem. What I'm unsure about is this:I want to be able to click a button inside B.swf, which will tell "A" to load a different movie in "B's" place.
View 9 Repliesi just did the loading movie into target tutorial on this site [URL] it worked fine, but when i went to apply the function to a button inside my drop down menu movie clip nothing happened. i am assuming it has to do with the fact that the movie clip button and the main movie are on different timelines. I thought the _root function would tell it to load the movie in the main timeline and not the drop down menu movie clips timeline.
View 2 RepliesIf I use an empty movie clip to load a series of images into,how do I get them to load in the center?The images are all different sizes.I think this is fine, if they loaded with the center of both the target clip and the image aligning.Upper left registration point for the target is not good.
View 10 Replies[code]That is the code used to solve the cache problems, but i dont' really get the second line. How does changing the level or target of the new movie stop the old file from playing?!i also searched what "?" does in flash, but i couldn't seem to find it.
View 3 RepliesI recently used the loadMovie action to load a .swf file to a target in the movie which it was being called from. Then I tried calling a picture to another target in the movie, but it did not load the picture as intended. I read about it on my book, but it didn't seem to work. Is there anyways on calling a picture into a target in the movie without placing the picture inside an swf file?
View 7 RepliesI'm trying to load a SWF movie into a target movieclip called blankmc. The SWF movie is loaded from an absolute URL (eg. [URL]/img/20042005113934movie3.swf ) My Loading Progress code fails to detect the SWF file size. However the same code works perfectly for a JPG! Essentially the .getBytesLoaded() and .getBytesTotal fail to work. Why is this and how can I get it to work for loading SWFs?
[CODE]...
using the command:
loadMovie(_root.section, _root.content);how would i work in a preloader bar?? add one to the file that is loaded into the main movie or on my main movie that is loading the file?
My boss made a quiz for the Flash movie I'm doing, using the Articulate Quizmaker software, and he saved it as a swf file. It plays great in Flash Player and through Flash. Now, I'm trying to use my main Flash file to call the quiz swf file and play it at the end of my movie. The main Flash file is set up as a swf array, calling the different swf files I want it to play in order. I want that quiz swf file to play at the end.
However, when I do that and I publish the file, I just get a blank screen when it tries to load the quiz swf file and a bunch of code in Flash that pops up. What's going on? How can I load the quiz swf file into my Flash movie?
I am currently creating a mockup website for a school project and i had the actionscript for the pages all worked out which functioned by changing the visible on/off properties as the buttons were pressed (the home page and it's animations would be able to be seen behind the information page so doing the pages on layers is the only way i can think of doing it)The problem with the way i have coded the webpage however is that even when the pages are invisible they're infront of the home page meaning that aspects which i wanted to add such as a hover over animation don't work as the hover over isn't registered (the nav bar is a seperate layer and above all the others) What my question was, was
a) would it (in your opinion) be better to make it so that the movie clips of the pages were loaded from the library when the buttons were pressed or to make the layers re arrange themselved when the buttons were pressed thus showing the page that i want to show. and b) how would i be able to achieve this? i work on Adobe flash cs4 with actionscript three and am favouring the first option (loading the page from the library)
I'm trying to get an external text file to load into my movie. I read the tutorial about the scrollbar w/ external text file but it's not really clear and it seems somewhat out dated... I'm anxiously awaiting ASDG2 coming out on December 19th. What would the code look like to load a text file called "theText.txt" into a text field called "theField_mc" created with AS itself attached to a mc called "theMC_mc" created with createEmptyMovieClip(); ? I'm trying to do this %100 AS, no instance manually put on the stage.
View 6 RepliesI've set up a test file and I'm having problems loading a video file from within a loaded movie.I have 3 files - "base.swf". This loads a swf - "LoadVideo.swf" into level 10
Code:
loadMovieNum("Files/videoFiles/LoadVideo.swf",10);
This, ("LoadVideo.swf"), has a button with the code
[code].....
Is it possible to target a loaded movie within the main timeline and stop sounds in that particular movie only?
View 4 RepliesI have a SWF that has a movie player in it. What I want to do is load an flv or audio file into the player from anywhere on my computer using a file browser. Currently it does work, but ONLY if the flv is located in the course folder where the SWF compiles to. How I can make it play an flv located anywhere other than in the same directory as the SWF?
View 3 RepliesI have a main SWF file, in AS3, wich works as holder/loader for many other SWF files (sections). I had to make a new section ("verano.swf"), but I did it in AS2. When I try to load it, I get the following error:
TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/addChild()
at Tabu/onCompleteHandler()
[code].....
I have created a preloader, and I want to tell the action script of the preloader once the file is done loading, put it away and load a new movie, or even a new flash file if i have to.here is the action script i have on the loader right now. Its just numbers counting from 1-100% and a .gif clip that plays but they are not connected in any way.
bytes_loaded = Math.round(_root.getBytesLoaded());
bytes_total = Math.round(_root.getBytesTotal());
getPercent = bytes_loaded/bytes_total;[code]...
Also, my preloader ends on Frame 3 and movie would start on frame 4.
In what combination of as2 code would instruct a preloader to recieve bytes loaded and bytes total in addition to loading a external swf file into a blank movie clip? I've seen countless issues regarding the same problem but still haven't goten a clear answer. I dont want to use the video player component standard on Flash. I want a preloader to preload a external swf file and play it inside a movieclip.
View 5 RepliesI know this goes against the logic of most menus. I am building a menu. I have very nice mc called "menu_list" and loading into the movie loads a easily editable external XML file with all my over categorys and sub menus
it looks like this...client.niallohara.net/xml_menu.html
[Code]...
I'm working on a bit of flash that has some actionscript in it the randomly generates different snowflakes that move upwards on the stage. Problem is I need them to load into a target mc rather than on the top level of the main timeline and I don't know how to amend the code.
The code I'm using is:
snowNumber = 60;
var flakes:Array = new Array("flake1", "flake2", "flake3","flake4","flake5","flake6")
for (i=0; i<snowNumber; i++) {
[Code].....
I am trying to load 1 of 4 swf. files randomly into a holder on a home page.
the code I'm using doesn't work.
[Code]....
when I test the movie I get an error message that it can't find the movie. As an example, the code is adding a 1 to the name of the swf. image11.swf
I am trying to import a SWF file into a custom loader and then treat the loaded SWF file as a MovieClip object. The code for the functionality can be seen below.
public function loadMyMovie(movie:String)
{
var now:Date = new Date();
var rnd:String = "?randomize=" + now.time;
[Code].....
When I do this I get the following error.
"Implicit coercion of a value with static type flash.display:DisplayObject to a possibly unrelated type flash.display:MovieClip."
I am trying to build a menu, that loads external swf to target movie clip, in the code below it works if I remove the line target removeChild, but then if a press the other button, just put it on top, so my actual problem is that if I don't have anything loaded in target, this code doesn't work because it can remove child?
menu.btn_avanti.addEventListener(MouseEvent.MOUSE_DOWN, goseccion);
menu.btn_professors.addEventListener(MouseEvent.MOUSE_DOWN, gofotos);
function goseccion(Event:MouseEvent):void{
var main:Loader = new Loader();
main.load(new URLRequest("seccion_basica.swf"));
target.removeChildAt(0);
target.addChild(main);
[Code] .....
I have been loading an swf to target by using namedMC.loadmovie ("path+name", _levelN) altho I notice there is another method suggested here about using createEmptyMovieClip so it is all in script. Can anyone suggest a way of preloading all my separate swf files and then playing them at various specified points, like when the previous animation is finished/finishing. I have tried things like altering the _alpha and using namedMC.stop(); and namedMC.play(); but that aint working.
View 1 RepliesI have 9 btns and one target to load submenus. The target has to close first and them load the selected one. Actually the target goes up and when it reaches y=x it loads the selected one.
View 2 RepliesWhen I load a .swf into a target movie that I have on my main page, it is all wrong, the slider menu that I have loading into the target movie, does not stay inside target and it seems to reposition the slider menu to the x psotion of my main movie How can I fix this, so the slider menu in the swf stays inside the target movie when loaded? FLA file is too large to attach, if needed I can attach it in pieces.
View 3 RepliesI'm looking for an alternative to using:
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyFunction);
The problem I am encountering is that eventListener above works fine on its own(stand-alone swf), but when loading an .swf externally into another .swf, the listener fails with the following error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
How can you target the event listener when loading as an external .swf differently?
I have two movie clips on my main time line. There is a button in movie clip 1 that I want to target to movie clip 2... and it's not working for me. I'm assuming that when I'm in movie clip 1, I need to tell it to go back up to the main time line, and into the movie clip 2.The site that does the same exact thing I'm trying to do is this tutorial:The buttons and the page area are two seperate movie clips, but the buttons in the button movie clip target to the page area movie clip.This is the code that I'm thinking I'm getting an error with:Code:MovieClip(root).eyecarePage.gotoAndPlay(10);- where eyecarePage is the Instance Name of the movie clip where I want the button to target to, and once it's in that movie clip, I want it to go and play frame 10 and on... but instead I get a #1009 error.
View 4 RepliesI am trying to have one single loader for different buttons to load their specific target. lets say I have btnOne and btnTwo, each of them have their page to link to, btnOne to pageOne, btnTwo to pageTwo, page one and two are external swfs. so can I load them into stage by sharing one single loader?
this is simply my script:
ActionScript Code:
var swfURL:String = ("external.swf");
btnOne.addEventListener (MouseEvent.CLICK, startLoad);
btnTwo.addEventListener (MouseEvent.CLICK, startLoad);
[code]....
I am trying to have one single loader for different buttons to load their specific target.lets say I have btnOne and btnTwo, each of them have their page to link to, btnOne to pageOne, btnTwo to pageTwo, page one and two are external swfs. so can I load them into stage by sharing one single loader? this is simply my script:
[Code]...
var urlString1:String="TestDrive/z05483205.xml";
var url1:URLRequest=new URLRequest(urlString1);
loader1=new URLLoader(url1);
loader1.addEventListener(Event.COMPLETE, test);
[Code]....
I expect to see this z05483205.xml