Loaded Swf: Library Assets Actions Are Ignored
Hi fellow flashers. I have a strange problem and could really use some help. If you can help me then let me know if you need anything in return
I have a loader.swf, this one loads application.swf Application.swf works fine on its own. It gets loaded and that works fine too.
However, now further down the development the application.swf is loaded.. and this time, all movieclip actions are ignored! Still working fine on its own, but not working properly when loaded. As if the buffer is full or something.
I've had this problem before where a loader loads an intro, plays it, then while playing it would load this application. Causing the intro to ignore all movieclip actions. I solved it by loading them 1 by 1, instead of 1 in the background. But now I only have 1 thing to load. So I can't apply the same solution.
The application.swf contains many library elements and few are in there multiple times (like vectors from illustrator), that's what the application and the intro have in common, can that have something to do with it?
I suppose it's a buffer thing? I have to chop it up in smaller swf's ? I sure hope not.
tia
Ultrashock Forums > Flash > Flash Professional
Posted on: 2008-11-07
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Second Try: Attaching Actions To Shared Library Assets (im)possible?
hi flashlovers and -haters,
would be great if anybody could tell me, if i´m just too stupid or if it just doesn´t work in generell.
my problem is, i try to use buttons from a shared library to which i try to attach actions, but nothing works. even simple things like a on rollover-trace action has no result. behaviors/actions work if the button is in the movié´s library, but if i open the shared library and switch the button symbols then, nothing works anymore.
anybody any clue??
or do shared libraries only work with simple animations.
looking forward for inspiration or salvation
thanks in advance
belikin
Loading A Swf That Contains Assets Loaded From Library
I'm trying to figure out how to load a swf that instantiates assets from it's own library and adds them to the display list without getting 1180 Errors.
A quick example:
There are two swf's, Parent.swf and Child.swf. The Child.swf will attempt to load a movie clip that has been properly declared for export via properties. I declare it like:
ActionScript Code:
private var _ball:MovieClip = new Ball();
This works fine when compiling Child.swf. But, I run into problems when I try to load Child.swf into Parent.swf. The compiler will through a 1180 error basically telling me that the method can't be found.
This is mostly a theory question as I don't know how to correctly reference things to stop the error. I'm guessing that upon import the compiler is yelling at me because Ball(); is not found in Parent.swf. So how can I fix it?
Is It Possible To Use Externally Loaded SWF Library Assets?
I have a main swf (which I'm calling a wrapper). This wrapper simply has 3 buttons that load 3 separate movies into the main stage. Each button contains a little snippet of text and a thumbnail.
The 3 externally loaded SWF's all use txt files to set text variables.
What I'm hoping to accomplish is to load the variables and/or symbols from the external swf's into the wrapper. This way I can populate the thumbnail/text snipped from the external assets in order to eliminate the need for separate files/images to be loaded just for the wrapper.
Let me know if I'm not being clear. :)
Edited: 06/13/2007 at 08:16:13 AM by FattyB
Library Assets Won't Load
I created my site using a master MC with a trigger file that should load the library assets. It works fine when previewed in Dreaweaver MX in IE, Netscape & Safari. The problem is when posting the files on my mac server. Some graphics load but every thing that is from the library is missing. Fonts, logos etc.
Any ideas
Sharing Library Assets
hola :
im building a site comprised of several swf, one per section.
there is an mc that im using to show the preloading progress, and i want all of my movies to use the same MC.
how can i share it across all of them.??
right now i am placing a copy of the mc in each and every library for each movie's fla.
hardly efficient.
please help the noobo
Shared Library Assets
For some reason I have always had a hard time with shared assets in the library. Theycreate more frustration for me in production because I seem to have to constantly go and redeclare the url of the asset in the library to make the sharing work in my local production environment. Is it me or does the whole shared library thing in Flash seem really buggy?
Is there a better way fro sharing common aasets across a site?
Copying Library Assets From Fla To Fla
There are times when I need to reuse assets from different fla's but I noticed something when I was checking the properties of the asset in the library.
The new item pasted into the library had the source pointing to the original fla that was first developed. I noticed that you can update the asset and if the original fla has been changed, the current fla with the pasted item will change too.
We've tried it and are about to apply it to a project at work.
Here's an example:
We have say 5 different swfs that use an identical interface. If the client decides to tweak the interface, we'll have to change each swf.
So what we're about to do is have 1 master source template for the interface, which includes buttons, frames etc, and copy those assets into any new fla we will build for the client. If the client decides to change the interface, then we'll only have to change a single fla and the changes will be applied automatically to the subsequent swfs.
Does that sound familiar to anyone in industry? Our team is young and fresh and we're not sure how robust this process will be.
Why Don't Shared Library Assets Update?
Why Don't Shared Library Assets update in the main linking SWF in design mode?
When I link to a shared library asset, and change the asset in the linked SWF, the asset updates linking SWF, but in design mode the linked asset does not update.
Any idea, how I get the linked assets to update in design mode?
Thanks,
When Are Shared Library Assets Downloaded?
Hi all
Anyone know what the score is with using shared libraries?
When exactly are they downloaded? Basically i get a huge delay at the beginning of my movie before the preloader anim appears. I think this is because the first movie I load i.e the interface, includes about 100k of shared assets in a shared library. Am I right in assuming that nothing will appear on screen (ie i am faced with a blank screen) until the whole of this shared library assets are downloaded even though I dont want to display them until after the preloading has finished??
If so what is the best way to avoid this?
All suggestions most appreciated!!
Thanks
Chucky
Shared Library Assets Problem?
I am trying to use the shared library assets feature in Flash between different swf files. I have read everything in the manual and on-line help, but still cannot seem to figure it out. I have my main movie which we can call main.swf. It has a graphic symbol called bluebox. I go to linkage and select export for runtime sharing and put in a identifier name. Now i also have to put in a url and I believe this is where my problem lies. I would like to just put a relative url like ../ because all of my swf will be in the same folder locally and on my web server. I now go to one of my other swf files lets call movie1.swf that I will load into my main movie using a targetted empty movie clip. I go to the bluebox symbol in movie1.swf and select linkage. I check the import for runtime sharing box and put in the same identifier name I used in main.swf. Now as I said before I would like to just put ../ as my url, but this does not seem to work. My main question is what url should I put in each of the movies to allow them to share this graphic symbol? Thanks in advance for all your help!
Resolving Conflicts Between Library Assets
Greeetings!
I am a teacher and Ihave my students developing original flash movies. They storyboard and then create scenes on individual machines. They then compile the scenes in a single file by selcting frames and pasting frames into the new scene. This works for the most part but many students get Conflicts between library assets. Is there a better way to do this project?
[CS3] Shared Library Assets Actually Slower
Hi all, hope someone has an answer to this problem that just boggles my mind.
I'm working on a project where I'm loading a number of movies on a higher level on top of a main one at different times. Since these movies all shared some assets I thought I'd do a brilliant thing and turn those assets into shared library assets and load them once and for all on the main movie. That should make loading each individual secondary movie a lot faster right?
Wrong. I've noticed that when I use "import for runtime sharing" for an asset it actually takes longer to load it than if I had simply put the asset in the movie itself. I don't understand why that is. If a movie that is already loaded and is sharing library assets with another movie doesn't speed up the loading of those assets in the second movie, then what's the point of sharing?
Help With Accessing Library Assets From Imported .swf
I have not attemped this before and could not find information on exactly how to do this.
I have 2 .swfs - 1 has assets in the library that are set to export on the first frame, but nothing on the stage.
The second .swf it the master program that I want to loop through the library of the assets file and display all the movieclips in the master file.
I have read some things about ApplicationDomain or using skeleton classes with import statements to make the assets available but have been unsuccessfull.
Does anyone know where I can find an example on how to do this?
Thanks!
TJ
Shared Library Assets :::: Sound Problem
Hi guy's
lstn i want to share some images and sounds between a couple of swf's
so what i did i make an swf containing all the assets and tagged the "Export for run time sharing"
the images worked like a charm, but the mp3's seem to have a mind of their own
when i placed the shared images on the time frame and tested the movie they didn't increase the size of the swf
however importing a shared mp3 into the time lime "making sure that all the parameters are correct" seem to have incresed the size of the swf ???
further more, if i removed the shared assets swf, and test the importing swf the images go red "as they should" but the sound will still be playing "they shouldn't " meaning that the mp3 was not imported from the shared library as it was supposed to be,
any suggestions?
Relative Path-names To Library Assets
Hi there
Having a few issues here with importing files to the library and trying to keep a relative pathname so as the files can be updated on various machines in the studio. (there are a few other methods of making this work, but I would really like to do it this way) Occasionally when I import png files to the Library and view their properties I will get a relative link, which is what I want, but most of the time the path is absolute, which means the files can only be updated on my machine. Does anyone know the method of importing that means the files keep a relative pathname.
I have found that when importing FLV files from the same place your fla is saved, you will get a relative link to that file, but import from anywhere else and the flv has a absolute pathname, I just can't find how to do it with PNG files.
Any help would be much appreciated
thanks
sinx
Access Shared Library Assets Via ActionScript?
Does anyone know if it is possible to have assets from a shared library accessed via ActionScript?
What I want to do is have bitmaps stored in the library of a flash movie. I'll assign them linkages and then publish the SWF (for example, to mymovie.swf).
I want to then be able to loadMovie("mymovie.swf"), and access the Bitmaps from the mymovie file using their linkage IDs, so that I could dynamically create bitmaps that were loaded from a separate flash library.
I do NOT want to have to import those bitmaps from within the FLA file at authoring time. Is this possible?
Flash Optimization - Shared Library Assets
Hello,
I would like to know how it works (in loading terms) a shared library asset... I think somebody who have been using this can give me a quick answer.
The thing, is to know how it works when you use loadMovie, from a movie which is using a shared asset... If the asset was not yet loaded, is the getBytesTotal computing this shared asset together? or may I have strange delays?
Once the asset is loaded, other movies can use it with no loading cost I guess...
Can anybody confirm that please?
We are in full production, and have not so much time for testing right now...
Thanks!
Bitmap Symbol Can Not Be Set To Use Imported Shared Library Assets
Hi Guys,
I have a problem to set a Bitmap symbol to use a shared library asset.
Here is what I am doing:
1. Imported a jpg file into library;
2. Right click on this Bitmap symbol, open the Properties window, Set this Bitmap symbol to import a shared asset;
3. publish
All other sysmbols(like MovieClip, graphic symbol, button) can be set to use the imported shared assets, but Bitmap symbol doesn't work. Any suggestion?
Thanks in advance.
Flash Library Assets Loading Into Flex At Runtime?
What is the best way to accomplish the following:
- User makes selection in simple form
- Based on selection, the Flex app would THEN load the proper swf
(library assets that are movieclips)
- Library movieclips (class instances) to be used in Flex containers as
needed
I understand and have tried the Flex to Flash Kit but i don't think this
is the route to go as this would load all the many swfs in at the start
of the app?? Also i could embed the movieclip symbols using embed method
but does this load the entire swf when first referencing a single class?
I'm thinking that using the Loader class is the way to go for this as I
could offer a preloader to client - but then not sure how to access
symbols?
I need help understanding how all these methods differ in terms of how
swf's are loaded and dealt with within Flex. Help!!!
Initializing Library Assets, Setting Up Stage Elements And Running Sequences...
Hello
I'm relatively new to AS3, but have decent experience with OOP PHP...I'm looking to get some advice or be pointed to some reading on an OOP approach to structuring Flash applications. More specifically...though I've read quite a lot lately on AS3 and OPP, I can't find many practical examples for the following:
1. Using an object to manage initializing library assets and setting up stage elements:
I know how the display-list works, and how to dynamically add library symbols to the stage, etc...But how about managing the initialization of all needed visual library assets when an application starts?
Having built AS2 projects, I was calling a function to load movieclips of various sorts from the library to the stage and set their initial state (x,y,alpha). Once on the stage, I'd reference another function to run certain animations coded for that movieclip, etc.
Any advice on abstracting this process would be great...even if it's your favorite chapter from your desert island AS3 book...or even a discussion on the structure of a document class for this type of purpose...
2. Using an OOP approach to building and running animation sequences:
Having done some coding in AS2, I was using various Tween class packages (Tweener or Fuse, etc) to build animation sequences. Using the same packages, can anyone advise me or point me to a discussion sequencing animation events using an OOP approach?
Looking around, I came across this class:
http://www.senocular.com/flash/actio...ts/Sequence.as
(This guy is great!). Perhaps this is the direction I'm looking for...can anyone explain or point me to a discussion on a practical implementation of this class?
I hope I'm making sense with the above questions...
Thanks in advance!
sd
Cache Loaded Assets
Hi everyone,
I was justr wondering if anybody could help me to cache my loaded swf.
I export 2 swf (one for the menu set such as a thumb menu and the other a thumb wall menu). Both are using the same xml and i would like to cache my swf as it is loaded by the 1 external swf (thumb menu set) so it will take not too long for the thumb wall to load the same set of swf again.
PLease does anybody know how to do this.
Thanks for any help.
Regards
Jerome
[cs3|as2]Positioning Loaded Assets After LoadMovie
Hi, guys.
This is probably a beaten subject but even after reading many post a couldn't understand how to go about it.
After doing the following:
PHP Code:
this.crateEmptyMovieClip("myMC",this.getNextHighestDepth());
myMC.loadMovie("image.jpg");
-would it be possible to set the _x and _y of image.jpg relative to myMC?
You see moving myMC and then loading the picture into it will not help me because myMC is to be scaled and manipulated, so its axis must be in the center of the loaded image.
Of course I can always create a childMC within myMC and load image.jpg into myMC.childMC, but I'd like to avoid that if possible.
Thank you.
Sharing Assets From Main Swf To Loaded Swf
I've been getting to grips with AS3 over the last couple weeks, generally getting used to it, and find it far superior to AS2.
Been racking my brains out trying to figure out the following though...
I made my own checkbox class which refers to a MovieClip in my main swf's library. I use "import checkboxMC" to import this from my library. This works perfectly within my main document class.
Where it all falls apart...
Aswell as using this class within my main document class, I also need to call it from an externally loaded swf (e.g. home.swf).
When I try and import and define a new checkbox in this separate .swf I can't even Publish it because Flash gives me:
"1046: Type was not found or was not a compile-time constant: checkboxMC."
"1180: Call to a possibly undefined method checkboxMC."
and...
"1172: Definition checkboxMC could not be found."
I can understand why/what it's doing, but how can I allow external SWF's to see assets defined in my main document?
Thanks in advance.
Actionscript In Externally Loaded SWF Assets
Can anyone explain the model for actionscript in externally loaded SWF assets? For example, suppose the stage owner uses methods from Class1 and that it loads an SWF file with an asset that also uses methods from that class. This means the code for Class1 is included multiple times in the application?
What is the best practice for such a situation?
Accessing Loaded Assets And Classes
Hey Everyone,
I'm building a completely OOP Flash AS3 application. It uses a scrolling list to populate pictures in a movieclip in the center. Here's what I'm trying to do:
I have a main file, which has nothing in it, to save on filesize. It loads in other swf files and assets as they're needed.
From my main file, I must be able to instantiate assets in the other files. (The movieclip in the center has a class: BLCircle) I want to be able to tell the file 'new Circle()'.
After the INIT event is fired on my loader, I try to instantiate the Circle class like so: "var circ:Circle = new Circle()" which SHOULD create a new instance of the Circle class onstage.
If I do this, it tells me I'm trying to access a null object reference.
Basically, how do I import these assets and classes into my main movie so I can just call "var circ:Circle = new Circle()" and add it to the display list?
- TK
Edited: 01/16/2008 at 11:38:27 AM by rfkrocktk
Actions In Library
Hi, in case of having scripts attached to objects in the library which do not appear at the stage, only when publishing, and using attach command - only then they appear : this actions (the ones attached to the obj in the lib) can be seen some place on work mode - through Movie Explorer i don't see them.
thanks in advance!
Maya.
Actions Of An Mc Which Is In The Library Only
hi, im adding an mc with ...attachMovie("item","item_"+i,i+1);
so the movie itself is nowhere visible on the stage, but i still want to give it actions.
the only place where i see it, is the library.
thanks.
Library Button Actions
how come if i bring in Faders from the common library, when i give it an action, ALL the otehr faders get the same action. is there a way to have each fader have an indvidual action?
what i want is to be able to use the fader as a button to load external .swf so when the drag the fader up or down, it loads the .swf
Common Library Button Actions
I've taken 4 instances of a common library button and want each to (1) on roll over, to display brief text describing what the user will encounter if clicked, and (2) to launch a movie when clicked. They only respond to the last command assigned. I'm dbl-clicking the instance, which, to my mind, is changing the symbol. When I just select a button (no dbl-clicking) and open the Actions panel, the On-Mouse Event is grayed. No locks are on. Also, when I choose a common library button, is a command from the Actions panel the only way I can assign actions to the diferent states of the button (vs. assigning in a frame (e.g., rollover) in the Timeline)?
Actions From Within A Loaded Swf
Help, please can someone tell me how i get my root timeline to stop at a certain frame from within a loaded swf, cos im having trouble with underlying buttons still being active through the loaded swf , any ideas?
Having It So Library Is Always Loaded
Is there a way I can set it so that the library is always there when I open Flash? Every time I had to reload it to access things and it's a window I feel that should always be there.
Loaded SWF Not Seeing Its Own Library
Hi all
I have a SWF (working fine on its own) that contains its code in class files and also a ComboBox and CheckBox component plus a pretty meaty exported font symbol. I'm trying to preload this SWF into another SWF because of the file size (120 K)
Im using a Loader to load in the SWF but when I compile the SWF containing the loader I get errors saying that it can't find the components in the class thats using them in the SWF im trying to load:
1046: Type was not found or was not a compile-time constant: ComboBox.
1046: Type was not found or was not a compile-time constant: CheckBox.
1180: Call to a possibly undefined method ComboBox.
1180: Call to a possibly undefined method CheckBox.
1172: Definition fl.controls:ComboBox could not be found.
1172: Definition fl.controls:CheckBox could not be found.
so I wonder why a SWF cant see its own library symbols once it gets loaded into another swf, because the application was working fine on its own! Ive tried LoaderContext but I dont really understand it. Any help would be appriciated!
Button Actions On Loaded Swf
I am loading in a menu bar swf into a main movie (main.fla) by using the following code:
_root.menubar_mc.loadMovie("menubar.swf");
This menu bar contains several buttons, one of which is called "exit_btn"
I would to put some action script inside my main.fla that responds to the buttons being clicked.
I have tried the following but it doesnt work
_root.menubar_mc.exit_btn.onRelease = function() {
trace ("exit button clicked");
}
Any ideas how I can get this to work?
Thanks
Paul
Loaded Swf's Losing Actions
Hello, I am using this great script that was provided by Claudio in this thread:
http://www.kirupa.com/forum/showthre...%20jpeg%20fade
I first tested it using my own images, then got an idea to use it to shuffle some swf's on a website I am developing. I tested it renaming any jpegs I was loading as swf's and changed the code to address loading swf's as opposed to jpeg's. This worked great as well.
Now, my problem is I have seven (actually 5 are done in my example provided) swf's that each have thier own things going on within them. When they are loaded into the main movie using the script that worked previously it loads the images (swf's) only...without any actions contained within each swf.
Can anyone please tell me why this is? Is there a possible workaround for this problem? Thank you anyone for taking the time to look at this.
The files which I am speaking of can be downloaded here.
Loaded Swf's Losing Actions
Hello, I am using this great script that was provided by Claudio in this thread:
http://www.kirupa.com/forum/showthre...%20jpeg%20fade
I first tested it using my own images, then got an idea to use it to shuffle some swf's on a website I am developing. I tested it renaming any jpegs I was loading as swf's and changed the code to address loading swf's as opposed to jpeg's. This worked great as well.
Now, my problem is I have seven (actually 5 are done in my example provided) swf's that each have thier own things going on within them. When they are loaded into the main movie using the script that worked previously it loads the images (swf's) only...without any actions contained within each swf.
Can anyone please tell me why this is? Is there a possible workaround for this problem? Thank you anyone for taking the time to look at this.
The files which I am speaking of can be downloaded here.
Attaching A Library MC From A Loaded Swf.
//on (release) {
// _root.main.attachMovie("att2", "newname2", 1);
//}
This does not work. Any help?
Trying to attach a movie clip from inside the Library to a blank MC on Main Stage from a loaded swf movie.
Is this possible?...or should my code work with better path.
M
[F8] Attaching A Mc From The Library Into A Loaded Swf
hey folks
I'm trying to do this
Code:
targetMC.attachMovie("bullet_bar", "bullet_bar", 20);
the targetMC is the location of another loaded swf file. the bullet_bar movieclip is in the library of my root swf
can this work cos I'm having a few problems
Attachmovie From Loaded Library
ello
I'm trying to load a movie into my main movie. What I need to know is is there any way I can access symbols that have been exported for actionscript in the library of my loaded movie from my main movie? (using either loadMovie or loadMovieNum)
I've tried just loading the movie and then using attachMovie in the main movie to attach a known exported symbol in the loaded movie with no luck. Should I be using a shared library?
Thanks
Accessing Loaded .swf Its Library
this question has been asked several times here… but still no solution for this
http://www.ultrashock.com/forums/showthread.php?s=&threadid=39682&highlight=loading+swf+library[/url]]thread 1[/url]
http://www.ultrashock.com/forums/showthread.php?s=&threadid=44161&highlight=loading+swf+library[/url]]thread 2[/url]
http://www.ultrashock.com/forums/showthread.php?s=&threadid=21845&highlight=loading+swf+library[/url]]thread 3[/url]
http://www.ultrashock.com/forums/showthread.php?s=&threadid=3984&highlight=loading+swf+library[/url]]thread 4[/url]
accordin to those threads its simply not done… loading an external swf in the main swf and accessing the external swf its library from the main swf…
but how do you load eg.
- external sound library?
do you load them as seperate .mp3 that you then attach to an object?
- external gfx library?
as seperate jpg/swf files directly in the mc you want? resulting that you cannot re-use that same gfx in ur main movie but that you have to reload it evry time?
- external 'app'?
an swf that uses library items for all sorts of gfx, or components. Dont tell me you have to put all those assets in the main swf, resulting in having a bigger file size for the main swf.
shared libraries has been mentioned as a solution… but that defeats the purpose of being able to change the loaded swf w/o changing the main swf
how do you people load your sections that are in seperate swf files and who uses the library items in those swf files?
Loaded Movie Into MC & Now Actions Don't Work
Ok this is my problem:
I have two movies A & B, both are realy entire movies with button actions, preloaders, and everything.
Now I press a button in movie A which loads movie B into a invisible MC (the invisible MC is one of those pseudo pop-up window designed in flash).
So movie B loads perfectly into the MC, everything is fine. But now none of the actions in movie B work, e.g. button anctions, preloaders, ect.
What am I doing wrong?
Very perplexed,
~ch33z
Actions On Loaded Swfs Not Working
hello all,
I'm having trouble getting some basic actions to work on a loaded swf. Would appreciate help or any ideas at all.
My problem (as best i can explain it!):
I load a swf into a blank movie clip named 'background' in my main movie. this background movie clip sits on the main timeline for the duration of the main movie. If i use a frame action in the main movie to make this background invisible - simply background._visible = false; - this will not work in the first frame where the background mc is. it will work in the second frame no problem, but not the first.
How do i get this frame action to work in the first frame that the background mc appears?
thank you,
skinny.
Running Actions From A Loaded Movie?
Greetings!
I have been working with Flash for the past several years, but I just ran into something that I thought should be sooooo easy and work right the first time, but it didn't. I've never had a need to do this before.
I am loading an SWF from a web server into an instance of a Movie Clip in my main timeline (_root). The loaded SWF replaces the Movie Clip. That's working just fine ... BUT ... I need to run action scripts from the Movie Clip I load into the _root to control the timeline of the _root, but They Do Not Work!
I have made a very simple file to test this which is attached. This is going to be a part of a larger application that will be checking to see if an internet connection is present. If the SWF loads from the web, then I want the _root timeline to gotoAndStop("CONNECTED");
I can watch the file load from the web and then the action script which is in the external file is suppose to make the _root timeline go to "CONNECTED", if not, then the _root timeline will continue to play until it gets to FRAME 75 where there is a stop(); action and the text changes to UNABLE TO CONNECT.
Here's what is in the SWF that is on the server;
FRAME 1-15
Just a simple shape tween to give something to look at
FRAME16-24
Same as above only tween is stopped
FRAME 25
_root.gotoAndPlay("CONNECTED");
FRAME 26-34
nothing
FRAME 35
stop();
THAT's IT!
VERY SIMPLE.
So why can't I get control of the main timeline that this SWF is loaded into by using action scripts contained in the SWF I am loading from the server?????
PLEASE HELP!
THANKS IN ADVANCE!!!!!!!
Assigning OnEvent Actions To Dyn. Loaded Mcs.
hi. i'm loading jpegs using the script below, and trying to assign an onPress action to each; the onPress doesn't work. what do i need to do differently?
Code:
i = 0;
onEnterFrame = function () {
if (i<24) {
i++;
this.createEmptyMovieClip("img"+i, i);
this["img"+i].loadMovie("m"+i+".jpg", "img"+i);
this["img"+i]._x = (i*600)-400;
this["img"+i]._z = i;
this["img"+i]._y = -50;
}
};
for (var k = 1; k<=24; k++) {
this["img"+k].onPress = function() {
getURL("mF"+k+".jpg", _blank);
};
}
Timeline Actions Ignored When Loaded Into Parent Swf.
If I have a movieclip in my library with some animation on the timeline and actions as well (stops, calls to other methods, etc.) and at runtime I add this clip to the display list, everything works as expected. The actions in the timeline of said clip are fired.
If however, I load this file into another swf all the actions in the movieclip are ignored.
Attached is a demonstration of this behavior. simply runnning Child.swf on it's own will show nothing as there is a stop on the first frame of the attached clip. However run the Shell.swf (which loads Child.swf) and you'll see the animation of the movie clip. There are no calls anywhere telling anything to start playing. What's worse, the method call further down the timeline and the stop and the end of the timeline are also ignored. Compiling these files and looking at the Output window, you'll see the trace from the method "__testCall" is never fired.
Anybody else experience this?
Is this a bug with the Flash Player?
EDIT: I've had to use addFrameScript as an alternative to actually having the actions on the timeline. lame.
Thanks for reading.
k.
Actions In Loaded Movie Don't Work
Greetings,
I'm sure this has come up before, but I can't seem to find the answer anywhere. Does anyone know why some actions don't work in a loaded movie. For instance, you have mc1.swf and mc2.swf, mc1 is where the main content is, and mc2 has the following actions:
PHP Code:
this.createEmptyMovieClip("emptyMC", 1);
emptyMC.loadMovie("mc1.swf");
When mc1 gets loaded into emptyMC, certain actions like stop(); don't seem to work and mc1.swf just plays no matter what you do. Other actions don't seem to work either, like _currentframe or _totalframes. If you put those actions into the movie to be loaded, when flash gets the current frame, it gets the current frame of the movie that just loaded it...sorry, kind of hard to explain but I think you get the idea.
Eric
Actions In Swf Not Responding Once Loaded Externaly?
hi, i have an swf, which has a bunch of buttons here and there. when i test it on its own it works fine, but once i test it being loaded into my main swf file, it loads fine, but the buttons dont work anymore. the hand cursor doesnt even show.
how can i fix this?
thanmks
|