A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Links Inside a Draggable Clip

  1. #1
    Junior Member
    Join Date
    Nov 2006
    Posts
    1

    Links Inside a Draggable Clip

    Ok here's my problem...

    I have a MC on stage that looks like a Newspaper page, where the content of the page (about us, gallery,contact us) appear like headings on the page. The whole page is draggable so that you could drag the page around to go to specific areas. The MC also contains clickable links inside it( contact us section has an email id which when clicked opens Outlook Express). Here's the AS i used to make the MC draggable..

    newspaper_mc.onPress = function() {
    startDrag(this);
    };
    newspaper_mc.onRelease = function() {
    stopDrag();
    };
    newspaper_mc.onReleaseOutside = function() {
    stopDrag();
    };

    When i hover the mouse over the links, they don't work,i.e. the cursor doesnt change to the hand icon..
    Any help will be appreciated...

    P.S. I'm Using Flash 8

  2. #2
    Banned deepakflash's Avatar
    Join Date
    Aug 2007
    Location
    [Object not found]
    Posts
    1,160
    dont use onPress, onRelease stuffs for your newspaperclip.. instead use this code.....
    Code:
    newspaper_mc.onMouseDown = function() {if (this.hitTest(_root._xmouse, _root._ymouse)) {this.startDrag();}};
    newspaper_mc.onMouseUp = function() {this.stopDrag()}
    ... because when you use onPress and onRelease, it treats the entire MC as a button. hence the actionscript for buttons inside your MC can never get triggered.
    Last edited by deepakflash; 05-07-2008 at 02:03 AM.

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center