Levels -What Am I Doing Wrong?-
Got stuck here... the problem is a bit more complex as I describe here but I'm sure that once I figure this out I can do the rest myself.
I have a swf with a movieClip with a button in it with the following code:
Code: on (press) { loadMovieNum ("shoppingchart.swf",2); _level2.shopLine_mc.product = "single toothpick"; } Now the shoppingchart.swf has a movieClip with the instancename "shopLine_mc" in this movieClip there is a dynamic textfield with the var called product.
Now I'd say that if I press the button the shoppingchart.swf should load on level2 and show the text "single toothpick" in the textfield right?
It doesnt... it does load the shoppingchart.swf but the dynamic textfield doesnt change....
Please tell me what I'm doing wrong....
Thanks in advance...
Nasier
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 08-23-2004, 05:08 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Levels -=What Am I Doing Wrong?=-
Got stuck here... the problem is a bit more complex as I describe here but I'm sure that once I figure this out I can do the rest myself.
I have a swf with a movieClip with a button in it with the following code:
Code:
on (press) {
loadMovieNum ("shoppingchart.swf",2);
_level2.shopLine_mc.product = "single toothpick";
}
Now the shoppingchart.swf has a movieClip with the instancename "shopLine_mc" in this movieClip there is a dynamic textfield with the var called product.
Now I'd say that if I press the button the shoppingchart.swf should load on level2 and show the text "single toothpick" in the textfield right?
It doesnt... it does load the shoppingchart.swf but the dynamic textfield doesnt change....
Please tell me what I'm doing wrong....
Thanks in advance...
Nasier
Levels -what Am I Doing Wrong?-
Got stuck here... the problem is a bit more complex as I describe here but I'm sure that once I figure this out I can do the rest myself.
I have a swf with a movieClip with a button in it with the following code:
Code:
on (press) {
loadMovieNum ("shoppingchart.swf",2);
_level2.shopLine_mc.product = "single toothpick";
}
Now the shoppingchart.swf has a movieClip with the instancename "shopLine_mc" in this movieClip there is a dynamic textfield with the var called product.
Now I'd say that if I press the button the shoppingchart.swf should load on level2 and show the text "single toothpick" in the textfield right?
It doesnt... it does load the shoppingchart.swf but the dynamic textfield doesnt change....
Please tell me what I'm doing wrong....
Thanks in advance...
Nasier
Levels -What Am I Doing Wrong?-
Got stuck here... the problem is a bit more complex as I describe here but I'm sure that once I figure this out I can do the rest myself.
I have a swf with a movieClip with a button in it with the following code:
Code:
on (press) {
loadMovieNum ("shoppingchart.swf",2);
_level2.shopLine_mc.product = "single toothpick";
}
Now the shoppingchart.swf has a movieClip with the instancename "shopLine_mc" in this movieClip there is a dynamic textfield with the var called product.
Now I'd say that if I press the button the shoppingchart.swf should load on level2 and show the text "single toothpick" in the textfield right?
It doesnt... it does load the shoppingchart.swf but the dynamic textfield doesnt change....
Please tell me what I'm doing wrong....
Thanks in advance...
Nasier
Levels -What Am I Doing Wrong?-
Got stuck here... the problem is a bit more complex as I describe here but I'm sure that once I figure this out I can do the rest myself.
I have a swf with a movieClip with a button in it with the following code:
ActionScript Code:
on (press) {
loadMovieNum ("shoppingchart.swf",2);
_level2.shopLine_mc.product = "single toothpick";
}
Now the shoppingchart.swf has a movieClip with the instancename "shopLine_mc" in this movieClip there is a dynamic textfield with the var called product.
Now I'd say that if I press the button the shoppingchart.swf should load on level2 and show the text "single toothpick" in the textfield right?
It doesnt... it does load the shoppingchart.swf but the dynamic textfield doesnt change....
Please tell me what I'm doing wrong....
Thanks in advance...
Nasier
[F8] Talking About Levels..controling Levels, Loading Swfs Into Levels, Etc
Hello, people!
I have a little tweaking i need to adjust.
To get to the point:
if (1==1)
{
loadMovieNum("test.swf", 3);
_level3.gotoAndStop(10);
}
else (...)
The problem is that on the if cycle, it doesnt consider the level as being loaded. I've tryed a while to wait for the level to load, nothing worked.
I've tested with a button to see if the level exist and is possible to control it and it is, with the onRelase.button etc etc.
Any ideas?
Ricardo
Thanks!
[levels] Snapto And _levels Targeting Levels
This code is on the root of a movie, it workks fine. However, when i load it into level 100(from another movie) , the snap-to code no longer works.
I've worked with levels a lot, but this really stumps me.
I've tried many many variations to taget the correct path, _levels. _root, this._name, targetPath,
The basic code appear below.
//code on root movie
onEnterFrame = fsnapto;
function fsnapto(){
//trace("pushed @ snapto ==" +choices);
// target1
area_oftarget_x = target1._x;
area_oftarget_y = target1._y;
//target2
area_oftarget_x2 = _root.target2._x;
area_oftarget_y2 = _root.target2._y;
}
// == end snap to==
// code on buttons
on(release){
if(_root.a3._droptarget == "/target1"){
trace("dropped 3================" +this.targetPath);
_root.fchoice("a3");
_root.a3._x= area_oftarget_x;
_root.a3._y= area_oftarget_y;
}
}
Swapping Levels - Levels Infinate?
Hi
im trying to produce a little news panel that you can swap between news items. The problem im having is the following... when I click a 'next' button I want a new story swf to load over the top - and so on for anouther 5 or 6 times. I want to be able to click forwrd randomly between stories - BUT how do I make sure that the next storie loaded is always on the next level up - and that the last swf is unloaded when the new one has loaded?
thanks for your help
PS: I thought of just putting all the news items in the same SWF but this would meen loading them and all their pictures at the same time and also make it harder to change/update indivdual stories
Is My Whole Layout Just Wrong, Wrong, Wrong
I have uploaded my layout, I am starting to think that this is not how its done, I will explain.
I have one main swf where I have 5 diffrent section where I want to load 5 different swf into, but I also need one of the swf's which would be a button based one to be able to comunicate with the other 4. I totally think now tehre is an easier way of doing this than the way I'm doing it, can someone help me out here cos as you guy's know, the roots of a good page is in the layout at the begining.
I have uploaded my swfs so you know what I'm talking about.
Please, please comment...
Conflicting Levels? Too Many Levels?
I've been working on this pattern maker and I have a movie clip that is basically a pixel. I duplicated that movie clip 1024 times using the following code:
for (y=0; y < 32; y++) {
for (x=0; x < 32; x++) {
_root.newName = "sampleMovie" + ((y * 32) + x);
duplicateMovieClip (sampleMovie, _root.newName, ((y * 32) + x));
xPos = getProperty(newName, _x);
yPos = getProperty(newName, _y);
setProperty(newName, _x, (x*movWidth) + xPos);
setProperty(newName, _y, (y*movHeight) + yPos);
}
}
Well, I tried duplicating another movie clip the same way with a slightly different code as follows:
for (a=0; a < 32; a++) {
for (b=0; b < 32; b++) {
_root.gridName = "grid" + ((b * 32) + a);
duplicateMovieClip (grid, _root.gridName, ((b * 2048) + a));
xPosG = getProperty(gridName, _x);
yPosG = getProperty(gridName, _y);
setProperty(gridName, _x, (a*movWidth) + xPosG);
setProperty(gridName, _y, (b*movHeight) + yPosG);
}
}
When I did that it duplicated the "grid" movie clips, but it didn't duplicate the "sampleMovie" movie clips. I figured it was because there were conflicting levels. So what I did was made a horizontal rule and just tried duplicating that just 32 times using the following code:
for (a=0; a < 32; a++) {
xLine = "horLine" + a;
duplicateMovieClip (horLine, xLine, a + 1025);
xAxis = getProperty(xLine, _y);
setProperty(xLine, _y, xAxis + 10.4);
}
This code only duplicated the movie twice. Am I using too many levels? How many levels can Flash recognize? The first code I showed produced 1,024 levels of movie clips and worked fine. Why would that last code only duplicate it twice instead of 32 times? Thanks for the help.
Levels, Jerry, Levels
Anyone who how to change a movie's level with a command? Sorta like swapdepths but for levels. I'm tryin got get a movie to basically go from being on level1 to levelo and replacing the movie in level0. I've asked in the newbies sections but no one knew for sure. Was hoping you guys would have a little something for me.
Vij'n
[F8] Controling Levels From Other Levels
Hi all,
I would like to have a button on level 0, that loads a swf on level one. In the swf loaded on level one I want to have another button wich controls a movieclip on level 0. Is that possible? I don't want to use containers, but use loadMovie("movie.swf", 1) method. Any ideas?
Thank you
Function Went Wrong....very Wrong.
Okey so i made a function that should, make two movieclips (balls) move around bouncing the edges of the screen....
but something is wrong... plz help...
when i start the movie, the whole picture is moved down to the right, and the balls aint moving, thou i can drag them around...
PHP Code:
left = 0;
right = 550;
top = 0;
bottom = 400;
xspeed = 5;
yspeed = 5;
ball01.onPress = doDrag;
ball01.onRelease = noDrag;
ball01.onReleaseOutside = noDrag;
ball02.onPress = doDrag;
ball02.onRelease = noDrag;
ball02.onReleaseOutside = noDrag;
ball01.onEnterFrame = ball;
ball02.onEnterFrame = ball;
function doDrag() {
this.startDrag();
this.dragging = true;
}
function noDrag() {
stopDrag();
this.dragging = false;
}
function ball() {
if (!dragging) {
_x = _x-xspeed;
if (_x-_width/2<left) {
_x = left+_width/2;
xspeed = -xspeed;
} else if (_x+_width/2>right) {
_x = right-_width/2;
xspeed = -xspeed;
}
_y = _y-yspeed;
if (_y-_height/2<top) {
_y = top+_height/2;
yspeed = -yspeed;
} else if (_y+_height/2>bottom) {
_y = bottom-_height/2;
yspeed = -yspeed;
}
}
}
Actins:wrong Syntax=correct, Right Syntax=wrong
Has any body made a similar observation:
when I want to load a pic into mc and write
_root.loadMovie("pic.jpg","mc");
I get a little window just the size of my pic but not my stage. But when I write:
_root.mc.loadMovie("pic.jpg");
everything is fine. I have a Mac, OS9.1. Is this related to the flashplayer in mac or what?
Levels
how do i know what level i work in?
thnx
Levels PLEASE
hi all!
ok, who can tell me how to set the level of a movieclip? i want to make a page with draggable windows. now if two windows overlay each other, how can i make the one in the back come to the front when clicked??
please help!
c!
PLS HELP ME WITH LEVELS
Flashies,
got major head trauma from trying to nut this one out solo:
what i've got is a movie that loads variables from an external .txt file to dynamic text boxes inside movieclips (this is so i can animate the textboxes), i managed to get the movieclips to automatically update and animate the number of text boxes needed from one of the variables in the txt (so all I need to do for multiple movies is change the txt, not the fla.)
now to the problem!!:: i can get everything above working fine on level0 but when i load it from inside another movie i get nadda. even if i go back and change all references to level0 in the first movie to level5 and load that into level5 i still get nothing
are there any hard and fast rules about levels that i'm missing or is my attempt at being smart making me look stupid?? any clues will be appreciated...
Please Help With Different Levels
I'm nearly going insane so please help me. I just published my site with a javascript popup (usual one). It works but here is the problem:
On my site, i've got three buttons. On release they are supposed to show a movie on level 2. But on my released site it does not work at all. It shows nothing on level 2.
If I release my site without javascript popup, just in normal explorer window it works. Why doesn't it work with a popup window? Is this a common problem or do I have to change anything. (maybe write the location of the the level 2 .swf anywhere in my index.html?)
Here is my index.html:
<HTML>
<HEAD>
<script language="JavaScript">
function openNewWindow(URLtoOpen, windowName, windowFeatures) { newWindow=window.open(URLtoOpen, windowName, windowFeatures); }
</script>
<TITLE>home</TITLE>
</HEAD>
<BODY bgcolor="#000000">
<OBJECT classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
WIDTH=150% HEIGHT=150%>swLiveConnect=true NAME=home.swf
<PARAM NAME=movie VALUE="home.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#000000> <EMBED src="home.swf" quality=high bgcolor=#000000 WIDTH=150% HEIGHT=150% TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>
</OBJECT>
</BODY>
</HTML>
Please heeeeelllppp meeee!!!
Thanx
Where Are The Levels...
If I load a .swf into a movie clip, ie -
movieclip.LoadMovie ("movie.swf". 3);
Where does that new level reside? Does it take place within the movieclip, or on the timeline? And how would I target the variables within that loaded movie clip?
Also, does the scroll work in a loaded .swf within a movieclip with dynamic text? If so, where do you target the dynamic text box? In the main timeline, in the movieclip, or in the loaded .swf?
Ciao
Levels Levels Levels
I'm making a zen rock garden. The action script I'm using attaches a movie clip every time the mouse moves to create the effect that the rake is moving the sand.....
My problem is that every time the movie clip is attached it gets put on a higher level....higher than my rake and the title...
is there a script which can put a movie clip on a specific level?
if you want to see the fla, i can mail it
Levels ?
On my main timeline I have a movie called "room". Frame two of the "room" mc has an instance name of pan2.
On button press "Room frame two (pan2)" calls a movie clip from the timeline of a symbol called "bowl". On button press "bowl" calls a movie clip from the timeline of a symbol called "angel". On button press "angel" calls a movie clip from the timeline of a symbol called "falls". On button press "falls" should return to "Room frame two (pan2)" of the main timeline, but it does not.
All of this works fine until I get to the end of the falls movie clip. How do I get the movie clip from falls to return to the main timeline frame2 (pan2)when the button is pressed?
1. Main timeline room frame two(pan2)calls (works fine)
2. bowl mc (works fine)
3. bowl mc calls angel mc (works fine)
4. angel mc calls falls mc (works fine)
5. falls mc returns to #1 ???
Using the button object On (press,release)I have tried tellTarget, targetPath and with using various combinations of _root.pan2, _level0.pan2, etc. and cannot get #5 to return to #1 or the same spot that the whole sequence started from. I know it is some little thing I am missing, but I am lost in the terminology.
Any suggestions?
Thanks
pkw
Levels Levels Levels
Thanks
Problem:
I need a movie to load based on the current position of the movie with the loadmovienum action.
example:
user presses button in _root the _root loads the movie _movie1.swf into level 1. In _movie1.swf the user presses a button to load a new movie in to the level ABOVE THE LEVEL THE MOVIE IN CURRENTLY IN witch could be 1 or 205 the action would need to determain withch level the movie is in at the present time.
Thanks
Levels
I've heard of movies being loaded onto diferent levels.
What is this and how is it done??
Why do we need them???!!
Thanks
Help With Levels?
I have been working on a Flash 5 project and have run into some problems. I am using the load movie and the attach movie objects. Everything is passed through ok. The problem is going back. I am trying to make a create your own image program. It might be easier to look at it than have me go on about it.
http://www.trina.net/shapes/test.swf
You can get the .fla file here
http://www.trina.net/shapes/test.fla
This is just a mock up of the actual project, but the layout and actions are all the same. You should be able to make a little collage of various shapes in the black box. I am unable to change shapes after I select one.
I know the problem is just where I am pointing things. If anyone can help it would be great.
Thanks
Matt
Levels
i created a button inside a movie clip and when i asked the button to go to another movie clip (which were placed on the scene) i got this:
Target not found: Target="_root.02" Base="_level0.01"
what should i do and how can i deal this levels problem?
Help!!!!
Help With Levels
How do i make a button in level2 cause the movie in level3 to start playing frame one (which is an if statment)?
This won't work! It never makes it to level 3!
on (release) {
_level0.transition = "designin";
_level3.gotoAndPlay(1);
}
Twister!
Levels.......
Hi, i'm making a menu navbar, it consists of a main movie clip on the main stage. Inside this movie clip are 3 buttons, each of which launches another movie clip, with 4 or 5 more buttons in it. I've used gotoAndPlay to get the buttons to launch the new movie clips inside the nav clip. I need the eventual buttons to move right back upto the main timeline and go to a section of the movie. I can't get the ActionScript right, i've been told that i don't understand levels and i was wondering if someone could offer a rememdy for this situation since i've fiddled with it for hours and i still get nothing!!
Martin
Levels, Please Help
Hi, i'm making a menu navbar, it consists of a main movie clip on the main stage. Inside this movie clip are 3 buttons, each of which launches another movie clip, with 4 or 5 more buttons in it. I've used gotoAndPlay to get the buttons to launch the new movie clips inside the nav clip. I need the eventual buttons to move right back upto the main timeline and go to a section of the movie. I can't get the ActionScript right, i've been told that i don't understand levels and i was wondering if someone could offer a rememdy for this situation since i've fiddled with it for hours and i still get nothing!!
Levels
I've got three cards in three different levels, each one is an external swf loaded into a main .swf, is it possible to change the level of the card as you click on it?, let's say the one at the back (level1) changes to level3 when you click on it... something like that... :-)
Levels
So say I have a number of draggable items on the same level, but i want the one that someone has picked up to be above all the others - what do you reckon is the best way of doing this?
Is it something to do with the _level command?
Is there a nice tag that sets it to _leveltop or something?
I wish....
Help!
Levels
How do I target a specific frame in a level that has been preloaded, which has a stop action on frame one, I need to target frame two of that level from level 0. Anyone?
Levels...
how can i change a property on a mc when its level is in a variable.
shot in the dark but is it something like:
path="_level"+lev+"."+mcname;
path._visible=true;
if you dont understand what im trying to do i can clarify...
Levels
hey
I am doing a cd-rom using flash and have around 4 different levels loading. The layout is on _level0 and then there is some animation and voice-over on _level1, then some nav and other stuff on the other layers. The main thing that changes is the _level1, with a new swf replacing the old _level one swf when the user clicks on the button. At the moment I am using a 44.1hz mp3 file set at streaming 160kps. I think I will reduce this as it increases the size of my swf files dramatically. But anyway, the main problem it that sometimes when I run it on a PC and have clicked on a few button, it freezes up totally or the files slows so that the voice over stutters (sounds like a sheep).
My main question is in regards to Flash whether when you do an loadMovieNum command, whether it gets rid of the previous swf it is replacing on the level in total, or whether I should unload the swf on the level and then load the new one. ie. Is it important to clear the level before loading in a new swf?
Any help or documentation on how Flash works in regards to this or taxes the processor would be greatly appreciated.
over n' out
Swf Into Mc On Levels?
I know you can load swf's into new levels, but can you load an swf into a movie clip on a new level?
I know you can on the main level0, but can you on another level?
Levels Help.............?
Can you help
I have 4 movies preloaded to levels and on release of a button im trying to store the level number so that after an animation has finished it can start to play the specified level can this be done.
ROOT: levelnumber=0;
BUTTON:
on (release) {
_root.levelnumber=2;
}
MOVIECLIP Frame action:
_level (what goes here ????).gotoAndPlay("start");
Help With Levels
Hello,
I am trying to create a movie that has several MP3's in it to be played when the corresponding button is pressed, so I have setup each MP3 in it's own movie and the buttons activate them, while the sound is playing another movie is flashing "NOW PLAYING"... when the MP3 is finished playing I would like "NOW PLAYING" to stop flashing, what should I put in the Tell Target to control a movie on the main stage?
I hope this isn't too confusing!
Thanks for your help!
Cheers,
Mike
Levels
ok heres the meal deal:
is there anyway i can define what level a swf unloads in through HTML ? cause i want my main page swf to unload on for example, level 2, and then when the user goes to a subsection for example showcase, ITS swf unloads on the same level, so that its knocks out the main page swf. i dont think i can do that if the INITIAL swf is in a level, right? cause if i make it so that it unloads a subsection in level 2, while the main page swf ISNT in level 2, wouldnt they just overlap?
Levels
few problems:
1. i have a main page, with 4 interior pages, the way i structured the travel from the main page to the interior pages is like this:
i have these actions on the buttons:
on (release) {
movieToLoad = "servicesmain.swf";
gotoAndPlay(311);
}
FRAME 311 IS EMPTY, completly, all it has this actionscript on it:
unloadMovieNum(1);
loadMovieNum(movieToLoad, 1);
stop();
My question is this: should i structure the interior pages like this? would the same technique work? putting the same actions on the buttons that go to the other sections of the site? changing only the names of the files of course...
2. Most of my interior pages have buttons that each unload external .swfs onto my main movie (the interior page), i need to know how i can clear out all those levels when the user goes to the next page (since they are all on levels, they stay there, all throughout browsing) i need a way to clear them out before it loads the next page.
Levels
few problems:
1. i have a main page, with 4 interior pages, the way i structured the travel from the main page to the interior pages is like this:
i have these actions on the buttons:
on (release) {
movieToLoad = "servicesmain.swf";
gotoAndPlay(311);
}
FRAME 311 IS EMPTY, completly, all it has this actionscript on it:
unloadMovieNum(1);
loadMovieNum(movieToLoad, 1);
stop();
My question is this: should i structure the interior pages like this? would the same technique work? putting the same actions on the buttons that go to the other sections of the site? changing only the names of the files of course...
2. Most of my interior pages have buttons that each unload external .swfs onto my main movie (the interior page), i need to know how i can clear out all those levels when the user goes to the next page (since they are all on levels, they stay there, all throughout browsing) i need a way to clear them out before it loads the next page..
this is a really crucial problem that ive been trying to figure out for ages, and ive been posting on several forums, but still, im not getting any solid help... please, HELP !
Levels
how can i get the swf to play if they are not in the same folders as the html and using levels
Levels
Hello, How i can disable the buttons on level 0 when a new level appears.
Levels
is it true that levels arent used by most people? if so why? what area some basic alternatives to using levels? to display/load a movie?
thanks
Z Levels
When multiple resizing movie clips overlap, I am trying to get the larger to be over top of the smaller clips. I know its z levels but how do I change a clips z level to acount for its size?
Levels?
Ok, I have two Flash Files... one is being loaded into the other. Lets name them swfA and swfB. swfA gets loaded into swfB, swfB is the Navigations and basically like a frame that swfA gets loaded into. in swfA there is a textbox with two buttons, one to scroll up and one to scroll down. When swfA stands alone it works but once it is loaded into swfB the scroll buttons no longer work properly. Someone told me that it is because in the scroll commands contain root and need to be changed to the proper level... how do i figure out the level name? thanks in advance
Levels
what is a level and how do you assign a level?
Is a level the same as a layer?
I hear all sorts of level discussion but for some reason I never
really understood or saw levels much.
please explain.
Levels
what is a level and how do you assign a level?
Is a level the same as a layer?
I hear all sorts of level discussion but for some reason I never
really understood or saw levels much.
please explain.
Levels
what is a level and how do you assign a level?
Is a level the same as a layer?
I hear all sorts of level discussion but for some reason I never
really understood or saw levels much.
please explain.
Levels
i got this enoying problem..
i have a MC with buttons in it. when i click on home i want it to go to frame 40. instead it goes to 30.
the code for the button is:
Code:
on (release) {
_root.gotoAndPlay(40)
}
download the .fla if you dont know what i mean.
please help me. It seems so easy... But it isnīt (for me anyways).
thanks
/black_emperor
Levels
I don't understand this level thing, so I'm having some problem with it. I have a movie clip on scene2 (scene 1 is a loader), there's a button inside this movie clip that goes to a frame on scene2, what should i put in this script?
on (release) {
with (_????) {
gotoAndPlay(27);
}
}
I know it isn't _root, what is it then?
Levels
I don't understand this level thing, so I'm having some problem with it. I have a movie clip on scene2 (scene 1 is a loader), there's a button inside this movie clip that goes to a frame on scene2, what should i put in this script?
on (release) {
with (_????) {
gotoAndPlay(27);
}
}
I know it isn't _root, what is it then?
|