i have a problem adressing or targetting a attached mc when i target de mc directly it works fine but when i try it trough a variable it doesnt recognise its path anymore???
i have a problem adressing or targetting a attached mc when i target de mc directly it works fine but when i try it trough a variable it doesnt recognise its path anymore??? hopefully a part of the code is gonna explain the situation a litle better... this piece works fine:
I've been looking for a tutorial that describes how to make it so dragable objects can snap together when one is dropped in the right place next to another, but so far I haven't had much luck. Does anyone happen to know of such a tutorial, or can post something here about how to do it?
For example, how do I make something like this: [URL].. and how do I make it recognise when all the pieces are attached together?
I have a big problem : My gallery ( with xml) was working perfect until yesterday . I uploaded my files to my server to test them. This morning I reopened the fla to make modif and big surprise : only the big image appears but no thumbs anymore in the scroller. I tried to trace the xml nodes but thay are now undefined. WHY? Everything is in the same folder.Nothing changed. I turned everything upside down but nothing. Does a uploading can affect some configuration ? Are the xml modified modified after being uploaded ?
I have used a pop up window code several times before and now it doesn't seem to work. I've tried in several different movies now and when pressing the button it simply flashed the page and moves a little, but won't actually pop up to the page it's pointed to.Here's the code:
on (release) { getURL ("javascript:NewWindow=window.open('http://www.angelfire.com/in/HansonArtGallery/2newpaintingbig.html','newWin','width=650,height=6 50,left=0,top=0,toolbar=No,location=No,scrollbars= No,status=No,resizable=No,fullscreen=No'); NewWindow.focus(); void(0);"); }
I create a button in flash cs4 and click "publish preview -flash" and my button works. I save my file and click "publish preview - flash" again, my button doesn't work anymore.??I'm using Flash CS4 on an IBM compatible.
I'm having trouble figuring out how to target a series of movie clips i'm attaching to my movie.I'm loading some xml for a slideshow and i'm generating a series of dots at the bottom of the screen to indicate how many steps are in the slideshow and the circle is meant to highlight your current position as you step through the presentation.the MC for the dots is two keyframes with a different color and a stop action on each frame. Here's the rundown of the code:
1. There's nothing weird here, i'm just bringing the xml in [code]
2. Here is the loadXML function i reference in the xml.Data.onLoad above:[code]Okay so now i have some dots with the instance names, step0, step1 etc. right? And at the end of my loadXML function you see the firstImage(); function. This is where my problem is, how do i target the first (step0) instance? I have no problem when I write "step0.gotoAndStop(2);" but I need to figure out how to use a variable to keep moving it along when i make my next and last functions for the slideshow.
3. Here is the firstImage function:[code]how do i target the step the same way i target the image? do i have to go back and do something in the loadXML for loop?[code]
I want to target ALL the 20 clips attached as below, at the same time, when I press the button "blue". However, my code can target only ONE of the clips at any time. I have tried attaching the clips to a separate dynamic clip and then targeting it but problems with the registration point (0,0) of that clip means I cannot achieve the result I want:
Code: for(i=0;i<20;i++){ mc = this.attachMovie("red","red2"+i,i); var scaleFactor:Number = Math.random() * 80 + 20; mc._x = Math.random()*500; mc._y = Math.random()*400; mc._xscale = scaleFactor; mc._yscale = scaleFactor; blue.onRelease = function(){ new Tween(mc,"_xscale",Strong.easeOut,mc._xscale,200,3,true); new Tween(mc,"_yscale",Strong.easeOut,mc._yscale,200,3,true); }}
My flash file creates multiple slideshow instances. These slideshow's are each controlled by some buttons and AS code that reside within the attached container clip. The code for buttons and slideshow nav is as follows (this resides on first frame of attached movie, not on _root):
[Code]...
The problem is that instead of just controlling the slideshow for which you are viewing, the keys control all other slideshows as well at the same time. Where the buttons, when you click them, control only the slideshow that they are contained in. I've tried writing an absolute path to the specific slideshow movie in question like:
the flash autoformat destroys my code... And i use it all the time .. my switch and for statements doesnt work anymore after autoformat, it adds ';' where it shouldnt..
I have a menu with 4 tabs. When I click on one I want it to open and the previous one to close.
I'm storing the previous tab as a variable (_previousTab) but am having trouble adding the variable to the path to the MovieClip of the previous tab. The error Flash gives me is:
TypeError: Error #1010: A term is undefined and has no properties. at MenuRun/menuOpen()
[Code]....
If I replace mainframe[_previousTab] with the name of the MovieClip it works fine. I'm thinking it's something to do with the variable being a String perhaps?
I'd like some help on using a variable in a path to a MovieClip. I have a menu with 4 tabs. When I click on one I want it to open and the previous one to close.
I'm storing the previous tab as a variable (_previousTab) but am having trouble adding the variable to the path to the MovieClip of the previous tab. The error Flash gives me is:
[Code]...
If I replace the variable _previousTab with the name of the MovieClip it works fine. I'm thinking it's something to do with the variable being a String perhaps?? Also, the trace statements return the desired MovieClip names.
i was trying to make a movie clip visible (it starts invisible), than invisible again. It gets visible, but i could't make it turn invisible again! Same thing happened with buttonMode propertie. I applied both only for movieClips and buttons, have no idea what is happening.
I have a function and some textfields within a movieclip, and I need to reference those textfields dynamically. This worked when I'd had the TFs on the stage, but not since I've placed them in an MC.The TF naming convention works out to this:
Code: t_t1c1r1 t_t1c2r1 t_t1c1r2
[code]....
So, to access them dynamically, I combine the letters with index numbers to be gotten through the function's arguments.
The numbers represented by "i" and "ii" are coming through fine in trace, but the path is still wrong. I've tried different combinations of _level0, etc., but it only works in my testing when I make an absolute reference to the field (e.g. Object(_level0.mc_instance)['t_t1c'+i+'r'+ii].text which is not a viable solution).
I am kinda puzzled as to where functions lay in path targeting. For example, I have this code on the first frame of a blank .fla:
Code: function pathTest() { trace("it runs...") this.atextfield.text="test..." } pathTest()
And then of course on the stage I have a text field with a instance named atextfield. The function runs but does not work. If I take off the "this" then it works. Why? I was reading something about private and public functions the other day, does this have anything to do with this?
I have a function and some textfields within a movieclip, and I need to reference those textfields dynamically. This worked when I'd had the TFs on the stage, but not since I've placed them in an MC.The TF naming convention works out to this:[code]The numbers represented by "i" and "ii" are coming through fine in trace, but the path is still wrong. I've tried different combinations of _level0, etc., but it only works in my testing when I make an absolute reference to the field (e.g. Object(_level0.mc_instance)['t_t1c'+i+'r'+ii].text which is not a viable solution).
So i made an expandable banner which overlaps a flash map. But now the flash map doesn't reacts any more for the part that is being overlap by the banner
I attached an mc to the main timeline using the code _root.attachMovie(loader,loader,depth + 5,{_x:(Stage.width / 2), _y:(Stage.height / 2)}); where loader is a variable which contains the name of the movie. The mc is successfully attached but whenever I try to code something to it it doesn't work. (For Example, In mc.onRollOver = function the function doesn't get executed) I don't know why this isn't working.
I'm dynamically attaching a movieclip linkage to my root timeline. The linkage has two layers inside -- a graphic shape mask and an empty movieclip for loading images. The empty movieclip is masked by the graphic shape mask.I'm using a MovieClipLoader object to load and manage the preloader for the empty movieclip when it loads images.Why does the mask sometimes work and sometimes not? Would the image type have anything to do with it? Or is it something to do with the act of attaching the linkage and then loading images into the empty movieclip contained therein?
I made an AS3 animation with Flash. The SWF work perfectly playing directly in the Flash Player.If I read the SWF file in a browser, interactions like "onRollOver" or "onEnterFrame" doesn't work anymore.
On the stage I have a movieclip called mc_back. I also have a movieclip on the stage called mc_content. Now, inside mc_content I have a bunch of code and some of it adds, or should add, an EventListener to mc_back as well as a a function that works when mc_back is pressed.
So basically, all code is written inside mc_content and some of it needs to interact with mc_back.
how to target mc_back from inside mc_content. Using stage.mc_back or root.mc_back doesn't work and Google should be my friend, but in this particular problem, it's acting more like my enemy.
On my stage, I have a bunch of movieclips with sequential instance names ("toggle1", "toggle2", etc.). I also have another bunch of movieclips, each with their own sequential instance name ("name1", "name2", etc.).How can I set it so that when I click on a "toggle" movieclip, a specified property changes on the "name" movieclip with the same number.Here's what I have so far.
ActionScript Code: for (var i = 1; i <= 16; i++) {[code]....