Results 1 to 4 of 4

Thread: CSE using as1.0-2.0 Button to control MC won't work

  1. #1
    Join Date
    Oct 2008
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy CSE using as1.0-2.0 Button to control MC won't work

    Well I can't figure out whats up, I have the button on the timeline actionscript for it on the timeline, But it wont play my MC. My movieclip is all keyframes, could this be my issue?

    []TAGS

    stop();
    var iconDepth:Number = 0;
    var down:Boolean = false;
    _root.onMouseDown =function(){
    if (_root.canvas_mc.hitTest(_root._xmouse,_root._ymouse)){
    var x:Number = _root._xmouse;
    var y:Number = _root._ymouse;
    _root.holder_mc.moveTo(x,y);
    down = true;
    }
    };
    _root.onMouseUp = function(){
    down = false;
    };
    var currentColor:String = "F7E7D9";
    _root.createEmptyMovieClip("holder_mc", 100);
    function draw() {
    _root.holder_mc.lineStyle(0, parseInt(currentColor, 16), 100);
    var x:Number = _root._xmouse;
    var y:Number = _root._ymouse;
    _root.holder_mc.lineTo(x, y);
    }
    _root.onMouseMove = function() {
    updateAfterEvent();
    if (down && _root.canvas_mc.hitTest(_root._xmouse, _root._ymouse)) {
    draw();
    }
    };
    window1_mc.gotoAndStop("color");
    window2_mc.gotoAndStop("admin");
    var topClip:MovieClip = window1_mc;
    function swap(clip:MovieClip){
    clip.swapDepths(topClip);
    topClip = clip;
    };
    function changeColor(color_index:Number){
    _root.currentColor = colors[colors_index];
    }


    function buildIconList(){
    var spacing:Number = 120;
    var iconY:Number = 365;
    var iconX:Number = 70;
    for (var i = 0; i < _root.icon_mc._totalframes; ++i) {
    var newName:String = "icon_mc" + i;
    var clip:MovieClip = _root.icon_mc.duplicateMovieClip(newName, 10000 + i);
    clip.gotoAndStop(i + 1);
    clip._x = iconX + i * spacing;
    clip._y = iconY;
    clip.homeX = clip._x;
    clip.homeY = clip._y;
    clip.icon_btn.onPress = function(){
    startDrag(this._parent);
    };
    clip.icon_btn.onRelease = function(){
    stopDrag();
    _root.iconReleased(this._parent);
    };
    }
    }
    buildIconList();
    function iconReleased(icon:MovieClip){
    if(_root.canvas_mc.hitTest(_root._xmouse, _root._ymouse)){
    ++iconDepth;
    var newName:String = "object" + iconDepth + "_mc";
    var clip:MovieClip = icon.duplicateMovieClip(newName,iconDepth);
    clip.gotoAndStop(icon._currentFrame);
    clip.icon_btn.enabled = false;
    clip._xscale = 150;
    clip._yscale = 150;
    }
    icon._x = icon.homeX;
    icon._y = icon.homeY;
    }



    function clearContent() {
    _root.holder_mc.clear();
    for (var i = 0; i <= iconDepth; ++i) {
    var name:String = "object" + i + "_mc";
    _root[name].removeMovieClip();
    }
    iconDepth = 0;
    }
    foward_btn.onRelease = function(){
    icon_mc.gotoAndStop("head");

    }

    []TAGS

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Well, which button? I assume the forward_btn??
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  3. #3
    Join Date
    Oct 2008
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you for the reply. I did figure it out. Any chance you might be familiar with JPEG Encoder scripts?

  4. #4
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Any chance you might be familiar with JPEG Encoder scripts?
    Post your problem. I've used them in the past and there are others who post here regularly that have as well. Doesn't hurt to ask. If someone knows about your particular issue, I'm sure they'll try to help.

    Also, please use the [code] tags when you post code. It makes it much easier to read (which in turn makes it easier for us to help you).

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •