;

PDA

Click to See Complete Forum and Search --> : how to make movie start at a given frame from HTML


rstephens
12-11-2005, 03:03 PM
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?

thanks

Bob Hartzell
12-11-2005, 03:13 PM
This may be what you want --

http://www.koolmoves.com/tutorials/remus/Browser_to_SWF.zip

rstephens
12-11-2005, 07:28 PM
still having problems:
I added the the following to my Movie....

if(jump == 1){
jump = 0;
page++;
gotoAndPlay(page);
}
stop();


Then I added these lines of code to the HTML....
<PARAM NAME=FlashVars VALUE="&jump=1&page=20&" />

however the whole movie still plays verse starting at page 20

not sure what i'm doing wrong?

Chris_Seahorn
12-11-2005, 10:24 PM
You're telling it to start at 20.

<PARAM NAME=FlashVars VALUE="&jump=1&page=20&" />


Bob gave you a bunch of ways to load the variables but I think what you are trying to do:

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?


Doesn't need the count (page++) so it's starting you at frame 21.

I think you want:

HTML (test_JumpToPage3.html)

Line 12 should be:

<PARAM NAME=FlashVars VALUE="&jump=1&page=page10&" />

//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".

http://sandbox.blogdns.com/test/test_JumpToPage3.html

blanius
12-11-2005, 10:25 PM
http://www.permadi.com/tutorial/flashjscommand/

docree
12-11-2005, 10:27 PM
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.]

rstephens
12-12-2005, 03:01 AM
well, i still can't seem to get it to work right.
i've attached the Fun and Swf files if someone can help.

as far as i can tell i did as all have suggested.

thanks

gusmus
12-12-2005, 04:22 AM
I can't figure out why you just don't make a copy of your banner and dump frames 1 to 9 then insert that into your other pages.

Chris_Seahorn
12-12-2005, 04:30 AM
You are telling it to goto page 12 in the html but only have one named frame called "randall" in that fun file in the zip.

Change that frames name to "page12" if that's the frame you want to start at .

Here is you're fun file with it renamed (5.1.7).

http://sandbox.blogdns.com/fk/bannor.fun

jamnden
12-12-2005, 07:20 AM
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.

necromanthus
12-12-2005, 09:28 AM
well, i still can't seem to get it to work right.
i've attached the Fun and Swf files if someone can help.

as far as i can tell i did as all have suggested.

thanks

You have many tweens there.
In this case "page 12" doesn't mean "keyframe 12".
Each tween is counted as a new frame.
;)

rstephens
12-12-2005, 12:35 PM
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.

to all....thanks for your help

Chris_Seahorn
12-12-2005, 01:48 PM
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.

necromanthus
12-12-2005, 06:13 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")
;)

rstephens
12-12-2005, 09:27 PM
Necromanthus, ok i hear you now. is it simple math then to just to multiply 59 X (the frame) i want to start at?

blanius
12-12-2005, 09:33 PM
well you can but you really should just name your keyframes that you want to jump to and then use the name in the gotoAndPlay gotoAndStop commands.

I'm adding a tutorial explaining keyframes/frames in KM see other thread

necromanthus
12-13-2005, 03:47 AM
Necromanthus, ok i hear you now. is it simple math then to just to multiply 59 X (the frame) i want to start at?
Is not so simple as it looks.
Also you did 2 mistakes there:
1) The ActionScript for the first keyframe is the following:
if(jump == 1){
jump = 0;
pag = eval("page");
pag++;
pag--;
gotoAndPlay(pag);
}
stop();
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)

That's all.

blanius
12-13-2005, 08:27 AM
- 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.

necromanthus
12-13-2005, 08:45 AM
It's just not practicle to not use lables.

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.

Bob Hartzell
12-15-2005, 07:38 AM
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.

Chris_Seahorn
12-15-2005, 01:59 PM
Using labelled frames shields you against the problem of using absolute frame numbers if you move frames around, insert frames, etc.

Hadn't even thought of that. Makes perfect sense.