A Flash Developer Resource Site

Page 4 of 5 FirstFirst 12345 LastLast
Results 61 to 80 of 96

Thread: [Resolved] [Resolved] [Resolved] [Resolved] [Resolved] [Resolved] [Resolved] [Resolved] [Resolved] [

  1. #61
    Retired Mod aversion's Avatar
    Join Date
    Jun 2000
    Location
    insomnia
    Posts
    7,917
    [QUOTE]Originally posted by Da enforcer
    Originally posted by aversion
    Code:
    // stop clip running
    onClipEvent(load){
    	gotoAndStop(1);
    }
    
    // move clip with mouse movement
    onClipEvent(enterFrame){
    	goto = Math.round(_root._xmouse/10);
    	gotoAndStop(goto);
    }

    Help! Hiya. Is this code for flash 6? Im a newbie and cannot get the code to work. I dont know either where the code needs to be. Does it need to be within the movieclip or outside attached to the clip. Sorry if these are stupid questions but as i said im a newbie and am having alittle trouble with it. Thanks alot
    clip events are 'attached' to the clip's instance on the stage. You can set them dynamically but here I am just attaching it to a clip I dragged from the library.

    right click on your clip on the stage and select actions, then enter that code in the actions window. Alternatively just click on the clip to focus flash's attention on it and write into the actions window.

    you might have to adjust the code a little for your clip, as I say above I have 20 frames in my clip and the movie is 200 pixels wide. So for each 10 pixels the mouse moves across the movie I advance my clip's timeline by one frame. You will have to work out what values you need for your own movie if the sizes are different.

    It should work in flash 5 just fine.






  2. #62
    Senior Member Da enforcer's Avatar
    Join Date
    Aug 2002
    Location
    England
    Posts
    238
    Im not using flash 5....im using MX

    When i paste the code it tells me i have a syntax error

  3. #63
    Retired Mod aversion's Avatar
    Join Date
    Jun 2000
    Location
    insomnia
    Posts
    7,917
    I don't think you're putting it in the right place, check out this mx FLA, I just copy and pasted the code and it works fine






  4. #64
    Senior Member Da enforcer's Avatar
    Join Date
    Aug 2002
    Location
    England
    Posts
    238
    thanks mate ill take alook now

  5. #65
    Senior Member
    Join Date
    Oct 2001
    Posts
    1,053
    wow, that site was VERY nice... i spent about 10 minutes just playing with the header.


    there was a flaskit movie on how to do those things, i cant find it now though...

    i used it on one of my sites, but not nearly as good as that one.

    the site reminds me alot of http://www.mjau-mjau.com

  6. #66
    Senior Member nepzap2's Avatar
    Join Date
    Dec 2000
    Posts
    1,112
    That's some phat sh...., I've never seen such talent!!!

  7. #67
    Enter the Flash Dragon Prototype3X's Avatar
    Join Date
    Jul 2002
    Location
    In my Mind
    Posts
    1,107
    What can you say! Its what we all try to do...

    Be the one!

  8. #68
    ... perozo's Avatar
    Join Date
    Feb 2001
    Location
    ...
    Posts
    105
    Originally posted by aversion
    there's another SWF i saw ages ago, last year I think that uses the same technique we've been talking about and to great effect also.

    go to http://www.ni9e.com/ and click on the second little square button at the bottom from the right, title browser d. I'm guessing this one was done by mapping a browser sceenshot onto a 3d model as a texture, but I could be wrong, it's a neat trick however it was done.

    this is the code aversion

    onClipEvent (enterFrame) {
    oldx = _xmouse;
    if ((_root.ex < 256) && (_root.ex > 206)) {
    _root.text.browser.gotoAndPlay("explorer");
    }
    if ((_root.ex > 257) && (_root.ex < 307)) {
    _root.text.browser.gotoAndPlay("netscape");
    }
    setProperty("_root.drag", _x , _xmouse + 40);
    _root.ex = int (_xmouse);
    if ((_xmouse < 136) || (_xmouse > 437)) {
    _root.drag.gotoAndStop("zoom");
    } else {
    _root.drag.gotoAndStop("rotate");
    }
    setProperty("_root.text.line01", _y , (_ymouse / -2) + 115);
    setProperty("_root.text.line01large", _y , (_ymouse / -4) + 75);
    setProperty("_root.text.line02", _y , (_ymouse / 2) - 125);
    setProperty("_root.text.line02large", _y , (_ymouse / 4) + 75);
    setProperty("_root.text.line03", _y , (_ymouse / -2) + 100);
    setProperty("_root.text.line03large", _y , (_ymouse / -4) + 75);
    setProperty("_root.text.line04", _y , (_ymouse / 2) - 150);
    setProperty("_root.text.line04large", _y , (_ymouse / 4) + 75);
    setProperty("_root.drag", _y , 180);
    if (_xmouse < 62) {
    _root.main.gotoAndStop(1);
    }
    if ((_xmouse >= 62) && (_xmouse < 77)) {
    _root.main.gotoAndStop(3);
    }
    if ((_xmouse >= 77) && (_xmouse < 92)) {
    _root.main.gotoAndStop(5);
    }
    if ((_xmouse >= 92) && (_xmouse < 107)) {
    _root.main.gotoAndStop(7);
    }
    if ((_xmouse >= 107) && (_xmouse < 122)) {
    _root.main.gotoAndStop(9);
    }
    if ((_xmouse >= 122) && (_xmouse < 137)) {
    _root.main.gotoAndStop(11);
    }
    if ((_xmouse >= 137) && (_xmouse < 152)) {
    _root.main.gotoAndStop(13);
    }
    if ((_xmouse >= 152) && (_xmouse < 167)) {
    _root.main.gotoAndStop(15);
    }
    if ((_xmouse >= 167) && (_xmouse < 182)) {
    _root.main.gotoAndStop(17);
    }
    if ((_xmouse >= 182) && (_xmouse < 197)) {
    _root.main.gotoAndStop(19);
    }
    if ((_xmouse >= 197) && (_xmouse < 212)) {
    _root.main.gotoAndStop(21);
    }
    if ((_xmouse >= 212) && (_xmouse < 227)) {
    _root.main.gotoAndStop(23);
    }
    if ((_xmouse >= 227) && (_xmouse < 242)) {
    _root.main.gotoAndStop(25);
    }
    if ((_xmouse >= 242) && (_xmouse < 257)) {
    _root.main.gotoAndStop(27);
    }
    if ((_xmouse >= 257) && (_xmouse < 272)) {
    _root.main.gotoAndStop(29);
    }
    if ((_xmouse >= 272) && (_xmouse < 287)) {
    _root.main.gotoAndStop(31);
    }
    if ((_xmouse >= 287) && (_xmouse < 302)) {
    _root.main.gotoAndStop(33);
    }
    if ((_xmouse >= 302) && (_xmouse < 317)) {
    _root.main.gotoAndStop(35);
    }
    if ((_xmouse >= 317) && (_xmouse < 332)) {
    _root.main.gotoAndStop(37);
    }
    if ((_xmouse >= 332) && (_xmouse < 347)) {
    _root.main.gotoAndStop(39);
    }
    if ((_xmouse >= 347) && (_xmouse < 362)) {
    _root.main.gotoAndStop(41);
    }
    if ((_xmouse >= 362) && (_xmouse < 377)) {
    _root.main.gotoAndStop(43);
    }
    if ((_xmouse >= 377) && (_xmouse < 392)) {
    _root.main.gotoAndStop(45);
    }
    if ((_xmouse >= 392) && (_xmouse < 407)) {
    _root.main.gotoAndStop(47);
    }
    if ((_xmouse >= 407) && (_xmouse < 422)) {
    _root.main.gotoAndStop(49);
    }
    if ((_xmouse >= 422) && (_xmouse < 437)) {
    _root.main.gotoAndStop(51);
    }
    if ((_xmouse >= 437) && (_xmouse < 452)) {
    _root.main.gotoAndStop(53);
    }
    if ((_xmouse >= 452) && (_xmouse < 467)) {
    _root.main.gotoAndStop(55);
    }
    if ((_xmouse >= 467) && (_xmouse < 482)) {
    _root.main.gotoAndStop(57);
    }
    if ((_xmouse >= 482) && (_xmouse < 497)) {
    _root.main.gotoAndStop(59);
    }
    if (_xmouse >= 497) {
    _root.main.gotoAndStop(61);
    }
    }
    onClipEvent (load) {
    newx = "_xmouse";
    }


    ------------------------------------------------------

    that is the code they used i think yours is easier

  9. #69
    Retired Mod aversion's Avatar
    Join Date
    Jun 2000
    Location
    insomnia
    Posts
    7,917
    wow, that's pretty hefty code, I mean, mine does do the same thing as all those if statements and set properties... as long as you know the width of your movie in pixels and the number of frames in your movie clip then you can just divide the mouse position by a number to get the same effect... maybe they have their reasons I'm certainly no expert.




  10. #70
    Webmaster Johnny Shiro's Avatar
    Join Date
    Jan 2002
    Location
    Norway |Trondheim
    Posts
    713
    Ok..now i feel like a bad web-designer **** dude !! that's some heavy code hehe

  11. #71
    NZ nizamm's Avatar
    Join Date
    Nov 2001
    Location
    Middle of the East.
    Posts
    643
    The site is terrible ! What a color scheme ! Its just too dull. Broadbands only.

    (Besides, someone'z got to be a different..heh heh)

  12. #72
    Retired Mod aversion's Avatar
    Join Date
    Jun 2000
    Location
    insomnia
    Posts
    7,917
    Originally posted by Johnny Shiro
    Ok..now i feel like a bad web-designer **** dude !! that's some heavy code hehe
    yeah, I really don't understand why they did it the long way like that, all those if statements... crazy



  13. #73
    Junior Member
    Join Date
    Jan 2002
    Posts
    16
    that's a sweet site!... i'm gonna use some ideas to improve my site!

  14. #74
    Great, Daddy-O! Hippyscum's Avatar
    Join Date
    Feb 2002
    Location
    Pays-Bas
    Posts
    382
    crap on a stick!
    damn thats a good site!

    I really really like the music, it brings great amosphere combined with the hot chick

  15. #75
    Senior Member
    Join Date
    May 2002
    Posts
    153

    perfect site

    the colour sceheme, effects and mood of the design are perfect for the subject. lacks nothing, needs nothing.

    aversion = thanks for that code!!!


    i tried to recreate the effect using onMouseMove - but the prob was that the clip only played forward regardless of which way i moved my mouse - i see where the math comes in
    jose gonzalez

  16. #76
    ... problems4me's Avatar
    Join Date
    Jul 2000
    Location
    UK
    Posts
    658

    dam...

    404 Just my luck
    Each success only buys an entrance ticket to a more difficult problem

  17. #77
    Registered User
    Join Date
    May 2000
    Posts
    617
    uh, 404 for me too. and i really wanna see this, its sounds so good.(im guessing its like the southpark example posted earlier in the thread??)

    oh, and btw aversion your very right. that code was ridiculously large. not only is it overkill, but wasting TONS of cpu power on running throuhg ALL those if statements.

  18. #78
    Member
    Join Date
    Aug 2000
    Posts
    63
    I am forced to make up a new adjective to describe this site......

    Scrumtrillescent

  19. #79

    raising hell to the next level

    Join Date
    Sep 2001
    Posts
    114
    what in the hell...??? i just get a mere 400 error

  20. #80
    FK's Homer J. kony2003's Avatar
    Join Date
    May 2002
    Location
    Welcome 2 NYC
    Posts
    652
    hmm..i dunno i guess the site is down too bad
    "Be quiet, Brain, or I'll stab you with a Q-tip" -Homer
    "Whos your daddy and what does he do?" -Arnold S.

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