Page 5 of 33 FirstFirst ... 3456715 ... LastLast
Results 41 to 50 of 327

Thread: new to flash 2004 mx

  1. #41
    Join Date
    Mar 2008
    Posts
    222
    Thanks
    10
    Thanked 3 Times in 3 Posts

    Default

    Okie thanks. Let mi solve the .txt thing 1st. after i done with tt den i let u noe. Still hav some qns to bother u

    erm, i try using typing the mouseover by reading up on the tutorial. but it did not work.

    Can guide mi?
    Last edited by hyk; 04-09-2008 at 06:26 AM.

  2. #42
    Join Date
    Mar 2008
    Posts
    222
    Thanks
    10
    Thanked 3 Times in 3 Posts

    Default

    hi, juz a qns. even i gt the linking between the URL & the marquee. if i juz click the marquee will it work if i nv do the mouseover functions etc?

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

    Default

    Quote Originally Posted by hyk View Post
    hi, juz a qns. even i gt the linking between the URL & the marquee. if i juz click the marquee will it work if i nv do the mouseover functions etc?
    Hmm, I think I understood that. If you could, try to keep away from the shorthand...I'm not very good at deciphering Internet-speak,

    The "click" event and "mouseover" event are for different purposes entirely. If you're asking if you can use the in conjunction, then yes, you can.

    For example, I'm sure you've seen flash effects where you mouse over a link of some kind and the color changes or a glow appears, etc. That's using the onMouseOver event call. The onRelease event is fired when you click on something and then release.

    If you're linking to something, you want to use the onRelease.

    for example:

    Code:
    logo_mc.onRelease = function() {
        getURL("site", target, method);
    }
    the target and method aren't required.

  4. #44
    Join Date
    Mar 2008
    Posts
    222
    Thanks
    10
    Thanked 3 Times in 3 Posts

    Default

    Sorrie for the short-forms . okie, i try understand this 2 lines. the 1st line is talking about the cursor or mouse, den 2nd is about the url etc.

    so if i wan the marquee to stop moving when the cursor is touching it, after the line on the onRelease then i add codes to set it?

    Another thing is, the get url part mayb i dun require? since i linking from a txt file. ( though i haven`t found someting in the web which can link both my txt & url together yet)

    few days never ask u stuff in forum, suddenly alot to ask again

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

    Default

    Even if you're brining in the URL from a text file, you'll need the getURL. The getURL is what creates the link.

    Take basic HTML for example, your link is like this:

    HTML Code:
    <a href="http://www.website.com">Text</a>
    The URL that you're bringing in is the http://www.website.com part. You still need to tell flash that this is a link and not just a regular string (in HTML you need the <a> tag to tell the rendering engine that it's a link). Just typing www.website.com in an HTML won't produce a link.

    So, what you'll have to do is to bring in the value from the .txt file, store it in a variable (let's call it earl for example purposes). Then, your AS will look like this:
    Code:
    logo_mc.onRelease() {
       getURL(earl);
    }

    As for stopping the marquee, you're making it move with a setInterval so you can clear it with a clearInterval onMouseOver and then reset the setInterval onMouseOut.

  6. The Following User Says Thank You to Medyman For This Useful Post:

    hyk (04-14-2008)

  7. #46
    Join Date
    Mar 2008
    Posts
    222
    Thanks
    10
    Thanked 3 Times in 3 Posts

    Default

    okie, thanks for the tips, i go read up on it nw erm, mind if i post my codes step by step ?? :P

    erm the marquee will stop when the mouse is over it but if the mouse is taken off after that should the marquee will continue from where it was stop, should i still use setInterval?

    Code:
    logos_mc.onRelease = function() {
    
    logos_mc._x = 0;
    myInterval = setInterval(moveLogos, 500); 
    };
    this will reset the marquee when clicked, so if i going to pause the marquee while the cursor is over it, i need to input the function mouse() etc?

    Thanks for answering my doubts
    Last edited by hyk; 04-14-2008 at 10:00 AM.

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

    Default

    okie, thanks for the tips, i go read up on it nw erm, mind if i post my codes step by step ?? :P
    No, not at all. Go right ahead.


    erm the marquee will stop when the mouse is over it but if the mouse is taken off after that should the marquee will continue from where it was stop, should i still use setInterval?
    Well, the function that you're calling with the setInterval (if memory serves) is constantly subtracting 1 pixel every second (or whatever your interval is). So if you use clearInterval, it will stop that function from being called.

    That means, the marquee will stop at that point.

    Then, onMouseOut, set the interval again calling the same function. So, when you mouse off, the marquee starts at the same point again.

    I would think that's the behavior you want instead of resetting it every time you mouse over it.

    Code:
    logos_mc.onRelease = function() {
    
    logos_mc._x = 0;
    myInterval = setInterval(moveLogos, 500);
    };
    this will reset the marquee when clicked, so if i going to pause the marquee while the cursor is over it, i need to input the function mouse() etc?
    Not quite sure what you mean here. Yes, that function will reset the _x position because you have logos_mc._x=0;. If you don't want it to reset, just remove that part.

    For your situation, do something like this.

    Code:
    logo_mc.onMouseOver() {
         clearInterval(myInterval);   // This clears the Interval, and stops the scrolling
    }
    
    logo_mc.onMouseOut() {
            myInterval = setInterval(moveLogos, 500);   // This sets it again and resumes scrolling
    }

  9. #48
    Join Date
    Mar 2008
    Posts
    222
    Thanks
    10
    Thanked 3 Times in 3 Posts

    Default

    hmm something is wrong somewhere i suppose,because when i put the code in, nothing happens , juz saw the hand* cursor when pointed at the marquee. mayb i need to declare the interval time etc at the start of the sctipt? because when i put the code in, nothing happens.


    Code:
    logos_mc.onRelease = function() 
    {
    
    myInterval = setInterval( moveLogos,500)
    };
    
    logo_mc.onMouseOver() 
    {
         clearInterval(myInterval);   // This clears the Interval, and stops the scrolling
    }
    
    logo_mc.onMouseOut() 
    {
            myInterval = setInterval(moveLogos, 500);   // This sets it again and resumes scrolling
    }

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

    Default

    Hmm...

    Can you zip up your project files and upload them to mediafire or something so that I can have a look?

    Post the link here when you're done.

  11. #50
    Join Date
    Mar 2008
    Posts
    222
    Thanks
    10
    Thanked 3 Times in 3 Posts

    Default

    thanks medy for taking up so much of your time, i add in some stuff if you dun mind can help mi take a look too? Thanks again

    http://www.mediafire.com/?ammfikzto12

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
  •