ActionScript 2.0 :: Properties Of A Loaded Movie?
May 27, 2004how to adjust the size (width*height) of a externally loaded movie?
View 12 Replieshow to adjust the size (width*height) of a externally loaded movie?
View 12 RepliesI'm loading a bunch of AS2 SWF's into a main AS3 SWF. How do I access the properties of the AS2 SWF's from the AS3 SWF? Or is that not possible?
View 3 RepliesI have come across a problem where an SWF that I've developed has to be loaded by another SWF that pans and zooms the inner swf. I have created these two MovieClips to demonstrate my problem, I've called them Inner and Outer. These are the document classes for them:
ActionScript Code:
package inner
{
import flash.display.MovieClip;
[Code].....
I dropped a button component into the stage of the Inner.fla file and named it btnOne in the properties window. The Inner.fla runs as expected on its own. When I include code in the OuterClip class to instantiate an InnerClass variable it complains thus:
1120: Access of undefined property btnOne.
So I can see that there is an issue here to do with linkage ?? I've tried quite a few different settings but feel like I am just guessing and have been struggling with it for a while. In my final scenario the outer file will have timeline and actionscript frames with no document class. Is it ok to mix these two methods of scripting?
My goal is to do various things to a movieclip (zoom out with an alpha change) that has a jpg loaded into it. My thought is that I can load any jpg into the movieclip, and it will follow the commands made to the movieclip (i.e. zoom / alpha change).I am at the point where I am setting up the movieclip properties. Some of the questions I have are: is it possible to constrain the movieclip to a particular dimension, regardless of the jpg size. The jpg would then, ideally, need to be told to center within the movieclip, and the excess picture be cut off. Here is what I have so far: [code]For some reason the mc will no longer show up, and the traces come up as unvalid when I add the width and height dimensions, otherwise the picture will load, but at its original dimension.I was wondering if there was a tutorial explaining some of the concepts of mc's and loading images.
View 1 RepliesIs it possible to access the properties of an image when it's been loaded in to an swf?
I am thinking of the properties which can be edited and displayed in the Windows directory listing.
The image 'contents' field could then be used as the caption for the image viewed in flash.
I'm loading a swf to my main stage and im adding a child to a childMovieclip in the loaded movieclip
but when i play the loaded swf and it goes back to frame 1 and starts plating again the changes i made aren't there?
Main movieclip onstage is : design_mc. Within it is a movieclip already in place onstage with an instance name clipart_mc.also loading a ListBox to the stage and each time a selection is made from listbox myLoader9 is used to load selected .swf intodesign_mc.clipArt_mc.Now within each of the .swf files loaded into design_mc.clipArt_mc there is a mc ike to color transform called color_mc.So now the listbox is onstage and I make a selection that places heart.swf inside of design_mc.clipArt_mc. I want to access heart.swf so I did this:
var child:DisplayObject = myLoader9.content.contentLoaderInfo.content.color_mc;
var colorTrans3:ColorTransform = new ColorTransform();
var trans3:Transform = new Transform(child);
[code].....
I'm making a modular site, that loads in external swfs that need to have decent screen reader names for each of the buttons.
The shell swf is set up to work with Thunder and NVDA screen readers by creating an AccessiblityProperties instance and assigning it to the relevent display objects then calling Accessibility.updateProperties( ) ; This method works in the main swf, but when used in the loaded swf it's not picking up the updated accessibility properties of the buttons, even though Accessibiltiyy.updateProperties( ) ; as been called again.
If I have a swf that's being loaded into other peoples' swfs (which I have no control over) is there any way I can get properties from the stage (such as height, width, fullScreenHeight, etc.) or does this have to be exposed by the loading swf?
View 1 Repliesi'm following a tutorial but modifying it to suit what i'm trying to do, basically the tutorial sets the X of each image upon loading but what i need is for the X of the image to change according to the position of mouseX
since cvItemLoader is a variable inside of the cfAddItems function i can't change the image's X from outside the function, at the same time i can't possibly define the variables outside because the total number of images will vary
here's my codes :
var cvTotalThumbs:Number;
var cvXMLList:XMLList;
var cvMenu:MovieClip;
[Code].....
I am running a for loop to bring in movie clips from an array, and I have a couple buttons that I want to affect the properties of all of the mcs. The buttons (labelsOff_btn, labelsOn_btn, increaseSize_btn, decreaseSize_btn) are only affecting the second-to-last item on the list, although the drag functions targeting the same mcs (thIcon) are working for everything. Code is pasted below:
[Code]...
I have the following AS3 code. I'm just beginning and have gotten on this since finding it here: (take out the spacesloadingData.phpNow, I find out that I cannot access the properties of the loaded movies because they are AS1 or AS2. converting this to AS2?
Code:
import fl.containers.UILoader;
var ar_movies:Array = new Array();
[code].....
I am trying to set a couple of properties (specifically width and height) for an mc within an externally loaded swf but am having bigtime troubles. Keep getting the 'Error #1010: A term is undefined and has no properties'. The code is attached below. I have tried to figure this out and searched for solutions but could not resolve this myself.
import flash.display.MovieClip;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
[code]......
My movieclip clipArt_mc receives movieclips that are loaded dynamically from a listbox selection using:
[Code]....
I would like to access the nested or loaded in movieclip inside of clipArt_mc that has in it a movieclip named color_mc so that I can apply color directly to it instead of clipArt_mc.
How would you go about calling the public properties and methods of a SWF you load in actionscript?
I have been using stackoverflow for years to answer my programming questions so I wanted to give back by writing a guide to an issue I had a lot of trouble figuring out. This is my first user guide so tell me if there is anything I can do to improve it.
I am still wrapping my head around AS3 and have been building out functionality that loads external images (PNG) from XML and putting them into MovieClips that have interactive events assigned.[code]What I'm trying to do is smooth the images when they are loaded and then adding them to the container "imageClick". What is happening is that the "image" is returning null. A lot of the code above is snippets I've been finding and I guess I'm confused with how some of these things work together.If I remove all the "image" functionality and change the line:[code]The images load fine and show up, but they aren't smooth when scaled.I guess what I'm asking, is how come my "image" object is returning null every time?
View 2 Repliesi have a movie that has 3 buttons on it..(and there r 7 of these button containing movies being loaded into my main movie...but this is not important in our case i guess.) anyway, each button loads a movie (they r draggable windows) into my main movie, located in different levels (not targets)..the problem is i want to change the alpha and depths of these draggable movies.eg;when i click on a button i want that draggable movie to come forward and set its alpha to 100 and the other two to 30..i could do this by loading the windows in target locations..but i can't do it when i load them in levels..
View 3 RepliesIf you load an external swf and after it is totally loaded give it as to change size properties. the file jumps from his size exactly to the pretended.
View 1 RepliesIf you load an external swf and after it is totally loaded give it as to change size properties. the file jumps from his size exactly to the pretended. How do one give code to do this in a progressive way.
View 1 RepliesIs it possible that we can control external loaded swf sound (on timeline) properties.
E.g:
duration
position
onComplete....etc?
I'm attempting to use "if" statements to determine if an dynamically loaded photo is portrait or landscape. The problem I'm having is when I try "gallery_mc.getChildAt(0).width", it returns 0.
View 10 RepliesCurrently I have a stage.swf (the parent) which loads child movies "inside itself" into an area called external.
Currently, for each of these movies I have to set properties in stage such as:
Movie Name,
Movie Title,
Length (how many frames)
Now, the annoying part of this is the length. If at any point I decide I want to add or remove a scene from a child, I have to reset the relevant "length" variable on stage.
what I really want to know is, is there a way that when each of the child movies load, stage can find out dynamically how many frames they have?
I can create a Movie Class to have all these variable declarations in one place, but that doesn't really solve the problem I have. I'd still have to manually go through and change variables ad hoc....
I created a movie clip which loops some text, i would like to populate the stage with instances of it but also with some in a different colour. When I copy frames from my clip and paste them into a new symbol(movie clip) the colour of the other instances changes as well.
View 1 RepliesI have the following prob :
I created several instance of the same MC like this
[Code].....
I want to trace all the names of a Movie clip properties. Funny thing is that I used to know how to do that. Now when i use [code]It only traces the names of nested Movie Clips not also properties like _x, _width. Anyone knows how to do that?
View 1 RepliesI have say 50 movie clips on the stage. each has a name like "button1", "button2" etc and I want to move each one using a for loop instead of hard coding "button1._x = 50"
When I try this it doesn't work.
Code:
var buttonName = "button1";
buttonName._x = 50;
I've got a problem with the Properties panel for Movie Clips, Graphics and Buttons. I clicked 'Advanced Options' at some point to see what they were, and now I have no idea how to get back to basic options like Alpha, Tint, etc.
View 3 RepliesI created a about_mc, which works like a button. The button is placed on stage1. When I click it, I want it to call another movie from the library and play it. So code inside the about_mc button on frame 1:
var dynAbout = textAbout();
addChild(dynAbout);
It works fine up to here.
Now I would like to access the dynAbout, so I will add name to it:
dynAbout.name="dynNameAbout";
Then accessing it like that:
MovieClip(parent.root).dynNameAbout.x=300;
When I test it, I get the textAbout() movie added to the scene1 and its playing, but it pops up with an error:
TypeError: Error #1010: A term is undefined and has no properties.
at About/aboutDOWN()
I want to parse a hex color value into a movie and use it to dynamically change the color of a movie within called "border"
I can do this if I hard code it in using:
Code:
var colorTransform:ColorTransform = border.transform.colorTransform;
colorTransform.color = 0xff0000;
border.transform.colorTransform = colorTransform;
[Code].....
I have some movieclips in my flash proyect, and I want these have the properties and behaviors of buttons, for example to make links with other frames.
View 7 Replies