Runtime/library Sharing 'Type Was Not Found' Error
Hi People
I am trying to create a shared library with runtime sharing so that I can update the interface for an online assessment program globally. I can import items from the shared library OK but once I give something an instance name I get the following error (questionInterface being the movieclip in question here):
1046: Type was not found or was not a compile-time constant: questionInterface.
I'm not sure what is causing this so if anyone knows a fix I will be very grateful.
Thanks
ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0
Posted on: 12-07-2008, 10:34 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Advanced Question On Runtime Sharing Of Library Items
hi,
i have this problem: i have a swf-file that gets displayed. in this i want to use library items from other .swf-files. when i do "loadMovie(MC, n)" i cannot use them or i haven't figured out how to. please tell me how i can do this:
_root.attachMovie([loaded movies library item]"mc01","mc_from_other_file",1000)
thank you very much.
Error 1046: Type Was Not Found...
When I try to compile my code below, I am getting the error 1046.
I'm not an OO guy with AS3 so I could use some help!
I'm using Flex Builder 3 Pro for what it's worth.
And what I *want* to do - is extend the email validation class and add some code to it so that I see a tooltip throughout the time the user is typing in the box.
Code:
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" xmlns:ns1="*" verticalAlign="middle" horizontalAlign="center" currentState="Login"
xmlns:flexlib="http://code.google.com/p/flexlib/"
xmlns:ns2="flexlib.containers.*" xmlns:ns3="flexlib.controls.*" xmlns="*" xmlns:ns4="com.flexcapacitor.controls.*"
xmlns:iv="InstantValidators.*">
Of course, I do an import:
Code:
import InstantValidators.EMailValidator;
Definition that does *not* work:
Code:
<iv:EMailValidator
id ="emailValidator"
trigger="{username}"
triggerEvent="change"
source="{username}" property="text"
/>
Change it to:
Code:
<iv:EMailValidator />
which compiles with no problem.
And finally, my package:
Code:
package InstantValidators
{
import mx.validators.Validator;
import mx.validators.ValidationResult;
public class EMailValidator extends Validator {
// Define Array for the return value of doValidation().
private var results:Array;
public function EMailValidator () {
super();
}
override protected function doValidation(value:Object):Array {
// Clear results Array.
results = [];
// Call base class doValidation().
results = super.doValidation(value);
// if there are errors then display it in a tooltip
// Create the ToolTip instance.
var pt:Point = new Point(value.x, value.y);
pt = target.contentToGlobal(pt);
var errorTip:ToolTip = ToolTipManager.createToolTip(value.errorString, pt.x + value.width + 5, pt.y) as ToolTip;
errorTip.setStyle("styleName", "errorTip");
errorTip.visible = true;
return results;
}
}
}
I have the code for package in a file called "EMailValidator.as" and it's located in a folder at the same level as my project.
Any ideas what might be wrong?
G-Man
Help With Error 1046: Type Was Not Found...
i have defined a custom object in a .as file as follows:
Code:
package com.xl {
public class Question {
public var qText:String;
public var qAsker:String;
public var qAnswers:Number;
public var qCat:String;
public var qTimestamp:String;
public var qURL:URLRequest;
public function Question(PqText:String, PqAsker:String, PqAnswers:Number, PqCat:String, PqTimestamp:String, PqURL:String):void {
qText = PqText;
qAsker = PqAsker;
qAnswers = qAnswers;
qCat = PqCat;
qURL = new URLRequest(PqURL);
}
}
}
i access this class in a test program as follows:
Code:
import com.xl.Question;
var q:Question = new Question("Text","Asker",5,"Cat","TS","http://www.google.com");
trace(q);
I get an error that says
1046 Type was not found or was not a compile-time constant: URLRequest.
I looks like when I create the an instance of Question, it doesn't know how to create a new URLRequest when the object is instantiated.
Help is appreciated greatly.
Error: Type Was Not Found Or Was Not A Compile-time Constant
This is my first time using flex. I tried compiling the scripts below using
mxmlc example.mxml
And I get:
Error: Type was not found or was not a compile-time constant: UIMovieClip
This is on a windows machine. If I type just "mxmlc" I get that I'm using version 3.1. Some please help?
Attach Code
example.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
click="draw()"
>
<mx:Script>
<![CDATA[
import mx.flash.UIMovieClip;
public function draw():void {
var container:UIMovieClip = new UIMovieClip();
var test:GraphicsExample = new GraphicsExample();
container.addChild(test);
addChild(container);
}
]]>
</mx:Script>
</mx:Application>
------------------------------------------------------------------------------
GraphicsExample.as
package{
import flash.display.DisplayObject;
import flash.display.Graphics;
import flash.display.Shape;
import flash.display.Sprite;
public class GraphicsExample extends Sprite {
private var size:uint = 80;
private var bgColor:uint = 0xFFCC00;
private var borderColor:uint = 0x666666;
private var borderSize:uint = 0;
private var cornerRadius:uint = 9;
private var gutter:uint = 5;
public function GraphicsExample() {
doDrawCircle();
doDrawRoundRect();
doDrawRect();
//refreshLayout();
}
private function refreshLayout():void {
var ln:uint = numChildren;
var child:DisplayObject;
var lastChild:DisplayObject = getChildAt(0);
lastChild.x = gutter;
lastChild.y = gutter;
for (var i:uint = 1; i < ln; i++) {
child = getChildAt(i);
child.x = gutter + lastChild.x + lastChild.width;
child.y = gutter;
lastChild = child;
}
}
private function doDrawCircle():void {
var child:Shape = new Shape();
var halfSize:uint = Math.round(size / 2);
child.graphics.beginFill(bgColor);
child.graphics.lineStyle(borderSize, borderColor);
child.graphics.drawCircle(halfSize, halfSize, halfSize);
child.graphics.endFill();
addChild(child);
}
private function doDrawRoundRect():void {
var child:Shape = new Shape();
child.graphics.beginFill(bgColor);
child.graphics.lineStyle(borderSize, borderColor);
child.graphics.drawRoundRect(0, 0, size, size, cornerRadius);
child.graphics.endFill();
addChild(child);
}
private function doDrawRect():void {
var child:Shape = new Shape();
child.graphics.beginFill(bgColor);
child.graphics.lineStyle(borderSize, borderColor);
child.graphics.drawRect(0, 0, size, size);
child.graphics.endFill();
addChild(child);
}
}
}
Error 1046: Type Was Not Found Or Was Not A Compile-time Constant: Event.
Can someone please help with this. I am getting an error saying that Type was not found or was not a compile-time constant ... and I have no idea why.
It doesnt seem to like this line:
function LoadXML(e:Event)
... any help would be greatly appreciated
ActionScript Code:
package {
import flash.display.MovieClip;
public class DealerLocator extends MovieClip {
public function DealerLocator():void {
init()
}
public function init():void {
var xmlLoader:URLLoader = new URLLoader();
var xmlData:XML = new XML();
xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
xmlLoader.load(new URLRequest("dealers.xml"));
}
function LoadXML(e:Event) {
trace("LoadXML")
xmlData = new XML(e.target.data);
displayDealers(xmlData);
}
function displayDealers(dealerInput:XML) {
var dealers:MovieClip = new MovieClip();
dealers.x = dealers.y = 50;
addChild(dealers)
var dealer:acuraDealer = new acuraDealer();
dealers.addChild(dealer)
dealer.dealerName.text = "dealerName"
}
}
}
Runtime Sharing Problem - Sharing Swf Unknown At Compile Time.
Hi All
I use run time sharing extensively in a lot of my flash projects but I can't get it to work in this case.
Usually I have main.swf and elements.swf. Elements.swf has movie clips that I drag into main.swf and it all works fine.
However, I am now working on a site that is to be used for many different clients of our client. There will be one main.swf that is set up with an xml config file to look different depending on which client it will be used for.
This config file specifies which content to load, colours ect but also which swfs to load with shared movie clips in.
In this case elements shared in clientButtons.swf are unavailiable in main.swf. I assume that this is because I have not dragged elelemts from clientButtons.swf to main.swf at compile time.
Is there any way of getting main.swf to load clips from clientButtons.swf without specifying clientButton.swf at compile time.
Many thanks.
FME Runtime Library Error: Flvmuxoutpin.cpp
I am trying to publish a stream from a USB webcam. I get the following error when I press the "Start" button.
Assertion failed!
Program: FlashMediaEncoder.exe
File:.flvmuxoutpin.cpp
Line: 1044
Expression: stop_reftime >= start_reftime
For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts
You can see a screenshot here: FME Runtime Library Error
When I use a firewire connected camcorder, I do NOT get this error. Any advice? This is a repeatable issue.
Error 1046: "type Was Not Found.." While Loading External .as File
I am trying to access a class "Loadxml" of an external package "xmltxt" in my main movie.
But I get error messages 1046: Type was not found or was not a compile-time constant: Event. If I comment out the event Listener I still get that 1046 error, now it is missing the constant URLLoader. What is going on? How do I make my xmltxt.LoadXML.as accessible?
I just finished the tutorial by Victor on AS3 and boldly wanted to use the same approach but it doesn't work!!
Thanks for any hints!
this is the code in my main document class:
Code:
package com.myCompany.documentClass{
import flash.display.MovieClip;
import com.myCompany.xmltxt.*;
public class DocumentClass extends MovieClip {
private var _XMLContent:Loadxml;
public function DocumentClass() {
trace("Document CLass instantiated");
_XMLContent= new Loadxml();
addChild(_XMLContent);
}
}
This is the code that I am trying to access.
Code:
package com.myCompany.xmltxt{
import flash.display.MovieClip;
public class Loadxml extends MovieClip {
var allTxt:XML = new XML();
var xmlLoader:URLLoader;
function Loadxml() {
trace("LoadXml is initialized");
//specify the location of the external XML
var urlRequest:URLRequest=new URLRequest("testxml.xml");
///create object to load external data using the built-in class URLLoader
xmlLoader=new URLLoader();
//Register to be notified when the XML finishes loading
xmlLoader.addEventListener(Event.COMPLETE, completeListener);
//Load the XML
xmlLoader.load(urlRequest);
}
function completeListener(e:Event):void {
allTxt = new XML(e.target.data);
trace(allTxt.toXMLString());
}
}
}
Keep Getting A "1046: Type Was Not Found.." Error HELP
Hi i am trying to code a new portfolio website of mine in FLASH CS3 using Actionscript 3 and i want the content to appear gradually when the user presses one of the buttons. I wanted to do this by changes the aplha gradually to all the content to slowly emerge, however when i am trying to run a test on the first button i keep getting this error"1046: Type was not found or was not a compile-time constant: Void." and that appears 3 time in the error window one error for the 3 different parts of the code. I have posted my code below and hopw you can help.
Also i was wondering if any one new how to make it so when the user clicks on another button the site would 1st slowly make the current content disapear and then make the new content slowly appear. thanks.
ERRORS:
1046: Type was not found or was not a compile-time constant: Void.
1046: Type was not found or was not a compile-time constant: Void.
1046: Type was not found or was not a compile-time constant: Void.
Code:
stop();
webCent.alpha = 0;
var targetAlpha:Number = 1;
bttn1.addEventListener(Event.CLICK, bttn1Click);
function bttn1Click(evt:MouseEvent):Void{
addEventListener(Event.ENTER_FRAME, fading);
function fading(evt:Event):Void{
webCent.alpha += ( targetAlpha - webCent.alpha) * easing;
}
}
Keep Getting A "1046: Type Was Not Found.." Error HELP
Hi i am trying to code a new portfolio website of mine in FLASH CS3 using Actionscript 3 and i want the content to appear gradually when the user presses one of the buttons. I wanted to do this by changes the aplha gradually to all the content to slowly emerge, however when i am trying to run a test on the first button i keep getting this error"1046: Type was not found or was not a compile-time constant: Void." and that appears 3 time in the error window one error for the 3 different parts of the code. I have posted my code below and hopw you can help.
Also i was wondering if any one new how to make it so when the user clicks on another button the site would 1st slowly make the current content disapear and then make the new content slowly appear. thanks.
ERRORS:
1046: Type was not found or was not a compile-time constant: Void.
1046: Type was not found or was not a compile-time constant: Void.
1046: Type was not found or was not a compile-time constant: Void.
Code:
stop();
webCent.alpha = 0;
var targetAlpha:Number = 1;
bttn1.addEventListener(Event.CLICK, bttn1Click);
function bttn1Click(evt:MouseEvent):Void{
addEventListener(Event.ENTER_FRAME, fading);
function fading(evt:Event):Void{
webCent.alpha += ( targetAlpha - webCent.alpha) * easing;
}
}
[F8] Possible To Set Runtime Sharing Path At... Runtime?
After a weekend of pulling my hair out on this problem it looks like the paths for runtime sharing are relative to the HTML page, not the SWF. This is a problem because the client wants to be carefree in distributing the SWFs around the server. (In fact is demanding it.) So I need a way to set the runtime sharing path at runtime.
Or put another way...
"child.swf" is looking for fonts and graphics in "master.swf" If I move them all (including "master.swf") to some/random/folder/ and embed them from a HTML page at /a/different/folder/ the linkage breaks, even though the files load fine. (The paths to the SWFs are sent via XML.)
Any ideas? I really can't hard-code this and I probably can't compile new versions each time they feel like moving stuff around.
Worst case I'll skip the runtime sharing, but it would make the files needlessly big and slow.
(Publishing to Flash 8 AS2)
Weird "Type Coercion Error" At Runtime
Here is my application described in detail:
1. HTML Wrapper has two frames:
· left frame is an HTML menu displaying a two items
· right frame displays a swf file (Flash 9, AS3.0) which has two scenes
Clicking on a menu item on the left rewrites the HMTL page in the right frame, reloads the swf and displays the corresponding scene.
2. Flash application
· There are two symbols in the library:
- george, associated class: George, base class: Guy (custom class, extends MovieClip)
- mike, associated class: Mike, base class: Guy (same class as above)
· An instance of george is placed on Scene1 and named aGuy.
· An instance of mike is placed on Scene2 and also named aGuy.
The file compiles correctly. I am running the swf in the HTML wrapper. When I click on a menu item, the swf is supposed to reload and change scenes. The following Flash 9 Player Error is thrown:
"Error #1304: Type coercion failed: cannot convert Mike@8160539 to George".
The error happens consistently one some machines and not at all on others.
The description above is much simplified. In reality I have close to a hundred symbols in the library all based on the custom Guy class so creating a separate custom class for each is out of the question. The instance on each scene must have the same name aGuy.
Any idea, anyone?
Help is much appreciated.
yr-cq
Edited: 10/22/2008 at 09:32:16 AM by yr-cq
How Do I Preload Runtime Shared Libraries Without "import For Runtime Sharing"?
Hi, i have a big shared font library. I want all the font symbols to reside in fonts.swf. I have a loader.swf loading main.swf, and fonts.swf. Even though fonts.swf loads completely, the fonts aren't available to main.swf. I don't want to choose import for the font symbols in main.swf, because that will make Flash compile fonts.swf every time I publish main.swf, won't it? How can I get main.swf to use fonts in fonts.swf without "import in first frame"?
Thanks!
Runtime Sharing :: Url?
Do runtime shared library symbols NEED to be posted on a server with a fully qualified URL in order to work? You can't just use the name of your library swf if it resides in the same folder as your other SWF's?
Runtime Sharing
Hi
I have one swf (main.swf) with a list with let's say 20 buttons, each of which will load an image into a container to the right of that list.
Since there will be 20 images I thought I would stream them in order not to have to load a 800KB file.
So I have another SWF (pics.swf)loading silently inside the main swf with all the pics in the timeline every 5 frames, and in every keyframe an action to make visible the button that calls the corresponding pic.
This way the buttons show "loading image" and when pics.swf stream every button is make clicable and displays "image loaded".
I have no problems with this part, but with what's next.
Buton1 must be able to call pic1 from the library of pics.swf and it must appear immediately since that pic is already loaded (I guess)
I think I must use attachMovie but I don't know how to do it properly.
Also must the pics be inside a MC? Do the pics have to be exported for runtime sharing?
Someone who has done this before may be can point me to the right way.
Thanks
Runtime Sharing
Hi,
Is it possible to pull in Shared Library assets at runtime, not using the IDE, but only using an application compiled with the MXMLC compiler?
Regards, snapple :]
Runtime Sharing?
is it possible to "attachMovie" a movie clip that is from a external swf file? is it known the technique of runtime sharing? I think if it is like the case of importing functions in DLL file to a exe program. How to do that in Flash 8 professional?
Your helps are highly appreciated.
Regards,
pixelmana
AS3 & Runtime Sharing
hi,
i've made the following simple test:
in a movie called 'sharedLib' i've crated a MC containg some graphics, and
in its linkage dialog-box i've checked all the 3 'export' check-boxes, named
the class 'myIcon', and in the url put 'sharedLib.swf' (the base-class was
automaticaly set to 'MovieClip'). in another movie, called 'destination'
i've added an empty MC, placed it on the stage, and checked the 'import for
runtime sharing' check-box in its 'linkage' dialog-box, named the class
'myIcon' and in the url put 'sharedLib.swf'.
when previewed the graphic from 'sharedLib' is seen in 'destination'.
however, when i add the following code to the 'destination' first frame -
var newIcon:MovieClip = new myIcon();
i got a compile error saying 'call to a possibly undefined method myIcon'.
so how do i approach a runtime-shared clip?
btw - when i turned both movies to AS2 and changed the code to
'this.attachMovie(...)' it worked fine.
thanks in advacne,
eRez
Runtime Sharing
Last edited by Markosef : 2004-02-17 at 09:38.
I have a problem with using runtime sharing MC's. I want to attach them to _root but i just cannot do that. When i drag them on stage they appear with no problems but that's not what i want to do. I want to use outside library of MC's and then attach those MC's when needed. How do i do that?
Export For Runtime Sharing
I created a shared library for the following website.
http://www.dicotaus.com
For some reason when you load different sorts, which are
linked to the shared libraries the images and text take
a few extra seconds to load.
I am using MX and I have a preloader which looks like this:
perc = Math.round((_parent.getBytesLoaded()/_parent.getBytesTotal())*100);
xperc = perc/100;
barlength = 200;
if ((perc == 100) and (bar._width == barlength)) {
_parent.gotoAndPlay(2);
} else {
nperc = perc+"%";
bar._width = barlength*xperc;
bar._x = -100+(bar._width/2);
}
Please check out the site to see the problem before you email.
fredsega@telocity.com
Export For Runtime Sharing
If i have a swf file in which i have 100 MC's and in every one there is a picture, if i exported them for runtime sharing, will all of them be loaded when i need just one, or will just that MC be loaded?
I have main swf and that other swf with data in many different MCs, what i need is to load just 15 MC's max and other to be left alone, how can i achive that?? will exporting for runtime do the trick ?
Local Runtime Sharing URL?
I want to share a font between multiple local swf.
I imported the font into a library and I have checked "Export for runtime sharing" in the Linkage. But I don't know what to write in the URL to use. The linked swf and swf that use it are in the same folder.
Thx
CFK
Runtime Sharing Problem
Hello,
I have make a main swf with a component
exported for runtime sharing.
From a loaded swf on the main i can use the
component anytime without having to reload it.
No problem! It works fine.
I made all of them in FLASH MX.
When I publish my movies from FLASH MX 2004
and do the simulate download the external swf seems to reload the component.
What is going wrong.
Please Any help???
Thank you in advance.
Runtime Sharing + Sounds
i have found out that all sounds that i use with ATTACH are beeing pre-loaded in first frame which makes my preloaded animation usless!
so i tried to load sound from another file under a URL like in the
flash help but it didnt work (using runtime sharing!!!)
does any 1 knows why?
thnaks in advance
peleg
Runtime Sharing Problem
I wonder if anyone can help me on this. My testing is simple...In program A where it attach textArea component, there is no physical textArea component in the library, just the runtime shared asset link (with url) to point program B which holds a list of CS3 components.
In Flash 8, I've no issue in creating runtime-sharing swf for movieclips and components. But now, this isn't working anymore in CS3. My reason of using runtime sharing swf is to reduce the bandwidth.
Would appreciate your help. Thank you.
Question Runtime Sharing
I can't believe I'm stuck on something so simple -
I'm new to CS3 and I'm trying to share library assets between swfs and add them to the stage at runtime
in AS2 i used to say
_root.attachMovie("mc", getNextHighestDepth())
In AS3 i say
var instance:MovieClip = new mc();
addChild(mc);
it says variable mc cannot be found
When I look in the help it talks about linkage identifiers, which AS3 doesn't use any more.
Is it to do with the automatic class file creation?
Problem With Runtime Sharing
hi all
i have a problem with flash runtime sharing. i have about 30 sharing components which are linked by a single fla file [named main.fla].
the problem is that lately from time to time the flash IDE had crashed when i had tested main.fla. when i regressed to an earlier version it did not happen.
as the code grew larger and larger the crashes became more frequent up to this moment where a crash is almost absolutely likely to happen.
i tried singling a problematic linked swf file but it seems that no single swf file is to be blamed.
i regressed to the early version [which has the same number of linked components] and nothing crashed. as i recompiled more and more of the newer versions crashes started to appear and the more newer compiled components i introduced the more frequent the crashes became.
this affects both flash IDE and flash Active-X control yet does not affect flash player.
flash IDE - flash 8 pro
flash player - flash 8
flash activeX - flash 9
if anyone has any idea how to solve this problem i'll be more then grateful as it made the development of project come to an halt
thanky you in advance.
Symbol Runtime Sharing
first time using runtime sharing, and i found that the sharing symbol are not load when the swf start,
it only load the symbol(swf) when required by next frame.
my questions is:
1. is there any way to get notice that the shared library(swf) are being loading (AS3.0)?
2. how the runtime sharing actually work? as the Flex external link which load the swf into same ApplicationDomain?
thankyou very much
Export For Runtime Sharing?
I have an external movie that I want to load on my web page.
The 'internal MovieClips' for my 'external swf' have the folling LINKAGE settings: "Exported in first frame".
The reason I have told the movie clips to be exported into the first frame is due to the fact that they will not load if I dont make their linkage settings as such.
Should I use Runtime Sharing?
I have read the flash help file about runtime sharing but do not know exactly what exactly it means & how I should apply it to my online flash web page.
Does anyone know how I can apply this to my site in order for it to become quicker & smoother?
It is a problem because my preloader will not display before the movie is loaded because all my BMP Movie Clips are being exported into the first frame.
Any help or advice would be much appreciated. Whenever you load movies on a web site that are big in size what method of preloading do you use?
Really really need help
Linkage / Runtime Sharing
MX04 Pro | AS2
Lets say i have two movies.
1.swf (contains movie clip in library with linkage ID "thing")
directory/2.swf
Inside of 1.swf I load 2.swf inside of a emmpty movie clip.
On the root of 2.swf I attach the "thing" from 1.swf's library:
Code:
attachMovie("thing","test_mc",this.getNextHighestDepth());
Nothing happens. The movie is not attached.
Do i need to use runtime sharing? Or am I missing an extra undocumented parameter. Because everything i've read on runtime sharing, specifies both movies in the same directory so i'm trying to avoid it. >.<
Using Sound Via Runtime Sharing
I tried to use shared Sound from main movie. (Import for runtime sharing)
But for attachSound must be the Sound in the library of the same SWF.
Is there any way how to use once loaded Sound from main SWF for external SWFs?
I mean the similar way how we use shared Fonts, Graphic, etc.
Runtime Sharing VS ApplicationDomain
Does anyone know how runtime sharing (through linkage properties) and sharing classes through applicationDomain class are related?
I feel that they're the same, but runtime sharing through linkage is made mainly for non-programmers, do provide a GUI of sharing classes. Is this true or not?
Im interested in using the linkage properties but the only prob facing me is that the URL of the shared file must be hard-typed (and can't be changed dynamically). I want it to change dynamically so that my main application file can choose from within different shared asset files (URLs), same concept as a CSS file, where each shared asset will give a different view/appearance/style for the application
Thanks!
Export For Runtime Sharing?
I have an external movie that I want to load on my web page.
The 'internal MovieClips' for my 'external swf' have the folling LINKAGE settings: "Exported in first frame".
The reason I have told the movie clips to be exported into the first frame is due to the fact that they will not load if I dont make their linkage settings as such.
Should I use Runtime Sharing?
I have read the flash help file about runtime sharing but do not know exactly what exactly it means & how I should apply it to my online flash web page.
Does anyone know how I can apply this to my site in order for it to become quicker & smoother?
It is a problem because my preloader will not display before the movie is loaded because all my BMP Movie Clips are being exported into the first frame.
Any help or advice would be much appreciated. Whenever you load movies on a web site that are big in size what method of preloading do you use?
Really really need help
To Use Or Not To Use Runtime Sharing Components...
So I'm doing a website... (who isn't? ;)) and I'm trying to decide whether or not to use runtime shared components (using AS 2.0)
I really like the modularity aspect of the shared components, but here's a couple problems that I've come across while using them - hopefully somebody else here has come across these too and found a nice solution to it.
Problem 1
It's great that by using shared components, the footprint of the main .swf file doesn't get bigger... Or is it? Because the footprint doesn't change, you can't really have a true 2 or 3 frame preloader at the beginning of the movie (checking the getBytesLoaded vs. getBytesTotal) as it no longer gives an acurate value... What happens if, say, my imported component is rather large and hasn't completely loaded by the time I try accessing it from client code (in the main .swf file)? Has anyone figured out a nice solution to figure out bytes loaded vs. bytes total while using shared components?
Problem 2
This one's kinda weird... It seems that if I have multiple shared components, each one must be loaded on a seperate frame. If I place multiple shared components in a single frame, only the constructor for the topmost component will fire... WTF? Is this a bug with the 2.0 framework? I don't seem to remember ever having an issue with this using good 'ole Object.registerClass's.
By posting this, I'm hoping either to a) find someone who has come across these problems and found a solution to them, or b) spark some conversation and attempts to find clean solutions to them...
Thanks in advance,
AtomicChip
-----------------------------------------------
"The night sky over the planet Krikkit is the least interesting sight in the entire universe."
-Hitch Hiker's Guide To The Galaxy
Preloading With Runtime Sharing
hello, if i create an empty movieclip, then change the linkage to import a certain swf for runtime sharing. if i preload the main movie, does the imported swf get counted? or do i have to preload the imported swf / swfs as well? thanks.
AS2 - Export For Runtime Sharing?
Hello Friends,
1. I would like to know how to use Export for runtime sharing option in ActionScript 2.0.
2. Problem I am facing right now is that we had designed one application in which we had used font from library, when we check the option export in first frame application works fine but it slowdown loading process like preloader shows its status after 40-50%. And when we un-check Export in first frame loading works fine but application doesn't show any font.
I would like to know if Export for runtime sharing could solve our problem in loading fonts when need and how to use this(Export for runtime sharing) option.
Thanx in advnce
Buttons And Eksport For Runtime Sharing
My buttons that I export for runtime sharing doesn't work properly in the exported movie. Either they doesn't do anything or they act wrongly.
Any ideas what the problem is?
Import For Runtime Sharing Question
Hi,
I am using the "import for runtime sharing" for one of my assets (a external .swf) in my main movie, this is because I want to share some of the external .swf's assets with multiple movies.
Here's my question: When I place an instance of the imported movie on the main timeline of my main movie, it does not look like its size is taken into account in my preloader (getBytesTotal()). I need to make sure that it is loaded prior to starting the movie. Do I have to use attachMovie() and check it for being preloaded separately?
Thanks
Export/import For Runtime Sharing
I have an experimental Flash movie that opens through a series of windows of a specific size. The main bulk of the movie is in the last window, but i want this information to preload in one of the earlier windows. i'm almost sure this has something to do with export/import for runtime sharing, but i don't really know how to use that, that's the first part of my question. The second part is, if i export in the first frame (assuming i'm supposed to export instead of import) what's the point in doing this if all the items are exported before the preloader? i don't want to fool with the load in _leve01 crap. This project isn't complicated enough to warrant that kind of coding. you can go to http://www.design-ninja.com/wednesday/enter.html and see the movie and that might help answer my question. i hope this is worded clearly enough. Thanks for your help
Importing Objects For Runtime Sharing
i'm having some trouble importing objects for runtime sharing. i right-click on the object in the library, select linkage, check import for runtime sharing, and specify the URL of the movie that exports the object.
the URL, in this case, is main.swf, but if i type that into the URL field, click ok, and then reopen linkage, the URL field is blank!
if i input any other URL (e.g. main1.swf or whatever.swf or even fkgjfkjg), the URL will remain there. for some reason, it won't let me specify main.swf.
anyone know why??
i've done it before, why can't i do it know?
Runtime Sharing & External Swf Files
I'm making a flash movie that has a pallete of objects (movie clips) which you can basically drag out onto the screen and create a picture. This has been working seemlessly...until I decided that it would be a good idea to have external pallete that you could load in. I can get the "palletes" (swf files) to load in and share their respective movie clips. However, they seem to only work if I load the new movie into root (which will not work, as it will replace all the current content) or if i load the new movie into another "holder" movie clip and then spawn that movie's movie clips inside "holder" (which also will not work for me, as i need to use these clips in the main stage with others).
Does anyone have any ideas to get around this. Suggestions?
Runtime Sharing - Selective Loading?
I'm making a puzzle game. Each puzzle's symbols have their own swf and are set to export for runtime sharing (in the first frame). In the main movie, each puzzle has its own frame where its symbols are just offscreen so that they can be employed by attachmovie later. And that pretty well works, but I have a problem.
I want for the order of the puzzles to be randomized and for each singular set of symbols to be loaded as needed. I thought that by going directly to just the frame with the chosen puzzle and then skipping ahead of the rest to the interaction, that only that one set would load. Regardless, all the puzzles load even though most don't have their frames visited. Rather than the user downloading 100k at a time, he's got to get all 3 mb!
What can I do to achieve the effect I want?
Thanks in advance,
PigFiend
Dynamic Import For Runtime Sharing
Hi;
how is it possible to create a movie clip using action script with "Import for runtime sharing" set?
Or how to type a variable name instead of movie name in the textfield that appears when you set a movieclip to "import for runtime sharing"?
Thank you
Erasmose
What Is 'export For Runtime Sharing' For? And Bar 'URL Link'?
what is 'export for runtime sharing' for?
according to this tutorial: http://www.flashkit.com/tutorials/Dy...-677/more3.php
it seems the function is the same, with both i am able to load library files (graphics, audio, MC and buttons), though why is this tutorial saying http://www.flashkit.com/tutorials/Dy...-677/more3.php
that only movieClips can be exported ? :-s
Also when d'ya use the bar: AS 2.0 Class?, which lies below 'identifier'.
question 3:
what is the bar: 'URL link' for when selecting the character tool / text tool. in the property inspector
[F8] Import For Runtime Sharing W/ _levels
hi guys,
I'm having trouble importing a library for my swf. I have a directory system where the library sits in one directory, the swf (we'll call B) that uses the library is in another, and the shell (A) swf that loads swf B into it is in yet another.
if I publish swf B alone, it imports the library just fine
but when I try to run the shell, swf A (also changing the URL in the linkage for the movie clip that's importing the library in B since if I don't it seems to look for the library in the wrong directory), it just hangs.
Is there something special I have to do if I'm trying to import a library into a swf that's sitting on a _level other than 0?
Thanks
[CS3,AS2] Runtime Sharing Vs Load Movie?
Hi guys,
I'm in the process of splitting a game up into assets, and I'm wondering what the difference is between using export for runtime sharing and just plain loading a movie? what are the advantages of using one versus the other, when I should use each, etc
Runtime Sharing Font Problem
I have an external swf that holds my font, an import clip, and an export clip
the import clip has import for runtime sharing checked and the location of the swf typed in there
the export movie has the import movie inside it and export in first frame checked
I have it set up like this so that the movie im sharing the font from can call any number of font movies, and load them in directly.
The problem is... is that if i use a relative path such as flash/fonts/myFont.swf it works, but the browser recursively loads the font in over and over..up to thousands of time ( i can see this in safari's acticity window)
But if i used the actual url such as http://myServer/flash/fonts/myFont.swf I don't have this problem at all
has anyone ever seen this problem before? or know a way around it
Import For Runtime Sharing Problem
I'm getting strange behavior from "Import for runtime sharing" in flash 9.
I have a gallery of swfs. Each swfs share 12 elements on a succession of frames. There is a transition between on item to the next so I'm using a system that swaps holders for any 2 live items. When the user enters the gallery, the first item is always loaded, thus this is where the 12 elements are exported from. Since all of the swfs live in the "swfs/360s/" directory. The url I use to import from is "swfs/360s/c1.swf".
What is happening is that everything works fine, when I go from the first item to another item in the gallery - the 12 elements show up fine in the second item that is using imported elements. My problems arise in subsequent views, after the initial swf has been unloaded.
When I go to the third swf i get errors on every frame.
ReferenceError: Error #1065: Variable S08 is not defined.
ReferenceError: Error #1065: Variable S09 is not defined.
ReferenceError: Error #1065: Variable S10 is not defined.
The S08,S09,S10 are the imported Objects that aren't accessible now that the initial swf is gone. Does this mean that you have to keep the shared library loaded in order to use it? That's not how I have understood shared libraries to work.
Thanks for any thoughts
|