Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




I Can Call A Sound From The Libary (useful Technique), Can I Do The Same W/ A Movie?



Can you use code and the Linkage for action script to pull a movie or graphic right from the libary, and have it appear in your movie?

It works with sounds, but I can't seems to get results w/ movies.

I use code to generate sounds on the fly, from the library.

After selecting "Linkage" from the libary and naming the file "bark" the following script pulls the sound right from the libary and it plays. So, I never have to deal w/ inserting these types of sounds.

on (release) {
mySound = new Sound(this);
mySound.attachSound("bark");
mySound.start();
}

By the way, "bark" could also be a variable, making this technique very useful.

QUESTION: Can you do something similar w/ a movie clip?



FlashKit > Flash Help > Flash ActionScript
Posted on: 09-13-2002, 01:59 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

What To Call This Technique ?
Hi everyone !
This is shahgillani

I have been see many site with the certain technique in which scrolling images or text etc. don't have a leap on click it rather go smoohly to the target position. For example if I click the link no 5 to scrolls all the images between them like it shows no 2 then 3 then 4 and then at last no 5. Like one in this file. I found it unexpectedly.

I hope you got me !

I wanna know that what is the name of this technique? What we call this ? So that I will be able to search it online or even you know this technique, I shall be obliged to hear it from you.

Thanx & Regards,
Hassan Sajjad
shahgillani

What Do They Call These Technique?
hi.. im just wonderin on how they put a textarea inside flash... (like the <textarea></textarea> tag in html), where you could highlight the text and copy it..

ive seen a site before, now i cant find any site like that..

coudl someone give me a link to any site with that kind of stuff? and how did they do that? is that called "the XML get stuff" (err.. i dont even know what xml is)?

or is it what they call externally loaded text?

thanks..

What Would You Call This Technique?
Hi,
I'm just wondering what you would call the menu technique used in these sites:

www.professorgreen.co.uk/
www.time4planb.co.uk/

I'm wanting to try and do something similar for my own site, but i cant research or ask how to do it, because i have no idea what its called...

Any help would be much appreciated.

Deleting Libary Item In Actionscript Of Another Movie
Hi,

Here's what i want to do:
Load a movie on another one by a button.
Once the new movie is loaded, one libary item of the new movie must be deleted, without adjusting the new movie.
HOW???

Greetz, DeaTH-RuLeR

Problem: [sound].setVolume(x) Controling Two Sound Objects In One Call...?
Hi there, hopefully some or at least one of you will be able to figure this out because it's wrecking my head!

Basically I'm writing a little looper player movie, that will play [x] number of techno/jungle/house/whatever music loops at the same time, and the user will be able to switch loops and turn loops on and off whenever they want to. I'd like to avoid putting sound in the timeline so I'm using sound objects to trigger the sound properties.

For a test, I've created two sound objects (these will later be in a 2D array), but for now- just two sound objects, I've attached the sound to the links in the library, and set the volumes on both sounds to 0. Both WAVs in the library have the linkage on "Export this symbol" and they are labelled/identified as "loop1_link", and "loop2_link"... (obviously without the quotes in the properties box). Here's the code:

// ---------------------------
loop_test1 = new Sound();
loop_test2 = new Sound();

loop_test1.attachSound("loop1_link");
loop_test2.attachSound("loop2_link");

loop_test1.setVolume(0);
loop_test2.setVolume(0);

loop_test1.start(0,999);
loop_test2.start(0,999);
// ---------------------------

So the sounds are triggered when the movie loads, and the start playing silently in the background for 999 loops.

Here's the problem:

In the interface of the movie, on click of a play button, I'm making a call to _root.loop_test1.setVolume(100) to turn that sound on, but when I make that call, the volume is set to 100 for BOTH loop_test1 AND loop_test2 !! I'm hearing both loops playing at the same time and I only want to hear just the one. Makes no sense to me because I'm only telling that ONE sound object to set it's volume to 100...

Any ideas? Any feedback/comments would be greatly appreciated.

Cheers,
Anthony
-Dublin, IE

How Do I Call Sound Files For A Sound Player Created In Flash
I want to create a sound player for a website in Flash 5. However, i do not know how to play the files without importing them into the flash movie. If i imported all of the sound files i am using, my flash file would end up being about 25meg in size. This would obviously be stupid, as it would take forever to load up. Could someone please tell me what action i eed to use to play a sound file which is stored in the same directory as the swf file.
Im only just learning flash so im not 100% sure that this is the way to do it. Is there a way of telling flash flash to only load a certain part of the movie as it is neded.
I want to create something similar to the player found at this address
http://www.newfoundglory.com/player.html

Any help you can give me would be much apreciated
Thank you
David

Creating New Movie Clip Then Add Movie Clip From Libary In AS
How do i do the following create a move clip using AS
1) Move it to location x100 y100
2) Add movieclip circle from library

I have the following code but it does not work


Create a movie clip

Code:
_root.createEmptyMovieClip("DrawContainer_mc", 0);
Move to 100,100


Code:
_root.DrawContainer_mc.x = 100
_root.DrawContainer_mc.y = 100
Add movieclip circle from library and place in position 10,10

Code:
_root.DrawContainer_mc[DrawLayerNumber].circle.x = 10
_root.DrawContainer_mc[DrawLayerNumber].circle.y = 10

Libary
Is it wise to ´clean up´ your library before exporting or is the library size of no influence on the exported SWF file ? Does it only export the used files, or does it export all files in our library to the SWF ?

Libary
Could anyone tell me how to import my own sounds in the libary so i can use them when i need to,and do they have to be a certian format?Is this the same process for buttons ect...in the libary?
Thanx.....
__=WARBLADE=__

Libary
can you save to a overall libary so you can pull up objects into diffrent documents without having to copy paste??

What The Libary Can And Can't Do
Morning out there;

Using flash 8, my knowledge base is not so hot. Would someone clarrify hte info below please.

First, is this correct. In my library i change all my bitmaps from lossless to jpeg to keep down movie size, and in the belief that our eyes don't see that much difference on our present day computer screens. Correct?

2nd - MOST IMPORTANT - - if i wanted to, i could go back into the library, change all bitmaps back to lossless and republish, AND i would have the original lossless quality - correct? Or is this truth - once you degrade the image in the library, you can't get the quality back unless you reimport the lossless image and place it back into the movie. A lot of work. Which is correct?

thank you
Hoss

Shared Libary
i need to use a shared libary - but i am a little confused about the URL when exporting for runtime - flash 5 doesnt need it. i guess i want to put a relitive path in it somewhere.

are there any examples .fla's around??

thanks

Ok .... Use No Shared Libary
hai

ok the shared libary is not cool to use

i take a other way ....

thanx kaptan

Libary Always Out? Flash 8
everytime I open Flash it doesn't have the libary on the side and I've tried saving a new default and all and it still doesn't work.

Actionscript Libary
Hey,
Being new into this whole actionscript thing I was wondering how others have their actionscript libary structured.

Right now I have folders for navigation, text, sound , transitions. Is this an effective way to catalog my actionscript or does anyone have a better suggestion.

thanks

Can Flash Load A Libary Of Another Swf?
hi i really need some help i got like 20png images and i need a way to load them dynamicly, i thought of putting them in a swf, then loading the swf in my mainmovie, then using attachmovie or something to add the image i want, but so far its not working
Any sugestions or help?

Flash Game AS Libary
Is there a website with all the useful codes to make a game?

Loading A Movieclip From Libary?
hi i was wondering if any one could tell me how i would go about loading a movie clip that is in the libary on to the stage after clicking a button

thanks for any help

Libary Issues With The Fl Packages
So I recently installed flash cs3 and updated it to current today. It works fine for the most part, but when I try to import things from the fl package, such as the statement: import fl.controls.*; I get a compiler error saying it can't find the definition. I can import things from the flash packages just fine.

I think I discovered why this is the case. I found the classes folder for as3 buried in my flash directory. The fl folder is there, however it only containers 4 packages; lang, livepreview, motion, and transitions. I'm missing a lot of packages. How did this happen and where can I get these packages?

Loading Images FROM Libary?
Hey all i dont want to load an image (Externally) i want to get it from the libary how would i do that?

Access Libary From Live Preview
is it possible for a components live preview to access (eg. use attachMovie() ) the libary of the .fla it is running in.

thanks

[F8] Adding Text Layer From Libary
I'm a swish user and right now I'm working in Flash 8. I'm working on a movie and there are several things in the library. How can I add something from the library to the movie? There is some text that is not playing at the end of the movie, but it is listed in the libary, so I'm thinking maybe it's turned off or something.

Can someone help me, please. I thought it would be as easy fix, and I have to finish this by 3:00.

I am desperate!!!!!!

Thank you.

Searching For Libary Member Usage
Hello,

I'm a pretty inexperienced with Flash, but am a Director expert. In
Director there is a way to find out if a cast member is used in the score.
In Flash, is there something similar? I mean is there a way to find out if a
library member is used in a timeline? I'm trying to clear out unused
resources and don't want to delete something that is being used.

Thanks,

Brian

Loading Movieclips Into The Libary Dynamicaly
Hi everyone,

Is it possible to load libary items from one swf into another?

I am trying to load a set of tiles stored in one swf into a tile editor.

In the code for the tile editor it adds objects from the libary onto the stage. Is it possible to get the movieclips from another swf?

Sorry for a poor description on that.

Call Sound..Problem?
How can i call sound which is play continuously ??
I have created cd presentation. And there are many links in that flash and i made separate .fla file for each and every link.
Now i want to play sound continuously in the cd, but the problem is if i put the sound in one file the sound will star but when i click on another link sound will stop cause i have made separate file for the links that i know.

Now the exact problem is the sound play continuously on the cd.
So please tell me how can i do this?
There is action script for this?
Please help me !
This is very urgent!
Thanks!

How To Call Two A Sound File?
its like this, i have placed half of one audio file to a Movie Clip, and another half of it to another movie clip clip, now what i want to do is, when the first half is finished i want it to tell the other half to start. and the other half keep playing continously, like looping. how to do that?

and when the user clips enter or intro button the music should fade out from where ever it is?

Best Way To Call Events In Sound Object
I am playing a series of sound files via actionscript 3.0, and I would like to have a fade out effect for each sound and then have the next sound fade in.

I was just curious if anyone could think of a better method then to have an enterframe listener check every frame the position of the song? Or would a timer be better suitable?

Or maybe something else all together? I'm just afraid that the listeners will mess up if a user's machine locks up...
Thanks,
-Danny

[F8] Array Of MC To Call A Sound Clip When Pressed.
I've got sound clips for words. For example, lets say the word is doorknob, then I have a sound clip in the library named doorknob and it's exported for actionscript with the same identifier name.

From there, I have a list of all the words. So, somehow could I write up a array which takes the words, puts each one on the stage (1 per row so it stacks vertically) as a MC that when clicked plays the sound clip in the library?

Because of the large amount of words, I would have to have some sort of scroll bar, but I don't know how I would do that either.



So, I got part of it figured out:


PHP Code:



var wordlist:Array = Array("dog", "bowl", "fighting", "chair", "venezuela");
thing_array.sort();




Pretty much this would store all my words and sort em I guess.

Then from there, I would use a master button (Button) to attach onto the stage. As well, it would have to be stacked vertically:


PHP Code:



for (i=1; i<wordlist.length; i++) {
    words = attachMovie("wordbut", "wordbut"+i, getNextHighestDepth());
    words._x = 8;
    words._y = words._width*i-words._width+8;
    words.num = i;
    words.onPress = function() {
        // this is the part I don't know
    };

}





Somehow, I would have to put the text on each button. So that, there would a stack of buttons and on top of each button would be the word in the array. If brackets equal a button, then this is what I want it to look like:
[ dog ]
[ bowl ]
[ fighting ]
[ chair ]
[ venezuala ]

Then from there, when the MC is pressed, it finds the word (let's say dog) and finds the mp3 in the library and plays it every time it's clicked.

How would I put the text on each button?
How would I make it play the mp3 when clicked?
How would I set it up to scroll?
Is there someway to make a variable so that the width of the button of the MC is equal to the length of the word?

Here is the FLA:

http://tivaelydoc.110mb.com/soundbut.fla

How To Break A Huge Flash Movie Into Smallers And Call One Another From A Main Movie?
Heeelllllpppppp…

My Flash file is huge. It is beyond 16,000 frames, the Flash size limit, as I was told. Therefore, it is not working ---my long narrations stop working. I have four scenes, so I came with a plan B to save my efforts on trying this file to work. I can break my Flash in 4 smaller files and then, call one from another. Is that possible?
How I do that? I will have a main file from with I will call the others. From a secondary file, can I come back to the main movie?
I looked at my action script book, but could not find a specific (or direct) statement about it.)
Thanks, thanks,

Patricia

PLEASE HELP Button Inside A Movie Clip..to Call Different Scene On The Movie
i have a button "within" a movie clip, i cant get it to work to call another "scene". i already used "_root." so the command will apply to the main time line but still, its not working.


on (release) {
_root.gotoAndPlay("scene2", 1);
}
thanks!

Problem, Call Attach Movie From One Timeline To Another Movie Clip
Hi Everyone,

I have a relatively simple attachmovie problem.

I have have two different movie clip instances correctly labeled on the main _root timeline; "slider" and "projects_library". Inside the timeline of the "slider" clip is a script to attach a clip to the instance "projects_library". However when executed, it doesn't work. The script works fine if it runs on the _root timeline, but not when it's inside the "slider" timeline. I might have a misunderstanding of levels in my script. Hope someone can advise and clarify. Many thanks,

onEnterFrame = function () {

_root.projects_library.attachMovie("testproject", "testproject_new", _root.projects_library.getNextHighestDepth());

}

Actionscript Code, Load Movie + Call Movie, Help Plz.
How do you go about loading several movies into level 1, and when called on, by different buttons in the base movie, each movie will replace the other.
In the base movie (level 0), i used this actionscript to load the 2 movies (02.swf and 03.swf), which both have a stop action on frame 1, so appear invisible on the screen, until called on and will start to play from frame 2.
loadMovieNum ("02.swf", 1);
loadMovieNum ("03.swf", 1);
On the base movie, i use this code from the buttons to call the movie into level 1 and to play from frame 2.
on (release) {
if (_level01._framesloaded == _level01._totalframes) {
_level01.gotoAndPlay (2);
}
}
However, how do i go about identifying which movie to call 02.swf or 03.swf, from 2 different buttons.
Thanks for helping me out, this has been giving me a big headache for the last 3 days.
BB.
[Edited by bobbrown on 04-05-2002 at 06:26 AM]

Is There A Way To Call Up A Movie To A Target In A Swf Movie With A Html Link?
Is there a way to call up a movie to a target in a swf movie with a html link lets say from a banner on another webpage??

How To Call The Main Movie From An Embedded Movie
Hi,

I would like to tell the main movie to go to the nextScene() from inside another movie. I know that gotoAndPlay() can be used for objects such as a embedded movie (something like _root.*name*.gotoAndPlay() )

I want to do the reverse, I want to tell the main movie to play from inside an object. How do I do this? What do you refer the main movie as? Can you give the main movie a name and associate that with *name*.gotoAndPlay() ?

Thanks.

Load Movieclip From Libary Into Another Blank Movieclip On Stage (URGENT PLEASE)
hi all i just need to know how to load a movieclip into a blank movie clip all in the same movie?! please help many regards peter thanks in advance!

To Call External Movie
I need help on actionscript in flash.

I got 2 swf files which is A and B. Let say I got a button to click in the Movie B to call Movie A at the certain timeline/frame, how can I do it.

Thank you.

Call An External SWF Movie
I am needing to call a .swf movie embedded in a page and tell it to play when another movie on the same page finishes.

Is there a way to call an external movie from within another movie?

Thanks

Is There A Way To Call Up A Movie Clip?
Hello, I'm making my first site in MX and made a different sectiona movie clip, called Homewindow. How do I call it up on a mouse event? TIA

How Do I Call From An External Movie To Another.
Hi,

How do I do this? Here's an illustration...

I need to go to play a frame in main.swf from subnav.swf.
How do I call the frame in main.swf?



thanks,
Archie

Can A Movie Clip Call Another One?
Can one of u guys help me out with this problem?

I have a frameset, in the bottom frame is a flash mx created menu. In the side frame is a flash movie also.

What I need to do is when i click a section in the menu movie I need to tell the side movie to go and play a certain frame number.

Because they are 2 separate movies in 2 different frames is this possible? is it easier if they were both in the same web page? If i just call a different clip to start in the side frame there may be a pause when the new clip starts so it wont look smooth....

Help!!!! Im confused


many thanks in advance

shanester

Call A File From A Movie
ok i have a flash movie am using flash 5 and i want to load a variable from a text file theres a format to make the txt file or i just write the variable i want there and save it as whatever.txt
and then called from flash like

loadVariablesNum ("whatever.txt", 1);

and then i can assign or use that load variable in my movie

Call A Movie Clip
i want to call a movie clip with a button. the movie has to be seen in the main flash movie (not separete). Like the windows that opens in the egomedia site
[url=http://www.ego7.com]

How To Call Movie Clip
How to call movie clip

Random Movie Call Up
Hello - my actionscripting is terrible, so I need help :)

I have a movie on the homepage of my website, from which I have a loadmovie script, calling in movie. However I want something more dynamic than this.

What I would like is for the movie on the homepage to randomly call up 1 of the 10 movies that I have created.

I have looked but can't find much in the way of help - can anyone help at all

many thanks

Mallory

Using A Movie To Call A Function
I have some actionscript that checks for installations of Acrobat Reader I'm using in a Projector project.

This code executes by pushing a button. I want to use a movie (like a preloader) to execute the script.

i.e. when the movie reaches frame 50 execute the fucntion to check for acrobat reader

I have it working fine using a button

test_btn.onRelease = function . . . . .


But I can't seem to get it to work with a movie.

I need to set up way to check what frames is loaded and if it is all loaded then execute the function.

something like

if (test_mov._currentframes == 50){execute function}

This is probly really simple but I can't seem to get it working.

Any thoughts??

Andy

P.S. the script is all on frame 1 of main timeline.

Call Upon Movie Clip Further Up
Hi all.

I have a movie clip and a movie clip inside that which I wish to call upon. I would normally use :


ActionScript Code:
_root["name"].gotoAndPlay(2);


however it is further up the chain, you would most likeley call it the child of the parent. I am unsure how to do this, could anyone advise me. I need to play the clip inside a movie clip, so the script above would not work unless i was playing the parent movie. so what is the action script for the next level up.

please advise

Trev

Can A Flv Call A Movie Clip?
I dont know if this possible, but can a flv call a movie clip after the video finishes playing? Im trying to accomplish something similiar like YouTube's video player. I'm using flash 8 videoplayer component and hoping it'll make it simpiler to figure it out.

I was given a tip to use the listenerObject command but i've had no success. Thanks!!



var listenerObject:Object = new Object();
listenerObject.complete = function(eventObj:Object) {
// ...
};
myMedia.addEventListener("complete", listenerObject);

Call A Movie Clip
i want to calla movie clip with a button. This must be seen in the main flash movie (not separete). Like the windows in egomedia site.
http://www.ego7.com

Call Keyframe In Sub-movie?
I made a Global continue button for a movie player that calls keyframes within a loaded swf file.

It increments +1 on each click to find the next keyframe, but the problem is that if the movie passes a certain section of the swf and I press the continue button it will jump backwards to the next keyframe +1. I hope this makes sense.

If some one could help that would be great. thanks.

Copyright © 2005-08 www.BigResource.com, All rights reserved