Getting Properties From Linkage
Is it possible to get width and height properties from a symbol that has been exported with linkage but has not been attached yet?
FlashKit > Flash Help > Flash ActionScript
Posted on: 11-05-2004, 04:21 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Linkage Properties
I have a movieclip symbol "Ball" in library, then I use linkage properties to give it a class name "Ball". The movieclip "Ball" contains an object called "texture", which is a movieclip instance. now I want to manipulate "texture".
with the "strict mode" turned off, i can do something like this:
var redBall = new Ball;
redBall.texture.rotation = ...
my question is, how can do it when the strict mode is on? WITHOUT using the casting method, something like MovieClip(this.parent). .. ?
many thanks!
Linkage Properties > Export... A Little Help?
I have a *.fla that includes a few sounds and the scrollbar component which are accessed via: Linkage Properties > Export for Actionscript and Export In First Frame. Is there an alternative way to access these objects without having them exported in the first frame, which prevents my preloader (which is included in the same file) from appearing immediately upon a request for my movie to load? Thanks for any hints, suggestions.
Linkage Properties And Sounds?
ok i have this problem.. my background sound it maybe 300k and the preloader stalls if i select export on first frame because its loading the sound.. But the only way it will play in the movie is if i export on first frame ?????? is there any way around this problem that anyone knows of? Thanks
--Adam
Dynamically Set Linkage Properties
I would like to dynamically set the linkage fields. For Example
Image: Background
Manual Steps:
Right click image --> Select Linkage --> Select Export For ActionScript
Dynamically, through coding Steps:
Can anyone tell me how to do this please?
Linkage Properties (exporting)
I have sound clip that, under linkage properties, is exported for actionscript. My problem then is, I do not want it to be exported in the first frame. How do I script it to be exported in the second frame?
Any and all help is greatly appreciated.
Linkage Properties (exporting)
I have sound clip that, under linkage properties, is exported for actionscript. My problem then is, I do not want it to be exported in the first frame. How do I script it to be exported in the second frame?
Any and all help is greatly appreciated.
Is It Possible To Dynamically Set Linkage Properties?
I have been debating methods of refactoring my code recently. At a particular point of my application a content panel MovieClip is dynamically generated [read: I call createEmptyMovieClip, I draw a box, fill it, add filters, and tween it onto the screen].
It gets messy extremely fast, however, so I would like to expunge that code to another external Actionscript file called Content.as. The problem I have come to, however, is that I cannot find a way to dynamically set the Linkage of an empty MovieClip I create.
Does anyone know a way of doing this or has an alternative suggestion?
Why Only One Class Name For Multiple Linkage Properties?
Hi,
I am wondering why only one Class name is allowed for multiple MovieClip objects in the Flash IDE.
Example: I have two MovieClip objects (two sides of a sliding door). One clip is the left side of the door, the other is the right side of the door. I wanted to have them link to the same class instead of setting different linkage Class names for each clip. Am I thinking about this the right way (obviously not)?
I know that I could set a Base Class of something like "Door" and write a Door.as file for it. So I guess I'm wondering where the Class name property comes in.
Thanks for any input!
-Brian
Linkage Properties: Or How My Pre-Loader Quit
Ever since Flash MX came on the scene I've had a disturbing problem using pre-loaders with flash movies that use assets linked from the library.
I have a very simple pre-loader movieclip that sits on frame 1 of my movie; but my pre-loader doesn't even show up until the linked objects completely loads.
I think I've read somewhere that Flash preloads linked objects before frame 1. I know that is true for sound objects. So naturally if your pre-loader functionality occurs on frame 1 it can't even begin to play until the sound files have completely loaded.
I believe the same is true for movie clips dynamically inserted into the timeline with actionscript. They load before frame 1 so again my pre-loader is useless until such time as all the assets I happen to have linked in the library load.
Somewhere I read that simply by unchecking the box in the Linkage Properties that reads "Export in first frame" that my pre-loader will work.
I've tried that and while my pre-loader does work the library files I have linked do not work anymore.
Exporting your pre-loader in frame 1 and inserting it onto the stage with actionscript doesn't work either. I think sound objects precede movie clips in the order of precedence.
This is most troubling and any help would be greatly appreciated.
[help] Defining Instances Of A Class In Linkage Properties
I have a class myClass that I've created an instance of using
var myInstance:myClass = new myClass();
and it functions fine; when I try to access private members I get an error message
but when I create an instance of the class using linkage properties of a movie clip in the library, I have full access to private variables in the class.
does anyone know why that is?
Class Problem Import Through Linkage Properties
hello,
I want to Linkage one MC in my library. So I wrote
In Class zPlayerClasses.contoller,
In Base class flash.display.MovieClip
My class contoller is located in folder zPlayerClasses, and it is in the main directory (with .swf).
this is my class script:
ActionScript Code:
package zPlayerClasses{ public class contoller extends flash.display.MovieClip { public function contoller():void { trace("contoller class instance"); } } }
After compile output this error, why?
1017: The definition of base class MovieClip was not found.
5000: The class 'zPlayerClasses.contoller' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type.
The some error come after change flash.display.MovieClip to MovieClip
Linkage Properties In Flash 9 Public Alpha
I install Flash 9 Public Alpha aka AS3 Preview and when I create MovieClip in authoring time, and went to Linkage Properties to set Identifier for that MovieClip, I check the Export for ActionScript and the Identifier field was disabled.
How to reference to a MovieClip in Library for using in scripting time?
[F8] Change "Linkage Properties" Dinamically
Hey,
I am with this problem.
I have googled and looking for everywhere, but I got no luck.
There is a way to change "Linkage Properties" dynamically, instead to use the Flash dialog box?
I need to access a remote shared library, that will be replicated in three redundant servers (to prevent to hang my main application in case of server failure). Then, I need to have a way to set the linkage URL through AS, but I am not sure if Flash have this capability.
I would be very happy if someone point me a way to do that.
Thanks!
How Do I Trace The Properties Of An Object's Properties?
I forgot to put it in the title so I'll just place it here; I am using AS 2.0. I know that there are other ways to accomplish the goal that am after, but I was wondering if anyone knows of a way to access the properties of an object's properties?
Here is the code that I thought of, even though it doesn't work
var a:Object = new Object();
a.bproperty = 0; //lowerlevel properties
a.cproperty = 1; // lowerlevel properties
var d:Object = new Object();
d.e = a; // upper level properties
for(var i in d){
for(var j in d.i){
trace(i + " = higher level lower level= " +j);
}
}
I know that you can enter the following code to view the 'lower level' properties of d.e:
for(var i in d.e)
This really just boils down to how I am organizing the code(I have ideas on what do next, and i am 99% sure that I can get them to work), and if there is a way to dynamically access the properties of the objects properties, It will save me from creating yet another large block of code for my project. If you want to see the unfinished project, go to http://www.garrettchristopherson.com
Linkage
Does anyone know of a way to do sound linkage with actionscript instead of hard coding it by clicking and doing it in the library? This is REAL important for me as it looks like Generator's ability to use sound is for ****
Linkage
Hi Everyone,
I'm using an attached sound with linkage.
The problem is that Flash automaticli load it in the first frame and it takes a lot of the time (the user won't c anything meantime)
SO...
I want to put this libary in another swf and to load it.
I do it but I didn't know how can I call the sound now.
I tried this:
------------------------------------------
x = new Sound();
x.attachSound("_level1/song");
x.start(0, 99999);
------------------------------------------
But it's not working.
Any solution?
and how can I know that this new swf is loaded?
Linkage ...
Hi all
My problem is that my movie - a slideshow has a call like
this:
sound1 = new sound();
sound1.attachSound("music");
sound1.start(0, 1000);
function setV (v) {
sound1.setVolume(v);
}
and of course I got a piece off music with a linkage = music
and this works fine.
THIS CALL is placed in an frame after the preloader loop
BUT the movie seams to start load the music in the memory
and that without showing the preloader-ani. Only when the
music is in memory the preloader starts for the hole movie..
Is there a way out of this?
Have a nice day :-) PAUK
Linkage
I want to make a screensaver that detects if the person is online and if so populates the screensaver with new images..using linkage in FlashMX...
Does anyone know how you can make actionscript that can be linked..I tired a link in an MC with code that would effect the main timeline...The MC came in, but not the code
why?
does anyone now any good linkage documents?
Linkage
Hi! i have a little problem. I create a .fla file to use it as a shared library, that file have a lot of movie clips. Once it was created i have the need to change the file name. I was wondering if there is any automatic way to change the url name of every movie clip on the library.
Thanks!!!!
How To Do This... CD Linkage
hello guys
i created a button, and what to add a "GET URL" action to it... to open an HTML page located on a CD, what is the command ?
i tried: on (press) get url (webindex.html)
but it didnt work... it opens the c:webindex.html insted !!
what is the exact command to use ?
Linkage
I am trying to standardise my work, almost make it into a production line and am thinking of using the shared library way. I want to be able to make one button and so forth and then use that in all my work, is using the shared library the best way to do this, and will it mean that if i change the original button it will overwrite wherever that button is used.
Has anybody done it any other way, or is using the shared library the only way.
cheers
lee
Linkage
guys
how to change the link instead of to the website, i want to link to the scene inside the same swf
onClipEvent (load) {
daTextBox = "<a href="http://ww.yahoo.com">When you say nothing at all (Ronan) 4.17</a>
<a href="http://www.msn.com">Run to me (Oscar de La Hoya) 3.41</a>
One in a million (Bosson) 3.36
Better man (Robbie Williams) 3.22
Escape (Enrique Iglesias) 3.28";
}
tq
Plz Help Me On Linkage.
Hi,
I need help on symbol linkage, using linkage we can send action script to another swf file or we can retrieve script from that swf in another swf file I am getting that. But my problem is that I would like to get dynamically updated content.
Thanx
Linkage
Hello
does anyone know if a linkage property of a library item
can be set through actionscript
and does anyone know of a thread on shared libraries
i would really appreciate any help
thank
PDF Linkage
Could anyone tell me how to write the script for opening an external pdf file and how/where to save this file for the published flash to find it?
many thanks in advance.
Shirshiron
Linkage
hey im loading one swf into another swf. Im using the window component here my code to help explain
---------------------------------------------------------------------
on (release){
flashvideoclip = mx.managers.PopUpManager.createPopUp(this, mx.containers.Window, true, {contentPath:flvvideo,<---------- closeButton:true, title:flvtitle});
flashvideoclip.setSize(1240, 930);
lo = new Object();
lo.click = function(){
flashvideoclip.deletePopUp();
}
flashvideoclip.addEventListener("click", lo);
}
---------------------------------------------------------------------
BUTTON1 (below) BUTTON2 (above)
---------------------------------------------------------------------
on (release) {
videotitle = "Carols PV"
realplayerurl.url = "removed";
realplayer.setTextFormat(realplayerurl);
flvvideo = "vp"; <----------------------
_global.flvurl = "removed";
flvtitle = "Carols PV"
}
---------------------------------------------------------------------
vp is the linkage name for a mc in the lower swf file.
meaning its in the 2nd swf that gets loaded not loaded into.
it runs fine untill i load it into the other swf. than the linkage disappears if anyone could help that would be nice.
Linkage Help Please
i have a scroll plane componet, the movie inside is named venders
i need the movie venders to link to another movie on the same level as the componet... any help with this would be great
Linkage
how to link this list.addItem("Because u love me - celine dion"); to an mp3 in flash???
the mp3 file iz already been imported into the library....
Thanks
Linkage
Agh - simple question. I need to link a button to a URL. The URL is to a downloadable file so I don't need to open a new page or anything.
Thanks,
H
Is This Due To Linkage.... Help Me Out.
I am currently involved in a commercial project. And I am in a drastic situation of loosing the project due to the fluidity of the animation.
About my project:
My project contains more number of SWF animations. There are almost 1000 swf files. I have a base file which is called main.exe ( made in FLASH ). In this exe I have a movieclip called containerMC. I have naviagtion buttons which allows me to load swf files into the movieclip containerMC.
Some swfs are around 2MB. And the most important is I have some general swf files in which I have more animations, each of 200 images. I have exported this image animation files using Linkage.
And I have imported this image animation files in lot of swf files.
My problem:
If I load the swf files (which have imported the image animation) into containerMC I have the problem of animation fluidity. The animation is not running smooth. If I run the file seperatly its running smoothly but not the case if I have loaded this into containerMC.
After testing the computer memory usage I was afraid because the usage keeps on increases when I loaded screen by screen. It goes upto 400MB too!!
My question is?
1. Why the animation is running jerky while I loaded into containerMC?
2. Why the memory usage is increasing steadily when I loaded all the screens one by one?
3. How actually linkage works? a) Is all the imported movieclips will be imported into containerMC?b) If a) is correct, will all the imported movieclips gets unloaded if I unload containerMC?c) If a) is wrong, where all the imported movieClips? Is this will be in the main.exe? It will be there always (once imported ) and never unloaded? Is this the reason for increase in runtime memory usage?Did anyone faced the problem like this?
I hope someone could help me out to solve my problem and save my project. Who will save me ...?
I really thanks a lot for those who will be interested in solving my problem.
Linkage?
Hey. I have allot of different flash files, for different pages. i.e. home, shows, images ect.. I use the same background on all these flash files.
The problem is it loads this same image obviously in each flash movie, which is a bit of a pain, as it makes it longer to load a swf.
I'm wondering if this 'linkage' "thing" will fix my problem somehow. I'm not sure what this linkage does. Some help with this little problem would be great. Thanks.
[F8] Linkage
What kind of Action Script do I need to use, if I was the use a text button that say's "View QuickTime" to play a short film (MovieClip) as a Linkage.
[F8] Linkage
hi, I know this is a long shot, but I've got a HUGE library and each of the symbols need to export for actionscript - using the default name is fine
is there any better way to do this other than right clicking on each library item one at a time?
Linkage?
if i place a button on my main timeline called "p1", and there is a mc called "clip1" with code on frame 1 that does a function when "p1" is pushed... what would the coding for it look like this to have the function happen? it does not seem to work no matter what i do... but if i put it within the mc and remove the _root it works fine. how can i have the button on the main timeline or rather "call it"
i used this
_root.p1.onRelease = function() {
Linkage
Hey,
I'm having some trouble with the linkage option in the library, is it possible to see a JPG-file in a flash movie without it being in it? (loading it from your webserver) I saw this option 'Linkage - Import this symbol from URL' but I cant figure out how it works. If anybody could help me with that...
thanks,
Linkage
I have not been able to find any reference in the help file on how to set linkage properties through action script. I want to make a scrollpane and then display movie clips in the scrollwindow but the movie clips will change depending what is clicked on in the main movie.
Linkage With .exe ?
Hey...
I'm trying to link a sound from my library
but it doesn't work...
Can anyone tell me if it's possible
to link sounds when using a .exe published movie?
Thanks !
Neuhaus3000
XML Linkage
Hi all
I have flash file that calls information from an XML file and everything works fine, the XML data is shown in the flash.
The XML is:
Code:
<portfolio>
<site>
<company>NAME1</company>
<address>www.NAME1.com</address>
<software>Flash, XML, Dreamweaver, Photoshop</software>
<description>AMAZING!!</description>
</site>
</portfolio>
My question is how to get the <address> tag to be an actual link in flash so that it opens up a new browser window? Do i need to add something to the XML or do i have to add some ActionScript ?
Www.com Linkage?
My web site (flash movie) is completely finished and uploaded to my ftp server -
index.html
index.swf
how do I link these files to open when someone types in www.caresmarketing.com???
ps... I have notified the registry company to link the domain name to the ftp server. All that's left is for it to recognize what file to open. Is it a command in Flash MX I must use on the index.fla file? Can't find an answer... please help
Swf Linkage
Ok I have
1.swf and
2.swf
1.swf
contains
movie A
2.swf
contains
button B
2.swf is loaded into level 1 of 1.swf
How do I get the button B to effect movie A.
eg. goandstop at a frame in movie A
Could you give me some actionscript examples?
Also I know you can pass variables between levels remind me how to do that.
As Linkage
Does anyone know how to go about creating a symbol of type 'button' and then linking that symbol to actionscript code?
Every example I can find shows how to create a 'movieclip' symbol and then linking that to actionscript code. The actionscript code for the 'movieclip' linkage looks something like:
class myClip extends MovieClip{
.
.
.
}
I would assume a symbol of type 'button' would extend a different class such as:
class myButton extends Button{
.
.
.
}
I've tried all kinds of combinations but the symbol ignores the actionscript code. It works fine with type 'movieclip' but this isn't what I need.
I am building a very extensive data driven system and would like to create button symbols such as 'cancel_btn', 'save_btn', etc. that are linked with actionscript class code. This allows me to visually use the symbol in the layout but encapsulate the logic at the class level.
Anyone know the magic formula for getting this to work? Maybe I'm just using the wrong superclass?
Thanks in advance!!
Linkage...
hey, i need to link from one html file to another... in the html file i have embedded a flash file. you click the button and it takes you back to the 'main' page of the site... HOWEVER... is there a way to link TO a certain frame within the NEW html document? let me say this once again...
HTML document - flash file embedded
<-Click Me-> - flash button inside the flash file
--when you click it you're linked to another HTML document. that html docuemtn has ANOTHER flash file embedded. but i want to skip by the first scene and 50 frames of the next scene... can i tell it to link to certain scene and frame from this flash file?
Help With Xml Linkage...
So im trying to make a banner/slideshow using xml so i can just make all the changes in XML. I can get the images to go through and transition and as for the links it just opens the first child link only. Trying to see if someone can help me. The problem is the Flash Portion.
Example... http://www.fottografie.com/links/events/events.html
Download.... http://www.fottografie.com/links/events.zip
Here is the XML Code:
Code:
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
'timer' :: number of seconds between each image transition
'order' :: how you want your images displayed. choose either 'sequential' or 'random'
'looping' :: if the slide show is in sequential mode, this stops the show at the last image (use 'yes' for looping, 'no' for not)
'fadeTime' :: velocity of image crossfade. Increment for faster fades, decrement for slower. Approximately equal to seconds.
'xpos' :: _x position of all loaded clips (0 is default)
'ypos' :: _y position of all loaded clips (0 is default)
-->
<gallery timer="10" order="sequential" fadetime="3" looping="yes" xpos="0" ypos="0">
<image path="events/flyers/flyer1.jpg" url="http://www.fottografie.com/links/ws/popup/sinsation.html" />
<image path="events/flyers/flyer2.jpg" url="http://google.com" />
<image path="events/flyers/flyer3.jpg" url="http://yahoo.com/" />
</gallery>
The Flash Script:
Code:
// set random # variables - each must be 0 for first 'while' loop below
var randomNum = 0;
var randomNumLast = 0;
// parent container
var container_mc = this.createEmptyMovieClip("container",0);
// movie clip containers
container_mc.createEmptyMovieClip("loader1_mc",2);
container_mc.createEmptyMovieClip("loader2_mc",1);
// preload watcher
this.createEmptyMovieClip("watcher_mc",100);
// load xml
image_xml = new XML();
image_xml.ignoreWhite=true;
image_xml.onLoad = parse;
image_xml.load("flyers.xml");
function parse(success) {
if (success) {
imageArray = new Array();
var root = this.firstChild;
_global.numPause = Number(this.firstChild.attributes.timer * 1000);
_global.order = this.firstChild.attributes.order;
_global.looping = this.firstChild.attributes.looping;
_global.fadetime = Number(this.firstChild.attributes.fadetime);
_global.xpos = Number(this.firstChild.attributes.xpos);
_global.ypos = Number(this.firstChild.attributes.ypos);
var imageNode = root.lastChild;
var s=0;
while (imageNode.nodeName != null) {
imageData = new Object;
imageData.path = imageNode.attributes.path;
imageData.url = imageNode.attributes.url;
imageArray[s]=imageData;
imageNode = imageNode.previousSibling;
s++;
}
// place parent container
container_mc._x = _global.xpos;
container_mc._y = _global.ypos;
// parse array
imageArray.reverse();
imageGen(imageArray);
} else {
trace('problem');
}
}
///////////////////Button Actions//////////////////////////
container_mc.onRollOver = function(){
this._alpha = 70;
};
container_mc.onRollOut = function(){
this._alpha = 100;
};
container_mc.onRelease = function(){
getURL(imageData.url);
};
// depth swapping
function swapPlace(clip,num) {
eval(clip).swapDepths(eval("container_mc.loader"+num+"_mc"));
}
function loadImages(data,num) {
if (i==undefined || i == 2) {
i=2;
createLoader(i,data,num);
i=1;
} else if (i==1) {
createLoader(i,data,num);
i=2;
}
}
function createLoader(i,data,num) {
thisLoader=eval("container_mc.loader"+i+"_mc");
thisLoader._alpha=0;
thisLoader.loadMovie(data[num].path);
watcher_mc.onEnterFrame=function () {
var picLoaded = thisLoader.getBytesLoaded();
var picBytes = thisLoader.getBytesTotal();
if (isNaN(picBytes) || picBytes < 4) {
return;
}
if (picLoaded / picBytes >= 1) {
swapPlace("container_mc.loader2_mc",1);
alphaTween = new mx.transitions.Tween(thisLoader, "_alpha", mx.transitions.easing.Regular.easeOut,0,100,_global.fadetime,true);
timerInterval = setInterval(imageGen,_global.numPause,data);
delete this.onEnterFrame;
}
}
}
function imageGen(data) {
// random, or sequential?
if (_global.order=="random") {
// choose random # between 0 and total number of images
while (randomNum == randomNumLast) {
randomNum = Math.floor(Math.random() * data.length);
trace(randomNum);
}
loadImages(data,randomNum);
randomNumLast = randomNum;
} else if (_global.order=="sequential") {
// start at 0, increment to total number of images, then drop back to zero when done
if (p==undefined || p==data.length && _global.looping=="yes") { p=0; } else { break; }
loadImages(data,p);
p++;
} else {
trace ("order attribute in xml isn't correct - must specify either 'random' or 'sequential'");
}
clearInterval(timerInterval);
}
stop();
Thanks for the Help
--otto
Linkage To A Shared Lib - HELP
This is the second time I am posing this question,
but hopefully I will get what I am looking for:
It goes like this:
I have a main movie which is blank in frame 1 except for a preloader. The main movie starts on Frame 2.
However, there is a mc in the frame 2 which is (implicity) linked to a shared library. So this mc gets its movieclip from the shared lib.
What I want to know is that while I am in frame 1 (in the preloader for the main movie itself), how can I determine when this host mc has indeed loaded the mc from the shared library. getBytesLoaded() is only for the main movie - it does not account for any links to shared libraries.
If you have done something like this I would like to know.
PLS HELP!
Problem With Linkage -- HELP
I really like the linkage feature in Flash 5, but the big drawback for me is that when I export something from the library with linkage, it puts itself in the first frame of the movie to be loaded. As a result, if I am trying to preload the movie and the first thing I want 56k modem users to see is a 2kb logo, they would have to wait until all of the exported symobls from the library are downloaded before they see the logo.
I can see this clearly on the bandwidth profiler. I was trying to export a WAV file so I could control it better with attachSound, but when I exported it, my first frame was no longer 2kb, but became 34 kb, meaning that the WAV loop was 32k and it was placed on that first frame.
My big question is, using exported symbols from the library, how can I make it so the 2kb logo loads before anything else -- so that it becomes what people see when the site begins to preload, instad of having to wait for all of the exported symbols to download first?
Linkage And Preloader
HI!
I've just noticed that before the first frame is displayed on a movie, it has to load all the linked graphics in the library (Or at least that's how it seems).
In my case the most bulky part of the movie are linked graphics (action script can call for them). And when the preloader appears it's already in 90%.
Is there a walk arround for this?
Sound Linkage
I am tring to add linkage properties to an imported wav file. What I want to do is be able to change the audio file that is imbedded/linked into the swf file by changing the wav file and keeping the same name obviously. Can this be done? I can't figure this out. Thanks.
Linkage And Preloading
Hi everyone..
I've got a problem with some symbols from my library that I've set to export. I've just found out that any such symbols will always load up on the first frame, no matter what you've got in your movie, and how it is arranged..
my question is this - is it possible to get the elements of my preloader to load into memory before the linked assets load in? At the moment my preloader doesn't appear until 70% of the way through, as most of my swf is made up of linked assets........
*****frustrated*******
if this aint possible, can anyone come up with a decent workaround? I've been rackin my brains for about 5-6 hours now, and it hurts
|