A Flash Developer Resource Site

Page 2 of 2 FirstFirst 12
Results 21 to 31 of 31

Thread: sending&recieving :: great code.. need help!

  1. #21
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    i think this has fixed it up,
    it is all a matter of addressing the correct paths

  2. #22
    Member
    Join Date
    Jul 2001
    Posts
    91
    i think it was a large file because it was saving your images and sounds in the fla library, you have to delete them there.

  3. #23
    Senior Member
    Join Date
    Dec 2002
    Posts
    156
    i have just ran the new swfs, there doesnt appear to be any different result? when the second movie loads, the new state of the lights etc has not taken effect?

    spacether, no i did definitely remove all instances and from the library too :-s

  4. #24
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    works ok here

  5. #25
    Senior Member
    Join Date
    Dec 2002
    Posts
    156
    this one works
    you must have uploaded a previous one or before save.

    thanks. do i apply the same principle for swapping the body colour of the car? if you noticed, i have the case statement:

    _root.brush_mc.onRelease = function() {
    stopDrag();
    if (_root.brush_mc.hitTest(_root.car_mc)){

    switch(body) {

    case "blue":
    _root.car_mc.body_mc.attachMovie("bodyYellow", "newBody", 1);
    body = "yellow";
    break;
    case "yellow":
    _root.car_mc.body_mc.attachMovie("bodyRed", "newBody", 1);
    body = "red";
    break;
    case "red":
    _root.car_mc.body_mc.attachMovie("bodyGreen", "newBody", 1);
    body = "green";
    break;
    case "green":
    _root.car_mc.body_mc.attachMovie("bodyBlue", "newBody", 1);
    body = "blue";
    }

    only i am unsure how to word this if level0 statement into this switch. i guess it would be if level0 body = "" then attach "". but i would imagine this should still be a switch..

  6. #26
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    use ternary operators in wash.swf to detect the settings from main.swf -
    code:

    this.onEnterFrame = function(){

    _level0.lights == "on" ?
    this.car_mc.lights_mc.attachMovie("onLight", "newLights", 1) :
    this.car_mc.lights_mc.attachMovie("noLight", "newLights", 1);

    _level0.radio == "on" ?
    this.car_mc.radio_mc.attachMovie("radioOn", "newRadio", 3) :
    this.car_mc.radio_mc.attachMovie("radioOff", "newRadio", 3);

    _level0.body == "yellow" ?
    this.car_mc.body_mc.attachMovie("bodyYellow", "newBody", 1) : null;

    _level0.body == "red" ?
    this.car_mc.body_mc.attachMovie("bodyRed", "newBody", 1) : null;

    _level0.body == "green" ?
    this.car_mc.body_mc.attachMovie("bodyGreen", "newBody", 1) : null;

    _level0.body == "blue" ?
    this.car_mc.body_mc.attachMovie("bodyBlue", "newBody", 1) : null;

    };


  7. #27
    Senior Member
    Join Date
    Dec 2002
    Posts
    156
    i copied all the new code from the version you posted, and the new body colour code into my actual version but found that many things do not work. so.. i decided to continue development on the minimal version that you posted, and add my other symbols etc. however there are 1 or 2 bugs which i cant get rid of.
    - brushes require 2 clicks to operate 1st
    - click tyres, once off screen click wash, the code says the car should be visible but its not. then on 2nd click it appears at the end. when i add my garage.swf which i didnt post, it then re-loads my garage clip on level1 and the car travels on level0 invisible.
    - when adding the same code to keep the state of the lights, body, radio to the garage.fla it didnt work, i dont see why when its the same principle

    with exception to that its perfect!

    i shall attach my garage.fla if this is any help too, so you can see what i see.
    Attached Files Attached Files

  8. #28
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    - brushes require 2 clicks to operate 1st
    change code to -

    brushes_mc.onPress = function () {
    !brushed ? brushes_mc.gotoAndStop(2) : brushes_mc.gotoAndStop(1);
    brushed = !brushed
    }

    i'll look at the other issues this evening and get back to you

  9. #29
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    is this heading in the right direction ? -

    http://www.jackleaman.co.uk/test/main.swf

    note : garage.fla needed lights,radio and color movieclips placing in the Library to function correctly
    i have used the "done" icon (jack_mc ) to close the garage

    if these actions are ok, d/l the fla from -

    http://www.jackleaman.co.uk/test/main.fla
    http://www.jackleaman.co.uk/test/wash.fla
    http://www.jackleaman.co.uk/test/garage.fla

  10. #30
    Senior Member
    Join Date
    Dec 2002
    Posts
    156
    that sorts part of the problem yeah but do you notice if you click wash when the garage is open, it stalls and re-opens the garage? this is what i meant.
    do u notice i have code in the garage thats meant to say on click open the doors, for some reason they just shoot up on their own, as if ignoring the if

    do you have an email addy? as there is only the 2 of us in this conversation lol

  11. #31
    Senior Member
    Join Date
    Dec 2002
    Posts
    156
    ^^ ...... sorted the re-loading.. its because the if says if its behind x = 10 then to load it, and the car stops at - 100, so when u click, its behind 10 and so reloads it, i changed them to if 99 and stop at 100 and this solves it

    still that damn door, on garage load (but only within main) its meant 2 be shut, then when clicked it opens (but not totally, just visible at the top so when its clicked again it shuts) but it just shoots up out of sight. ive altered the Y co-ords to no end with no luck!
    can u pm me your email, i find these forums a bit fiddly

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