dcsimg
A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Help it keeps on disappearing

  1. #1
    Senior Member
    Join Date
    Mar 2008
    Location
    England
    Posts
    159

    Help it keeps on disappearing

    Hi. I am creating a game and i want the stick figure to have a gun in his had when i press button. So far i have put a button on frame 1 and then stick figure is on frame 2. On the stick figure timeline i have created a gun on frame 5. I have made the button goto frame 5 on the stickfigure timeline but it doesnt show. This is probaly because they are on two different frames but does anyone know how i could get i to work. I know that it isnt a button faultty or anything because i tried putting the stick figure on the same frame and it worked but it doesnt wok on 2 different frame. Here is the code in the button :

    on (release){
    _root.char2.gotoAndStop(5);
    }

    Does anyone know what i should do??? I might have use alpha . does anyone know the codes for that???
    Thanks

  2. #2
    Student
    Join Date
    Apr 2001
    Location
    -
    Posts
    4,756
    trace out some properties- e.g
    PHP Code:
    on (release){
        
    trace("vis: "+_root.char2._visible);
        
    trace("alpha: "+_root.char2._alpha);
        
    trace("frame: "+_root.char2._currentframe);
        
    trace("x/y: "+_root.char2._x+"/"+_root.char2._y);

    and check if everything is visible on stage

  3. #3
    Senior Member
    Join Date
    Mar 2008
    Location
    England
    Posts
    159

    Thanks

    Hi
    Thanks but does anyone know the AS 2.0 code.
    Because i dont understand PHP
    What i want isa shop on frame 1 where if you press a button the stickman on frame 2 will have a gun. I know how to use alpha but not on2 seperate page. Can anyone help me???
    Thanks

  4. #4
    Student
    Join Date
    Apr 2001
    Location
    -
    Posts
    4,756
    it is actionscript- its just that this dump bulletin board doesn´t have a propper AS code representation - but the php tag gets as close as it can here.
    perhaps you feel more comfort with this (wich is the same)
    Code:
    on (release){ 
        trace("vis: "+_root.char2._visible); 
        trace("alpha: "+_root.char2._alpha); 
        trace("frame: "+_root.char2._currentframe); 
        trace("x/y: "+_root.char2._x+"/"+_root.char2._y); 
    }
    as for the rest- can´t follow you very well there- placing game elements on different frames on the main timeline is not a good idea. if you want to hide or display movieClips use the _visible attribute like:
    PHP Code:
    myMovieClip._visible false

  5. #5
    Custom User Title Incrue's Avatar
    Join Date
    Feb 2004
    Posts
    974
    Quote Originally Posted by renderhjs
    it is actionscript- its just that this dump bulletin board doesn´t have a propper AS code representation
    And FK is suposed to be the best Flash portal evar...

  6. #6
    Student
    Join Date
    Apr 2001
    Location
    -
    Posts
    4,756
    Quote Originally Posted by Incrue
    And FK is suposed to be the best Flash portal evar...
    well the people are the gems here - but the system is getting old not to mention the tutorial & movie section or the horible start page.
    dont get me wrong I am rather criticizing the technical disadvantages on this domain- not at all the great community

  7. #7
    Custom User Title Incrue's Avatar
    Join Date
    Feb 2004
    Posts
    974
    Quote Originally Posted by renderhjs
    well the people are the gems here
    Definitely, if you focus on the games board the members are the best, im also talking about the tech side, i mean, fk must have been one of the first Flash portals and ppl are showing their 'php' code for ages, how though must be to change that? I know this is not such a big thing, but put that in the perspective that this is suposed to be THE biggest portal 100% devoted to Flash...
    Last edited by Incrue; 03-22-2008 at 12:41 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