What I'm trying to do, is duplicate a movie clip an x amount of times, based on a variable loaded externally, not the problem though, got that working fine.My problem comes in while I'm trying to reposition the duplicated movies, to line up in a stacked order.It duplicates the movie the number of times I need it, but when trying to call upon the movie clip, which is the a=this["a"+i]; script, nothing happens, the clips don't get repositioned.[code]
This is the third thread I've written for my current project (1st was answered perfectly, 2nd failed [but I still figured it out anyways]) but I'm not sure if there is a solution to this problem. I can't really explain my problem, so once again I've included a helpful animation to show you what I mean. Bear in mind that the pale-blue box represents the movie clip's borders, and those borders are usually changed to include the animation (instead of the borders moving with the animation, the borders get bigger).
For the animation problem, I've already got a solution: create an invisible movie clip that has the exact size and shape of the animated movie clip and make it follow the movie clip as it animates, and make the hitTest check the invisible movie clip instead of the animated one. As for the rotation problem, well, I don't know how to fix it. Is there a way to change that?
I always run into the same bug concerning the x and y positioning of a Movie clip. When I try to get the X and Y values of a movie clip inside another movie clip, they aren't the same values (since I guess every MC has it's own x,y grid starting at point 0,0 where that MC is placed on the work area). How do I get the x and y values of a MC inside another MC when I want those values to be the same as the _root's x and y values? In other words: The movie clip that is inside the other one is moving on a simple guide path. I want to create "lasers" (or whatever) at its own coordinates every few seconds depending on where that moving MC is at when the shooting counter is up.
i put my MovieClip on frame 1 than i put it on frame 60 and made motion tween between them. that works until i decided to positioning MovieClip at frame 1 with actionscript, i write this at frame one.
i am trying to do some xml based driven search. i am right now stuck with positioning of movieclip inside movieclip and pagination for the same.Since the data is going beyond main movieclip container. i have just started actionscripting.
PHP Code: on (press) { var getSearch = myText.text;
What I'm trying to do, is duplicate a movie clip an x amount of times, based on a variable loaded externally, not the problem though, got that working fine. My problem comes in while I'm trying to reposition the duplicated movies, to line up in a stacked order. It duplicates the movie the number of times I need it, but when trying to call upon the movie clip, which is the a=this["a"+i]; script, nothing happens, the clips don't get repositioned.
I created a class called GameBoard that uses a pair offor-loops to populate a 2-dimensional array and display the array'selements in alternating rows of 14 and 13 objects respectively. Thefirst dimension of the array holds the arrays for each row of thegrid. The array for a row holds a set of objects from a class thatextends MovieClip. The objects are arranged with just enough roomfor each one.
The objects are displayed via addChild(). Their coordinatesare set via .x and .y properties. The intervals for theseproperties are unsigned integer values.When I test GameBoard on its own stage, everything worksperfectly. When I place a GameBoard object in another file,however, the spacing between the objects in GameBoard showsseemingly random changes, with some objects appearing to slightlyoverlap. The Stage of the file I am importing GameBoard into is
Im trying to build a script that attaches and positions an instance of a movieclip for each node of an xml sheet. However, I can't seem to get it to loop properly. The script is simply attaching and positioning the movieclip according to the last node in the xml file. Here is my script:
Code: var myXML:XML = new XML(); myXML.ignoreWhite=true; myXML.load("map.xml");
I have been wondering over this for a while now and I have tried a number of different soloutions to no avail. I am used to designing HMTL website but for a portfolio I would like to create a Flash site. One problem is dynamic screen sizes, although I have a soloution it isn't idealy what I would like.
My current soloution is to size the stage to a 1024 x 768 resoloution and scale it to 100% on a webpage. The background for my flash is massive, 1920 x 1080, equivelent to full HD size, to support as many screens as possible, the flash has a No Scale atribute. Unfortunatly this method dosen't only increase filesize, but makes the content restricted to a small area of the screen which looks terrible on large displays.
I'm new to AS 3.0 and I don't get this fluid thing fully. Everything works fine when I want my movieclip to align to the middle of the screen but when I try to make a button (or any movieclip) always align to bottom right I can't figure out how. Here's my AS, how do I make the "ball_mc" align bottom left?
I have one Sprite which acts as a container for two other Sprites. One has a picture the other has a series of hotspots.
If i change the scaleX and scaleY of the picture, the hotspots don't line up anymore. Do you know the correct equation so that any scale i set will always make the hotspots appear at the right place?
I'm looking to create something like the link below, [URL].. however I need it to work on both x and y,I've been trying for days to figure out a way to pull this off,
can anyone point me to a tutorial or an example of something along those lines?
I am trying to position my loader for an external swf. Can anyone help me. Here is the code that I currently have to load the swf. These are the positions that I need x=0, y=180.
Code:
stop(); var myLoader:Loader = new Loader(); myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, swfLoadComplete); function swfLoadComplete(loadEvent:Event)
I'm using action script v2 to load a .jpg from a button.I'm using the command 'loadMovieNum("photo.jpg",4)'What script could I add in to resize the jpg to specific dimensions and position it at a particular x,y coordinate?
I need to create the attached jpg, but i'm not sure of the best way to tackle it. The news posts are loaded from XML and will vary in height so they need to somehow be sorted so that if one is going to come off the page, then it's put into the next page - where the user will click the scroll buttons to view.
1/ Load article from XML
2/ Create a postMC_0 and add article bits to it (date, title, body)
3/ Record height
4/ Create a newsColumn_0 and add postMC_0 to it
Then a loop:
5/ Load next article
6/ Create a postMC_1 and add article bits to it
7/ If difference between postMC_0 height and newsColumn_0 height is greater than the height of postMC_1, then add postMC_1 to newsColumn_0.
8/ If not, then create newsColumn_1 and add postMC_1 to it.
9/ Loop back to 5 (increasing the numbers each time, so postMC_2, etc) Then just make the scroll buttons function according to how many columns have been created..
This is the swf I'm trying to load. These actions load and position a small simple swf just fine and the trace in the onLoadProgress function indicates that it loads completely but I can't see it. What am I doing wrong?
I built an app in flash where you can rotate objects and save positions and rotation to xml.... that xml then feeds html to produce a layout that is then rendered the a pdf It seems that every time it goes to the html, a rotated object in positioned a little to the lower right then the position in flash.
I know the rotation in css in different, but I think if I can find the true top left of the rotated object in flash and pass that it will solve the issue.
I tried this
newx = imageHolder.parent.localToGlobal(new Point(imageHolder.x,0)).x; newy = imageHolder.parent.localToGlobal(new Point(0,imageHolder.y)).y; also this imageHolder.parent.globalToLocal(imageHolder.localToGlobal(imageHolder.getBounds(imageHolder).topLeft));
I have been working on this to no avail. I would like to individually position different movie clips unto my flash site, yet it will only let me position one. Well.. more specifically it will perfectly position rock_mc, but transition_mc wont appear centered until I resize the screen manually. Is there any way I can fix this to have it appear in position from the beggining?
I'm trying to make some mcs be displayed from alpha 0 to 100, one by one in the stage and in random positions. I've managed to make appear it randomly from alpha 0 to 100 with this code:
how would you go about positioning a MC in the top right hand corner - a few pixels. And How to get it to stay even on Resize? to get it to stay in that corner so it moves with the screen resize?
Code: for (var i = 0; i<nTotalPics; i++) { main.createEmptyMovieClip( "container"+i, i ); var container:MovieClip = main["container"+i]; container.createEmptyMovieClip( "pic"+i, i );
[code]....
First, if I add "trace (pic._name);" inside the onLoadInit function it outputs "pic3,pic2,pic1,pic0". Why does it show up in reverse order of the for-loop?
Second, is the "pic:MovieClip" in "mclListener.onLoadInit = function(pic:MovieClip)" pointing to the "pic" in "mcl.loadClip( astrImages[i], pic );"? If not, what is it pointing to? If it is, can I add another variable after "pic" so that I can pass it inside the onLoadInit function? Ultimately what I would like to do is create a textfield under each pic.
I am using this actionscript to obtain full screen flash in AS2 but am having problems positioning mcs on the y axis (the x is no problem).
[Code]...
I am trying to get the mc "buttons" position in the top right of the browser window but I cant get the height value correct. When the width is used on its own it works perfectly.
I have five rectangle shaped movie clips....I need to change their _y position randomly by clciking a button..but there must be 10px space between them... so how do I modify the code to do it ?
i have seen websites with fullscreen .swf and i dont know what kind of script they used to have the movie clips positioned constantly i.e. 20px from right border of the screen while all people have different resolutions.
I'm trying to make some mcs appear to alpha 0 to 100, one at one in the stage and in random positions. I've managed to make appear it randomly from alpha 0 to 100 with this code:[code]The strange thing is that only some mcs are positioned randomly and others stay in the same position, but not always the same.
I am writing a loop and want to position 25 boxes in a square. I can make 5 boxes appear in a line, but can't make 25 boxes appear in a square without writing 5 seperate loops (e.g. j, k, l, m, etc.). This seems long-handed, can I shorten the code? Here is the code I have used so far:
how to make it so that it is always centered horizontally in the middle of the browser window. I am having issues making it so that it is centered vertically between 150pixels from the top to the bottom. This will make it so that if the window is small the swf will be right at y=150 but if the window is large it will have equal spacing between the top(150) and the bottom of the window.