What's the code for Scaling a MovieClip at Runtime?

I can't believe how difficult it's been to find an answer for such a simple question.  I found a thread in this forum titled "How to Resize a MovieClip at Runtime?", but the code that was posted as an answer has been removed from the post.  WHY?!?!  Is it a highly guarded secret?!?!
Anyway...I just want to know how to scale a movieclip at runtime with a drag function...and also while the parent movieclip already has a drag function active.
Any help would be much appreciated.
BTW...I've found a cure for death that also instantly makes you the richest person in the world with all the knowlege of the universe...
It can be found here:

onMouseUp and onRelease is usually (but not always) the same.
you can use a scaling factor:
var scaleFactor:Number = .3;
mc.onPress=function(){
resize_mc = this;
startX =_xmouse;
startY = _ymouse;
this.onEnterFrame=resizeF;
mc.onRelease=function(){
delete this.onEnterFrame;
function resizeF():Void{
resize_mc._width+=(_xmouse-startX)*scaleFactor;
resize_mc._height+=(_ymouse-startY)*scaleFactor;

Similar Messages

  • In BSP-HTMLB what is the code for auto refresh.?

    Hi friends,
    In BSP-HTMLB what is the code for auto refresh.?
    Means i gave the input every 2 minutes once my output should get refresh.
    So what is the code in bsp-htmpb?
    Moosa

    Hi Moosa,
    Many threads on this topic...
    [Auto Refresh - I|Auto refresh]
    [Auto Refresh - II|Auto-Refresh for BSP page]
    [Auto Refresh - III|Page refresh.....]
    Search the forum for more information.
    Regards,
    Anubhav

  • What is the code for a proscan tv-dvd for a sony rmt-d197a remote control

    trying to program a sony dvd remote to turn on and off my proscan tv-dvd combo. the dvd no longer works. is that possible and what is the code for e proscan tv dvd combo?

    Unfortunately, the RMT-D197A remote control is not programmable. It only works with the DVD player it comes with.
    If my post answers your question, please mark it as "Accept as Solution"
    http://bit.ly/Win-4K

  • What is the code for a reset button that puts the program to start?

    What is the code?
    reset_btn.addEventListener(MouseEvent.CLICK, reset);
    function reset(event:MouseEvent):void
         //Reset all variables and send the playhead to the appropriate frame
    doesn't work!

    Hi,
    I think you are using the pre-defined keyword (RESET), thats why you are facing the problem, try the other word and your problem will be solved, i have tried it in FLASH CS5.
    reset_btn.addEventListener(MouseEvent.CLICK, resetHandler);
    function resetHandler(e:MouseEvent):void
         //Put code reset logic here.
    It will work, as it is properly working.
    VIPUL

  • What is the code for updating a table of content?

    I'm looking online and not finding a command list or something helpful. I'm also on a government computer so a bunch of sites are blocked for security or something. I am making a script that does a few things and one needs to be updating the TOC but I cant find the command.
    I wish this software had something simular to a program called MAYA has. "echo all commands" in the script editor so anything you do shows all code being exicuted.

    Theoretically, if you are using Adobe's own ESTK to write your scripts, all commands can be found in the Help menu. Then again, searching in there is needlessly made difficult (i.e., you have to know exactly what you are searching for before you can find it). So (modest cough) ... Adobe InDesign CS6 (8.0) Object Model JS: Table of Contents
    The command you are looking for is not in the "Table of Content Suite" since that only describes the format of the contents. It is a Document method: Adobe InDesign CS6 (8.0) Object Model JS: Document -- look for createTOC (this stupid editor doesn't show it but the link already points to the correct place -- perhaps this editor was written by "We Also Brought You The ESTK").
    Searching through the thousands of pages is easier if you download the CHM version and use a good CHM viewer. Check out
    http://www.jongware.com/idjshelp.html

  • What's the code for applying CSS to an XML file, in a dynamic text feild

    Hi all,
    Very simply put, just like in the title.
    If you have a CSS ready, an XML file that already appears
    inside a dynamic text field, what AS2 code would you use to connect
    the CSS so it applies to the XML file which is now unstyled?
    thanks!!!

    ...sorry for thaking a while to get back to you. I pluged the
    code you provided and the exported flash does not deplay the text.
    instead it says "undefined" which to me means something in the xml
    files is work, which is strage since I tested the xml file in a
    browser and it works find. so i am providing both the AS code
    (below) and the xml and css file (attached). my hope is that you
    can direct me to what the problem is.
    THANK YOU AGAING FOR ALL YOU HELP!!!
    AS code:
    Scrolling Text XML by Digital Science |
    www.digitalscience.za.org
    /////////////Load XML Data/////////////
    function loadXML(loaded) {
    if (loaded) {
    xmlNode = this.firstChild;
    header = [];
    txt = [];
    total = xmlNode.childNodes.length;
    for (i=0; i<total; i++) {
    header
    = xmlNode.childNodes.childNodes[0].firstChild.nodeValue;
    txt
    = xmlNode.childNodes.childNodes[1].firstChild.nodeValue;
    gotoAndStop(11);
    } else {
    errorMsg.text = "Error loading XML";
    xmlData = new XML();
    xmlData.ignoreWhite = true;
    xmlData.onLoad = loadXML;
    xmlData.load("member_content_test.xml");
    stop();
    import TextField.StyleSheet;
    var ss:StyleSheet = new StyleSheet();
    ss.onLoad = function() {
    txt_mc.styleSheet=this; // where yourTF is your textfield
    ss.load("jokes.css"); // where yourSS.css is your css file.

  • What is the code for a rating scale?

    I can't seem to find the coding for a simple 1-5 point/star rating scale. Can someone help me?
    Thanks,

    http://speckyboy.com/2010/04/21/15-javascript-and-plugins-and-tutorials-for-adding-ratings /

  • What is the code for entering data in tablecontrol as in smartform....?

    Hi
    1.I create 2 tabs in Modulepool Programming.
    2.In First Tab, I enter the data and when i click the SAVE button the data should be saved in my custom table ZDILEEP.
    3.In Second Tab,I put an Tablecontrol and DISPLAY the data what i have to save in first tab and i do 3 operations as DELETE,UPDATE,ADD A RECORD.
    4. I Create a button in Application Toolbar as FORM,whenever i click this button the SMARTFORM will be triggered.
    5.In SmartForm, I put an TableControl and display the data and i put SUM of SALARY.
    6.Now My Requirement is At run time, if i add a record or update a record that should be displayed in smartform,
       without clicking the pushbuttons UPDATE,ADD A RECORD i.e. without using custom table ZDILEEP the data
       should be displayed in smartform as of Tablecontrol.
    where I want to write these code....? and what code i want 2 write...?
    can anybody help me

    >
    dileepbandla wrote:
    > Hi
    >

    > 1.I create 2 tabs in Modulepool Programming.
    > 2.In First Tab, I enter the data and when i click the SAVE button the data should be saved in my custom table ZDILEEP.
    > 3.In Second Tab,I put an Tablecontrol and DISPLAY the data what i have to save in first tab and i do 3 operations as DELETE,UPDATE,ADD A RECORD.
    > 4. I Create a button in Application Toolbar as FORM,whenever i click this button the SMARTFORM will be triggered.
    > 5.In SmartForm, I put an TableControl and display the data and i put SUM of SALARY.
    > 6.Now My Requirement is At run time, if i add a record or update a record that should be displayed in smartform,
    >    without clicking the pushbuttons UPDATE,ADD A RECORD i.e. without using custom table ZDILEEP the data
    >    should be displayed in smartform as of Tablecontrol.
    You need to read the table control data along with Custom table data before you call the smartform and passing data to smartform.
    > where I want to write these code....? and what code i want 2 write...?
    >
    In PAI. What code? - Probably, loop at table control and get the data into another internal table then pass this data into smartform interface.
    >
    >  can anybody help me

  • What is the snippet for a symbol's XY position?

    I am animating a drag drop game and when all 4 pieces are in the right locations, I need another action to happen.
    But what is the code for the location of a symbol?
    I know it's not getPosition (as that relates to the timeline), and if you put in .css({"position": "absolute", "left": "Xpx", "top": "Ypx"}) then it positions the different symbols top begin with... but still doesn't start the consequent action.
    Anyone know?
    Here is the code I am using currently:
    if(
        (sym.$("Slide").css({"position": "absolute", "left": "45px", "top": "117px"})),
        (sym.$("Rightleg").css({"position":"absolute", "left": "260px", "top": "21px"})),
        (sym.$("Leftleg").css({"position":"absolute", "left": "105px", "top": "30px"})),
        (sym.$("Ladder").css({"position": "absolute", "left": "360px", "top": "16px"}))
           alert("correct");

    There are several ways to find the position of an object.
    with top() and left()
        var symTop = sym.$('Rectangle').css('top');
        var symLeft = sym.$('Rectangle').css('left');
    with offset()
        var x = sym.$("elementName").offset();
        alert("Top: " + x.top + " Left: " + x.left);
        Note: you will need jquery
    with position()
        var position = sym.$("Rectangle").position();
        console.log( "x or left: " + position.left + ", y or top: " + position.top );
              or
        var x = sym.$("Rectangle").position().left;
        var y = sym.$("Rectangle").position().top;

  • HT201195 I entered the code for my gift card but I never used it,now I'm trying to use it but it's no there and doesn't let me redeem the code again. What can I do?

    I entered the code for my gift card but I never used it,now I'm trying to use it but it's no there and doesn't let me redeem the code again. What can I do?

    An iTunes gift card can only be redeemed once, you can't enter and redeem its code again. Since you redeemed the card you haven't bought anything (including IAPs and auto-renewing subscriptions), and your account doesn't show a balance ? You've tried logging out and back into your account and seeing if it shows then ?
    My account's balance shows at the top left of the store's page on my computer's iTunes, and by logging in to view my account via the Store > View Account menu option. On my iOS devices it shows at the bottom of, for example, the Featured tab in the App Store app under my account id (or you can view your account via Settings > iTunes & App Stores and it should show on the screen that you are taken to). If the balance is zero then it might not be shown.

  • Is about to enter the code for my personal wifi, but in my code I have the £ sign which i cannot type. What shall I do?

    Is about to enter the code for my personal wifi, but in my code I have the sign £, which I cannot type. What shall I do?

    Welcome to the Apple Community.
    I'm afraid the only thing you can do is the obvious thing, change your password.

  • What would be the code for a previous button?

    I am passing Strings from an array to JTextArea. When I hit the "next" button on my jtoolbar, it shows the next string in the array. This is the code I have for the next button:
    static final public String NEXT = "next";
    String cmd = e.getActionCommand();
    String[] arr =
    "the strings",
    "that i am",
    "passing to JTextArea"
    if(NEXT.equals(cmd)
    showNextValue();
    public void showNextValue()
    textArea.setText(arr[index]);
    index = (index+1)%arr.length;
    My question is:
    how would I write the code for the method showPreviousValue() without getting an indexoutofbounds exception? It would do the same thing as showNextValue, but show the user the previous string when they hit the previous button.
    Thank you!!!

    how would I write the code for the method showPreviousValue() without getting an indexoutofbounds exception?I'm guessing that you tried something and got an IndexOutOfBounds exception. You might do better to post what you tried.
    Basically you need to figure out why the exception occurs - for instance by printing the value of the expression that you were using as the index value. And then figure out some way of avoiding that problem. (Probably a little bit of arithmetic.)

  • I request the code for the exchange of Mac OS X Mountain Lion, on 25 July and still I do not get the validation email, what should I do? :/

    request the code for the exchange of Mac OS X Mountain Lion, on 25 July and still I do not get the validation email, what should I do?
    ANYBODY HELP ME!!

    same problem here.....
    anyone can help?

  • HT2736 I haven't recieved the code for gift my dad bought me? We have tried to resend the gift 3 times, but nothing happens! Do any of you know what to do?

    I haven't recieved the code for gift my dad bought me? We have tried to resend the gift 3 times, but nothing happens! Do any of you know what to do?

    Turns out my son had a mail filter on and had redirected the email to another folder, hence decline all knowledge of it! I got the invoice as one transaction the following morning. All OK.
    Suggest you check to ensure the email address is valid and being sent to the right folder. Also check your invoice the following day as it will confirm the address you sent the gift to.

  • Can not view the code for views, triggers or table definition

    Hello Gurus,
    I can not see the code for any of the triggers, views, tables etc. in sql developer. For instance a view code will be
    "create or replace" and then nothing, I could see the code in the past.
    When clicking on SQL tab for table I get following errors
    1. Ora-00904 Invalid Column name
    2. Ora-31600: invalid input value emit_schema for parameter name in function SET_TRANSFORM_PARAMORA-06512: at SYs.DBMS_SYS_ERROR............................
    please advice.
    Thanks

    Sqldev was only certified starting from 9.0.2, so it's possible that's the culprit. The latest update in the certification document even omits 9i entirely.
    Did it start happening after upgrading sqldev? What version are you on?
    K.

Maybe you are looking for

  • Pixelated images after burning

    A friend of mine is using iDVD to create a slideshow of some photos. The photos look great, and after burning, when playing on either tv's or even other computers, no matter the screen size, all the images, as well as the text that pops up, is all pi

  • Can You Listen FOR while AS does something else too?

    Play and control the playing of a QT movie while also listening with Speech recognitionServer to some word from the user. i heard AS cant multithread.......

  • Error trying to use VHV or diff

    Hi, I've installed SCM 9.0.4 on a 9i database. I'm trying to use it but I get the following error while trying to use RON's diff tool or VHV: Message CDR-03120: Internal Error - Problem making a repository connection Cause An internal Diff or Merge c

  • CR 2008 on Windows 7, with DataDirect drivers

    When I creata a new report (or open a current report) and try to create a new ODBC connection (or a current one in the old report) I get error: I select Data source, click Next, add the password (to the OracleXE database) and click Finish. The error

  • Manual for M55-S1001

    I can't find a manual for my M55-S1001.  Any suggestions, please!