Click here to Skip to main content
15,885,757 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
See more:
Hi,

I've completed this tutorial - http://www.republicofcode.com/tutorials/flash/portfolio_bc/[^] but when I view the project on HTML the images don't stop and wait for you to hover over the thumbs, they play repeatedly for about 0.2 of a second each on loop! What am I doing wrong?

In the code the first step is;
C#
btn1_btn.onRollOver= function(){
myScreen_mc.gotoAndStop(1);
};

What is the significance of (1) - what does this relate to?

Thanks,
Alex
Posted
Updated 14-Jan-13 3:36am
v2
Comments
Sergey Alexandrovich Kryukov 14-Jan-13 14:11pm    
Documentation on this API says it's a frame; must be a frame number.
—SA

1 solution

Simple answer: Stop wasting your time with Flash. The world is abandoning it and any developer with any foresight will jump that ship right now - let alone teach yourself it! Adobe are gradually discontinuing Flash an shifting to HTML5/CSS3 - already Flash doesn't work on newer Android phones e.g. Galaxy S3 (basically, Jelly Bean).

I would suggest you start learning HTML5/CSS3 - the new(ish) standard though it's been around for a while now and is supported in all major browsers & IE9 (some bis are in IE8). Start here: http://www.w3schools.com/html/html5_intro.asp

When you come to wanting to do slide shows, you have 2 options. Either go all out HTML5/CSS3 (and lose some browser support) by using CSS3 animations or go the JavaScript route in which case you're best to look at jQuery - by far the best/easiest. You can set up a slideshow less than 3 lines of code once you've learnt a little!

I realise this might be a bit of a learning curve with more to it before you reach doing slide shows, but it is certainly worth it! Especially if you are only just beginning with Flash (as it appears you are). No point teaching yourself an already outdated technology :)

Hope this helps,
Ed

Useful links:
HTML5: http://www.w3schools.com/html/html5_intro.asp[^]
CSS3: http://www.w3schools.com/css3/default.asp[^]
jQuery tutorial: http://www.w3schools.com/jquery/default.asp[^]
jQuery Website: http://jquery.com[^]
 
Share this answer
 
v2
Comments
MT_ 15-Jan-13 4:45am    
+5. :-)
Ed Nutting 15-Jan-13 14:09pm    
Thanks :)
Alex Sinclair 15-Jan-13 4:52am    
Thank you so much for your response. At the oment I'm desperately working to finish a portfolio link so I can apply for a job. At this point in time I don't have the time to teach myself HTML5 but I will certainly be sure to rebuild in HTML5 in the future. In the meantime is there any advice you can give me on how to quick fix the error above?

Thanks,
Alex
Ed Nutting 15-Jan-13 14:14pm    
May seem a bit dumb, but you do have the initial stop(); call at the start of your ActionScript, right? If not, your flash show would play each frame at standard frame rate (which I think is 0.2 frames per second ish) - it would explain why it isn't working properly. Please see this quote from the article you linked to:
"We will now stop the movie from playing these frames without us telling it to do so, click on the very first frame in the layer named Actions and then press F9 to open up the ActionScript panel (or go to Window>Actions). Simply type Stop(); to stop the movie from playing those frames automatically." and refer back to the article screenshot provided too.

Hope this helps - it's the only thing I can think of that could be wrong!
Ed
Alex Sinclair 16-Jan-13 5:02am    
Thanks Ed, I'll try this tonight. Do I only have to do this once at the beginning as instructed? Or before each goandstop command? Apologies, I'm a complete beginner!

Thanks,
Alex

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900