ActionScript 3.0 :: Controlling Depth And Scale In Dynamic Constructs
Jan 26, 2009
I'm just starting to program in AS3 and use it in frames on the main timeline vs OOP. Can you point me at some reference that would cover:-
1) If it is possible to scale a dynamically constructed object over a few frames in the time-line. I draw an object/shape on frame 10 and scale it up from frame 10 to frame 20, for example.
2) If I can control the depth of the dynamically constructed object. I draw an object on frame 10 and on frames 11 through 20 I have some line already drawn on another layer that I want to appear above or below the dynamically drawn shape. I can easily do both of these in AS1 but don't seem to see similar constructs in AS3?
View 3 Replies
Similar Posts:
Jun 26, 2007
I'm looking to create a rotating set of images, simulated to look 3D... that can rotate either left or right, reactive to someones mouse location.
The path of the images would look like a flat oval, and as the images came to the forefront, they would be at full scale, have the lowest position (high _y), have the highest depth (appear in front of everything else) and be dead center _x.
As they slide left or right, they would reduce everything by a relative 50% to the final shift (scale, _y, and depth) until they got to the end, moving in an upward arc following the oval path. When they got to the end, and kept rotating beyond (move in the opposite _x. but appear to follow the flow of the arc), continuing to decrease in scale, _y, and depth.
View 1 Replies
Dec 16, 2009
i have some movie clips on my stage and a dynamic text box... when i look for depth of objects i get informations that the text depth is lower then the mc that should be behind the text... i have tryed to change the depth of text like ActionScript Code: //thisText is instance name of dynmaic text
_root.thisText.swapDepths(this.getNextHighestDepth());
i can easy change movie clip depth...but doesnt work for text?
View 2 Replies
Nov 30, 2006
In my stage im loading many dynamic movieClips.at the same tim i have the static movieClips too..while i'm loading these dynamic movieClips, thats overlapping the static movieclips on the screen.. actually i need the static movieclips at the topmost position. is there any option to do like?
View 2 Replies
Jun 7, 2006
Flash 8 - AS 2.0
Ok kiddies. I've been toying with AS and trig. and have a little wiggly worm that half-heartedly responds to the mouse just as I want. It's created by looping 30 times through a for loop and using attachmovie() like this.
for(i=0; i<30; i++){
attachMovie("mcCircle", "mcCircle" + i, i, {_x:mx[i], _y:my[i]});
}
As you can see for their depths I have used the increment of the for loop. So I have 30 clips with depths from 0 to 29. On the other hand, the graphics which have been statically placed on the stage have these depths.
instance7:-16352
mcThought:-16355
instance6:-16357
mcCode:-16360
[Code]....
What I need is to place the mcCircle clips underneath some of the objects on the stage. Imparticularly, the menu bar at the top of the stage and the logo at the bottom while staying on top of the background. I just want it to look like it's going behind these two graphics. I've tried a number of things and have ran out of ideas. By the way - the bottom of frame 27 of the actions layer has the code that is outputting the depths in the Output panel in Flash.
View 6 Replies
Jun 17, 2007
I've got this new problem where I'm trying to remove a container movieclip i've attached the first time the function is run, but I try to remove it and replace it again, but the second time around it gets a negative depth and all goes to hell.
Code:
function populateBasket(){
trace("B4 REMOVE:" + basketRows.loader.container.getDepth());
basketRows.loader.container.removeMovieClip();
[Code].....
View 1 Replies
Sep 7, 2007
i am working on a project where i have some common code which i import in different movie clips and different files the code is in actionscript 2 in an external .as file. this is not a class its just a bucnh of functions and temporary variables.Problem is when i use the check syntax button or auto format button i get the following error."ActionScript 2.0 class scripts may only define class or interface constructs."this used to work fine in flash 8 but it always gives this error since i started using flash 9.the code works fine too. its just that my auto format button and the check syntax doesn't work.
View 5 Replies
Nov 11, 2003
I was wondering if it is possible to scale a UIobject (scrollpane) dynamically.I have set the scaleY of my Scrollpane but the problem is it stretches and also stretches the content that scrolls inside. Is it possible to scall it without the stretching occuring?
View 1 Replies
Mar 20, 2010
I use Flash CS4 and most of the explanations you find online are for CS3.I used a mechanism once in HTML that set the flash site to 100% width, 100% height, which did scale it but there was no maximum limit and all the content got scaled equally. I would like to do it like in the HP above, where certain elements are differently scaled.
View 1 Replies
Jun 17, 2010
dynamically loading in a swf into another flash file, and I'm wanting the user to be able to either advance to the next frame(of the dynamic swf) with the right arrow key, or go to the previous frame with the left arrow key. If I have to I can create a couple of arrows as a generic interface but I am not sure now to code those either.
View 3 Replies
May 16, 2010
I'm pretty new to AS3 but have a project with a very tight turnaround here, having been lumbered with it after a guy from work got taken ill. The basic idea is a visualisation of an XML feed, using the data pulled in to control the behaviour of movieclips. So far I have this;
[Code]...
View 0 Replies
Aug 27, 2006
The menu items are created dynamic out of empty movieclips and have the name movie + x. Now I'm trying to create a method that resets al the other movieclips to their original size and colour when one is pressed. The first problem is to adress the other ones. Even if I try to put the following in the script: movie[x]._alpha = 0; nothing happens..
for (x=1; x<=11; x++) {
eval("movie" + x).onRelease = function() {
var my_strNr:String = this._name
[Code].....
View 1 Replies
May 15, 2007
I have this code:
Code:
for (i =0; i < txB_NumberOf; i++){
var TextNames:Array = new Array;
TextNames[i] = "text_txt" + i
_root.createTextField(TextNames[i], i, 0, 0, 300, 100);
text_txt1.text = "test text;
;
The code creates a number of text fields based on the number in the variable "txB_NumberOf" each text box gets named text_txt0, text_txt1, text_txt2, text_txt3 etc by storing the names in an array called TextNames and using it as the name field in the createTextField part.
The bit in bold I want to be the name of the newly created Textfield each time through the loop. So instead of just one text box having "test text" in it each textbox gets it.I read somewhere that ... this[TextNames[i]].text = "test text" would work but it doesn't. I've tried everything else I could think of without any luck.
View 3 Replies
Dec 9, 2009
I have some dynamic text in an swf, that sits in an html doc, with the width & height set to 100%, in order to have the swf scale depending on screen size.Everything works really well apart from a dynamic text field (which pulls in slide numbers) which disappears or reappears depending on the size of the window or when the window is resized.
View 4 Replies
Jan 22, 2011
I understand that, in order get an anti-aliased font in a dynamic text field, the most given advice is to embed the font. But that doesn't work for my project since we want to make it available in multiple languages, and there are too many fields that must be embedded, and it greatly increases the file size of just one scene.
The other option I have seen people use is to custom anti-alias, but for some reason, this option just is not working for me. I fiddle and fiddle with the sliders, and no change is ever made. We are only using Arial, so I am at a complete loss as to why I seem to get no changes in the text from this option.
shed light on what might be blocking me from using custom anti-alias in my flash files?
View 3 Replies
Dec 1, 2010
I'm trying to add some zooming functionality. The problem is that when you zoom in and out, it scales the MC up and down from where the registration point is. This means That when I'm far from the position of the registration point instead of zooming the in straight it also makes it appear as if you are travelling towards the registration point.
To offset this effect I want to calculate the amount of pixels I need to offset the Map by so that it appears as if you are zooming in directly.
So just as a test I've put a little ball inside the map(called "center") which I'm trying to keep in the center of the map.[code]...
View 1 Replies
Jan 9, 2012
I have some dynamic text in an swf, that sits in an html doc, with the width & height set to 100%, in order to have the swf scale depending on screen size.
Everything works really well apart from a dynamic text field (which pulls in slide numbers) which disappears or reappears depending on the size of the window or when the window is resized. [URL]
View 1 Replies
May 11, 2004
putting a movieclip into highest depth without knowing which clip is in the highest depth
View 2 Replies
Feb 11, 2010
Is it possible to stretch the font of dynamic text or make it more bold using actionscript2?
View 12 Replies
Sep 25, 2009
I need to dynamically attach a movieclip from a library and then make it move across the screen.This is quite easy for one movieclip instance, but what I need is to have movieclips spawn at regular intervals then move accross the screen.[code]My question is, how do I continuously attach movieclips without making so many variables? Is my method of attaching even alright for this purpose?
View 2 Replies
Aug 12, 2008
I have a main.swf which plays, then stops, loads a dynamic .swf... And what I want is, from either the dynamic .swf or the main one, when the dynamic .swf is finished, the main .swf will continue/play.
View 1 Replies
May 15, 2010
I'm pretty new to AS3 but have a project with a very tight turnaround here, having been lumbered with it after a guy from work got taken ill. The basic idea is a visualisation of an XML feed, using the data pulled in to control the behaviour of movieclips. So far I have this;
[Code]...
it isnt too hard to see what I'm trying to do. The above code plops 5 movieclips on the stage, their size dictated by the 'tlength' value, and the next step is to get them moving. Ultimately I'd like these MCs to shift out from the centre of the screen and vary in size and distance depending on the data that is applied to them, but running the current code throws this error; TypeError: Error #2007: Parameter listener must be non-null.
View 4 Replies
Feb 16, 2010
I'm trying to make a text effect where on every frame the textfield increases in size and decreases in opacity. I'm using the scaleX and scaleY properties of my dynamic textfield to enlarge, but it's doing so keeping the left registration point fixed. I want to make it scale up radially outward, or with the center point fixed.
View 4 Replies
Mar 17, 2007
I found a bug with use of _X and _Y. even though vars are case sensitive in the case of _Y and _X Auto format will change them in to lower case _y and _x and still even then, the use of upper case will still apply what ever value of that var to the _y and _x of the _root.Now that I dont have the stage shifting any more I went back to look at my trace and to my surprise it's still the same.I assume that it's because of the array style scope. when in debug the the level0 and level0.stage is the same width and height.[code]
View 7 Replies
Aug 26, 2009
Basically when loading dynamic text... the .txt will have a simple yes or no inside of it... nothing more nothing less.I've been trying all morning to get a movie clip to begin playing if the value is "yes", and to NOT play if the value is "no"
Basically i have a movie clip on the main time line named WHM. and im loading a dynamic text file into a dynamic text field named player1whm.
I want to be able to change the text file to yes or no on a whim, and if the value is equal to yes... i want the movie clip to begin playing as soon as it loads that value into the box. If it says no then i want that movie clip to continue doing nothing.I have already been successful at getting yes or no to load into the dynamic text box... i just cant seem to get it to control the movie clip.
View 7 Replies
Jul 26, 2010
i have an flvplayback component within a dynamically-created accordion pane. when the user hovers over a new accordion tab and opens a new pane in the accordion, i want to stop the video in the first pane. how can i reference the video player?
here's the code on the root timeline:
function _open(ev:AccordingEvent):void {
MovieClip(root.instance7.flvPlayback).stop();
[code]....
View 2 Replies
Jan 29, 2009
I have a movieclip called pointer.mc and this movieclip has only two frames, on the first one the arrow points up and I have a stop(); action on this so it does not jump to the next frame which has the arrow pointing down and this frame also has a stop(); action on it.Then I have a dynamic text field with an instance name of tiderise which is calling a variable from a seperate .txt file called tiderise.txt and the variable is &rise= . Now I have programmed the .txt file to only supply two variables either "up" or "down" and these change periodically during the day. (I am actually making an animated tide chart if you haven't guessed already)
What I want is to get some coding that will control the movieclip pointer.mc between frame 1 and frame 2 depending on the value in the dynamic text field with an instance name of "tiderise" that can only return the value's of "up" or "down".I have spent already about 2 hours trying to figure this out with no luck, I only seem to be able to control other dynamic text fields with values from another dynamic text field, but cannot seem to get this to work on a movieclip.
View 5 Replies
Dec 31, 2009
I can't seem to control my letter spacing (kerning) in my dynamic text field. I gave the field an instance name of about_txt and I loaded the text from a text document. The text shows up fine but it is all bunched together. Here is my code:
Code:
var about_req:URLRequest = new URLRequest("about_txt.txt");
var about_1dr:URLLoader = new URLLoader(about_req);
about_1dr.addEventListener(Event.COMPLETE, onComplete);
function
onComplete(event:Event):void{
about_txt.text = event.target.data;
}var fmt:TextFormat = new TextFormat();
fmt.letterSpacing = 10
about_txt.setTextFormat(fmt);
No matter what value I put in for letterSpacing nothing seems to happen.
View 3 Replies
Jan 7, 2010
I have dynamically loaded buttons (thumb) and images (galImage) going to container_mc and full_mc containers respectively. I can't get the buttons to stay down when pressed using MOUSE_DOWN and MOUSE_UP. When I use CLICK instead, they all stay pressed. [code]...
View 7 Replies
Oct 23, 2004
The following code, when attached to the MC panTracker_mc works as desired, passing the value of the dynamic text field with a VARIABLE name of s1Pan to s1 sound object, thus controlling the pan.
[Code]...
View 14 Replies