Sync movie clips loaded by swfloader
hi guys,
i have 5 separate movie clips (swf) represent 5 flower petals,
each of them is showing up from center,
i load them in flex app by 5 separate mx:SWFLoader tags.
the problem is they should sync with each other to open up the flower,
but due to being loaded from network, they don't start at the same time.
please help me, how to sync these flower petals?
according to http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/controls/SWFLoader.h tml
it doesn't seem like SWFLoader has a method called "rewind()" or "gotoAndPlay(...)"?
Similar Messages
-
When loading pics to iphoto 11 from my camera, occassionaly it will include some video clips with the description of Movxxxx. I wonder if someone could direct me to some straight forward instructions as to how to transfer these video (movie) clips, which now exist in iphoto, to a dvd that will play on a dvd player as one might expect to see a video play, including the audio that was captured at the time of filming.
Thanks in advance for any assistance you can offer this novice.You need to open iMovie and it will have a event library called iPhoto Videos, click on that and the videos will load in the window next to it, then you make a new project in iMovie. Then open iDVD and make a new project then import the movies to the program then burn to a DVD..
-
Question about scrolling and Movie Clips Loaded from the Library
I hope I am posting this in the right forum.
Ok, I'm using actionscript 2.0, and I am trying to make a scrolling image gallery. I have a movie clip with three layers. the first contains a movie clip used as a scroll bar. The second is a mask used to hide the overflow content, and the third contains movie clip thumbnails. when I click one of the thumbnails, it loads a symbol containing a larger version of the picture over top of the thumbnails on the same layer. My problem is, the large image is added at the very top of the movie clip, even when it is scrolled out of sight. I want it to appear in sight, so the user doesn't have to scroll all the way back up to the top to see it. This is annoying and confusing. Is there a way to do this?
Here is the code I used to create the scroll effect (there is actually a whole lot more to the code but it is very long, so I am not adding it now. I will if it is needed though)
(Oh, and there is no text involved in this. I just got this code off a tutorial and I haven't changed the variable names yet)
var scrollUpper:Number = 58;
var scrollLower:Number = 309;
var textLower:Number = 60;
var textUpper:Number = -179;
var scrollRange:Number = scrollLower - scrollUpper;
var textRange:Number = textLower - textUpper;
var startY:Number = imagesHolder_mc.thumbs_mc._y;
function scroll(){
var moved:Number = imagesHolder_mc.scroller_mc._y - scrollUpper;
var pctMoved:Number = moved/scrollRange;
var textMove:Number = pctMoved*textRange;
imagesHolder_mc.thumbs_mc._y = textLower - textMove;
imagesHolder_mc.scroller_mc.onPress = function(){
this.startDrag(false,this._x,scrollUpper,this._x,scrollLower);
this.onMouseMove = scroll;
imagesHolder_mc.scroller_mc.onRelease = scroller_mc.onReleaseOutside = function(){
this.stopDrag();
this.onMouseMove = null}Thanks for your reply. I'll try to explain it better. I have a long, vertically scrolling movie clip. This movie clip contains lots of thumbnails. When I click a thumbnail, the full sized image is loaded from the library and displayed within the same movie clip. when I click the full size movie clip, it disappears again, and I can click another thumbnail to display another full size image. So I'm not just adding more and more stuff to the gallery if that's what you were thinking. I'm just clicking thumbnails to display the full size image so I can look at it, closing it, and moving on.
But the full sized image is fixed at the very top of the scrolling movie clip, so if I click a thumbnail at the very bottom, I have to scroll all the way back up to the top to see the full size image. I just want the full size image to appear on screen no matter how far down I have scrolled to click a thumbnail.
I made my basic gallery useing this tutorial:
http://flashexplained.com/actionscript/making-the-ultimate-dynamic-image-gallery-in-flash- 8/
if you want to take a look at that, to get an idea of what I'm talking about.
Now I'm just trying to add some scrolling functionality, which wasn't included, but I don't really understand actionscript well enough to do this easily on my own.
Sorry for the long reply. I hope this is clearer. -
Movie Clip loading buttons require double clicking on the first attempt
I have created a number of buttons that load move clips into
an empty movie clip. The problem is that it takes several clicks to
activate the first clip button then the buttons behave as they are
supposed to and load properly. Is there a reason why the first time
you must click several times to activate the button loading a movie
clip?stop();
unloadMovie(1);
agatha_btn.onRelease = function() {
nextFrame();
loadMovieNum("agatha_full.swf", 1);
anastasia_btn.onRelease = function() {
nextFrame();
loadMovieNum("anastasia_full.swf", 1);
chiara_btn.onRelease = function() {
nextFrame();
loadMovieNum("chiara_full.swf", 1);
clarisse_btn.onRelease = function() {
nextFrame();
loadMovieNum("clarisse_full.swf", 1);
fifi_btn.onRelease = function() {
nextFrame();
loadMovieNum("fifi_full.swf", 1);
gigi_btn.onRelease = function() {
nextFrame();
loadMovieNum("gigi_full.swf", 1);
ginger_btn.onRelease = function() {
nextFrame();
loadMovieNum("ginger_full.swf", 1);
ingrid_btn.onRelease = function() {
nextFrame();
loadMovieNum("ingrid_full.swf", 1);
lucrezia_btn.onRelease = function() {
nextFrame();
loadMovieNum("lucrezia_full.swf", 1);
natasha_btn.onRelease = function() {
nextFrame();
loadMovieNum("natasha_full.swf", 1);
philipa_btn.onRelease = function() {
nextFrame();
loadMovieNum("philipa_full.swf", 1);
signy_btn.onRelease = function() {
nextFrame();
loadMovieNum("signy_full.swf", 1);
sophia_btn.onRelease = function() {
nextFrame();
loadMovieNum("sophia_full.swf", 1);
teresa_btn.onRelease = function() {
nextFrame();
loadMovieNum("teresa_full.swf", 1);
trudi_btn.onRelease = function() {
nextFrame();
loadMovieNum("trudi_full.swf", 1);
}; -
Playing a mp3 when a movie clip loads
I am using Adobe Flash Professional CS6
What I am trying to do is play a mp3 file that I have in my library when the clip loads and stop playing it when the a new clip is selected from the menu I created. On the button that loads the movie clip (Instance name: Slideshow), I have the following code:
[code]
on (release){
gotoAndPlay(120);
onClipEvent (load){
mySong = new Sound();
mySong.attachSound("MastersThisHall");
mySong.start(0,50);
onClipEvent (unload) {
mySong.stop();
[/code]
- I went to the properties of the MastersThisHall.mp3 file in my library,
- Selected the "ActionScript", tab,
- Checked the box that says "Export for ActionScript",
- Unchecked the "Export in frame 1" check box, and
- Added MastersThisHall in the "Identifier" field.
The sound is NOT playing when I when the "Slideshow" button is pressed.
Ideas?Thank you for all of this; it is very helpful.
I have series of 6 buttons I created, each of them load a different movie clip. I need to have the music from the slideshow NOT continue to play when a new movie clip is selected.
I have the following code.
Frame 1:
SlideshowMusic = new Sound(this);
SlideshowMusic.attachSound("MastersThisHall");
stop();
Frame 120 (attached to the Slideshow movie clip object):
onClipEvent (load) {
SlideshowMusic.play();
The "Mute" Button:
on (release) {
SlideshowMusic.setVolume(0);
The "Resume Sound" Button:
on (release) {
SlideshowMusic.setVolume(100);
And the "Pause" Button:
on (release)
if (SlideshowMusic.position < SlideshowMusic.duration)
SlideshowMusic.start(SlideshowMusic.position / 1000);
It is loading and working perfectly. However, I have two more questions:
1. How do I make the the sound automatically stop when a new movie clip is played?
2. How do I change the "pause" symbol to the "play" symbol when the "Pause" button is pressed? -
Mask - movie clip loaded from .swf
Hi!
I have made an application where a movie clip (map_mc) is
masked by another movie_clip (map_window_mc:
map_mc.setMask("map_window_mc");
This works fine until I try to load an "external" .swf into
map_mc:
map_mc.loadMovie("Testmap.swf");
Then the mask does not work anymore......
Any suggestions?
(The testmap.swf is also displaced from map_mc.........)
I use Flash 2004 MX pro
terjemterjem,
> My problem is probably that I really don't know wath
event
> handler I should use...
Depending on the approach you're using, there may not even
be an event
handler when the external SWF loads. If you're using the
MovieClipLoader
class, there will be. If you're using a
MovieClip.onEnterFrame loop, there
won't be.
> Here is the first ("non-automatic") code that works:
Okay.
> map_mc.loadMovie("Testmap.swf");
> trace("Loading started!");
> this.onEnterFrame = function() {
> if (
> map_mc.getBytesLoaded() > 0 &&
> map_mc.getBytesLoaded() >= map_mc.getBytesTotal()
> ) {
> trace("Loading complete!");
> trace("File width: " + map_mc._width);
> delete this.onEnterFrame;
> } else {
> trace("File width: " + map_mc._width);
> }
> };
Okay. So far, so good. When bytes loaded is greater than
zero and
greater than or equal to bytes total, you'll know the
external SWF has fully
loaded. You'll know, because the "Loading complete!" trace
will be visible
in your Output panel. Well, that means the place in this
script that
represents "where to put additional code" is right were your
trace()
functions are. Not in the "else" clause, but the first one
this.onEnterFrame = function() {
if (
map_mc.getBytesLoaded() > 0 &&
map_mc.getBytesLoaded() >= map_mc.getBytesTotal()
trace("Loading complete!");
trace("File width: " + map_mc._width);
[delete these trace() functions, if you like]
[add your masking code here]
delete this.onEnterFrame;
// etc.
> The code below does not work (the positioning of the
> map_mc works, but not the setMask):
Your problem may be right here ...
> map_mc.setMask("map_window_mc");
... because "map_window_mc" is in quotes. Yes, the
ActionScript Language
Reference says the parameter of setMask() may be a string,
but leave the
quotes out and see what happens. In any case,
David
stiller (at) quip (dot) net
Dev essays:
http://www.quip.net/blog/
"Luck is the residue of good design." -
One script for multiple loaded movie clips
Hello,
I am sure that this has been asked or answered before, but
could not locate the correct response.
Problem:
There are 20 movie clips loaded onto the stage through
actionscript. I have 20 different onPress scripts to start the drag
for each (which also contain custom variable).
Problem, I have one single onRelease script which is to be
used for each, but do now wish to give 20 custom handled scripts.
Can I somehow use certain scripting for using one single
generic script for the onRelease? So no matter what was released it
will go through this one script.
Thanks
Dlike this...
activate
set the_folder to choose folder with prompt "Select the folder you want to add folders to..."
tell application "Finder"
set the_name to "Name"
set the_count to 3
repeat with this_num from 1 to the_count
set new_num to this_num as string
if (count new_num) is 1 then set new_num to "0" & new_num
make new folder at the_folder with properties {name:the_name & " " & new_num}
end repeat
end tell -
Can't get Simple button to Load Movie Clip
Hi I've looked around for the answer to my question on this
forum
but havent found it so here it goes. I am working on this
company's
Flash site that was built by an outside studio. I am using
CS3.
The url to the site is
http://www.bubbakeg.com.
(this link will take you to the main page click the shadow
graphic
on the left under Bubba and this will take you to the site I
am speaking
of. The site is basically 5 different pages or movie clip.
What I am
trying to do is basically change the "Spring Break" middle
graphic
(which is a Movie Clip) on the HOME page and add a simple
button
that will direct the user to a new page. When I replaced the
graphic
with a new Movie clip there was no problem but I have added
a
button to load a new page (movie clip) and nothing happens.
This
button is in the movie clip of the new graphic which is
called up
when the page loads. If i take this button and just put it
on the
Main Stage in Scene 1 by itself it works and loads the page
(movie clip). It does not however when it is embeded in the
Movie
Clip. The Flash site is basically 5 different Movie Clips
loaded into
an "Empty Clip". This empty clip has a timeline with each of
the
clips labeled and with their respective sized placeholders.
And
when you click on either the links on the Nav bar or the
graphic
for each page it loads that movie clip on the main page. It
seems
like the button only wants to work on the main timeline. I
have
even replaced the code for the "Contact" button with the code
for the new button and it worked (opening new page). Here is
the
code for the new button that does not work:
on (release) {
_root.contentHolder.myHeight = 307;
_root.contentHolder.newLoc = 9;
heightAnimation();
I know the location and height from the above code are
referring to the placement and sizing of each movie clip
in the "Empty Clip". As i said before this heightAnimation
and the resizing of the new clip works fine when the
button resides in Scene 1 on the Main Timeline but not
within the new movie clip (graphic Ive created.)
I will upload the main chunk of the code that resides
in Scene 1 on the first frame of the "Actions" layer.
If anyone has any ideas I would appreciate it very much!
Please let me know if I can provide anymore info.
Thanks!
Gregchange:
function newLayerBT_CLICK(MouseEvent):void{
to:
function newLayerBT_CLICK(e:MouseEvent):void{ -
Whenever I load a movie clip into the target and test my
movie, the loaded movie clip always loads in the bottom right. I
think this is a registration error but I am not sure how to fix it.
My target is 835px by 635px, same as the movie clip I want to load.
Any help would be much appreciated.Position the blank movie clip in the top left corner where
you want to have
the external movie clip loaded.
Note that if the external movie clip has dynamic content
creation via AS or
different content size on higher numbered frames you may find
it will show
content to the left and top of the blank movie clip because
initial size is
not detectable. In particular if you are loading Flash movie
that you
created that you used a third party tool such as xCelsius. In
this case you
need to MovieClipLoader and once the onLoadInit event fires,
manually
position the blank movie clip which is passed as an argument
for coding
convenience.
Lon Hosford
www.lonhosford.com
May many happy bits flow your way!
"northstar_86" <[email protected]> wrote in
message
news:e27cer$5i2$[email protected]..
Whenever I load a movie clip into the target and test my
movie, the loaded
movie clip always loads in the bottom right. I think this is
a registration
error but I am not sure how to fix it. My target is 835px by
635px, same as
the
movie clip I want to load. Any help would be much
appreciated. -
How to play movie clips for a certain amount of time only
Hello everyone, I think I have a relatively basic question here but I can't figure it out. I have a movie clip loaded using action script 3 at the start of my animation, I want ito to end at the 120th frame. But I can't use the stop(); command because it will also stop the rest of my animations from the 121st frame onwards. So my problem is, how can I stop the movie clip without stopping the rest of my animations?
Thank you in advance!I don't think I have codes that load the swf, but I've sent you the code that I would like to stop. Thanks!
-
Drag variety of movie clips with one script
Hello,
I am sure that this has been asked or answered before, but
could not locate the correct response.
Problem:
There are 20 movie clips loaded onto the stage through
actionscript. I have 20 different onPress scripts to start the drag
for each (which also contain custom variable).
Problem, I have one single onRelease script which is to be
used for each, but do now wish to give 20 custom handled scripts.
Can I somehow use certain scripting for using one single
generic script for the onRelease? So no matter what was released it
will go through this one script.
Thanks
Dsomething like
upListener = new Object();
uplistener.onMouseUp = function (){
doSomething();
Mouse.removeListener(this);
and the line
Mouse.addListener(upListener);
in every onPress action could do.
[Code not tested, likley full of typos - but hopefully useful
as a general example;] -
Multiple Preloaders for Multiple Movie Clips
Designed in Flash 8, the site's timeline is all in Scene 1
and is comprised of an introduction, which contains a short video,
and 6 movie clip categories that the user selects to view. Since I
want the intro to play as soon as possible, I'd like to limit the
first preloader to just the video in the intro and not
_root.getBytesTotal. Then, as the viewer watches this short video,
the rest of Scene 1 movie clips will keep on loading. After the
intro, the viewer will choose which of the 6 categories to view.
These categories are identified with buttons which play the
particular movie clip. Since I don't know the order of the
categories they will select, I thought there should be a separate
preloader for each category. Hopefully, after they view a category,
the rest of the categories will have loaded and the loading time
will be nil. The design for the preloader is comprised of a status
bar and a percent loaded. Is there a way to limit the
_root.GetBytesTotal to specific frames? I know I could break these
categories up into separate SWF files but then I loose the
advantage of one loading while another is being viewed.MovieClipLoader is a built in class of functions that will
allows you to easily load Media (swfs/jpgs) from external sources.
This will create a MCL object
var mcl:MovieClipLoader = new MovieClipLoader
We want the MCL object to receive events for any movie that
is loaded into the main timeline
mcl.addListener(this);
Ok. now we have a movie clip loader that is able to recieve
events. Since we want to show the progressive download and want to
do something with that content after it loads, we need to declare
two event handlers onLoadProgress and onLoadInit. onLoadProgress is
pretty straight forward. onLoadInit executes it's action as soon
all of the AS on frame 1 of its time has finished loading. In this
case, we want two different things to happen. 1st, load the first
clip and show it.... 2nd, load all remaining clips into the buffer.
But first, lets declare those next...
function onLoadProgress( target:MovieClip,
bytesLoaded:Number, bytesTotal:Number):Void {
// standard preloader code goes here
function onLoadInit( target:MovieClip ):Void {
// display the clip - this will be as easy as just calling
our loadClip function for the mcl...more on that in a minute
// If you want something special to happen, i.e. movie fades
in or a mask is applied to it, you'd do that here.
Now all we need to do is call the loadClip member function
for the MovieClipLoader. Just replace the two parameters with the
location of the swf and then the name of the instance you want it
to load into
mcl.loadClip( "myswf.swf", targetMovieClip );
The other movie clips are now a breeze as well. For each
button, just add an on(release) or onRelease = function (depending
on your situation) to just call that mcl.loadClip() line from up
above. Just change the movie you want loaded.
Let me know if you need more help... -
How to stop a movie clip that is loaded dynamically
Hello Flash Forum,
I am using the loadmovie method to load a swf file into a
movie clip "container"
Code snippet:
var mc:MovieClip = this.createEmptyMovieClip("mc",1);
mc.loadMovie('bbc_module1.1.swf','bbc_audio',container.getNextHighestDepth(),
{_x:300.8, _y:240});
mc._lockroot = true;
The movie clip I load does not have a stop action in frame 1,
but comes up playing (audio and images). I am not using video. It
is a series of still images synced to the audio.
I would like to be able to load the movie clip, stop it from
playing, and by clicking buttons, get it to play, pause, etc like
the buttons and skin on the FLVPlayer.
Any tips on how to do this?
Thanks,
eholz1Many thanks ClBeech!!!
I've tried the code you suggested but it doesn't seem to work
:0(
I'm working on a Mac using Flash Pro 8 which only has the
option to publish as 'actionscript 1.0 or 2.0' is the script you
supplied an actionscript 3.0?
Below is the script with the amendments, I've changed my
button instance names to match the script you supplied (left_btn /
right_btn)
stop();
import mx.transitions.Tween;
import mx.transitions.easing.Strong;
var rposX = 369;
//the ending x of the right position
var rposY = 84;
//the ending y of the right position
var lposX = 116;
//the ending x of the left position
var lposY = 154;
//the ending y of the left position
right_btn.onPress = function() {
new Tween(content1, '_x', Strong.easeOut, content1._x,
rposX, time, false);
new Tween(content1, '_y', Strong.easeOut, content1._y,
rposY, time, false);
left_btn.onPress = function() {
new Tween(content1, '_x', Strong.easeOut, content1._x,
lposX, time, false);
new Tween(content1, '_y', Strong.easeOut, content1._y,
lposY, time, false); -
Seamless transitions between externally loaded movie clips
I'm building a flash player that loads various movie clips in succession depending on user input. The player should continue to play seamlessly when one clip ends and another starts playing, however there is always a slight noticeable delay between the COMPLETE event for one clip and the actual playing of the next clip. I am using the FLVPlayback component to load the video clips, with successive clips loaded in different players in the component.
I've tried playing the next video a short duration before the current video finishes by adding a cue point just before the end of the currently running clip (about 200 - 300 ms before the end). This improves matters somewhat, but it is not a reliable method as the timings are different for different browsers and computer specs.
I was wondering if anyone here has any experience with smooth transitions between external video clips and could suggest possible optimizations I could use to improve the transitions.Thank you for replying.
The video clips basically continues the same shot only with different directions, so I can't fade out between transitions. It needs to appear as though it's playing a single video clip in that respect (a one-shot scene).
Another major issue is that there is music playing for each video which should continue playing without interuptions. Even a small gap is noticeable with audio. I thought about separating the audio and video streams but that could mean they could go out of sync as the more transitions occur. -
Unable to Sync Quicktime Movie Clips with IPOD
I am a new ipod user having difficulty syncing Quicktime movie clips to IPOD.
Clips are saved as .mov files and Itunes will play.
However I cannot get them to sync woth IPOD.
Any ideas - Do I need to convert to annother format?First you need to import your movies into iTunes. Do this by opening iTunes <File> <Import> <Movies> then choose the movie you want to put on your iPod. Make sure the movie has .mov at the end otherwise it won't be set up the way it's supposed to be.
Once the movie is imported into iTunes right click on it so a pull down menu appears. Click on <Convert Selection for iPod/iPhone>. It should begin converting it on its own and when it's done you'll hear the typical sound that happens after importing a cd, telling you the operation is complete.
After it's converted, you will have 2 identical movies in your menu. If you <Get Info> on each, you should be able to see which is newest version; that is the movie you are going to want to sync.
Then plug your iPod in to iTunes, go to the movie tab in iPod summary and check off the converted movies you want to sync to your iPod. Press <Sync> and that should add your movies to your iPod.
Hope this helps.
Maybe you are looking for
-
What is an administrator name and password
I am trying to unlock the parental controls but it needs an administrator name and password. I dont know what that is.
-
Differences between XI 3.0 and PI7.0?
Hi Experts, I want to know the major differences between XI 3.0 and PI7.0? can anyone suggest me some weblogs which explains the all the new features of PI7.0.....as i'm very much keen to learn PI7.0 Thanks Faisal............
-
Passing a parameter to a thread
HI, could you please tell me how to pass parameters to threads? Thanks
-
I Just purchased Adobe Acrobat DC, Everytime I try to install I get the same Error We've encountered the following issues, The server is not responding currently. Please try after some time (Errors Code: 207) I've rebooted twice, and I get the same
-
HTTP 403.13 during SCCM client push
We have multiple forest connected to a shared SCCM 2012 R2 site. The site is in SSL only mode With one forest we have problems pushing clients from SCCM. Install works fine but soon as the client connects to the MP we get HTTP 403.13 failures. RootCA