I understand how to tell Flash that a preexisting symbol in the library should belong to a certain custom class, but how do you do this when creating movie clips w/ createEmptyMovieClip?
I know it is possible to attach a class to a movieclip that exists in the library by checking 'Export for ActionScript' and specifying an 'AS 2.0 class' for that symbol.
I would really like to know if it's also possible to attach a class to a movieclip that was created by using the 'createEmptyMovieClip' method.
I know it is possible to attach a class to a movieclip that exists in the library by checking 'Export for ActionScript' and specifying an 'AS 2.0 class' for that symbol.
I would really like to know if it's also possible to attach a class to a movieclip that was created by using the 'createEmptyMovieClip' method.
I know it is possible to attach a class to a movieclip that exists in the library by checking 'Export for ActionScript' and specifying an 'AS 2.0 class' for that symbol.
I would really like to know if it's also possible to attach a class to a movieclip that was created by using the 'createEmptyMovieClip' method.
ve 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++)
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.
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() );
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.
it 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();
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:
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:
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 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....
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;
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.
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:
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?
I have a question regarding createEmptyMovieClip in AS2. I have a flash file separated out into sections with labels and menu buttons which allow you to move you to the relevant frame/section (which contains the information/contents relevant to that section). This works fine. What I can't work out is that if I manually put a movieclip on the stage in my 'about section' and then add contents to it via AS2 then it only exists within the about us section. If I do it using createEmptyMovieClip within the actions for the about frame this works fine but it then always exists on every other frame of the project. I assume this is because it isn't actually creating it within this frame but I can't work out how to make it do this, even when i use this.createEmptyMovieClip it has exactly the same effect. I can obviously remove the movieclip completely each time a user moves to another frame that doesn't contain it but I don't want to do this as it contains a youtube video and leaving it means it doesn't have to be reloaded each time they come back.
I would be massively grateful if anyone could shed any light on this for me as I know i'm not getting how to place it correctly but i'm not sure how I should be doing it?
im making this website in AS2 using SWFaddress for the first time. everytime a new page in flash is requested trough swfaddress i need the menu to be remade, so i unload the previous menuitems en load new ones.
the problem is if the unloadmovie works the new items aren't made, but if i reload that same page it will show. so when items are unloaded new ones aren't made and if no items are there to be unloaded new ones are made...
here's my code
ActionScript Code: function createMenuNow(){ trace("_______create menu now_______");
I am using createEmptyMovieClip to create MC's based on values from an array. The MC's are placed into the FScrollPaneSymbol component. They load ok however the getURL that should be loaded from the array doesn't work. I've only been able to get it working if I put in an onEnterFrame function but that makes it assign the last url from the array to all the MC's.
Code: foo.onEnterFrame = function() { for (q in portfolio.sections[0].items) {[code]....
If the array values are 1,2,3 it assigns the geturl for each of the MC's to "3"; Do I even have to use the onEnterFrame for the ScrollPane/MC's?