how to make movie start at a given frame from HTML
Hi, here is my problem.
I have created a Home webpage that has a movie for the bannor. the movie plays one time through and ends on frame 10. the bannor remains visible as long as your on the home page.
Now, when i go to another page, I don't want the bannor to replay. I want it to just display the images from frame 10. I could grate an jpg and place it there, but i was nto wanting to have to do that.
can i make the same movie start and play on frame 10 from other pages?
can this code be added to the HTML code?
//so you don't use a numbered frame but a named one.
and frame 1 or 2 of the Koolmoves movie should have:
if(jump == 1){
jump = 0;
gotoAndPlay(page);
}
stop();
This example does exactly that but instead of continuing on from frame 10 it just stops. It's Bob's example movie...it just jumps over the frames to the frame named "page10".
If you're loading flash vars try setting them here...
<param name="movie" value="bannor.swf?jump=1&page=20" />
and change the embed
embed src="bannor.swf?jump=1&page=20"
[I'll look into making a tute for others.
And I'll update my earlier vars button tute.]
I'm with you Gusmus. I would just dump all of the other frames and tweens and save the last frame under another name and use that on all of the other pages.
gumus,jamnden... Yes i agree and this would have been the way i would do it. however my navigation menu is also animated and i don't want to keep replaying it on webpage entry. I could just remake the nav, but i was trying to figure another way + learn something new.
Chris, once again your helping me....thanks. On the differences from my posts to the actual Fun file (randall, page20). I frist tried the page example then i changed the name thinking it might help...on and on.....so the example i sent might have been one of my attempts.
necromanthus, although my movie is 15+ frames...i understand that it will be longer with the tweens. in one of my post as you'll thats why i had page 20 verse page 10.
Since the site must not be a full flash site if you are worried that the banner restarts, the old portal trick might be a solution too.
Create a 2 frame frameset with the banner in the upper frame and the pages pulled into the lower frame. When your users enter the banner starts as normal but as they change pages it does not affect the banner at all. If you use no border for the frameset it would be invisible to the end user and seamless.
Don't like framesets? Use 2 iFrames.
Last edited by Chris_Seahorn; 12-12-2005 at 01:51 PM.
necromanthus, although my movie is 15+ frames...i understand that it will be longer with the tweens. in one of my post as you'll thats why i had page 20 verse page 10.
You missed the point.
Each page of your movie has 59 frames (!?!).
In this case <PARAM NAME=FlashVars VALUE="&jump=1&page=20&" /> it means gotoAndPlay("the first page")
This trick is useful to convert a text number into a real number.
Otherwise, in certain conditions FlashPlayer may jump to strange locations.
2) Also pay attention to the HTML code:
... WIDTH="760" HEIGHT="84" id="bannor" ALIGN="middle">
<PARAM NAME=movie VALUE="bannor.swf" />
<PARAM NAME=FlashVars VALUE="&jump=1&page=12&" />
... <EMBED src="bannor.swf" bgcolor="#000000" WIDTH="760" HEIGHT="84" FlashVars="&jump=1&page=12&" ...
As general rules:
- Do NOT use tweens for ActionScript keyframes
- If you're looking for smooth movement on entry-level machines, do NOT use labeled keyframes (because of the indexing method, the movie runs much slower)
- If you're looking for smooth movement on entry-level machines, do NOT use labeled keyframes (because of the indexing method, the movie runs much slower)
That's all.
That's a shame but it's the way I reccomend those with low end machines will have to just suffer in my opinion, It's just not practicle to not use lables. Of course I only use labels when "Jumping" to frames not for keyframing.
Labeled keyframes are useful for lazy folks (LOL) and/or for short "artwork" movies (movies without sophisticated AS routines).
In case of movies with hundreds/thousands of frames containing multi-loops, if the global performance is "a must", DON'T use labeled keyframes !
cheers.
Goto frame actions with labelled frames are translated on export into goto frame frame actions with correct frame numbers. KoolMoves counts all the key frames and tweens associated with the frame label and uses that number for the goto action. It isn't necessary to label every frame. Just the frames that are associated with goto frame actions. Using labelled frames shields you against the problem of using absolute frame numbers if you move frames around, insert frames, etc.