Starting Animation When Images Are Loaded
Hi,My client want an animation for his site banner. I'm using Flash 8 to create this animation and I need to load external images with the loader component 'cause he wants to be able to change them easily..I'm not so good with actionscript and I want the animation to start only when all the images (3 or 4 of them) are fully loaded..Can anyone help me with this?Thanks in advance...
Adobe > ActionScript 1 and 2
Posted on: 05/09/2008 06:51:48 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Animation - Images Loaded From Xml?
Hi all,
I have an idea that I would like to learn to do. But I will need some help as I am very new to Flash.
I would like to create an animation - basically cycling several still images in a loop, with each image clickable as a link - and be able to add/subtract images by adding/subtracting the images from a directory. I've been able to determine from some web searches that this might be do-able with an xml file?
Please advise on whether this is in fact possible and please link me to any tutorials that would help me get this started.
Thanks so much!
Dodge
Starting An Animation
I am looking to start a movie clip animation when a different movie clip button is rolled over and then when it is rolled out the animation will stop...?
Can someone point me in the right direction.. I have looked through the tutorials and I have not found anything...
Thanks
Starting An Animation Through A Class
I have a class that puts a shape on stage called _paneContainer. Inside _paneContainer I'm adding 9 childs to _paneContainer called _paneShape, which each are instances of something I have called "PaneClass".
In this file, after _paneContainer slides out onto the stage, I have an tween event listener looking for the end of the animation. When that happens, I want the first _paneShape to run a method called startAnimating(). I have been able to trace this first object using _paneContainer.getChildAt(0) and _paneContainer.getChildByName("Pane_0) but if I add .startAnimating() it says I'm calling a possibly undefined method. If I try _paneShape.startAnimating, running the function thorough the last instance of the PaneClass I placed on stage, it works fine.
How can I get my first instace of _paneShape to run its startAnimating() method?
Help With Starting Animation Over Movie
Help! I've used every tutorial book I can find and still can't solve this problem.
I have my movie and which teaches my students about fractions but it needed a little animation overlay in it so I added the animation in layers and it works but.....
unless the movie starts immediately when you go to the page the animation won't sync up. The animation seems to start as soon as the page opens. I tried a stop() code which then didn't even let the animation start and then tried a goandplay and again now it starts but really doesn't change anything. I need the right coding to do this. If I'm not totally clear about the problem you can check out the movie to see the problem. I don't know if its easier to post the site or the file let me know. Help!
Lindsey
lwhyte1980@hotmail.com
It's posted at:
http://montgomeryschoolsmd.org/schoo...afraction.html
Stopping And Starting Animation
Hi,
I'm currently working through a number of tutorials so I can learn the basics of Flash but have found a couple of problems with the instructions being given!
Could some please tell me the best way to stop a movie? I have tried to apply the actionscript code stop() to a layer which I have tried placing at the top and at the bottom and this doesn't work, I have even tried placing it on the layer which is moving but still this doesn't work!
If anyone could please point me in the right direction it would be greatly appreciated!
Regards
Toby
Toby Heywood
Starting And Stopping Walking Animation
I need some help with my little project.
I made a character and I let him move over the screen by clicking with the mouse. Next step is make him do a walking animation while he's moving. I made an animation on frame 2 on (_root.milford.animation) but when I try to tell it to go frame 2 with tellTarget() it doesn't work at all. No sign of the animation and I can't even move my character over the screen.
So could someone give me a hand here?
http://piers.buggyashell.nl/bogus.fla
Problems With Button Starting My Animation
I have animated everything into the generic Scene 1. The animation starts with a box having multiple buttons and then the box breaks and something comes out of it. Now, I made the button on the box that I want to trigger the rest of the animation however I can not seem to get the actionscript correctly.
I double click on the button I want to trigger the rest and program in the following for the HIT function:
on (release) {
gotoAndPlay("Scene 1", 2);
}
So it should go back to Scene 1 (that has a stop action frame at the beginning and one at the end) and start from frame 2 until the following ending stop (). But it does not....
Starting An Animation At A Specific Time.
Hey everyone,
I'm trying to figure out how to start a flash animation at 7PM PST every Tuesday PST—this animation would signify a 'live chat.' I can't figure how to make it PST specific, or how to do automate it every Tuesday, and I'm not sure if it's possible with just AS2.0 and no php involvement. I looked up the "get.Timeshift" function in the help, but it didn't make sense to me.
Anyone's insight would be very appreciated!
Thanks!
Chris
Starting And Stopping Animation Relative To System Time.
This is probably a pretty basic question... forgive me, I'm just now starting to learn ActionScript (after three years of using Flash ). I'm using Flash MX 2004 and attempting to do the following: I have an object that windows specific parts of the frame and covers the rest. What I want to do is use ActionScript to make the window animate and move to a specific part of the frame when the computer's system time reaches a desginated value. For example, I have three pictures next to each other horizontally. The window reveals the picture on the far left. At Noon, I want the window to slide for half a second (15 frames @ 30 fps) to the picture to it's right, then stop and stay there. Then at 3:00 PM, I want the window to slide again for a half a second to the next picture to the right, then stop until the next time trigger hits. I already have my motion tweens set up and everything, it's the time issue that takes the scripting. I know that this can be done, I'm just not sure how. Any help is greatly appreciated.
Starting Up Loaded Swfs
Hi,
I've got a swf which loads variables from a database when it starts. I wanted to embed it in another swf with the loadMovie action.
The embedded swf is coming up okay in the outer swf, but it's not performing any of the first frame load actions.
Any ideas how I start it running? This is my first attempt at embedding swfs within swfs so I'm probably missing something obvious.
Starting A Movie When 50% Loaded?
Can someone help me on figuring out how to load a movie at 50%? I am using the following code to preload and play at 100%.
Code:
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = getPercent*100;
this.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
}
Thanks!
Preloader That Loads Both The Animation And Sound File Before Starting The Movie
I've made an animation swf file with a preloader.
The animation loads another swf file when it is triggered to start. That swf file is the music that runs in the background.
How can I make a preloader that loads both the animation file and the sound file before displaying the start animation button?
The movie im working with is here: http://home.c2i.net/dhl/oestmoe.swf
And the sound file that should run in the backround is here:
http://home.c2i.net/dhl/loop.swf
DassMario
Help Need Preloader That Plays Animation Fully Before Starting Main Movie
Hello, I'm in need of a preloader, (or easy tutorial on how to create one), that will run a progress bar and also play a short welcome animation all the way through... regardless of connection speed. One that checks total frames of mc against total bytes loaded or something.
I am SO not a coder, mainly design... so EASY is key. :]
I really appreciate any help you can give me. [desperate!]
Starting Sounds Loaded From An External Swf
I have one instance of a movieClip on the stage (from now on called this). It listens to its own movieClipLoader which loads an external swf file into this.audioLibrary
this.audioLibrary then contains a movieclip called liveAudio which contains three tracks, each with an attacked sound called audio.
I can run something like this successfully:
this.onLoadInit = function(audioLibrary)
{
trace(this.audioLibrary.liveAudio.track1.strName);
}
but I can't run this:
this.onLoadInit = function(audioLibrary)
{
this.audioLibrary.liveAudio.track1.audio.start();
}
How can I gain control of the audio tracks? All objects are set to export for actionscript, my publish settings are right. The audio tracks start if I code a this.audio.start(); locally.
Starting Sounds Loaded From An External Swf
I have one instance of a movieClip on the stage (from now on called this). It listens to its own movieClipLoader which loads an external swf file into this.audioLibrary
this.audioLibrary then contains a movieclip called liveAudio which contains three tracks, each with an attacked sound called audio.
I can run something like this successfully:
this.onLoadInit = function(audioLibrary)
{
trace(this.audioLibrary.liveAudio.track1.strName);
}
but I can't run this:
this.onLoadInit = function(audioLibrary)
{
this.audioLibrary.liveAudio.track1.audio.start();
}
How can I gain control of the audio tracks? All objects are set to export for actionscript, my publish settings are right. The audio tracks start if I code a this.audio.start(); locally.
Starting Flash Movie After Everything Else Is Loaded
Is there a way to have flash load last on page? I want all the bg's and other images to load beofre my flash animation starts. Is this possible?
Also how do we set a transperant bg on a flash doc??
Thanks
Nick
Starting Movie After All Library Items Have Loaded
is there a way to make a preloader script wait until all library items are loaded instead of all frames? (movie is a client navigated slideshow delivered via web) i have a 10 frame scene that is started after frame 10 is downloaded, but each frame has one jpeg on it and all of them haven't finished loading before the scene is loaded because it's based on frames...
does that make sense?
thanks,
dvc
Starting Main Swf Over From Loaded Movies (see Issue)
All,
I have tried to find exactly the solution on this forum but haven't seen it yet.
I have a swf (main.swf) that loads one of two external swf files with this actionscript:
var targets:Array = (["movie1.swf","movie2.swf"]);
var mcl:MovieClipLoader = new MovieClipLoader();
var movieNum;
if (movieNum < (targets.length - 1)) {
movieNum++;
}else{
movieNum = 0;
}
loadMovie(targets[movieNum], this.createEmptyMovieClip("pic_mc", this.getNextHighestDepth()));
var listenerObject:Object = new Object();
listenerObject.onLoadInit = function(target_mc) {
target_mc.onRelease = function() {
unloadMovie(pic_mc);
};
};
mcl.addListener(listenerObject);
Now, at the end of the loaded movies (movie1.swf and movie2.swf in this case) I have a button with:
on (release) {
gotoAndPlay (1);
}
When they were standalone movies, they started from the beginning. Now I want them to point back to the main movie if possible. Possible, how?
Or is it better to have them end (fscommand ("quit", true)) and have the main do the work?
TIA.
-Wes Yates
Random Starting Frame Everytime The Video Is Loaded
Im looking to for my flash video to start at a random keyframe everytime the video is loaded.
I have about 20 layers with images transitioning into each other.
ex: http://www.uniquefood.ca/whyuniquefoods.html
The file: https://pearlwhitemedia.sharefile.co...87eda4505c43d2
Anyone have any actionscript that could generate such an effect?
Thanks in advance
Default Random Starting Frame Everytime The Video Is Loaded
Im looking to for my flash video to start at a random keyframe everytime the video is loaded.
I have about 20 layers with images transitioning into each other.
ex: http://www.uniquefood.ca/whyuniquefoods.html
The file: https://pearlwhitemedia.sharefile.co...87eda4505c43d2
Anyone have any actionscript that could generate such an effect?
Thanks in advance
How To Time The Starting Of An Exteranlly Loaded Movie After A Specific Part Of Main
Plz help with this...
how to time the starting of an exteranlly loaded movie after a specific part of main movie has loaded...
I have a movie called mywork.swf, which is loading thumbnails and display (the display of main clip/ image when u click on any thumbnail) externally from a movie called thumbnail_loaded.swf
Now that is working fine...
But the problem is here... in mywork.swf , I am also loading a movie called tbn_detail.swf whihc has the detail of the work displayed (from thumbnail_loaded.swf) and the serial number of the project page (like in www.albertocerriteno.com , in exhibition link click on any thumbnails and see the numbers with detail on top- thats exactly wat i want) but dont knw how to get it working...if some1 has a similar file or knws how i shd go about it plzzz help ...im working on a deadline so any urgent help wld be much appreciated...
Thanks a ton
Reload This Page Random Starting Frame Everytime The Video Is Loaded
Im looking to for my flash video to start at a random keyframe everytime the video is loaded.
I have about 20 layers with images transitioning into each other.
ex: http://www.uniquefood.ca/whyuniquefoods.html
The file: https://pearlwhitemedia.sharefile.co...87eda4505c43d2
Anyone have any actionscript that could generate such an effect?
Thanks in advance
How To Time The Starting Of An Externally Loaded Movie After A Specific Part Of Main.
Plz help with this...
how to time the starting of an exteranlly loaded movie after a specific part of main movie has loaded...
I have a movie called mywork.swf, which is loading thumbnails and display (the display of main clip/ image when u click on any thumbnail) externally from a movie called thumbnail_loaded.swf
Now that is working fine...
But the problem is here... in mywork.swf , I am also loading a movie called tbn_detail.swf whihc has the detail of the work displayed (from thumbnail_loaded.swf) and the serial number of the project page (like in www.albertocerriteno.com , in exhibition link click on any thumbnails and see the numbers with detail on top- thats exactly wat i want) but dont knw how to get it working...if some1 has a similar file or knws how i shd go about it plzzz help ...im working on a deadline so any urgent help wld be much appreciated...
Thanks a ton
Skipping Missing Images For Dynamically Loaded Images?
Hey all,
I'm creating a image viewer for a photography studio.
I have it dynamically load the images. I'm using a text file to tell flash how many pics there are, the starting number, and the prefix and suffix for the file name ie. Ahp1234.jpg. Im using a simple counter when a person clicks on the "next" button it will add an increment to the starting number. My problem is photography studios often throw out images that didn't come out right, so there is a jump in numbers, and hence I get an error when trying to load an image that isn't there. I was wondering if there was a way to tell if an image has loaded properly using loadMovie. Or perhaps a better method than what I'm using?
I tried
square = new loadMovie;
square.load (_root.Filename);
square.onload = function (success){
if (success) {
//coding
}else{
counter++
}
}
If any one has any insight I would appreciate it.
Thanks.
2d Images 3d Looking Animation?
Ok, so i've looked and im stumped.
I have 3 images of a truck. one of the side, one of the back/side @ about a 45* angle, and one showing its back end. I want to make this truck look like its rounding a corner and drive off in the distance..
Am I on the right path in using shape tweens with shape hints, to 'rotate my truck' to make it look like its rounding a corner? I've started it looks 'ok' -
HOWEVER, when it tweens to shape, any space outside my original rectangle from one keyframe to the other has another instance of my truck image.- when wondering why it was there i made the image of the truck larger than the canvas, and it was tiled... wondering why it was and what may fix that aswell...-
Thanks, any advice or comments are greatly appreshiated!
Edit-. Ps. MX 2004 ( if that makes much of a difference ? )
Animation With Images.
Say I have an image on a web server that is constantly being updated by a webcam. Is there a way that I can tell Flash to be loading that image every 250ms?
The camera is updating it like 20 times a second and I would like to provide the most seamless effect of motion.
My current code, while efficient and almost gets the job done, causes the mc to go away each iteration of getImage() instead of seamlessly loading it over my existing image.
ActionScript Code:
createEmptyMovieClip("imageHolder", 1);
setInterval(getImage, 500);
function getImage() {
imageHolder.loadMovie("image.jpg", this);
}
Let me know what ya think!
Animation Of Images
Hi all
i have to load dynamic images and i have done it.I have added an effect to blur other images on mouse rollover, but i want to show larger image on which mouse rollover instead of blur effect. I don't know what to change?
Please give some suggestions
here is my code
import flash.filters.BlurFilter;
import mx.transitions.Tween;
import mx.transitions.easing.*;
var myTween:Tween;
var img_name_var:String;
img_name_txt._visible = false;
img_var = "images/blue_product.png,images/green_product.png,images/orange_product.png,images/pink_product.png,images/purple_product.png";
var xcord:Number = 10;
xcor = 30;
xcor2 = -300;
ycor = 210;
incr = 0;
//////
img_name = img_var.split(",");
///////
for (i=0; i<img_name.length; i++) {
this.createEmptyMovieClip("mc"+i, this.getNextHighestDepth());
var mclListener:Object = new Object();
mclListener.onLoadInit = function(target_mc:MovieClip) {
target_mc._x = xcor;
target_mc._y = ycor-target_mc._height;
xcor += target_mc._width+20;
target_mc.onPress = function() {
temp = target_mc._name;
index = temp.slice(temp.length-1);
};
target_mc.onRollOver = function() {
delete _root.onEnterFrame;
temp = target_mc._name;
index = Number(temp.slice(temp.length-1));
myTween = new Tween(target_mc, "blur", mx.transitions.easing.Elastic.easeOut, 0, 20, 3, true);
myTween.onMotionChanged = function() {
target_mc.filters = [];
for (var j = 0; j<img_name.length; j++) {
_root["mc2"+j].filters = [new BlurFilter(target_mc.blur, target_mc.blur, 1)];
if (j != index) {
_root["mc"+j].filters = [new BlurFilter(target_mc.blur, target_mc.blur, 1)];
}
}
};
};
target_mc.onRollOut = function() {
delete _root.onEnterFrame;
// }
slideit();
myTween.yoyo();
};
};
var image_mcl:MovieClipLoader = new MovieClipLoader();
image_mcl.addListener(mclListener);
image_mcl.loadClip(img_name[i], "mc"+i);
target_mc.mycode = img_code[i];
}
Variable Images Into Animation
i need to know how i can preload a movie including external "to be loaded" jpg's, does anyone know how?
kind regards,
Marcus
Four Images In Non Stop Animation
Hi all,
I want to do a banner with images passing continuously one after the other in non stop animation.
I have 4 images, I import each of them in a new layer and I create a motion tween from right to left for each image.
Eveything works fine, but after the last image has passed there is a time until the first image appears on screen again in which there’s no images, nothing is shown... How do I fix that? I'd like the first image to come right after the last one .. how do I do that?
Thanks a lot in advance!
Code Animation Using These 2 Images
If you closely look into this animation-glow_device4.fla you will find this is a simple flash tween animation.But please help me code this animation may be using tween class.
Details of this animation:
15 seconds after the page has fully loaded, the (>) button glows from
Extract Still Images From Animation?
Hello,
Does anyone know the best way to extract still frame images, jpeg, gif, png or pdf from a flash movie? I've tried using export image and publish settings but the image turns up all pixelated or totally blacked out. My movie has a lot of movie clips within movie clips, not sure if that makes any difference. Should I somehow flatten the file to get the optimum image quality output?
I tried downloading a swf decompiler but it wouldn't let me save any frames as it was a demo version (called Gordon) and moreover I couldn't see every frame of my movie within the software's stage..if anyone thinks the decompiler is the way to go, do they know of any good versions for a mac os x?
Any help is greatly appreciated
Preloading Images To Flash For An Animation
Hello!
I am trying to do somehting that may be impossible.
We wanto to be able to preload external images dinamically from a remote folder to use in an animation.
The ActionScipts and tutorials we've found talk only about preloading a single image, not a series of 36.
Look at http://insightdesigns.com/carlos/test_3dmx10.html
This is a compiled movie with the images in the swf.
The idea is that anyone could upload a folder containing the 36 images that make up the rotation and flash would simply pull them from that directory and play them.
Does anyone have any ideas on this?
Thanks
[MX04] Twisting Images In Animation
I am designing a website for the club i dj at and the boss wants to have images that are on for 5 or 10 seconds then twist and transform to another image but i dont have any idea on how to do this.
Im using flash mx 2004 professional and need help on how to do this please could you lot help out.
If I cant do it with flash what software do I use and are they free.
PreSet Animation For Dynamic Images?
Hi,
I am trying to load a dynamic image into a movie clip that is already animated on the main timeline. I would like the dynamic image to be animated in the same way. My problem is that I have been using the MovieClipLoader to load the image and it seems to take away the animation for the movie clip once the dynamic image has been loaded.
However, if I simply use the loadMovie function to load the dynamic image, then the it animates just fine. But I would like to use the MovieClipLoader so I can resize the movie clip once it's loaded.
Any ideas?
Can I Create An Animation Of Images From A Directory?
Hi All,
I want to create a flash animation that would take images from an arbitrary location and fade them in and out one at a time.
So far, I'm able to use PHP to read the names of the images I need to display in my animation. I'm using a LoadVars object with a listing of the files. So, my flash script already knows the location and names of the images.
Now I need to somehow load these images so I can manipulate them on the scene.
Should I manually create a movie clip in the library with the fade in/out effect and a generic image to later on swap the images somehow?
Is this possible?
Thanks!
Dynamic Images Animation Problem
Hi All,
I am new to work on an Action Script wherein I need to display the Images dynamically through XML.
I am able to display all the Images but we require an Animation same the effect for the images like this link (http://laco.wz.cz/tween/swf/showswf....ne&w=500&h=500.)
The animation of the Images should start from center of the Stage something like above link. I've attached here with all the files.
The attached file animation is starting from the corner of the stage. We want it to be happend from center of the this stage.
Any help in how to achieve this task will be highly appreciable.
Files attached herewith.
Thanks & Regards
Krish
Looking Flash SWF Animation To Show Images
I'm looking for a SWF animation, something I could place on my webpage and input images via an admin section.
So I would put the SWF in place, and then he would feed himself via an XML file I would do (or something like this) that I would construct with a PHP script from a MySQL database. The script would take randomly images from the DB.
All I want is the SWF, I can organize myself with the XML/PHP/MySQL thing.
The animation (the SWF) has to be extensible, I mean, I want to specify the width and height of the animation and I want it to scroll from right to left continuously, at an average speed. This implies that the animation could be, let's say 900 pixels wide, there could be numerous images at the same time scrolling from right to left, all images would have to keep aspect ratio (the maximum height specified).
I don't care if it's something I have to pay for it.
Does anyone knows something that do such a thing (or something very similar)?
Thanks
Loaded Swf Not Playing Animation
I have a swf from a tutorial located here http://www.virtual-fx.net/tutorials/...extanimate.htm
and it works fine on its own but when I load it into my main movie, it shows the movie clip ( I used as a motion guide) within it instead of its main timeline (where the actionscript is).
I think that it might have something to do with the scripting in the swf I want to load... I am trying to learn programming but I suck
Can someone help me please!
-lissa
SetInterval Animation In Loaded Swf
I'm using the setInterval function to animate a movie clip across the stage. This animation is taking place in a swf that has been loaded into a holder from an external swf. Each time the button is hit, reloading the swf into the holder- the animation moves faster and faster.
- I've tried a clearInterval from the external swf and inside the function in the code of the animating swf.
- I've also tried unloading the movie clip and reloading.
Any ideas?
Share External Images Between 2 Flash Animation?
Hi, I have 2 Flash animations on a Web page. One is a horizontal banner, & the other is a vertical banner.
I am importing the same external JPEG images into both banners. I know that some browsers may cache the images, but I've read that other browsers won't so the user will download the same images twice.
Is there a way to share images (or other resources for that matter) between 2 Flash animations on the same Web page?
Thanks,
May
Animation W/fading Images And Background Music
Hi there!
Please help me, I'm a total n00b trying to make my first flash animation.
The animation I have in mind has
2-3 changing images
looping background music
a fading transition between the images
a sound on/off button
Something like this:
http://www.freeforumzone.com/viewmes...82&idd=426&p=8
(scroll down to post #2)
I was wondering if there is a simple template available in Flash 8(or any other program) that allows you to create these types of animations quickly and easily?
Or you can recommend me any tutorials to read, anything to start me off. I'm willing to learn ...
How To Database Driven Images In A Flash Animation? Possible?
Hi. I have a flash animation which is simply a fade-in/fade-out of three
images, all the same width/height, side by side.
I want to be able to upload new images via my content management system and
have them appear in my Flash animation without having to recreate the
animation every time. Is this even possible?
I can upload photos to my web server via a password protected admin system
(ASP), which allows me to browse images from my PC and upload them to the
server (and also enters file info into my database). Can I drive the Flash
animation using this database?
Would appreciate some advice, links to tutorials where/if they exist etc.
Really appreciate it. Thanks.
Nath.
Export Scripted Animation As Images/frames?
Is there any method/application to publish/export/convert a Flash movie as an animated gif or bitmap sequence?
It seems to only work for key-frame based animation.
Thanks,
Dynamically Loaded Jpg Blicks With Animation
Hey everyone.
I've recently run into a little glitch with this site i'm working on.
On the about me page of the site, I have an external loaded image using the loadMovie function. The only problem i'm running into is that it blinks after the animation of the mask that i'm using finishes. It then blinks again when a button is clicked to go to another page. I know that the loadMovie function is the problem, but i need the image loaded dynamically so that the client can change it in the future....
The problem can be see here http://frankelphotography.com/fpsiteHelp.swf
fla can be found at www.frankelphotography.com/fpsiteHelp.zip
think you could help me out? Confused
Thanks,
God Bless
PS. what's a good way to make sure that the photo is loaded competely before the user gets to the 'page'? So that the animation can be seen?
Thanks for any help.
Animation Problems In Externally Loaded SWF
Hey,
I was wondering if anyone could help me out with the following problem:
I have a SWF file, that externally loads another SWF which has actionscript that animated a image.
Go --> http://www.elcardesign.com/flash/3dstyling.swf to see the file and http://www.elcardesign.com/flash/3dstyling_image.swf to see the externally loaded file.
As you may see, the externally loaded file (3dstyling_image.swf) has an image, that is animated by the mouse, depending where you move it over the image, the image moves in the opposite direction. I have externally loaded that file into the main file (3dstyling.swf). Here is where the problem appears, i assume this is some kind of conflict with scripts, but im not sure.
When you scroll your mouse over the image, it moves for a while, but it seems that when u stop moving the mouse, the imagestops moving, and its like if it turns into a button, and then when you move the mouse again, it doesnt move, you have to roll your mouse out, and back in again.
the externally loaded file works perfectly as you may see, but when loaded externally into the main file, doesnt work properly no longer.
Below are the actionscripts for both, externally loading the file into the main one, as well as the actionscript used to move the image according to the mouse.
Externally loading file:
Code:
//--- CONTENT BOX SCRIPT ---//
var mcl:MovieClipLoader = new MovieClipLoader();
var mclL:Object = new Object();
mclL.onLoadProgress = function(target,loaded,total) {
loader.percent = Math.round((loaded/total) * 100) + "%";
loader.loaderArrow._x = Math.round((loaded/total) * 200) + 130;
}
mclL.onLoadInit = function() {
loader._visible = false;
loader.percent.text = "";
}
mcl.addListener(mclL);
mcl.loadClip("3dstyling_image.swf",contentBox);
//--- CONTENT BOX SCRIPT END ---//
Moving image according to mouse in externally loaded file:
Code:
//--- PANEL = IMAGE ---//
//--- STROKE = BORDER AREA WHERE WHEN MOUSE IS OVER ACTIVATES THE SCROLL FUNCTION ---//
panel.onRollOver = panelOver;
function panelOver() {
this.onEnterFrame = scrollPanel;
delete this.onRollOver;
}
var b = stroke.getBounds(_root);
function scrollPanel() {
if(_xmouse<b.xMin || _xmouse>b.xMax || _ymouse<b.yMin || _ymouse>b.yMax) {
this.onRollOver = panelOver;
delete this.onEnterFrame;
}
if(panel._x >= 200) {
panel._x = 200;
}
if(panel._x <= 185) {
panel._x = 185;
}
if(panel._y >= 170) {
panel._y = 170;
}
if(panel._y <= 80) {
panel._y = 80;
}
var xdist = _xmouse - 178;
var ydist = _ymouse - 125;
panel._x += Math.round(-xdist / 30);
panel._y += Math.round(-ydist / 30);
}
Appreciate your help!
Thanks
Simple Animation Using ActionScript? 35 Unique Images Sequencially.
hello there people, I used to be so helped by these great boards and Im proud to be back. Some family issues made my time necessary. Its so great to be back into programming animation land!
So with no further-a-doo! I will ask my question! Im not asking for a step by step tutorial on how to do everything, Im just asking fellow veterans what kind of method they would go about; I can figure out the details later even if there isnt a generous samaaritan!
In the opening sequence of my new animation, I would like to simply have a series of 35 different images animate themselves into the center of the screen. (as in the image is enlarged whenit first appears, and shrinks into the center of the screen).
This isnt very difficult to do manually, but it is time consuming. So rather than animating it one by one, I was thinking to code this. There must be a way to tell flash "Let image 1 appear in empty movieclip, let it rotate into place, let image 2 appear in empty movie clip"
These are just normal images in a folder I named simply "pics".
Is this something where I should use "arrays"? That's one wall I've yet to climb being that Im only a novice programmar and more of an animator....thanks always for kind reccomendations.
|