Actionscript 3.0 :: Setting "Z" Or Layer Position When Loading External Swf?
Oct 31, 2008
I've been using the loader class to import external swf files when I need them. I can position them on the screen where I need them using the:
loader_var.x
and
loader_var.y properties
However something that seems to stump me is how to position the loaded content below other content in the movie. I tried making the layer where I was actually calling my external file below the other layers and yet when I export the Flash movie the clip that I'm importing at run time always ends up on top of every thing. Is there a way to specify which objects imported media comes in above or below?
View 5 Replies
Similar Posts:
Nov 1, 2005
I am using loadMovie to load a JPG to a MC. The MC is one of 3 layers under a mask. The mask is not a tween. The image fails to load in the MC. When I move the layer with the MC out from the mask, the JPG loads.
View 6 Replies
Nov 1, 2009
I am trying to create a flash viewer, which will load various other flash movies. The viewer will be in the root directory, but the flash movies it will load are a few directories deep.
/flashViewer.swf
/myContent/someProgram/program.swf
/myContent/someProgram/audio/sound1.wav
It seems that when I load one of these movies into my viewer, the loaded movie is looking for the sounds in an audio folder in the root directory, and not relative to the swf I loaded. Is there a way to set this? I would rather not have to make the changes in each of my other movies to use the absolute path
View 7 Replies
Jul 19, 2010
I have an external swf that im loading onto my main.fla but it loads into the bottom right corner of the stage and i would prefer it on the stage.
This is the code i am using in the subMenu movieclip which contains all the buttons to call external movieclips:
[Code]...
View 4 Replies
Jul 3, 2009
setting a position of movieclip called red x and y position within a movieclip called background
Code:
background.redsquare.x = 300;
background.redsquare.y = 300;
comes up with TypeError: Error #1010: A term is undefined and has no properties.
setting a position of movieclip called red x and y position withen a movieclip called background
Code:
redsquare.x = 300;
redsquare.y = 300;
This works fine but how can that be when surely you must access the red withen the background rather then just accessing red?
View 3 Replies
Dec 10, 2009
I wonder if it's possible to take the filled colour (filled with myColor.setRGB(0x993366); like a colouring style) and set the colour filled to be a value of a variable in an if statement? if yes, anyone know how to do it?and is it possible to set a layer's content so that it does not block any button underneath it? I'm trying use that movie as a mask but I do not want it to block any activity underneath it. or is it better to use the myMovieClip .setMask (maskMovieClip)I only need the masking to appear when a specific button is pressed.
View 8 Replies
May 24, 2011
I would like to RUN/LOAD my loaded SWF or Movie Clips BEHIND some existing Masks already designed in a scene or simply arrange theirvisibility position in ActionScript 3 while loading them with CODING only
View 1 Replies
Jun 28, 2011
How can I drag the key frames back within each of the layers below so that they all end on the final scene. Currently when I hit play, the clip runs till the last key frame and the other layers that don't run that length disappear. How can I best fix this?
View 2 Replies
Jun 4, 2009
I would like to place a video object above one movieClip instance ("mc"), but below another movieClip instance ("mc_top").
I instantiated the _root.flashVid object by dragging a "New Video..." from the Library to the stage, and giving it the instance name "flashVid".
I create mc, then paint a blue box, then I create mc_top, and paint a yellow box. The flashVid instance is on the Stage (_root) from the beginning. Now how do I get the flashVid above "mc" but below "mc_top"?
// Create movieclips and paint boxes.
var mc:MovieClip = _root.createEmptyMovieClip("test",
_root.getNextHighestDepth());
mc.beginFill(0x0000ff, 50);
[Code].....
View 3 Replies
Aug 26, 2011
Don't know if the flash layer on the view stack contain only the compiled flash swf file
View 1 Replies
May 19, 2009
I ve got a series of frames, each with its own instance of a scrollPane called actionText. When navigating from frame to frame I want the vertical scroll position of actionText to reset to 0.For some reason these separate instances of the component are inheriting scroll positions from one another,for example,if I scroll to 50% in one frame, jump to a new frame with a new instance of actionText, that new instance starts at 50%, not 0.
I should be able to set the scroll position by actionText.vPostion = 0 but I get Position is an undefined property of the object actionText .Roll over either the star one or star twotabs and select any action item, scroll the text down (actually a pdf converted to swf), then navigate to another action item and the new scrollPane does not default to 0. Only stars one and two are coded.[url]......
View 3 Replies
Oct 22, 2009
In my app, the user clicks on an object, which centers the object on the screen. The user's cursor stays where he/she clicked. I find that it is kind of disorienting to have the object move without the cursor. For the user's convenience, I would like to move the cursor to the center of the stage as well.
View 14 Replies
Aug 8, 2011
I have created a simple audio player to play continuously even if the page is refresh it will play continuously.This is my code to store audio position in flash Temp memory
MySharedObject.data.audioPos = mySndChannel.position;
MySharedObject.flush();
MyProblem,When the player starts the sndPosition is null, so it was not playing. If I set some value, when I am refreshing it will not continue from the last position. How can I set the initial position to play from the start?
View 1 Replies
Apr 2, 2010
I am create a flash mp3 player. In that I am displaying the song.position(time completed played). The song.position is not setting to zero, when a new song is played. It is continuing with the previous song. For example, if the previous song time is 30 seconds. the song.position is started from zero and comes to 30 seconds. After that song is completed and a again a new song is started, the song.position is starting as 30 seconds and gets increasing. It is not setting to zero at the start of the second song. I even set the song.position=0, when the previous song is completed.
View 1 Replies
Mar 8, 2009
I've creating a drag and drop card game in AS 2.0 and need to set the cards randomly in set positions every time the game is played. no two cards can be in the same space, so the taken position needs to be taken out of the array.I am not concerned about the Y value just X . I think this needs to be an array containing the positions. then using slice to remove the value from the array. I'm not sure how to assigned the array position to the movie clip.
View 6 Replies
Sep 20, 2010
I have a scrollpane with a very long list of images stacked vertically. The user can scroll around, click on an image, and it will take them to another part of the application. There, there is a back button so they can return to the list of images. Instead of jumping back to the top, I want the back button to return them to where they were in the list of images beforehand. how do I log the value of the scroll position, and then set it to that value when the page is loaded again?
View 3 Replies
Jul 3, 2010
i'm attempting to simply set the caret position at the start of the text flow when it is first displayed, without having to click and activate the text to see the blinking caret.
googling returns that the solution is to do this:
textFlow.interactionManager = new EditManager(new UndoManager());
textFlow.interactionManager.setSelection(0, 0);
however, setSelection() is not a valid function of the selection or edit managers.
1061: Call to a possibly undefined method setSelection through a reference with static type flashx.textLayout.edit:ISelectionManager.
View 1 Replies
Jun 1, 2003
I have an empty mc called "attachmcextra".Into this empty mc is attached another mc called "mcnote" that contains a texto box named "loadnote". So it`s path would be:_root.attachextra.mcnote.loadnoteThe following code is set to the mc "attachextra":
onClipEvent (load) {
//set inicial position
this.posY = 20;
[code]....
View 1 Replies
Oct 10, 2009
I am loading a drop down menu file into another animation. It's working except the menus should drop over the animation below. As the images change in the lower animation they cover up any drop down menu that is displayed.
The command I am using to load the menus is as follows:
var myLoader:Loader = new Loader(); addChild(myLoader); var url:URLRequest = new URLRequest("ncjhs_Menus.swf"); myLoader.load(url);
I need to load the menus - with all its layers - into the uppermost layer. Is there a simple way to set the target layer when loading a movie? I'm assuming you need to specify a target container/object in the target ... ?
View 3 Replies
Oct 24, 2011
So I'm loading multiple swfs into a container swf, how do I decide which is on top of the other? Currently I'm loading a swf like this:
var myLoader:Loader = new Loader();
var url:URLRequest = new URLRequest("example.swf");
myLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressListener);
function progressListener (e:ProgressEvent):void{
if (e.bytesLoaded == 0){
[Code]...
View 1 Replies
Dec 9, 2009
I just trying to load a external swf and i have this code:
var myLoader:Loader = new Loader(); addChild(myLoader); var url:URLRequest = new URLRequest("test.swf"); myLoader.load(url);
but just wondering how can i make it load on the top layer
in Action script 2 i can have something set like on the top layer 60000, like this:
banner.attachMovie ("man_mc", "man_mc", 60000);
View 1 Replies
Mar 22, 2012
I have a project that loads multiple SWF's, and I need a certain layer to be above the loaded SWF. Is there anyway to dictate which layer an external SWF will load on?
View 2 Replies
Jun 22, 2009
I'm loading an image in a UILoader Component (created during runtime).
var lb:UILoader = new UILoader();
addChild(lb);
Now when I load any image into this then it loads on top of everything.I know this is because it goes over the top of stack. But is there any solution by which i can move it downwards or even at the bottommost layer. I've tried setChildIndex(lb, 0) though but it didn't work.
View 3 Replies
Oct 6, 2009
On one layer I have a gallery loading the content from an xml file. On the layer above I have two square blocks on either side of the screen, with a gap in the middle for where the main picture will be displayed. The two blocks are 50%percent alpha. This is because the gallery thats loaded, loads the images in a line, which is movable, whereby the user can click either the left or right image and the gallery moves along, displaying the next or previous image into the middle spot where there are no blocks shading it.
View 0 Replies
Aug 11, 2010
I am loading the actionscript for my flash file from an external .as file. But it seems no matter what layer i place the #include "code.as" It always loads on top. I need to know if there is a way to get it to load to a different layer.
View 5 Replies
Jul 23, 2010
In trying to activate the remainder of the pause button, I find that using MovieClip(loader.content).channel.position always returns 0. I've tried numerous other combinations to access the position of the sound for the play function to resume correctly. The visual part of extswf.swf stops and starts exactly as it should.
In CntlClass:
public var loader:Loader;
public var movie_mc:MovieClip;
public var soundResume:int = 0;[code].........
View 2 Replies
Dec 18, 2010
I want to build a web page with a button that when clicked opens up a javascript layer and loads a flash player inside that layer. And that layer would need a close button.
View 4 Replies
Sep 15, 2008
how to layer photos imported via an external source (XML) with other art elements? The imported XML photos always seem to arrive on top of anything else no matter what layer your XML code keyframe is on.
View 4 Replies
Sep 1, 2003
I've tried 3 different scripts for a random loading image layer and none of them work. Does anyone have code/script for this that will work for Flash 5? I'm totally hung up at this stage and can't move on with the page or site until I have this aspect resolved.
View 12 Replies
Feb 8, 2007
i've donwloaded a scrollbar from the forums and i need help on how to make the scrollbar go to the top when you push a button.
View 1 Replies