ActionScript 2.0 :: [cs3]Positioning Loaded Image After LoadMovie?
May 18, 2008
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 me because myMC is to be scaled and manipulated, so its axis must be in the center of the loaded image.
View 8 Replies
Similar Posts:
Apr 1, 2007
How can I take a loded image and with actionscript position it at say 45 degrees (3d, not 2d) so that it looks like I'm looking from one side. It would have a 3d look.
View 1 Replies
Apr 12, 2011
So, basically, I've loaded an .swf into an empty movie clip in my movie and positioned it with this code:
[Code]...
When I hit cntrl + enter, everything lines up looks good and works fine. When I do a publish preview in HTML however, the mc is dragged all the way to the bottom of my screen and mostly hidden beneath my footer.
View 4 Replies
Apr 13, 2011
basically, I've loaded an .swf into an empty movie clip (myContainer_mc) which is itself located in another mc called loop_mc on the main stage and positioned it with this code:
Code:
var lp:Object = new Object();
lp.onResize = function() {
loop_mc._y = Stage.height-275;
[code]....
When I test the website in flash (ctrl+enter) everything looks perfect and works right, however when I view the website in a browser the movie is dragged all the way to the bottom of my page and mostly hidden beneath the footer.
View 3 Replies
May 30, 2003
I have a flash movie that has an internal movie clip, when the various buttons are pressed I want to load a movie in place of this original so I have put this script one of the buttons:
[Code]...
However, the new movie is not positioned in the correct place ie - instead of it being in the same position as the original MC the top left corner is positioned in the middle of the stage.
View 1 Replies
Apr 9, 2009
This is a webpage, where I use a modified gallery from tutorial (xml galllery with thumbs).This place is where I align picture movieclip in the center of area (which is also a mask).Sometimes, action clip doesn't get image _width and _height and load a picture with it's left upper corner in the center of mask movieclip. When I click again on thumbnail - image loads already perfectly how it should be centered. What can be the problem? maybe I missed something?Here is a modified code of the gallery:
Code:
stop();
function loadXML(loaded) {
[code]......
View 1 Replies
Oct 19, 2002
I have tried everything to get my movie loaded in _level1 to be positioned correctly. The movie always jumps back to the top left corner.
Here's my code:
stop();
unloadMovie(1);
loadMovieNum("1dictate.swf", 1);
_level1._x=random=(164.3);
_level1._y=random(111.4);
Everyone says the code is right, but it doesn't work!
View 5 Replies
Jan 24, 2005
I'm working with a script that loads from an XML some jpgs, these ones once loaded move to their positions.
[Code]....
the problem is that i would like put all these movies well aligned in rows and columns, i've seen it's possible to do this with a nested for.. loop, something like this
[Code]....
View 3 Replies
Nov 24, 2004
I'm using MX 2004 for a photographic portfolio project. The site seems to work fine on 99% percent of systems. Unfortunatley a strange error occus when viewing the site with IE on Mac OSX.I a dynamically loading images using LoadMovie and repostioning them so that they are centred. Sometimes with Mac IE the image doesn't get centred and is loaded with the top left corner in the centre of the screen as it would had the repositioning not happened.
This only happens sometimes and only with some images and with different images each time. I can reproduce the effect on my Mac but am stumped as to why it happens. I have ruled out the flash player version (it happens with them all) and have tried numerous export settings.Here's the code for the loading and repositioning and the link,
if (_root.image1loaded == false) {
//load image to empty movie clip
_root.images.createEmptyMovieClip("holder1", 1001);[code]...
View 5 Replies
Dec 29, 2006
I'm quite new in ActionScript (but I know the basics). Well anyway, I have a small problem. I'm doing this fake panorama to my site and I've used this Interactive Image Panning code I found here at kirupa.com. Now I have added some buttons into it and by pressing those I would like the image to move to a specific position (with ease if it's possible) and stop. And by pressing another button the panning starts again. Is it possible to add to this code? (I have made some little modifications to the code. There is a mask area where the panning works and if your mouse is outside the area the panning doesn't work)
View 13 Replies
Nov 24, 2004
I'm using MX 2004 for a photographic portfolio project. The site seems to work fine on 99% percent of systems. Unfortunatley a strange error occus when viewing the site with IE on Mac OSX.I a dynamically loading images using LoadMovie and repostioning them so that they are centred. Sometimes with Mac IE the image doesn't get centred and is loaded with the top left corner in the centre of the screen as it would had the repositioning not happened.
This only happens sometimes and only with some images and with different images each time.I can reproduce the effect on my Mac but am stumped as to why it happens.I have ruled out the flash player version (it happens with them all) and have tried numerous export settings.Here's the code for the loading and repositioning and the link,
_root.images.createEmptyMovieClip("holder1", 1001);
_root.images.holder1.loadMovie("flashimagesmac/mike.jpg");
//loader[code]....
View 5 Replies
Oct 20, 2009
I'm loading a .png image with loadMovie() and I need to center the image (for later dragging). I know flash has some issues with loading stuff, but I really need to get the movieclip's width. If someone knows how to get over this and get the movieclip's width
This is a part of a more complex app, so that's why I won't paste any code.
View 3 Replies
Feb 17, 2005
Scene: 450 px width. and the boxes (instance name:dot) are 50 px each.
The AS on the timeline:
// IMAGE
PHP Code:
gridx = 60; gridy = 60;
num = 0; mcArray = [];
dot._visible = 0;
for (var i = 0; i<21; i++) {
for (var j = 0; j<1; j++) {
var mc = dot.duplicateMovieClip("dot"+num, num);
[Code] .....
And when It start to slide after a little time the images start to stack on top of each other. How can I solve this ?
View 3 Replies
Aug 29, 2006
im trying to achieve a Full Browser Flash and i want my bgimage to remain in the centre of the stage whilst other objects move round it depending on mouse movements but how would i go about centering the bgimage through AS?
View 2 Replies
Feb 16, 2011
I'm loading many movies in a moan movie into mc instance name "movieHolder" I need something to happen only IF the first movie is not loaded. How can I check WHAT movie is currently loaded in movieHolder?
View 14 Replies
Feb 18, 2007
[URL]
I'm trying to use .loadMovie to load a .swf that contains a high res background image for the website. I want it to load hidden behind a layer of black before the user is even presented with the oportunity to move forward.
Is it possible to put somthing like this on the first frame (a black screen)...
Code:
choice = Math.round(Math.random()*13);
switch (choice)
{
[Code].....
then have the second frame contain a button that will reveal the loaded image, but not until the code above is executed and the image is loaded?
View 1 Replies
Feb 3, 2006
i have a button that when pressed passes a variable:
_root.movieToLoad = "testAni";
then the next movie clip thet "receives" the variables needs to play the external .swf in an empty movie clip... i have the code like so:
movieToLoad = eval("external_" + _root.movieToLoad + ".swf");
emptyMovie_mc.loadMovie(" + VARIABLE_GOES_HERE + ", "_self", "GET");
of course it doesn't work... how do i place a variable in that loadMovie?
View 3 Replies
Jun 18, 2009
The whole problem is in the title. I have a gallery which looks a lot like coverflow. Each button in it loads a new gallery which is a swf with a new XML. The Problem is it only works on the first time i click on a button. The XML does not renew when i click on another button. It does load the new XML.
[Code]...
View 8 Replies
Oct 20, 2009
I have a flash document that is calling an .swf file into a movie clip via the .loadmovie command. The .swf plays all the way through in the movie clip, but it has problems with the "play again" button at the end. It is not letting go of all the actions from the first play and doesn't reload properly. The .swf restarts perfectly by itself, it uses this code to replay:
on(release){
_root.gotoAndPlay(1);
}
but once the .swf is loaded into the main flash file, the "play again" button doesn't work anymore.
I can apply to the button at the end of the .swf that will allow it to replay when it is loaded into the movieclip in the main .fla file?
View 5 Replies
Apr 28, 2003
i want to load a swf in a MC called frame and want to display the load progress of the loaded swf. i tried sth like that:
[Code]...
View 2 Replies
Jan 10, 2010
Im using loadMovie within a .swf on level 1 to load an external movie into level 2. But when this happens the sound function doesnt work. The 2nd movie being loaded has the newsound defined and everything within itself. It plays if i run that swf seperately or using ctrl+enter. Yet when the 1st movie calls the 2nd movie onto level 1 at runtime.The sound in the 2nd movie doesnt play. But its button sounds all seem to be working.
View 1 Replies
Aug 9, 2004
I haven't been able to find documentation on why loaded movies via 'loadMovie' into another movie clip don't seem to obey onEnterFrame commands. The following code represents a movie clip, 'container', which has a loaded external .swf file, 'box.swf'.
I have set the container to begin a decreasing alpha change. I've also added a trace to see if the onEnterFrame is performing at all. What happens is that the box does not appear to have an alpha change. There is, however, a trace that returns an output of '100' only. But no other numbers, suggesting that the command has stopped.
// Start
container.loadMovie("box.swf");
container.onEnterFrame = function () {
[Code]....
View 6 Replies
Nov 19, 2003
I have this movie [URL] its for a mates building company ok here is my problem (i will explain it to the best of my abilites) i have 3 buttons which each load 1 seperate SWF into an empty movie clip eg. servicesbutton loads services.swf into contentsMC that is fine that is working fine my problem occurs when the loaded movie button is clicked on again... it resets the loaded SWF back to frame 1... how can i make the loadmove command abit more cleverer? like dont load the movie if its already loaded?
View 5 Replies
Aug 9, 2004
I haven't been able to find documentation on why loaded movies via'loadMovie' into another movie clip don't seem to obey onEnterFramecommands. The following code represents a movie clip, 'container',which has a loaded external .swf file, 'box.swf'.I have set the container to begin a decreasing alpha change. I've alsoadded a trace to see if the onEnterFrame is performing at all. Whathappens is that the box does not appear to have an alpha change.Thereis, however, a trace that returns an output of '100' only. But noother numbers, suggesting that the command has stopped.
// Start
container.loadMovie("box.swf");
container.onEnterFrame = function () {
[code]......
View 6 Replies
Jul 14, 2009
I have this for loop where I am circling through an array. I have swf's for each of the numbers like dropTarget_1.swf, etc. For whatever reason I can't seen to get this loaded into my holder.
When I hard code it then it works.
[Code]....
View 2 Replies
Jul 31, 2010
I'm trying to load an image and center it within a movie clip already on the stage.
function loadImage(){ image_mc.loadMovie("fullImage/"+imageNum+".jpg"); image_mc._x= Stage.width/2 - image_mc._width; image_mc._y= Stage.height/2 - image_mc._width;}
I know it's something simple and there are forums dedicated to this topic but I can't seem to view the code examples that the helpers are using.
View 3 Replies
Jun 24, 2004
What I am trying to do is simply load the images location using a string.Here is my Code.
Code:
//Load Images
image1 = "image.jpeg"
[code].....
View 2 Replies
Aug 8, 2008
My header is an mc with buttons that load swf's into a main content mc with this:on (release) { loadMovie("myswf.swf", _root.holder); and that works perfectly (content loads into mc with no page refresh).But..one of my loaded swf's has the same button code on a button to load swf's into the same mc and I get a page refresh.
View 1 Replies
Jan 28, 2005
How can I make a preloader that shows percentage/bar for a movie loaded in with LoadMovie?I've tried using a normal preloader (the one from Kirupa) in the "to load" movie, but it doesn't work.Is there a way to have the preloader assess how big the movie to load is, how a bar etc. and have the movie hidden until 100% is loaded (as seen on the bar)?
View 2 Replies
Dec 18, 2009
Ok I have so many images for every html page. So what I want to do, instead of typing
pic.loadMovie("image1.jpg","_level2");
pic.loadMovie("image2.jpg","_level2");
I just want to call a variable like
PHP Code:
pic.loadMovie("loadImage","_level2");
Is it possible so that in HTML, ill just replace loadIMage with the real image1.jpg???
View 4 Replies