ActionScript 2.0 :: Determining Correct _xscale And _yscale For TweenLite?
Sep 29, 2009
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]........
View 1 Replies
Similar Posts:
Dec 18, 2006
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 Replies
May 4, 2010
I'm creating a learning activity for one of our biology classes. The basis of the activity is to test students ability to transcribe and translate DNA into other sequences.I have a dynamic text field where the student would type in a 36 character squence.
I already know that I can use an if statement to see if all 36 characters are correct. I was wondering if there was a way to individually check each letter the student typed in is the correct one for that line. So if UUAACCGG is the correct answer, I want flash to check and see if the third character is indeed A or not.
View 1 Replies
May 4, 2010
I'm creating a learning activity for one of our biology classes. The basis of the activity is to test students ability to transcribe and translate DNA into other sequences.
I have a dynamic text field where the student would type in a 36 character sequence.
I already know that I can use an if statement to see if all 36 characters are correct. I was wondering if there was a way to individually check each letter the student typed in is the correct one for that line. So if UUAACCGG is the correct answer, I want flash to check and see if the third character is indeed A or not.
I know I can do this with 36 individual text boxes, but I was kind of hoping to get away with just one big text box.
View 0 Replies
Jun 1, 2011
Its pretty simple what im trying to achieve.I have a MC on Stage, which im trying to tween to different X coordinates.I've set up four TweenLite.to sequences, however for some weird reason only one is being triggered - what am I doing wrong?
TweenLite.to(slider.mc_slider,1,{x:_returnXPos(95), ease:menuEasing});
TweenLite.to(slider.mc_slider,1,{delay: 1, x:_returnXPos(35), ease:menuEasing});
TweenLite.to(slider.mc_slider,1,{delay: 2, x:_returnXPos(50), ease:menuEasing});
[code].....
View 3 Replies
Apr 4, 2007
Is there a known way to have _xscale and or _yscale show as if it was say 25% have it show .25, and if it's a 100% it's shows 1?
View 5 Replies
Oct 25, 2004
i'm using this code to for a button to make a MC "kids1" gradually scale to 300%, in 5% increments, but it only scales it 5% then stop, does anyone know how to make this function repeat until _yscale=300?
Code:
on (release) {
if (_root.kids1._yscale<300) {
_root.kids1._yscale+= +5;
}
}
View 1 Replies
Oct 27, 2009
i am pretty new to action script. please explain me wats the difference between _x and _xscale...
View 1 Replies
Feb 25, 2010
I'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.
View 4 Replies
Nov 17, 2002
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?
View 4 Replies
Nov 21, 2006
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.
View 8 Replies
Dec 30, 2009
I'm trying to get the depths of all the blocks to be at the correct levels at the correct times so that the 3d effect is maintained. I've tried many things, but have had little success. All the instances of the blocks are stored in an array, but since it's adding them in accordance with when they're added to the stage, it doesn't help me locate them to swap depths. Is there a way to arrange them by location on the board?
View 4 Replies
Jun 2, 2008
I'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;
}
View 4 Replies
Aug 14, 2003
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 Replies
Jan 4, 2004
I 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 Replies
Feb 28, 2012
Determining the value of a bit in a byte? Hence at a current position?It's something with bitwise but im not entirely getting it. I know how preset a uint's value (a 32 bit's value)Just not....able to take part of a bit (say the 3rd, 4th, 5th, and 6th position of byte A into a new byte(byte B))etter example:001101000101110100101110101011101000Let's say that's a 32 bit segment.
View 6 Replies
Dec 21, 2005
i know there is a code that determines which of two values is larger and returns the larger value.i cannot seem to find it in the actionscript help.i know you can do it with
[code]...
but there is an easier way and i cannot find the file that i used it in previuosly.
View 3 Replies
Mar 5, 2006
I have a container_mc that loads in a external MovieClip, lets call it video1.swf using the MovieClipLoader class (it actually contains a video of a 180sx drifting but thats neither here or there). What I'm trying to figure out, is a way to find out when this externally loaded clip terminates, then preload and then display another clip, called video2.swf. I call my preloader and load my external clips into the MCL class using a version I learnt in Senoculars preloader tutorials here [URL]
View 3 Replies
Apr 10, 2007
i have 3 variables and im executing a block of code depending which on has the highestow do i determine has the highest and the execute the code which ever has the highest
View 3 Replies
Dec 30, 2009
I have an swf loaded into my main swf. So far I can get a button in the loaded swf, to link to a frame in my main swf. However, how can I let my main swf know when the loaded swf has finished playing?Here is my code so far:
Code:
stop();
var imageRequest:URLRequest = new URLRequest("dylanTalking1.swf");
var imageLoader:Loader = new Loader();
[code]....
But it does not seem to work.
View 13 Replies
Mar 13, 2009
normally the sound.length property is only accessibleafter the sound has finished downloading.I have heard there is an algorithm that can determine thesound.length property before an mp3 has finished downloading, or atleast approximate it very closely
View 1 Replies
Jan 15, 2009
Within my fla file I have an intro and I have added anaddEventListener on the skipBtn located within the intro and I getand error message. The button appears on the second frame and is onthe stage until the intro concludes. I have a preloader on thefirst frame. I get the following error message: TypeError: Error #1009: Cannot access a property or method ofa null object reference. at intro_fla::MainTimeline/frame2()This is the error when I debug the movie:Attemping to launch and connect to Player using URLC:Bteferraintro2.swf[SWF] C:Bteferraintro2.swf - 331059 bytes afterdecompression
View 5 Replies
Nov 2, 2011
I'm current building a game in as3; the proplem I have right now is when I roll the virtual dice, the player(marker) moves accross the board but what I need to know is: is there a way to find the instance name of the object(box) that the player lands on?
View 2 Replies
Jan 15, 2009
Within my fla file I have an intro and I have added an addEventListener on the skipBtn located within the intro and I get and error message. The button appears on the second frame and is on the stage until the intro concludes. I have a preloader on the first frame. I get the following error message:
TypeError: Error #1009: Cannot access a property or method of a null object reference. at intro_fla::MainTimeline/frame2()
[Code]....
View 5 Replies
Jul 21, 2010
Is there a way of determining if one interface extends another? ie if IA extends IB then passing in to a method like this will return true
ActionScript Code:
function checkInheritance(TargetClass:Class, CheckClass:Class):Boolean
{
// return TargetClass implements CheckClass;
}
View 2 Replies
Aug 27, 2009
I'm working on a new website it's going to show a room & I think it would be kinda cool if this room had a window in in that outside showed the current local weather and portrayed day/night. I can make a script to check the weather on yahoo but I cant find a way of finding out the users location. It does't need to be exact, even just having the country will do.
View 2 Replies
May 19, 2011
I have a series of movieclips acting as buttons that load different flashvars video srcs onto the stage.When the swf loads --- the first button is added to the stage after a 20 sec Timer completes.As you click through each button, the one just CLICKED is removed and a new button is added in its place.All the buttons are set to dynamically be centered on the stage. However, the function that is positioning them is called BEFORE the first button is on stage, throwing the error (Error #2007: Parameter child must be non-null.)here is the code inside of the windowResize method which positions the buttons.
Code: Select allprivate function onWindowResize(e:Event):void
{
//position hidden buttons[code].....
Even though I've set up a boolean var and set it to true after the first button has been added to the stage -- the method still tries to find the first button and gives me a error saying that it must be non-null.Basically I want to make sure that it doesn't try and position the first button before it has been added to the stage. I'm not sure if encapsulating this method inside of another Timer is a good idea.
View 1 Replies
Nov 27, 2004
using actionscript, of determining if a file exists within a directory on the web server? I�m using Flash MX Pro.
View 1 Replies
Sep 22, 2007
i have to create something that loads text dynamically and then you can input words and it determines if that word is in that dynamically loaded text. I have to output a statement for three different reasons.
1. If the word is not found
2. If the word is found
3. If the word is found, but it's not the same (Ex. You enter hello but the word in the text is Hello)
I have it all working for the moment using functions etc....but the one thing I am unsure about is how to determine whether the character is uppercase or lowercase or maybe there is another possible way so that I can print out the 3rd reason from about.(telling the difference from hello and Hello.)
The whole thing is based off a tutorial I found here: [URL]
just got rid of the find next button and added an output msg box.
View 2 Replies
Apr 27, 2009
...How do you do this? I'm gunning for <65 kb and need to figure out if my published swf will meet this goal. Is there a window or something (maybe a 3rd party tool) to let me know what the initial download size of my swf is?
View 2 Replies