dcsimg
A Flash Developer Resource Site

Results 1 to 15 of 15

Thread: Dynamic GRAFIC

  1. #1
    Member
    Join Date
    May 2001
    Posts
    34
    Please l have been asked in my work to make this presentation and l started with it, and the Grafic should move in two direction using two buttons to the right and to the left the event work like this : if l click on the right button then the Grafic move's from one lable to another with each click and if l want to go back to the previous lables with clicking the left button the movie should work going back to the previous lable ! here is my problem how to make that? and which script do l have to use here and where do l have to put it?
    l have a link for this work, you can click on this and then on the british flag, and then on flash and there are l put alsotwo images (print scrn SysRq) fo the flash movie ,and that will make it easyer to understand !!

    http://httpd.chello.nl/k.mussa/Newoo.swf

  2. #2
    Member
    Join Date
    May 2001
    Posts
    34

    dynamic Grafic


  3. #3
    Member
    Join Date
    Nov 2001
    Posts
    55
    It is simple. Just use a variable, which monitors clicks and an array to store labels:

    myArray = new Array();
    monitor = 0;
    myArray[0]= yourfirslabel;
    myArray[1]= yoursecondlabel;
    etc.

    forward button:
    on (release) {
    monitor = monitor+1;
    gotoAndPlay(myArray[monitor]);
    }

    back button:
    on (release) {
    monitor = monitor-1;
    gotoAndPlay(myArray[monitor]);
    }

    Of course - this is also one possible solution. There are others, more complex and more flexble.

  4. #4
    Member
    Join Date
    May 2001
    Posts
    34

    Dynamic Grafic

    thank you for your Help .. l know that the other two scripts l have to add them to the Buttons but what about the first one ? and once more if you don't mind can you send me the other scripts ?


    myArray = new Array();
    monitor = 0;
    myArray[0]= yourfirslabel;
    myArray[1]= yoursecondlabel

  5. #5
    Member
    Join Date
    May 2001
    Posts
    34

    Re: Dynamic Grafic

    [QUOTE]Originally posted by alhakeem
    [B]thank you for your Help .. and do l have to put the buttons in the same MC or to put them in a part on the scene and l know that the other two scripts l have to add them to the Buttons but what about the first one ? and once more if you don't mind can you send me the other scripts ?

    !!!!!!!!!!!!!!!!


    myArray = new Array();
    monitor = 0;
    myArray[0]= yourfirslabel;
    myArray[1]= yoursecondlabel



    !!!!!!!!!!!!!!!!!!!!!!!


  6. #6
    Member
    Join Date
    Nov 2001
    Posts
    55
    the first script belongs to the first frame of main movie. There are no other scripts in this case. Just adjust those i've send you according to your needs.
    [Edited by borut on 06-22-2002 at 08:46 AM]

  7. #7
    Member
    Join Date
    May 2001
    Posts
    34

    Exclamation Check my work ! please

    l am sorry but l send you the flash file l hope that you can take a look on and see what's wrong l did !!!! lt's just didn't work !

    http://httpd.chello.nl/k.mussa/flash/Graficoo.fla

  8. #8
    Member
    Join Date
    Nov 2001
    Posts
    55
    myArray = new Array();
    monitor = 0;
    myArray[0]= "_root.yy.start";
    myArray[1]= "_root.yy.omar";
    myArray[2]= "_root.yy.munir";
    myArray[3]= "_root.yy.bashir";

    1) label names must be in double quotas
    2) you must tell the flash exactly where to go: _root.yy is a path to the instance of movie first grafic

    on (release) {
    _root.monitor = _root.monitor-1;
    gotoAndPlay(_root.myArray[_root.monitor]);
    }

    3) again - _root indicates that variables monitor and myArray are in the main timeline

    4) add one frame before label omar and name it start - this will be a starting point of you movie

    5) Why so many frames in main timeline - one is sufficient.

    6) Just a remark - you must try harder if you want to do something in Flash. I cannot tell you everyhing.

  9. #9
    Member
    Join Date
    May 2001
    Posts
    34

    Smile Thank you for your PATIENCE !

    yes, really thank you , It works , but this is the good thing >>>>>> the bad thing >>>> it works some how but not like l want !! well the good thing is when l click on the right button the Grafic works nice but when l click on the left button the Grafic just springs to the beginning of the Movement !! and l think that you agree with me also that this is not logical to make it like that.. so please l think we are too close to find a way to put this simple Grafic in order..l hope so !! now if you don't mind and if you take a look to the flash file (for the last time) to see how far l went to do.. :-) the Grafic should works to the other direction if l click the left button (the same movement when we click the right button but in reverse).. did you get it? :-)

    http://httpd.chello.nl/k.mussa/flash/Graficoo.fla

  10. #10
    Member
    Join Date
    Nov 2001
    Posts
    55
    Hi, Alhakeem,
    I know, where the problem is, but I will not tell, you. I found it in 5 minutes, so now I want you to use your brain!
    Try harder a let me know!

  11. #11
    Member
    Join Date
    May 2001
    Posts
    34

    !!!

    Is it something that l didn't get it from you ? ! or a new script that l have to figure out,,,,, ? ! l know that l have to copy the motion for each lable and make reverse to the frames but the problem is where to paste the new frames !!
    [Edited by alhakeem on 06-23-2002 at 03:43 PM]

  12. #12
    Member
    Join Date
    Nov 2001
    Posts
    55
    So you did it? Great! Good luck in your future work!

  13. #13
    Member
    Join Date
    May 2001
    Posts
    34
    Hy Borut don't go and leave me alone here !

    Im still hanged here l need your help don't go a way! Please! l have to finish this work other wise l will be fired from my work.. well ... not .. exactly... but somehow.. something bad ......will happen to me ! :-))
    Now l am very serious lets finish it PLEASE.. we are nearly finished this work just look to the flash file l made the reverse frames in a new MC and l put them behind of the main frames now the right button is working quite good but the back button works good only he is making the steps following the labels but in reverse and thats not the right thing he is missing the frames that l add between the main frames (reverse MC):

    http://httpd.chello.nl/k.mussa/flashooo.fla

  14. #14
    Member
    Join Date
    Nov 2001
    Posts
    55
    Hi,
    I thought you already solved it. Sorry, I misunderstood. Well - in your last attempt you made it too complex. Give me your e-mail and I'll send you working *.fla.

  15. #15
    Member
    Join Date
    May 2001
    Posts
    34

    Smile you are very kind :-))

    thank you very much and this is my E-mail :

    <a href = mailto:alhakeem2001@hotmail.com>alhakeem2001@hotma il.com</a>

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