![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Programming A discussion forum for programs and programming used in tech-related businesses. |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: Jun 2009
Posts: 5
OS: xp
|
small flash actionscript problem!
Hi All I am new and not that great with actionscript FYI in advance!
I have created a project in which people walk forward and when I click on them (they are created as a button) it then moves to a new scene which plays a video and has some blurb about them etc. Basically I have it all working but the final step I want them to walk forward after a user click and then it to move on to scene2 after the walk has ended. At the moment I have: Code:
b1.onRelease = function ()**
_root.gotoAndPlay(7);
_root.gotoAndPlay("scene2, 1");
};
Thanks for any help nwmsltd |
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
|
|
#2 (permalink) |
|
Design Team Member
Join Date: Jul 2007
Location: Coventry, UK
Posts: 1,862
OS: Vista, various linux distros
|
Re: small flash actionscript problem!
Hey, you're gonna have to show us what's on your main timeline then. because the gotoAndPlay function is like a return function (it kills the current thread and moves to the next[example below])... Possibly putting the second bit of code(scene 2, 1) to frame 7 will help...
Example of why this doesn't work right now: Code:
//gotoAndPlay will end the current thread of code
_root.gotoAndPlay(2);
//so this trace will not run
trace("this wont run");
If you really want in depth help on this then i suggest zipping it up (using win/7zip/alt) and posting it up here, because flash is so customiseable it's hard to visualise what's going on. Cheers, Jamey p.s. there are only a few flash developers that frequently post on TSF (me being one, FredT seems quite able as well) so if it takes a while for us to reply don't think we've abandonned you =] Edit: re-read a little, put the gotoAndPlay("Scene 2, 1"); at the end of the walk. That's the only way i can see it happening. Last edited by jamiemac2005; 06-01-2009 at 09:30 AM. |
|
|
|
|
|
#3 (permalink) |
|
Registered User
Join Date: Jun 2009
Posts: 5
OS: xp
|
Re: small flash actionscript problem!
Hi Jamey thanks very much for your reply
I thought it would be easier to attach a zip of the project (cs3) because as you say it can be hard to explain just with text! I have amended it a little so the (7) has now changed but the idea is still the same. Thanks very much for your time on this - It can be hard when I know what I want it to do but can't get it to work! Here is the link as its bigger than what I can attach here. http://www.nwmsltd.com/help/flash.zip Thanks Again! |
|
|
|
|
|
#4 (permalink) |
|
Design Team Member
Join Date: Jul 2007
Location: Coventry, UK
Posts: 1,862
OS: Vista, various linux distros
|
Re: small flash actionscript problem!
Hey, only problem i had is i couldn't find the "scene 2, 1" label, but i guess that's because it's not there yet...
So, to do this you need to place the _root.gotoAndPlay("scene2, 1"); within the movie clip of the person where he ends the walk (frame 27?), just on the main timeline somewhere(the same place you have the stop(); command). You also need to make sure you do not re-keyframe the person, but use standard frames(F5) so that flash doesn't re-initiate the object. If you wanted the second scene to load on top of the current movie (i don't know how to explain this, but the bio as an overlay) then you could do it using a movie clip as an overlay holder for the scene. For example what i have done in the movie(I've re-uploaded and attached =])... I threw in a major example of how to do this, but basically what you should be looking at is the AS and where things are placed (and how they reference each other). (Not my on the spot basic design hhaha, which i'm sure will be binned). Anyway, that's how i'd go about it, i also suggest you do some framechecking on your b1 movie clip, basically because if someone rolls over the dude then suddenly clicks he jumps a bit, i've thrown in an example of that aswell... Uploaded here: http://www.mediafire.com/?sharekey=1...4e75f6e8ebb871 Cheers, Jamey |
|
|
|
|
|
#5 (permalink) |
|
Registered User
Join Date: Jun 2009
Posts: 5
OS: xp
|
Re: small flash actionscript problem!
Jamey this is brilliant its just what I needed help with!
Thanks so much for doing this - It can be frustrating to know what you want but not know the correct code! I have done some AS before but need to expand my knowledge I think! Again thanks very much ![]() I am pretty up on other Abobe packages and computers if you ever need any help just PM me! |
|
|
|
|
|
#6 (permalink) |
|
Design Team Member
Join Date: Jul 2007
Location: Coventry, UK
Posts: 1,862
OS: Vista, various linux distros
|
Re: small flash actionscript problem!
It's fine don't worry =] here to help haha.
And yeah AS is one of those things that it takes a few to get the hang of, mainly just because the program flow is sketchy. Post back if you have any more problems. Cheers, Jamey |
|
|
|
|
|
#7 (permalink) |
|
Registered User
Join Date: Jun 2009
Posts: 5
OS: xp
|
Re: small flash actionscript problem!
Hi Jamey hope you are well
Sorry for another post but I'm afriad I have come to another brick wall as far as my knowledge goes and I have done loads of messing about but still no luck! Basically I have used my flash that you helped me with before but have amended this a little due to some other problems with the way we have filmed our subjects. To cut a story short we needed to get the other people to dissapear when you click on someone. This works fine (even though I have to amend the look of it) but my problem is when I click the back button. I need the movie to go back to everyone standing in a line but the person I am working on (the black lady in the movie) ends up standing forward once the back button is pressed - Its not until I move over her that she corrects herself and goes back. I know this is a stuidly long post and the problem is a small one but I just cant seem to get past it. Any help would be very very appreciated I have uploaded my flash to www.nwmsltd.com/help/flash2.zip Thanks much! Nwmsltd
|
|
|
|
![]() |
| Thread Tools | |
|
|