ActionScript 3.0 :: Movieclips To The Highest Level?
Sep 20, 2009
I have 3 different movieclips loaded to the stage. Placed on different layers when I press the button which is associated with the right movieclip I get working only the one that sits above all. The rest is being played in the back of this movieclip.
I have 2 solutions in mind, I hope you guys could help me at leas with one of them.
-I have prepared a fade out inside each movieclip but why I am new to AS3 (I used AS2 before) I can't figure out how to trigger this when another movieclip started to play.
or
-To get the actual movieclip placed on the highest level when a button is pressed.
View 7 Replies
Similar Posts:
Jan 15, 2008
how do i load a movie clip SYMBOL at the highest level and then unload it.
i dont want a SFW or JPG to be loaded- that would be one of the symbols from the same swf file.
the issue is- i have used "getNextHighestDepth()" to create movie clips.. now i need to add a box on top of that- so again, i will have to use "getNextHighestDepth()" - which im having hard time to unload (when i use duplicateMovieClip) -
View 5 Replies
May 11, 2004
putting a movieclip into highest depth without knowing which clip is in the highest depth
View 2 Replies
Aug 16, 2004
Is there a way to add some code in the first frame of the main movie's timeline that sets certain MC's that I specify into level 1000? I'm going to be using swap depths for a project but I need certain clips to always remain on top no matter what. The swap depth of the other movies will constantly be raising them by 2 levels, so I figure I'll put the ones I need on top on level 1000 as the others should never reach that high. I was thinking I'd have to either add an array with the MC's I need moved to level 1000, or make them _global. and set a property to that somehow.
View 3 Replies
Oct 18, 2004
Is it possible to check the number of movieclips in a level?
View 1 Replies
Mar 4, 2002
I have a movie (back.swf) and this calls into another (menu.swf, level20). I want to control the movie clips to the level0 with the buttons on level20. I do that but I can't control in a random order.
For example:
I press button 1 and play movie clip 1.
I press button 2 and play movie clip 2.
But if I press again button 1 don't play it.
And if I press the button 3 play the movie 3 but don't allow to return to the button 1 and 2.
Every movie clips are in level0.
View 1 Replies
Oct 31, 2007
I am writing a simple game in which the hero will need to jump on a trampoline. The thing is there are various trampolines (set as instance name tramp1, tramp2, tramp3 etc, and only one trampoline will be active at any given time. I have set a variable _global.level which decides which trampoline is active but how do I do the hit test?
So far I have:
trampland = _parent.ground.tramp2.spring.hitTest(this._x+8, this._y+32, true);
if (trampland) {go and do something}
But how do i tell which 'tramp' to use? I have been trying
_parent.ground.tramp[_global.level].spring,
But to no avail.
View 2 Replies
Apr 22, 2011
im trying to create a level select screen so the buttons unlock as you complete a level, so far i have this on each button:
on(release){
if(this.number <= currentItem){
gotoAndPlay(3);
}
}
[Code]...
View 0 Replies
Aug 26, 2010
I have two layers in my FLA both with empty movie clips as follows:In mc_Empty1, I attach a faded background movieclip as I wait for mc_Empty2 to load a SWF. Once the SWF is loaded into mc_Empty2, I want to remove the faded background movieclip from mc_Empty1. When I load the SWF from the main timeline, the onLoad() function works and removes the faded background from mc_Empty1. However, when I load the SWF from mc_target, the SWF loads, but the onLoad() function does not. Here's my AS2 code:
//Loading SWF from main timeline
mc_Empty1.attachMovie("mcFadedBg", "mc_FadedBg", 1);
mc_Empty2.loadMovie("My.swf");mc_Empty2.onLoad = function():Void{ trace("loaded"); //This works removeMovieClip(mc_Empty1.mc_FadedBg); //This works}
[code]....
I know I'm targeting properly because the SWF loads as it should, but the onLoad() function does not.
View 3 Replies
Oct 2, 2010
This is making me a little kooky today. I thought I could defined a library path in PREFERENCES > ACTIONSCRIPT > ACTIONSCRIPT 3.0 SETTINGS then that library would be available to all AS3 FLA files, but that doesn't seem to work for me. If I use the PUBLISH SETTINGS and define the library path everything is fine.
Is there something that I could have done to disable the application level class path functionality? I guess I'm trying avoid having to set the library path for every new FLA I'm making.
View 1 Replies
Dec 26, 2011
I'm doing a bigger aplication in flash (as2).Image, there is a main "home" flash with several menu buttons.Clicking these buttons, I load external swf into an empty container in this "home" flash.[code]clicking buttons in this second level, will load external movies into an empty container in this SECOND LEVEL swf.This works fine, but now, coming to the THIRD LEVEL (don't think there will be more in the future) problems come up, some scripts won't work.Now (I'm a as2-beginner) I think, loading external swf ALLWAYS into containers in the first "Home" flash should solve the problem.But I don't know, how to load an swf from the third level into a container in the first "home" level.In the "home" level, I have a "close" button, that will unload the container content.I need to go to a certain scene "content_2" in the home swf, too.
View 7 Replies
May 9, 2004
i have game im doing, and i want it to jump to level 2 upon completing the first level, but the problem is, the level 2 is a seperate swf, i've tried to use
Code:
on (release) {
loadMovie("level2.swf",2)
}
View 3 Replies
Dec 2, 2009
I have called main.swf into a container in index.swf.
myMCL.loadClip("main.swf","container"); is an action on my Index.fla timeline.
I have my navigation on index. (i wanted it to go on main, but the nature of the animation meant it had to go on index)
I need to call "home.swf" into "main.swf" from the navigation button in Index.swf.
When I had the navigation on "main.swf" this was my code to call "home.swf" into the page.
on (release) {
Preloader_mc.gotoAndStop("home");
}
("home") is the label name where the preloader is for home.swf
how to call the preloader for home into main.swf from "INDEX.SWF INSTEAD OF MAIN.SWF"
View 5 Replies
Feb 2, 2010
I have a file1.swf which loads file2.swf into it. Within file2.swf i have a button that when clicked needs to remove file2.swf and load file3.swf into its place.
View 2 Replies
Sep 16, 2004
Is there a way to link to one level below the current level? Instead of saying _root.level1.level2.level3, something like: ../level3 ?
View 4 Replies
Jul 26, 2006
I have 3 movieclips and inside them loads external txt.files .To MovieClip number one loads 1.txt, to number two loads 2.txt and to number three loads file 3.txt.Allright everything works, but......what if I wantet to load the txt-file that has the highest number to the first movieclip example 65.txt, and to number two the 64.txt, and to movieclip 3 txt-file 63. And when there is txt-file called 66 in the folder it loads to movieclip one, and 65 loads to movieclip 2 etc... I think everybody gets the point.Is it possible, that Flash look up the txt file that has the highest value?
View 8 Replies
Apr 10, 2007
i have 3 variables and im executing a block of code depending which on has the highestow do i determine has the highest and the execute the code which ever has the highest
View 3 Replies
Aug 13, 2008
I have a shape and I want to find out what the highest y value is for an x value.Example: I have an oval, and with width 200 px. I input an x value like 78 px from the left and I want to know what the highest y value is that matches the x value (the top of the oval at point x)
View 3 Replies
Apr 30, 2009
i had to remove the flash built form and place an iframe over the top of the animation with an html form! (my reason was that the exported flash file always recognised keystrokes as that of an american keyboard and the @ sign came out as this "when you hover over the icons at the bottom which bring up information contained in a button, it falls behind the iframe.is there anyway in which i can make that particular button that contains a movieclip get the next highest z index to go above the iframe?FYI:-i have tried this on the button instance but does not work...
on (rollOver) {
this.getNextHighestDepth();
}
[code]....
View 1 Replies
Nov 4, 2002
on this page .i had to remove the flash built form and place an iframe over the top of the animation with an html form! (my reason was that the exported flash file always recognised keystrokes as that of an american keyboard and the @ sign came out as this hen you hover over the icons at the bottom which bring up information contained in a button, it falls behind the iframe.is there anyway in which i can make that particular button that contains a movieclip get the next highest z index to go above the iframe??FYI:-i have tried this on the button instance but does not work...
on (rollOver) {
this.getNextHighestDepth();
}
[code]......
View 1 Replies
Jan 14, 2009
Situation:
- We have a Flash application located on a SAP EP (let's say ep.x.com)
- We have a SAP ABAP Application (Webservices) on a SAP WebAS
server (abap.x.com)
- Clarification: This is not about Flash islands / but a normal Flash application communicating with WebAS ABAP via WebServices
Problem: Due to the changed security policy in Flash 10 this scenario does no longer work.
- A crossdomain policy file on root level cannot be deployed on root level
- The WebServices http/s headers cannot be modified, since the WebServices are generated by the WebAS IDE.
Comment: Technically there is a way to patch a WebAS ABAP,but this is not a practical / acceptable way in a normal SAP WebAS infrastructure.
Conclusion:- The above scenario (Flash from EP content / WebAS ABAP as backend) is a quite normal scenario in the SAP world.
- SAP / Adobe always features the close relationship between their technologies.
Question:- What could we do?
- How does the Visual Composer works around that problem?
View 1 Replies
May 2, 2010
I'm creating this shooter game. I attached a crosshair mc at the beginning with the depth set to getNextHighestDepth.However I keep adding the monsters mc dynamically when the game progresses, also with getNextHighestDepth. So the monster mc will keep overriding the depth of my crosshair's depth. how to get my crosshair mc's depth always to be on top of everything including the monster mc.I tried getNextHighestDepth()+1000 for my crosshair mc. But it was dumb because the monsters keep getting getNextHighestDepth as well. I assume that monster's depth would be 1001, 1002 and so on...
View 3 Replies
Jul 17, 2009
I'm trying to set the MovieClip I MOUSE_DOWN on to the highest index using
var mcToMove:MovieClip;
mcToMove = this[e.target.parent.name][e.target.name];
trace(mcToMove is MovieClip); // "true"
setChildIndex(MovieClip(mcToMove), (this.numChildren - 1));
but I think it's only giving me the e.target.name and not the whole path that includes the parent mc as well.
View 5 Replies
Dec 10, 2010
ok so in actionscript using xml I can find all the nodes of the same name using
xmlList.descendants("nodename");
and that returns me a XMLlist of those nodes that exist within the xmlList I provided all well and good but now I want to only get the one node of the returned value that has the largest value.
Do I have to loop through the resulting nodes or can I get that node without a loop maybe some other xmllist function I'm not aware of ?
View 2 Replies
Aug 4, 2006
How would I go about returning which object in an has the highest (numerically) of a particular variable? The variables are randomly generated.
[Code]...
View 8 Replies
Oct 13, 2006
I have an array of image width values pulled from XML. I want to simply look at the array and return a value that is equal to the highest number in the array. e.g. the array might end up like array [250,600,350,375]and I just want something that returns the highest value (in this case the 600).
View 9 Replies
Aug 18, 2008
way to find the highest number in an array? umbersArr(314,2613,221,103,77);is there a way to loop though this, compare all the numbers to each other and find the highest value while keeping the array in order?
View 14 Replies
Jul 27, 2009
I want to add highest score table in my flash game ? I want to upload my game to web so visitors can play on my page and see how good they were. Im working with as2
View 1 Replies
Apr 28, 2011
I have a set of variables of type "integer" and I just want to take the greatest of these values, and set as the value for some new variable. How would I do this in as3?
View 2 Replies
Sep 12, 2010
I'm adding a custom cursor, and I need it to stay at the highest depth. Currently, whenever I add new movie clips to the screen, the custom mouse shows up behind the movie clips, which looks terrible. I have to add movie clips regularly during runtime, but I need the custom cursor to stay above them, just like the regular mouse would.
Here's how I'm adding the custom cursor:
Mouse.hide();
var cross= new crosshairs();
this.addChild(cross);
cross.depth = 999999;
cross.startDrag(true);
View 2 Replies