Get Buttons (fro Xml-doc) To Load Swf's In New Level?
Very good article!!! However, I am very new to Flash and Im having a bit of a struggle to get things to work... Ive got one porblem left to solve: I want the buttons (created in the xml document) to load spearate swfs in another level (say level 10). How do I continue from where this lesson ends to get this achieved?
(Ultimately I want to be able to just add a button in the xml-document and allocate the exclusive swf there without having to go into the flash document doing changes.)
Very thankful for any help!!!
SitePoint > Design Your Site > Flash and Actionscript
Posted on: May 21, 2007, 02:34
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Load A Movie To Another Level And The Buttons In Base Level Still Work..
Hello,
Ok Im loading movies into level 95. The problem is the movie at the base has buttons in it and they are still active through the movie that is loaded at lvl 95. So to fix this I made one large button and made the movie at lvl 95 dragable. The only issue with this method is now your cursor looks like it is always active. So has anyone figured out a way to block buttons that are at the base level if you load into a upper level?
Thanx
Robert
Level 0 Loads A Movie Into Level 1 - Buttons On Level 0 Still Appear To Be Active Underneath
I am working on an interactive cd. My main movie plays in level 0 and clicking on an option loads the relevant movie into level 1.
The problem I have is that the main movie's buttons are still active underneath and if you click on the wrong place in the movie on level 1 it jumps to a new movie because of the button below.
Is there a way to somehow deactivate these while there is a movie playing above?
On Mouse Press Load Movie To Level 5 And Unload Movies From Level 6.7.8.9 ?
on mouse press Load movie to level 5 and unload movies from level 6.7.8.9 ???
Ok here is the deal
I have 5 Music files I created 5 seperate flash movies for them
As it stands now I have
Track1 load to level 5
Track2 load to level 6
Track3 load to level 7
Track4 load to level 8
Track5 load to level 9
The problem is how I script that if I press track 1 to unload level 6,7,8,9 so only level 5 track playing
Or if I press Track 5 to unload movies level 5,6,7,8
This is what I done so far
http://eclipse.ebportal.com/bluenotejazz/index.html
If u press on track1 and after on track 2, Track 2 will just upload new flash file on top of track 1.
Now I am not good with this but, this is what I tried
This is as code stands
on (press) {
stopAllSounds();
loadMovieNum("flash/track1.swf", 5);
play();
}
This is what I was trying to do for TRACK 1
on (press) {
stopAllSounds();
loadMovieNum("flash/track1.swf", 5);
play();
}
on (release) {
unloadMovieNum(6,7,8,9);
}
---------------------------------
Of course for Track 2 this would be
on (press) {
stopAllSounds();
loadMovieNum("flash/track2.swf", 6);
play();
}
on (release) {
unloadMovieNum(5,7,8,9);
}
ETC
Pls some help need it here and its URGENT !!!
Why Are Buttons On A Lower Level Still Active In A Loaded Higher Level...?
hi, i'm very new to flash and am in the midst of trying to figure out the loadMovieNum feature. I have the one swf loading into a higher level (say 10) but the buttons on the level below it are still active (ie you get the little hand if you roll over them) even though they are no longer visible. I tried loading all levles into 0, but that means the page below goes away entirely and i like having the preloader of the next page pop up over the current page. I've tried just loadMovie into an empty MC but get the same result. Can anyone help?
thanks in advance!!
Loading Movie To Level 1, Cancelling Out Level 0 Buttons?
I have a movie (main.swf) and when you click one of the buttons, it loads section.swf on top of main.swf onto level 1
When section.swf appears on the screen, everything is fine BUT... the buttons on the main.swf work THROUGH the section.swf which is on level 1. Is there anyway to cancel out the buttons on level 0 when a movie is loaded ontop of it to level 1????
TIA
HELP With LoadMovie: When I Load Level 1, Level 2 Disappears And Shouldn't
Hi I have a problem...
I have a movie on level 0 with menu buttons A, B and C. Every button loads a new movie (movie A, movie B and movie C) and they all load the movie in level 1. I have another movie containing the music (movie MUSIC).
When I load the site (level 0) I first load the music (movie MUSIC) in level 2 with a loadMovie(2) and later I let the user choose if he wants to see movie A, B or C by loading them with loadMovie(1). Unfortunately when the user clicks on a button to load any of the three movies A, B and C, the music MOVIE disappears and therefore the music stops. I need the movie MUSIC to be in the top-most level and to load before the other movies do, that's why I have it in level 2, so the controls (play, stop, volume) are always on top of all other movies loaded.
Can you please help me make the music play without the music MOVIE disappearing and stopping when a movie UNDER/BELOW is loaded in a level lower that the music movie's level?
Thanks a lot!
Load Movie...Park/Play...Load A Button Into Level
Okay, I tried the Park/Play tutorial in order to load a movieclip and have a button on the stage that controls the main movie. Problem is that I have a background that covers up my button which is in level0. My movie clip is in level1. How do I bring that button out in front of the background? Do I load it into level2? If so, how do I do this?
Thanks alot,
Roger
Jagged Bitmaps: Not When Load In Level, Yes When Load In Target
I noticed that I get distorted bitmaps when I load a swf into a target movieclip. When I load them into levels the bitmaps look alright. Anybody knows of a bugfix for this. I prefer to load into targetmovies because then the swf's get cached in the browser.
thanks already.
Load Var From One Level To Another
i got 5 buttons that need to send there variables to the movie to level3 then level3 would be like if button 2 was pressed then load bla.swf, elce if 4 was pressed load blabla.swf
how do i get the variable to go from level0 to level3...
Load .swf On Level 1
Hope there'll be a better solution.
I have a main movie call myself.swf with a main navigator, to go to other swf movies. One of the other swf is portfolio.swf. What I want to do is with a frame action on myself.swf to load portfolio.swf on level1. Action I'm using is
stop ();
loadMovieNum ("portfolio.swf", 1);
portfolio.swf contains a MC with buttons assigned:
on (release) {
tellTarget ("_level0") {
gotoAndPlay ("slide shaw");
}
}
This "MC with buttons" placed on the main time line of the portfolio.swf This works fine independently. When I go from the myself.swf, it loads the portfolio.swf on level1 but the buttons doesn't work. If I use level0 to loadMovie the button works. But that's not what I want.
Hope you understand my problem and will come up with a solution. Thanx in advance.
Any Way To Load Into Level And Behind A Mc?
Any way to load into a level and behind a mc? I know about load into blank mc but then the pre-loader don't work. can i load the movie into the _level01 and have it cover everything and have one mc stil visible. I tryed this and
it made the loaded movie go behind everything. Which was interesting.
onClipEvent (load) {
_level.swapDepths(1);
}
I want the be able to bring that mc to the front when the new movie gets loaded in.
Load Into Level Or MC?
What is better? Loading external SWF into level or target(MC)?
What are the advantages and disadvantages of both?
Load Swf To Level
Flash MX
I have a flash movie CCM.fla that has a navigation system as a movie loaded into level one on the site. Within that navigation movie I want the buttons to load external swf's into other levels on the site. I put the code on the buttons and when I test publish my movie it does exactly what I want it too. However, when I push the CCM file as well as the external swf file (why.swf) the link does not work.
What am I doing wrong?
Check out http://www.cashcowmedia.com/CCM.html and press on the why cash cow button....this sould open why.swf into another level of the CCM site. Like I said works in testing but not when it is published live.
My files are too big to attach but here is the code I have attached to the why button:
on (release) {
loadMovieNum("why.swf",2);
}
Can't figure this one out...I even tried calling for the URL path to that page and no dice
How Do I Load XML To Level 9?
If anyone can help, please...help...
I have created a root movie "start.swf" that calls a scrolling "ticker.swf" to level 9. "ticker.swf" then grabs data from the ticker.xml.
"ticker.swf" works fine when tested and loaded by itelf at level 0, but ceases to function when loaded into a movie level. The swf finds the XML file, but fails to animate.
Any ideas about how to load XML swfs into movie levels successfully?
Here is my code:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
caption = [];
url = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
caption[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
url[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
}
first_item();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("ticker.xml");
//
function first_item() {
delay = 1000;
p = 0;
display(p);
p++;
}
function timer() {
myInterval = setInterval(ticker, delay);
function ticker() {
clearInterval(myInterval);
if (p == total) {
p = 0;
}
fadeout();
}
}
function display(pos) {
over = new TextFormat();
over.underline = true;
//
out = new TextFormat();
out.underline = false;
//
newsMC.newsText._alpha = 100;
newsMC.newsText.text = caption[pos];
newsMC.onRelease = function() {
getURL(url[pos], "_self");
};
newsMC.onRollOver = function() {
this.newsText.setTextFormat(over);
};
newsMC.onRollOut = function() {
this.newsText.setTextFormat(out);
};
timer();
}
function fadeout() {
this.onEnterFrame = function() {
if (newsMC.newsText._alpha>=0) {
newsMC.newsText._alpha -= 5;
} else {
display(p);
p++;
delete this.onEnterFrame;
}
};
}
Xml Load Onto New Level
Hey - i know there has to be thread on this topic somewhere, but have been unable to find it... if some one can point me in the right direction or has the answer that would be great -
basically - using the kirupa xml photo gallery script http://www.kirupa.com/developer/mx20...otogallery.htm - i am trying to simply load the next image on top of the current image and then unload the previous image - just for a smoother transition. instead of the current image unloading then loading the next image.
thanks...
Load Into Level 1
just woundering, if i have a movie on level 0 and load one on level 1, will the one on level 0 still be there?
im gonna try to make some smoth scene changes so i was woundering if this was a smart way to do it?
Is There Any Way To Load A Swf On A New Level And
I know that whatever swfs you load in default to the frame rate of the main movie.....but is there a way around this?
Perhaps MX or MX professional have come up with a way to do it.
SO that, if the main movie was 20 frames per second, you could load a swf on top of it that would be 40 frames per second.
Thanks.
Can You Still Load Mp3's Into Level 0?
I remember how to make a simple mp3 player or one that loads swf's into level 0. Then the stop button just unloads them. Can this still be done or is there a better way? I also want it to stream. maybe the load swf is better huh?
Disable Buttons On Level
Is it possible to disable buttons on a level while still keeping them visible.
situation:
a button on level0 loads a movie on level1, i want to disable the buttons on level0 when level1 is playing. because they conflict.
If not with action script then maybe someone has another method of doing this.
How Can I Disable Buttons In A Level?
Hey there!
Im having a bit of difficulty.... I have a main movie on level 0 - now Im loading another movie into level 1 which covers the first movie fully. Problem is that I need to disable the buttons in movie 1. They are not visable - but still when u mouse over an area - the cursor changes to the hand...
any ideas?
Im not going to load the second movie into level 0 though. I want it to still be there.... i dont want to load the main movie again when i close movie 2.
Thanks!
T
Level 0 Buttons Still Showing
This is the common problem of level 0 buttons still giving a visible hand cursor through a movie loaded to level 1. I haven’t found a fix I can understand on the FlashKit site as yet. Can anyone explain parking to a blank frame to me or any other fix for this?
Also when I load my movies to level one I get a flash of level 0 of about 1 or 2 frames before the loaded movie kicks in. Anyone know why?
I feel so close but yet so far. This is the last trick I need to learn before putting this project to bed. Thanks all.
Bill
ps
The Flash MX 2004 Bible doesn’t explain this either (that I can see).
Deactivate Buttons On Level 0
Hello to all Flashers:
Is there anyone who can help?
How to deactivate the buttons on level 0,
while running levels above?
Because it is possible to click onto the hidden buttons of level 0,
an that should not be possible for the users!
I am using Flash 5 only
I hope I could made understand,
please excuse mistakes, because this ist not my native language.
Many thanks,
helma
Level Buttons Hlep
I need it so that when you goto the main story screen that there is level buttons that are gone because you have not beat the level before it so how do I make it so that there is a gobal variable that I can use to make it so that the level 2 button wont work untill level 1 is beat?
How To Disable Buttons In A Level
Right now I've got 3 different movies. The first .swf is simply the background and is level 0. It loads the second .swf into level 1 when it loads. The second .swf has buttons that when clicked will load the third .swf into level 1. My problem is that when the third .swf is loaded into level 1 the buttons are still active from the second .swf. Is there any way to disable the buttons?
Help Blocking Buttons On Level 0
Hi everyone,
I´ve made a site with several buttons that load other .swf on level 1 which cover the entire stage, but the buttons that are on level 0 can still be clicked on. Is there anyway to block these buttons while the level 1 .swf is playing? Any help is more than welcome.
How To Disable Buttons In A Level
Right now I've got 3 different movies. The first .swf is simply the background and is level 0. It loads the second .swf into level 1 when it loads. The second .swf has buttons that when clicked will load the third .swf into level 1. My problem is that when the third .swf is loaded into level 1 the buttons are still active from the second .swf. Is there any way to disable the buttons?
Load External Txt. In Level 2
I'm trying to load an external txt. file to another level other than "0"
I tried this:
loadVariablesNum ("brunch.txt", _level2.variablename );
The problem is it makes the main movie dissapear.
[]main- loads[]sub- loads brunch.txt
[]brunch.txt
any help would be great!
Load Movie Level
Is there a way to find out in a prelaod situation if a load movie is loaded . I have a loader loading the main movie and in the first frame of the loader I also load a another small movie onto level1 is there a way to tell if that level1 movie is loaded then go to another frame and start the next
load like .
Code:
if (_level1.getBytesLoaded()>=_level1.getBytesTotal()) {
gotoAndPlay("mainload")
}
Load Movie This Level... ?
I am trying to load a swf to level 28, in MX.
I can load it but it displays top layer.
on (release) {
loadMovieNum("movie.swf", 28);
}
there are a dozen layers that are supposed to be above it.
Could someone tell me why it won't work?
Thanx DjXtraKtor
Load MC And Level Problem.
first frame of movie:
fscommand("allowscale", "false");
var point = 0;
_root.nextframe = false;
//uniportant to my question///// / / /////
function testDone(target, destin) {
// test for equality
if (target._x>=destin._x-.5 && target._x<=destin._x+.5) {
_root.nextframe = true;
} else {
_root.nextframe = false;
}
// if frame that call is complete then go to next
}
function movieit(target, destin, speed) {
_root.offset = (dis/speed);
if (destin._x>target._x) {
dis = destin._x-target._x;
target._x += (dis/speed);
}
if (destin._x<target._x) {
// find distance between two points
dis = target._x-destin._x;
target._x -= (dis/speed);
}
if (destin._y>target._y) {
dis = destin._y-target._y;
target._y += (dis/speed);
}
if (destin._y<target._y) {
dis = target._y-destin._y;
target._y -= (dis/speed);
}
testDone(target, destin);
}
second frame:
moveit(_root.pictures, _root["t"+point], 9);
if (_root.nextframe) {
loadMovieNum("mc" +point+".swf",0);
}
it doesn't work. i want it to load the correct movieclip
for each 'point'. so if point=0, i want mc0.swf to load on
top of my main movie. it sort of works now, but it comes in
after var point is determined and only for about one second, then
it disappears. and shouldn't mc0.swf be loaded in after this
frame? cause it hasn't worked. i'm no AS genius, but i'm hoping
this is something simple.
thanks in advance. email me if you need to see the source.fla.
How To Load Sound Into A Level
I have a flash file and evertime I go to a new page I load a new movie into level 0.
I want sound to continue throught the web site, so I want to load sound into level 1 and have it play continuously.
How do I do this? Or should I say, "can this be done?"
Help - Multiple Swf's (load Level) Cause Lag
I am working on a web site in flash using a main movie to call up other swf files. These swf files are 1 frame with some action script scrolling (code based on Adam Lem's tutorial)but for some reason these files lag and are slow to start up. I have tried using preloaders but those don't seem to do the job. If neccissary I can post the files.
web address is http://www.lauzondr.com
Any suggestions?
On The Level? Load Swf Question.
Hello helpful people,
I'm loading an external swf using an empty movie clip that appears on the first frame of the first layer of my main movie.
the prob is that before the movie clip I'm loading plays you can, ever so briefly, see the layers in the main movie. Does this have something to do with:
A) incorrect level-or should it be target?
B) action script linkage?
C) where the action script is located (I've the load code to the empty movie clip)
This is the code that loads the external swf from my main movie:
onClipEvent (load) {
loadMovieNum("try2.swf", 1);
}
-----------------------------------------
This is the main code of the external movie clip (try2.swf):
this.onEnterFrame = function(){
//my_mc is the instanceName
scissor_mc._x += 10;
//500 is where you want to put the number where you
//want it to stop
if (scissor_mc._x>720) {
//_root.scissors_mc._x = 720;
//kills the onenterframe
delete this.onEnterFrame;
_root.fabric_mc.play();
}
}
I'm keen to learn -- and can't wait to hear what I'm doing wrong-
thanks!!!
On The Level? Load Swf Question.
Hello helpful people,
I'm loading an external swf using an empty movie clip that appears on the first frame of the first layer of my main movie.
the prob is that before the movie clip I'm loading plays you can, ever so briefly, see the layers in the main movie. Does this have something to do with:
A) incorrect level-or should it be target?
B) action script linkage?
C) where the action script is located (I've the load code to the empty movie clip)
This is the code that loads the external swf from my main movie:
onClipEvent (load) {
loadMovieNum("try2.swf", 1);
}
-----------------------------------------
This is the main code of the external movie clip (try2.swf):
this.onEnterFrame = function(){
//my_mc is the instanceName
scissor_mc._x += 10;
//500 is where you want to put the number where you
//want it to stop
if (scissor_mc._x>720) {
// _root.scissors_mc._x = 720;
//kills the onenterframe
delete this.onEnterFrame;
_root.fabric_mc.play();
}
}
I'm keen to learn -- and can't wait to hear what I'm doing wrong-
(btw after i finish this project I'm taking an actionscipt class!)
thanks!!!
Load Level Problem
Hi all, anyone tell me whats wrong with my code...
It's popping the portfolio.swf up into a new window instead of over the top of this one. I'm calling this movie from my main movie.
// Hides displayed elements
this.reelmc._visible = false;
this.loadbar._visible = false;
percent_display = "";
//create a new movieclip to load
//the external movie into
this.createEmptyMovieClip("container",this._root.l oadarea);
//load the external movie into the new movieclip
container.loadMovie("portfolio.swf");
//check the download status of the external
//movie once every frame
this.onEnterFrame=function(){
//trace the percentage of the movie that has loaded
percent=(this.container.getBytesLoaded()/this.container.getBytesTotal())*100;
if(!isNan(percent)){
// trace(percent+"% loaded");
if (percent == 0) {
percent_display = "";
} else {
percent_display = Math.ceil(percent) + "% LOADED.";
}
this.loadbar._visible = true;
this.loadbar._xscale = percent;
if (percent > 1) {
this.reelmc._visible = true;
}
container.stop();
} else {
// trace("0% loaded");
}
if(percent == 100){
delete this.onEnterFrame;
this.reelmc._visible = false;
percent_display = "";
this.loadbar._visible = false;
loadMovieNum("portfolio.swf",this._root.loadarea);
}
}
stop();
Load Movie Level 101
How do I make this work to load level 101
on (press) {
_root.wnd.loadMovie("info-windows-mk.swf");
}
Im Trying To Load Swf File To Level X
the swf file on level 0 is 400 height and the other swf file is 600 height. and the I want to use the part of the swf file on level 0 just like you are using 100% height in html
If it is possible plaese tel me
tutorial, yes thank you
this is the web im trying to load bigger swf file in to: http://www.sfjdesign.com/grafik/sida1.html
Load Swf In To Random Level?
I am building a project that loads 30 images in to empty movie clips. I want one of the images to apear on top randomly. What is happening now is that the first swf in my loop always shows up on top.
Here is a link to waht i am doing:
http://www.0-style.com/files/
Here is some code i am working with:
Code:
// Random range
function randRange(min:Number, max:Number):Number {
var randomNum:Number = Math.round(Math.random()*(max-min))+min;
return randomNum;
}
//Load External files
for (i=1; i<=30; i++) {
createEmptyMovieClip("img"+i+"_mc", randRange(101, 99999));
loadExtMov("images/"+i+".swf", "img"+i+"_mc");
}
Which Level For Load Movie?
Hi,
I'm trying to out together quite a big site, so I'm going to split it up into separate swf's and load the sections using the load movie script. I'm just wondering is there any reason why you shouldn't load them into level 0?
The reason is that if I load them into level 1, then things might show through from the main swf they are loaded from, so I thought I could just put them all into level 0 to avoid this. I understand that this mans the new one replaces the old one, but what are the consequences of this - will it mean that if I want to click back to the original movie that it wll have to load back up again or not?
Thanks
Kerry
Load A Swf Or MC On Next Or Previous Level
Say 5th level is the highest, I'd like to load a swf or a MC (either one would work) on that highest level while the one that is on that 5th level unload and load on the 4th one, the one on the 4th to the 3rd, etc. it is the possible?
......i apreciate any help! thanks
Load Level Question?
Hey All,
Sorry for all the questions but I'm trying to figure out the best way to do this.
My Mc_A is loading another movie to level 9 Mc_B.I have a button on Mc_A that I want to tell Mc_B to play.
I can't figure out the Action Script.
Thank you, D
Load A Certain Scene On A Level
(Flash 8)
I'm loading a navigation bar in level5 and I when I release a button I want the main movie (loaded on level 0) to go and play a scene called products. Here is the code on the button placed in the navigation bar:
on (release) {
_level0.gotoAndPlay("products",1);
}
I don´t get any error message but this is not working, it does nothing at all.
Any ideas?
Load Movie From Level
I have created one presentation in which i have loaded 5 movie clips at different levels.
i dont know how to start the loaded movie from particular label.
I'll be thankful to u if u can help me out with this problem.
Load Swf Into Root Level...?
does someone know if its possible to load an external swf into the root level, thus replacing the original swf that loaded it?
i tried using loadMovieNum and it didnt work....it unloaded itself, but didnt load the new swf...
Load Gallery Into A Different Level
HI, this is my very first message to the Kirupa forum. I always try to figure things out on my own, but I really could use your help. It will cut days off my illogic.
I am able to use the Create a Photo Gallery
code by sbeener
this.pathToPics = "animation/";works great when I used one swf, but when the level that I want to use is _level50, and I have loaded a navigation level70 above that, the _root.photo mc loads into the level70 swf. I don't know how to get the gallery to load into the proper level. I have done traces, and changed the _root to _level0. It all works if I don't load the navigation swf on a higher level.
How's that for illogic. I appreciate your help.
tosca
Load Movie Level
Hi
I have to load a movie in level 01. So how can I make the movie to be loaded in a x and y axis that I choose?
HoW To Load A MC Over Another MC Was Loaded In Level 2
Under index.swf the file index2.swf loads in level 2 :
- (loadMovieNum ("flash_folder/index2.swf", 2); -
index.swf is just an introduction , actually index2.swf is the action
on which there are 3 buttons that I intend to load 3 other
movies , let´s call them x , y and z , over index2.swf ;
I am not exactly sure about the level such mcs will be loaded ,
are the below codes right ? if index2.swf is loaded on level 2
x will load in level 3 ...and so on ?
(loadMovieNum ("flash_folder/x.swf", 3);
(loadMovieNum ("flash_folder/y.swf", 4);
(loadMovieNum ("flash_folder/zswf", 5);
Thanks for any help provided
|