Ask a Question related to Macromedia Director Basics, Design and Development.
-
DrColt45 webforumsuser@macromedia.com #1
Working with a Flash Movie into Director
Hi all !
I'm a newbie ( FRENCH newbie lol ).
I imported a flash movie into Director. Everything is fine. But here is my problem:
At the end of my flash movie, there is 3 buttons (graphic areas). I would like to create hotspots on them ( on mouseover set the membernum of sprite x to y ) BUT ONLY after the flash movie ends.
If I don't place a "Go to the frame ", the movie plays for about 2sec. ( the flash sprite is 20 frames long ). And if i do place a "go to the frame" then my hotspots never comes up because they are after the frame script "Go to the frame"... !
I really hope you understand ! Anybody can help me out ? I would really appreciate any help.. ( I know that question sounds stoopid, specially for advance users hehe
Thank you !!
Doc
DrColt45 webforumsuser@macromedia.com Guest
-
Help with flash movie in director
Im having trouble importing my flash movie into director 8. I created the movie in flash mx and iv imported the swf file into director, but all... -
controlling Director movie with Flash
I have a Director file that has to react to a Flash file. Specifically, I have a director file that includes a Flash file. When the swf reaches a... -
possible to import director movie into flash?
I have a silly little program that i wish to import into a flash movie and I don't really know if its possible. Flash refuses to touch dcr files at... -
Flash movie in Director
Hi All, I am new to this user group. I am facing a problem in Director MX. I have imported a Flash Movie ( SWF ) in Director. What I require is... -
Director Mx and Flash Movie Control
When I try to control a flash movie into director, for example I put this fonction : on exitframe me sprite(flashspritenum).stop(); end ... -
InsomniacZx webforumsuser@macromedia.com #2
Re: Working with a Flash Movie into Director
I don't think I know exactly what your talking about, however, I do things a bit differently:
If I have buttons in flash that I want to control in director (ie - flash button 1 goes to director frame "section1") I use the getURL function in flash, and use a simple case statment in director to capture the flash string. Sounds complex, but really is simple. Here's what Im talking about:
In Flash:
1. create a button
2. put code on the button:
on(Press) {
getURL("button1")
}
In Director:
1. create the following function in a movie script:
on getURL me, stringfromFlash
case stringfromFlash of
"button1": go to frame "section1" -- this will tell director that if the text that Flash matches this exact word "button1" from the getURL function, to perform the following action.
"button2": go to frame "section2"
"button3": go to frame "section3"
"button4": go to frame "section1" of movie "movie2" -- this can tell director to go to a specific frame of a seperate movie if you want to jump from movie to movie.
end case
end
2. Be sure to put a global variable at the top of your movie script to check for the getURL:
global getURL -- gets string passed from Flash button
on startMovie me
-- insert case statment here if you would like
end startMovie
3. just put a "go to the frame" frame script on the frame you want director to stop at for each section, as well as when the buttons are animated in or whatever
That's it... I hope this helps.
InsomniacZx webforumsuser@macromedia.com Guest
-
Rob Dillon #3
Re: Working with a Flash Movie into Director
Hi Doc,
If I'm reading you correctly, you want to play a Flash file and then
when it finishes, show three buttons.
If that's the case then place you Flash sprite on the stage as you'd
like. It only needs to span 1 or 2 frames. Set the Flash member, to be
direct to stage for the best playback. Set the member to paused.
use a behavior like this on the Flash sprite:
------------
property thisSprite
property thisMember
property totalFrames
on beginSprite me
thisSprite = me.spriteNum
thisMember = sprite(thisSprite).member.name
totalFrames = member(thisMember).frameCount
sprite(thisSprite).play()
end
on exitFrame me
go to the frame
if sprite(thisSprite).frame >= totalFrames then go to the frame + 1
end
---------------
Place your button sprites in a frame after the Flash sprite. When the
Flash file is finished, the playback head will move on to the next
frame.
In Director, the playback head will move from frame to frame until it
reaches the end of the movie. To hold the playback head in any single
frame, use "go to the frame", as you did. You want to use "go to the
frame" in a frame script at the frame that holds the button sprites.
This will let your users select a button.
--
Rob
_______
Rob Dillon
Team Macromedia
[url]http://www.ddg-designs.com[/url]
412-243-9119
[url]http://www.macromedia.com/software/trial/[/url]
Rob Dillon Guest
-
DrColt45 webforumsuser@macromedia.com #4
Re: Working with a Flash Movie into Director
Wow, first of all I would like to thank you for your time and the message which is very detailed ! Thx !
I will try what you suggested today and I let you know as soon as my test will be done.
To make my exemple shorter, here is what I meant ( as an exemple ) :
Lets say you make an animation in Flash or Swish.
Your animation starts with a logo of the Montreal Canadians fading in,
Few frames later, this logo fades out.
After it fades out, there's a text layer appearing for FRENCH or ENGLISH version.
( this is static texts, no script on them)
The animation is done.
I import that animation into Director.
NOW, I just want to place an active zone over FRENCH and another one on ENGLISH.
( on mouseenter, set the membernum of sprite x to y ) so when the user slide his mouse on the active zone, the FRENCH or ENGLISH texte become, let say, red.
But the problem is that I cannot tell the animation to stay at his last position so I can put my active zone ONLY AFTER THE MOVIE IS COMPLETED.
I just need the command line or script to tell the movie to stop and stay at its last frame so I can add sprite or shapes or actions after the last frame of the flash/swish movie.
Its so hard trying to explain in english when you'Re french hahahaha! I hope you understood what my prob. is :)
Thanks again !!!
DrColt45 webforumsuser@macromedia.com Guest
-
Rob Dillon #5
Re: Working with a Flash Movie into Director
Hi Doc,
Look in the library for some behaviors that change the member of a
sprite on rollover. If you want the sprite to only work after the Flash
movie has finished, but still show the buttons on the stage, there are
a number of strategies.
1. Very simple - place the button sprite on the stage with the Flash
sprite, but don't attach a behavior to make the buttons work. When the
Flash movie finishes, move to a new frame that shows the image of the
last frame of the Flash movie and the buttons. Now attach the behavior
to the buttons so that they will work.
You can export the last frame of your Flash movie as another .swf from
Flash. Import this into your Director movie also. Now you have the
Flash movie and the last frame as a separate element.
2. More difficult - Set a global variable to hold a boolean value. This
value will be 0 when the Flash movie has not finished and 1 when it
has. Use the behavior in my previous message and adapt it.
In the behavior attached to the buttons, add the reference to the
global variable and on the mouse event functions, add an if condition
that only allows the button to work if the global variable's value is
1.
--
Rob
_______
Rob Dillon
Team Macromedia
[url]http://www.ddg-designs.com[/url]
412-243-9119
[url]http://www.macromedia.com/software/trial/[/url]
Rob Dillon Guest



Reply With Quote

