Control Main Timeline Using a Function (Jumping to a different frame using labels)

This is a discussion on "Control Main Timeline Using a Function (Jumping to a different frame using labels)" within the Flash & Multimedia Forum section. This forum, and the thread "Control Main Timeline Using a Function (Jumping to a different frame using labels) are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Flash & Multimedia Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jun 27th, 2007, 19:16
New Member
Join Date: Jun 2007
Location: Stevenage, Herts
Age: 25
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Control Main Timeline Using a Function (Jumping to a different frame using labels)

Hi Guys,

Please can someone point me in the direction of a tutorial or help me understand how to jump to different frame labels in the main timeline of a SWF file using functions....

I have a SWF file and want some kind of function that makes the SWF play a specific frame label when a true or false is present

I have 8 points on frame labels... "neutral", "conversation" "light_conversation" etc...

The "neutral" frame label ( the first one ) runs to a 'stop)' frame and is the open animation. The animation will just be a looping movie clip on the stage.

e.g. from an external file x=hot / in the swf, if "hot = true" then play frame label 'hot'....

There should be a function that can be called by an external whatever that will tell the SWF movie to " gotoAndPlay " a specific frame label such as "sensitive", "happy_1" etc... At the end of each of these frame labels there is an action that will take the play head back to the first frame ( gotoAndPlay(1); ) which is where it will stay until another function is called that that frame label is played.

The thing is that I think the control of the frame labels must be done
by using a function or something like that as it will be controled
by an external script...

Thanks guys, any help really would be very, very much appreciated. You can kind of see what im trying to do....

Help?!

THANKS !

: )
Reply With Quote

  #2 (permalink)  
Old Jun 27th, 2007, 21:02
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Sgaspar11
Re: Control Main Timeline Using a Function (Jumping to a different frame using labels

This is definately possible...

Here is the idea of what you are wanting to do.

In the flash object on your html page, in your flash object you can create a FlashVar that looks something like this:

Code: Select all
<param name="flashvars" value="mood=happy" />
and in the embed tag add:

Code: Select all
flashvars="mood=happy"
Then in your flash file create a variable called mood:

Code: Select all
var mood:String;
Then on your actions layer in your first frame (where you just created your variable) create a simple IF statement that says:

Code: Select all
 
if (mood=happy)
{
gotoAndPlay("happy"); //framed in flash labeled happy
{
else
{
      if (mood=sad)
        {
         gotoAndPlay("sad");
        {
}
and so on and so on...

This will pull the value from the flashvar variable in the object embed tags. (which right now is static and set to happy)

The next step in this process is to make that flashvar variable dynamic using JS, PHP or ASP whatever you use.

That way when a button is clicked is dynamically changes that variable and updates it in the .swf.

This will hopefully get you on your way...

EDIT: In thinking more about this, it would only update the variable when the page was refreshed/re-loaded using this method.

I guess I don't know the scope of what you are trying to accomplish, but this might with for you.
Last Blog Entry: Yay!? (Oct 8th, 2007)

Last edited by Sgaspar11; Jun 27th, 2007 at 21:05.
Reply With Quote
Reply

Tags
frame, jumping, labels

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
EASY PEASY Displaying frame address in another frame question molotov JavaScript Forum 3 Nov 20th, 2007 17:29
Button and box labels.What is the best way? Mulith Starting Out 17 Nov 5th, 2007 10:26
main timeline volume control? edd_jedi Flash & Multimedia Forum 1 Jun 14th, 2007 20:40
How to target main timeline from within 3 mcs in a slidemenu? nikising Flash & Multimedia Forum 11 May 18th, 2007 12:22
CSS form labels AdRock Web Page Design 7 Dec 13th, 2006 23:53


All times are GMT. The time now is 19:49.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43