ActionScript 2.0 :: Difference Between _x And _xscale?
Oct 27, 2009i am pretty new to action script. please explain me wats the difference between _x and _xscale...
View 1 Repliesi am pretty new to action script. please explain me wats the difference between _x and _xscale...
View 1 RepliesI've read the Photo Slideshow and the Photo Gallery Using XML and Flash tutorials from Kirupa and I've modified it a little bit to suite my website. Mostly layout changes.What I want to do is for the slideshow() function, with the setInterval, is to have a "time bar" that shows the time of that setInterval function. Just like a preloader.I have a movieclip named time_left and in that movieclip I have a border and also another movieclip called whats_left . The idea is to use _xscale and scale the whats_left moviclip.Here's the actionscript for the slideshow() function
Code:
function slideshow() {
myInterval = setInterval(pause_slideshow, delay);
function pause_slideshow() {
if(p == (total-1)) {
[code]....
If you know the tutorials I've read and wonder where my clearInterval is, it's in my prevImage, nextImage and firstImage functions as I use the previous- and next-buttons to give my users the ability to skip the timer and go straight to the next/previous image.
Is it possible to give a variable to the _xscale of a given MC.? i wonder because I ran into a problem with this example:
I have a MC, that i want to be able to modify the xscale by an input box and button. basically the user inputs a value, presses the button, and the _xscale of the MC chages to what they put in the input box. so my MC is named graph. the input box has a var of xsize. the button works fine if I use on release graph._xscale = xsize
but when I try to give graph._xscale a variable like MCsize
on release
MCsize = xsize
that doesn't work.
is it my syntax or just that I can't give a property of a MC a variable name?
I have some MC's and they have buttons and other MC's within them. (dynamically loaded). I don't want them to be seen or the buttons enabled until my startbutton is pressed. I tried
mc.enabled = false
mc._alpha = 0
and it didn't work. (If anyone knows why, I'd be curious to know the answer)
So I did mc._xscale = 0
and that seems to do the trick. They aren't visible and there's no fear of anyone pressing any invisible buttons.
I've run into a little bit of a wall with TweenLite (AS2). It isn't really an issue with TweenLite so much as my lack of understanding, and I'm hoping someone will be gracious enough to educate me.I'm using TweenLite to tween the _xscale and _yscale of a movieclip The issue is that the end _xscale and _yscale values will differ depending on the original size of the movieclip. I need to reduce the _xscale and _yscale until the movieclip's width is less than 620. I've created a pretty clumsy way of doing this:
Code:
center._alpha = 0;
center.onEnterFrame = function(){
[code]........
I'm moving my movieclip around and in order to make things work nicely I need to know the _xscale and _yscale values before and after the clip has been triggered, there are lots of variations but when I trace(myMC._xscale) & trace(myMC._yscale) the only values returned are 100
View 7 RepliesI'm making a shooting game, would like the gun to flip _xscale when you move the gun past half the width of the stage. Here's the script I made which doesn't work and is probably not written correctly:
if(_xmouse >= Stage.width/2){
_root.gun_mc._xscale * -1;
}
I've got a scrolling image gallery which I have a zoom button that lets the user zoom in on the images... If they click on the stage, the scrolling stops. Now, if they try to zoom in, the image scales from the left side, since the images registration points are on the left side of the movie clip they're loaded into. This causes the images to shift right, but I want it to appear as if its a straight on zoom...
View 3 RepliesI am making a photo gallery with thumbnails and when the mouse rolls over them, they increase in size. Problem: when they increase, they do not cover the other thumbnails completely, since it is only an _xscale percentage increase and not a new movie clip. So you can see all the other thumbnails over the increased photo size. It is a problem of swapping depths I'm sure--but do I have to take off all the thumbnails from the main level and load them dynamically onto different levels in order to be able to swap depths?
View 4 Replieswhat are the differences between '.this' and '.stage'?
View 4 RepliesWhat are the main differences between the versions?
View 3 Repliesi am intermediate programmer.but i think that has ended 2 days before when i came across a simple while loop.which i can't figure it out how the stuff works..[code]from 1 - 9 ,that is (1,2,3,4,5,6,7,9);I want to know difference between pre and post additions in the loops.if the first program adds the increment value after each loop , then why didn't it prints the (0) value. and i also want to know that ,Why this methods does not have any difference on for loops....
View 9 RepliesWhat's the difference between if, while and do..while besides the way they are presented?
[Code]...
Both are working, can be used, but I'd like to ask what's the difference between '}' and '};'. Let me know if I asked something very stupid.
View 4 RepliesBut what is the difference between [] and (). I used () in the random letters tutorial and it didn't work. When i used [] it worked.
View 2 Replieswhat's the difference between for example:
var H:int;
var _H:int;
I am trying to load random external SWF's using XML. I'm not having any problems loading JPG files, but the SWF's just won't load. Is there a difference between JPG's and SWF's when loading using loadMovie? Pointers to tutorials or pages in the manual would be great.
Here's a snippet of the code:
[AS]
function firstImage() {
if (p<(total-1)) {
p=random(total);
[Code]....
I was looking for the difference between the different content types in Flash CS3/CS4 - Browser/Screen Saver/Application etc - especially it's capabilities and limitations. Of interest are Standalone player and Application.
View 3 RepliesEach line in the dynamic textbox has 15 characters, and yet you can notice the difference in the length(between each line).
I want to make the length of each line look same if they have same number of charaters.
Suppose I'm building a game where your ship moves with left/right keys.I assign a speed variable which is the number of pixels the ship will move when you press one of the said keys.Currently (on the tutorial I'm following) I have:
Quote:
static const speed:Number = 150.0
Can't I just replace it:
Quote: var speed:int = 150
Also, what's the difference between var a:Number and var a:int? And is there any important reason to add the .0 in 150.0?
I was just wondering what the difference between these two is.
View 1 RepliesWhat is the Difference between macromedia flash and flash cs4. What is the Advantage of Flash cs4. Why Flash CS4 came..?
View 4 RepliesWhat is the difference between set and get functionality?
View 1 RepliesWhat is the difference between FMS 3 and FMS 3.5? Is 3.5 a totally new version or just some kind of service upgrade?
View 8 Repliesdifference between XML and XMLList in my example code? I am passing a node to the function and extracting the url of the file:
private function getFile(node:XMLList):String {
var file:String;
for(var i:uint=0; i<node.children().length(); i++) {
trace("Test 1: "+node.children()[i].@id);
[Code]....
Why do I have to have 'current' as XML and not as XMLList? I thought XMLList's with length == 1 are handled as XML's anyway, aren't they?
Just want to clear a very basic doubt am having for quite some time.
Is LCDS and FDS the same
What differences are there betwee Flash CS4 and Flex, besides the GUI of Flash?
View 3 RepliesI have heard different things in forums but unable to find a concrete answer on the difference between obj[name] and obj.name. Does the compiler treat them differently?
View 3 Replieswhat is the difference between skin and CSS??Why it is better to use skin over CSS in Flex.
View 2 RepliesJust wanted to know if someone can explain the difference between these two conditionals:
if ( !object )
if ( object == null )
where object is an instance of a user-defined class.I'm sure that these two cannot be used in an interchangeable manner, or are they?