ActionScript 2.0 :: CreateEmptyMovieClip In The Next Free Level?
May 22, 2004I want to createEmptyMovieClip in the next free level, I remember it was something with getNextHighestDepth?
View 1 RepliesI want to createEmptyMovieClip in the next free level, I remember it was something with getNextHighestDepth?
View 1 RepliesI want to createEmptyMovieClip in the next free level, I remember it was something with getNextHighestDepth? How do I actually do this ?
View 1 RepliesHere is my loop:
puppycount = new LoadVars();
puppycount.load("puppycount.txt");
puppycount.onLoad=function(){[code]....
it works, but when I click on another button in my movie each movieClip that this script created remains above everything else? Something to do with the levels.
I am using the following code to load the external file "1.swf":
this.createEmptyMovieClip("image_1", 2);
image_1._x = 50;
image_1._y = 50;
image_1.loadMovie("portfolio/100_design/1.swf", 1);
When the playhead goes to the next frame, I want create a new empty movie clip 1 level above the previous one, which will load external file "2.swf". The content of "1.swf" must not be deleted / replaced.
Is there any way I can dynamically add 1 to both the EmptyMovieClip name and level?
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]...
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.
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.
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 Repliesi 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)
}
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"
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 RepliesIs there a way to link to one level below the current level? Instead of saying _root.level1.level2.level3, something like: ../level3 ?
View 4 RepliesSituation:
- 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?
I have a movie that's 500x400 px in level 0 and has lots of thumbnails with pictures that I want to open. the thumbnails open a 500x400 px movie above the other but on level 1. the problem is that when the new movie loads on level 1, the thumbnails on level 0 (that are now hidden by the new movie) are still active, and if i click anywere in the movie on level 1, it trigger an action from level 0. Is it possible to load a movie to level 1 that deactivates the movie in level 0 without unloading it?
View 1 Repliesve been trying to populate an empty MovieClip in AS3. I can get my head around it if I create an empty movie clip and place it in the library, and then add it to the stage and then add other MCs from the library to it.But I want to make multiple empty MCs and fill each one with MCs. I want to do this using for loops so I can control as many as I need.I dont know how to write the code. I can do it in AS2! but thats not the point!here's the simple version:::
Code:
var myMC:MovieClip = new MovieClip();
for(var i:int=0;i<5;i++)
[code]......
I find myself having problems with createEmptyMovieClip(s), I only seem to have one loading, I basically wish to have a preload for each thumbnail, my images are obtained from a php array and not an xml file.
Code-
hspace = 80;
vspace = 20;
[code]......
I'm having some big problems trying to migrate this part of code from AS2 to AS3. I'm newbie, and tried to google examples, but i still can't get it.
[Code]...
The "scroll_right" image shows up, but in Debug, _root.win_Main.scroll_right.bar does not exist after this code is called. However, _root.win_Main.scroll_right DOES exist.
Code:
var win:Object = _root.win_Main;
win.createEmptyMovieClip( "scroll_right", win.getNextHighestDepth() );
[code].....
I found some AS2 code for creating a XML dynamic photo gallery, with thumbnails and big selected image. I extended that for more than one gallery, and all worked well except one thing: when I load a gallery with, for example, 6 photos and return to one with 2, the difference of 4 thumbnails of the first gallery remains, so the problem is that I don't know how to remove the mc instances that I've created with createEmptyMovieClip function. The code of the function that creates every thumbnail is:
function thumbnails_fn(k) { thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth()); tlistener = new Object(); tlistener.onLoadInit = function(target_mc) { target_mc._x = hit_left._x+(target_mc._width+5)*k; target_mc.pictureValue = k; target_mc.onRelease = function() { p = this.pictureValue-1;
[code]....
k is the number of the image to create this thumbnail, and thumbnails[cat_actual][k] is the path that contains the thumbnail to show. I've tried to use the removeMovieClip(); function with thumbnail_mc but doesn't work.
this is what i have.- createEmptyMovieClip "hold"- hold.attachMovie("logo","logo",1)the problem is that when attaching the logo...it's not centered. how do i center it...i've tried _x and _y but Movie Clips seem to have different dimensions than the actual movie size.
View 4 Repliesit goes to a certain point in the timeline, which then initiates some code to load a movie clip onto a certain part of the screen.I made a sample swf to be loaded(home.swf), but the thing is, I dont want the user to see the things that are off the page of home.swf, that the user couldn't normally see... i was wondering the best way to solve this.As you can see, i already tried sizing the clip, but that only made it extremely small and didn't solve the problem.he main timeline :
Code:
this.createEmptyMovieClip("content_mc", this.getNextHighestDepth());
var mclLoader:MovieClipLoader = new MovieClipLoader();
[code].....
I'am having troubles with the CreateEmptyMovieClip on my website.I made the following script in a new document with just a button and an image.This is the code in the button:
Code:
on (press) {
gotoAndStop(2);
[code]......
Ok, so I am using a basic stamp and processing to create an interface in flash. So far I have it draw a line from the middle of the stage to the x-y of my custom mouse when you push a button. That's the easy part.What I am trying desperatley to do is to make each line stay on screen, and when you press the button a new line is drawn. This is where the problem is. Right now it's erasing the old line and drawing a new one every time.I have tried everything under the sky that my basic knowledge can think of. It seems that what I need is to name each new EmptyMovieClip with an increasing number at the end (like "line1" then :"line2" etc) but when I try that I can't get the lineStyle and moveTo commands to recognize the names.Any suggestions? Here is the part of my Actionscript:
inVarY = (inData[0]*2);
inVarX = (inData[1]*2);
btnVar = (inData[2]);
[code].....
I'm making a simple photo gallery, and I'm having trouble loading the thumbnail images. I use the same method (loadClip()) to load the fully sized pictures, and there's no problem there. Even with the thumbnails, I could get the images to load properly when I hard coded each individual thumbnail. The problem is when I try to createEmptyMovieClip() and then loadClip() into these movieclips dynamically, if you will, so it can adjust itself to the number of images in the gallery. I get nothing. No images. Nothing shows up.This is my first time using the createEmptyMovieClip and loadClip methods,
Basically, the code is just creating a new movieclip (mc_thumbnails) to contain all the thumbnails. Then, it should create a new movieclip (inside mc_thumbnails) for each image available. Inside each of these clips (mc_thumbnail1, mc_thumbnail2, etc), the appropriate image should be loaded...
Code:
thumbnailMCLoader = new MovieClipLoader();
thumbnailPreloadObj = new Object();
thumbnailMCLoader.addListener(thumbnailPreloadObj);[code]...
I have a my class file, as such:
class custom.myprojectname.load_photos {
public function load_photos(){
createEmptyMovieClip("myMC", 1);
[code].....
I am creating Movieclips on the fly from a database but I cant manage to create the objects with unique ID. One more problem is that I have to place the objects on a targeted movieclip. This is the code....
Code:
mainMap.map.pan.top_mc.createEmptyMovieClip("myOBJ", getNextHighestDepth());
mainMap.map.pan.top_mc.myObj.loadMovie("hast.swf");
[code].....
I'm dynamically creating movieclips and using loadMovie to load jpg images from an xml file. But I cannot get the onRollOver, or any other event handler to work. Here is my code:
Code:
var images:XML = new XML();
images.ignoreWhite = true;
[code].....
How do I create MovieClip in class. I tried to use createEmptyMovieClip. But unless I use _root.createEmptyMovieClip, it is not working.
Code:
class LoadM {
private var mcAlpha:Number;
var defX:Number;[code]....
This code is working fine. But I don't want to use _root.createEmptyMovieClip. I tried this.createEmptyMovieClip, but it is not working.
Is this possible to:1. create an empty movie clip2. load some swf in that with loadmovie3. create another empty movieclip inside the first empty movieclip4. load another swf into the second empty movieclipSomething like this I guess:
Code:
_root.createEmptyMovieClip("teste_mc",1);
_root.teste_mc.loadMovie("intro.swf");
[code].....
Can createEmptyMovieClip and createTextField work nested... ?I have the following:
this.createEmptyMovieClip("infoBox", 1);
infoBox.onEnterFrame = function() {
this.createTextField("infoText", 1, 0, 0, 100, 100);
[code].....