[F8] Saving And Retrieving Game Time And Manipulating Frames Of A Movie
Hi all , I have an interesting question for you. What do i do if i wanted to store the current day and time in a cooky on a users computer and then everytime the user used the flash program - a specific frame of a movie would show depending on how long its been since they first 'joined' the flash program i.e. with a username and password?
Many thanks in advance
Regards Q
FlashKit > Flash Help > Flash Newbies
Posted on: 07-21-2007, 06:27 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Saving To And Retrieving From The Desktop
I am an educator in the public school system and I am in the process of writing a Flash movie/application designed to simplify desktop publishing and put it in the hands of first and second graders. The app is close to completion, but I have a few hurdles I need help jumping.
Is it possible to have a flash movie browse files on the desktop? This would be a prerequisite to my second hurdle, which is saving files to the desktop.
Here’s how it works…the program is designed to allow kids to create either a 4-page or an 8-page booklet with clipart and text out of a single sheet of paper. So at most, there will be 8 text fields which be assigned variable names and then 8 movies containing clipart which will also need a variable assignment. It would be very easy to compile these variables and write them to a text file on the server via PHP, but I would like to write them to a text file on the desktop. Then, later, have the movie find that text file through LoadVars and plug the info back in the appropriate text fields in the program. What is necessary to make that happen?
Thank you for your help.
Take care.
Saving Data To Database And Retrieving It
does anyone know of a tutorial that explains how to save variables from flash to any database and the retrieving it using ASP or PHP scrips? i really need a very detailed tutorial since i dont know nothining of php or asp or flash action scrip that deals with sending and receiving variables.. maybe a tutorial on how to use the new flash communication thing?
Retrieving And Saving Data Into Database
Goodday to all Flash users,
I am currently using Flash MX to create a simple e-Book. One of the function is Bookmark. This function will bring up a box that contains a listbox, one "Add" button and one "Delete" button.
For example when a user is in Chapter 5, then click on "Bookmark" in the menu, that box pops up. When he/she clicks on the "Add" button, "Chapter 5" would be displayed in the listbox.
I need to save this info into a database so that when user opens the e-Book, the data should be retrieved from the database and store into the Flash e-Book.
Can somebody show me the code to do this please? Or maybe a link to a tutorial on this perhaps? I had went thru the Macromedia Flash Support Center on Creating Forms with UI components tutorial, but it doesn't teach me how to save/retrieve data into/from database.
Would appreciate it very much if anyone could help me on this, thanks a bunch!
Saving/retrieving Settings With MyLocalSO
K, i'm making a game (not for web). and there are option menus. all it's doing is.. if they press the button "on" or "off" then it changes the variable, _level0.setting1$="on".
also, i need to do this with multiple settings. in one file.
all, i want to do is save that variable on their computer, and when the game loads uses that variable. i have everything working. inside itself. and i was using a txt file. i could recieve the variables. but it wouldn't acknowledge them.
i searched all over, i started to see the myLocalSO would work perfect for what i'm trying to do. but i couldn't actually find help for what i'm trying to do.
thanks.
Saving Download Time By Loading Swf Into Dummy Movie?
Anyone please help?
There is a tutorial on loading swf files into dummy movies to save on download time. I tried it and can't for the life of me make it work.
I created a dummy movie on main timeline and named the movie symbol Container.
I made a script to load the swfs into this movie by:Load Movie command, target than /Container
for some reason I can't get the swf file to play this way.
Is there something that I'm missing. I'm pretty much doing what the tutorial says.
Tom
Saving Download Time By Loading Swf Into Dummy Movie?
Anyone please help?
There is a tutorial on loading swf files into dummy movies to save on download time. I tried it and can't for the life of me make it work.
I created a dummy movie on main timeline and named the movie symbol Container.
I made a script to load the swfs into this movie by:Load Movie command, target than /Container
for some reason I can't get the swf file to play this way.
Is there something that I'm missing. I'm pretty much doing what the tutorial says.
Tom
Shared Object / Saving & Retrieving Arrays Problem
I have used SO's to save and retrieve simple variables successfully, but I am a problem saving and retreiving array data in the following example:
http://www.nottingham.ac.uk/home/ccz...llRenderer.fla
A user selects several options using radio buttons. All that happens is that the SO should store in memory which buttons the user clicked on. If run through flash with the output window, you can see that when the save button is clicked, the data is saved. But when you load the activity a second time, the array data that was stored in the SO only gets recalled as 'undefined'.
Can someone suggest how I might fix this please? It may be to do with how I am moving the array data around, I am not sure.
Thanks
Manipulating Time For Website
hi I don't know if this is a newb question but
basically I am trying to create a "normal" flash website with
one catch. After ie. 45 seconds, it automatically moves the timeline
to ie. frame 200 regardless of what frame(different webpage section) the user was on.
Obviously I need a global variable and some way for flash to measure the time. any comments/suggestions welcome
thanks
Help With Movie Time And Frames
Aight, so I've got a movielcip with 2000+ frames (dun ask why just go with it) and I need to display the total time it will take to play that movieclip as well as the elapsed time.
i.e. 3:49 (elapsed mins) of 5:00 (total mins)
To be displayed as "3:49 : 5:00"
Here's the kicker, I can't use getTimer() at all, since this needs to be reliant on a frames only. Some help would be nice
Manipulating MovieClips For A Game (Play Once And Notify)
Hi Everyone,
This is my first post, so please take it easy on me . Anyways, my situation is that an artist friend of mine is taking an independent study on flash animation for college, and I'm a comp. science major very familiar with C++. We decided that it would be cool to make a game together and it so happens that it will help me fulfill my Art Minor. So the jump to AS 3.0 wasn't too bad and we've made some good progress on the game. There is one thing that is escaping me so far though, and the game kind of hinges on it.
Is there a way to tell a movie clip to start playing from beginning, only play once, and let me know when it has finished playing??
Some things to know, the movie clip is assembled from an animation made in Flash CS3 that has several layers (15 or so?!) but it of course is referenced as one movieclip. We really can't do that part any other way and it in fact works great for idle characters and running characters. The time it doesn't work is on an attack animation. I want to be able to start attack at the beginning, go through one attack cycle, and then have a way to tell when it has finished. If I could do this I am confident the rest will fall into place, but so far all I have seen is "make into AS 3 code as Animator" (not an option with multiple layers) and some other stuff about "play(), rewind()" and other stuff that just doesn't seem to work on a normal movieclip.
If anyone has any ideas or knows of some function of MovieClips that is escaping me, your help would be greatly appreciated!!!
I don't know what to give you for code as I have a lot, I guess really I just want to be able to in effect say:
mc.___(___) // plays the movieclip once from the beginning
___________ // maybe some event listener for when the end
// of the movieclip is reached so that i can then
// call a function that puts me back into my prev
// animation
Thank you so much for looking!!!
-Ryan
Frames Per Second Display? (In Game/Movie
Hi,
I was wondering how I could go about making a Frames Per Second display like the one in game below. (Except with a limit of 8 digits.... like this: 29.234531).
http://www.timdrew.com.au/shooter.html
I would also like to display the framerate in game/movie instead of in the output like some scripts do.
Thanks,
Mr_Welfare
Movie Length Based On Time, Not Frames
Hello all,
I was wondering if anyone knows how I can have a movie hang on a frame for a specified amount of time(in seconds, preferably) before moving to the next frame. Any suggestions?
Mark
Retrieving Server Time?
Hey people,
I have a flash site which alters its state depending on the time of day in this particular city. Only the time I retrieve is currently off the users puter.
The site is hosted on a server here in our city, so I really need to retrieve the time off the server. Is there a method for this??
Cheers
Brucha
Load Movie Clip After A Certain Amount Of Time/frames Played
I'm making a site out of flash with different sections accessed from a main menu. I'd like to be able to access any section from any section. Each section has an into and outro. I'd like the section to intro in, display the info, and then when another section is selected have the current section outro before the next one intros. All of this with externally loaded swfs inside a movie clip. So i need a button (set in the main movie) script that does this in plain english:
On release play currently loaded external swf for "N(frames or seconds)"
Then load this external swf into the same container to replace the previous one.Is it possible, or is there a better way of going about this? Thanks!
Flash Game, Retrieving Avatar From Different Source
I’m making a shooting game and i have a little avatar down the bottom for the person to choose out off, now all i want to know is that when the person puts in there name at the start of the game, this game is going to be for a special occasion at (deviantart.com) that the game can grab there avatar if they are a member at deviantart.
like example, {
if they type in 'member1'
i want flash to grab http://www.deviantart.com/ bla bla/bla bla/member1.gif and swap it with the one there in the flash file...
now is this possible? and how do i go about doing it.. Thanks for you help.}
Problem Retrieving NodeValues, Getting A Big 'Null' Each Time
Hey there,
this is my first attempt at parsing xml into flash from scratch, i've read through most of senocular's tut on kirupa so i've got a loose grasp of the fundamentals, i just need help filling in the gray areas.
this is the xml i'm attempting to parse;
HTML Code:
<stageitems>
<stage>
<homehead>Blah Blah</homehead>
<homebody>Blah Blah</homebody>
<homefooter>Blah Blah</homefooter>
</stage>
// **the 'stage' node below here repeats three more times**
<stage title="RENEWAL" path="images/renewal" >
<item image="LHimage_1.png">
<description> The first left hand image of Renewal</description>
</item>
<item image="LHimage_2.png">
<description> The Second left hand image of Renewal</description>
</item>
<item image="RHimage_1.png">
<description> The first right hand image of Renewal</description>
</item>
<item image="RHimage_2.png">
<description> The Second right hand image of Renewal</description>
</item>
</stage>
<stageitems>
And heres what i've played with just to retrieve the first 'stage' nodeValues, but i just can't get it to click ;
ActionScript Code:
var xml:XML = new XML();xml.ignoreWhite = true;xml.onLoad = function(success) { if (success) { var stage = this.firstChild.childNodes; numOfStages = stage.length; for (var i = 0; i<numOfStages; i++) { var homehead = stage[i].firstChild; var homebody = stage[i].childNodes[1]; var homefooter = stage[i].childNodes[2]; castMC.StagesWrap.homeMC.homeHeader_txt.text = homehead.firstChild.nodeValue; castMC.StagesWrap.homeMC.homeBody_txt.text = homebody.firstChild.nodeValue; castMC.StagesWrap.homeMC.homeFooter_txt.text = homefooter.firstChild.nodeValue; } } else { castMC.StagesWrap.homeMC.homeFooter_txt.text = "Error loading XML file"; }};// load the xmlxml.load("headerData.xml");
it just returns, null and i just can't figure out why
thanks
Cam
Probelm In Manipulating "LoadMovie" Frames
Is there any way I could manipulate the frames of the movie loaded during run time?
For example I've loaded an swf file into a movieclip, how can I play play with the frames of the loaded movie? Is it possible?
Saving Frames As Jpegs
I'm trying to create a flash application that will generate different maps based on the user input. The end goal is for the user to be able to save this map as an image. Is there a way to save a frame as an image using ActionScript or any way at all?
Saving Data Across Frames
Ok here is my situation. I've developed a quiz application. Their is 30 frames. 2-29 is the presentation that contains the answers. Frame 30 has the quiz on it. When the user hits submit (once theyre all answered) and if their are wrong answers, it does not continue and it highlights the wrong questions and sets some _visible = false buttons to true. The buttons say "Review answer" which is going to take them back to the frame that has the answer and once that review is over it goes back to frame 30.
My problem is that when the user returns to the quiz frame, everything is reset. How can I store what the user has already selected so when they come back to frame 30 everything they filled out is still their?
Flash 5: Help Saving Frames From .swf As Jpgs... Is It Possible?
hi, im fairly new to flash, and have only been working with it for a couple of months now.
i was just wondering if anyone could tell me if it is possible to action script a button to save an area of a flash movie as an image file locally on someones pc.
basically i am making an interactive character creator for a website: www.controlarms.org and they have a campaign where you sign up and submit an image to a gallery. they want customisable characters on there. so basically i have got as far as the movie working... link to movie here. but i cant find anyway of making a button to save the created character to upload to the database.
please help!
thanks.
Saving Text Box Info Between Frames?
I have a text box on the first "tab" (first frame) of my page which writes directly to a dynamic text box somewhere else on the page.
As soon as a click on the second "tab" (second frame) and go back to the first tab, the text box on the first tab is cleared and does not remember what I wrote in it before.
Is there an easy way to address this issue?
How To Disply Time In Game And How To Stop After The Game..
Hi all,
i need help on drag and drop game...
i have done the drag and drop function, for this game timer has to be shown, after user finishes the drag & match, it should give finish alert and time taken for this game (please tell me also how to stop time after he finish the game) is to be sent to some external file or some database...
can it be done?
i have attached the .fla file also..
Saving A Game
is there anyway i can make a game saved, so whenever i play again an i click load it loads me back to where i saved.
Saving A Game
I'm making an RPG using Flash MX 2004 and I need a way for the player to save their game. The final product will be a projector file (.exe) and I need a way to write to an external text file their level, stats, location (a number representing which save point they stopped at) and what bosses they've already taken care of. I also need a way to read from this file when the player starts the game. Anything that will save this information and keep it indefinitely would help...cookies won't do because most people have those deleted after a certain period of time.
I'm not sure if this is a different problem or not, but it would be awesome if i could set up some sort of installer that puts the program itself in the program files directory and all the save files there, then puts a shortcut on the desktop. That way the save files would not be sitting around on the desktop to clutter things up or get accidentally deleted...
Any help with either of these things would be greatly appreciated.
Saving A Game
Hi, i was wondering if i had a flash game offline game. How could i make it possible to when they save tere file they can load it make up i want it like it gets saved to my my sql database is that possible? if yes how?
Saving Time
anyone have any idea for preloader that loads upto 20 external swfs at the same time ?
100% means all 20 loaded
many thanks in advance
Avi
Saving Time
For those of you that have designed fully flash sites, do you have any time saving tips for me? Ways to streamline things like multiple similar buttons, transitions, etc...
Thanks.
Action Script, Saving Amount Of Frames
What I have is 1 menu bar and when I press it, depending on the frame I want it to go to a part of the movie. What I have is 4 buttons
Home, About, Bands, Contact
So what I have right now for about is...
(Don't know if this is right)
on (release) {
set (bands, false);
set (home, false);
set (contact, false);
set (about, true);
if (endb=true) {
_root.gotoAndPlay("endb");
} else if (end=true) {
_root.gotoAndPlay("enda");
}
}
Now End and enda are the ends of their scene. End is the end of home, while enda is the end of about.
Now at the beginning of each scene I have something like this (example used from home)
set (end, true);
set (enda, false);
set (endb, false);
set (endc, false);
and when I click bands letsay I want it to play the end of home, and then:
if (bands = true) {
_root.gotoAndPlay("band");
}
if (about=true) {
_root.gotoAndPlay("about");
}
and the frames are properly named. Now about and home works fine, but for some reason when I click bands (on about or home) it goes to about if the frame is on home, and home if the frame is on about. Does anyone know a simpler way (maybe without true or false, perhaps order = bands, or something) or a correct way to do this? By the way, I tried without using set as well. Thank you very much
Saving Game Results
I am trying to edit a game script to save to a server residing text file and not a local file Flash 'cookie' as it is currently doing, using the script below. I have no idea at all what I need to change to get it so save to say C: est.txt rather than the Flash generated .sol file.
function initSharedObject() {
soHighscore = SharedObject.getLocal("GameResults");
if (soHighscore.data.fileCollection == undefined) {
soHighscore.data.fileCollection = new Object();
}
}
// To save the game results
function saveHighscore() {
with (soHighscore.data) {
if (fileCollection["highscore"] == undefined) {
fileCollection["highscore"] = new Object();
}
fileCollection["highscore"].content = arrScore;
trace("Highscore saved");
}
}
Your help to edit it would be most appreciated
[F8] Saving And Loading Game.
Hi, i am aboutto start a lenthy game and was trying to search for a tutorial that can allow players to save their game and load it at anouher time but i cant find one.
I think it can be done by cookies and a variable. If so i want to be able to save the players x and y, cash, health, weapon, misions completed etc.
if any one knows how to do this or has a better way please help =-)
Chris
Saving/Loading Game
I am making a game where you have to defend a Fortress. Flash will record things like money, score, ammo, progress, etc into arrays/variables. I want the user to be able to click a button to save these variables to the local computer (not a database or anything, since I want this feature to work offline too). Then, when the user decides to quit the game and come back later, he can just click the load button, and this will load the game. Then it will load the variables/data from the computer so the player will be where he left off.
Manipulating A Flash Movie From Another
Hi there, I have a navigation bar and a header, both individuall flash movies in a html file... I have done this so long ago, but how can I call from one movie and change the other movie... I remember that you have to use
function header_DoFSCommand(command, args) {
Does anybody know of a tutorial that can help me thanks...
Rafael
Day Light Saving Time
Currently i am using a "clock" on a site, and altough it does display the time, date and year correctly.... i have been experiencing some difficulties after having to set the day-light saving time (because i live in Holland).
So now when i have for example : 2:50 PM on my computer
the website shows : 1:50 PM
how can i change this ???
This is a "bit" of the whole script
-----------------------------------------------------------
if (hour<12) {
meridian = "AM";
}
if (hour>12) {
hour = hour-12;
meridian = "PM";
}
if (length(minutes) == 1) {
minutes = "0"+minutes;
}
if (length(seconds) == 1) {
seconds = "0"+seconds;
}
currenttime = hour+":"+minutes+":"+seconds+" "+meridian;
------------------------------------------------------------
I'm sure the script relies on the computers time, so it should automatically adjust to the current time.....but somehow it doesn't!
Saving Time With Actionscript
hello,
I am adding the same sound to many many rollover buttons.
is there a way to add sound to one button and then tell flash to repeat this on all the other buttons?
if i want to change the sound, i feel ridiculous editing each button.
Saving Bitmap At The Run Time.
I'm working in a flash project and there is a requirement as follows.
Once a user regstered in the site, the user directs to a flash page where he can select a background and inputs his details to create his membership card.
My problem is after finishing the card generation, the user should be able to save this card as a either JPG or PDF.
Hope any body will help me with this...
Thanx.
Nirosh.
Saving Game Information In Flash 5
Hello all,
I am hoping someone can help me out. I am trying to make a game in Flash 5 and I would like to know if it is possible for the user to click a button to save the game where they currently are and have that information sent to an external file and then when they come back to play again, and they choose to start where they left off, flash will check the file to see what scene and frame they were on and take them there. If this is not possible then how would I make it were each level has a code that can be entered and flash checks against an external file for a preset list of codes for each level and then takes them to the begining of the level they last played or each scene ? Every level is it's own scene.
The game is NOT for the web and will run off a CD. Also I am familiar with Flash for animation but no nothing about using it for Action scripts so if you can dumb it down a little I would apreciate it. Thank you in advance for any help I can get.
Saving And Loading Game Scores
I am wondering if someone could please tell me how I could save and load game scores? I want to load the first name then their score and finally the time that they completed the game in. Is it possible just loading a text file or do I have to use xml? I want people to be able to download the game from my website then play it. Not play it on the Internet. Can you please show me some code to get me started? Thanks in advance.
Manipulating Variables From A Separate Movie
I'm using
myScrollpane.loadScrollContent("my.swf", "functionHandler", _parent) to load a movie into the scrollpane of my new movie. Is there anyway to manipulate the variables, such as text, in the new movie from the old movie?
Something like scrollpane.NewMovie.textfield.text = "this is text from the main movie" . Thanks.
Gregg
Manipulating Movie Clips (help A Student)
Good evening
I am in need of some help. I am in the midst of creating a banner project for school. I have created several movie clips that contain text and effects. I would like to have them played at different times on the main time line. Although I would like to have the main movie clip continue as a constant. I am unsure of how to achieve this. I have included a link where you can download my FLA and see to what I am reffering too. Any help tonight would be greatly appreciated.
thank you in advance
Mario
www.meghanstorm.com/bannerviaohelp.fla
Manipulating Movie Clips At Runtime
I have placed random movieclips into an empty movieclip (named "container_mc") on the stage with the idea of resizing container_mc. However, I want to change the _x and _y of the clips inside container_mc first.
Previously, I had the random movieclips load directly to the stage and used:
Code:
_root["C"+variable]._x=whatever
to affect the particular clip. Now that they are inside container_mc, that method no longer works.
Any ideas? Thanks in advance.
Manipulating Timeline Within A Movie Clip
NB: I figure this outmyself now so could it please be deleted, sorry it was very easy.
movieclipname.gotoAndPlay(frame);
How easy is it to manipulate the timeline of a movie clip that is in my library.
What i am referring to is the movie clips individual timeline rather than the timeline of the main stage. Can anybody help with this? I'm in work so its hard to find sites we can access to search for this info, but i tried my best on google before posting here.
Regards,
Daniel Harris
Date/time And Daylight Saving
hi all i've got a script that shoes day, date, month, year and current clock time on machine, but it doesn't take into account daylight saving time and as a result the time shown is 1 hour behind what the "real" time is,
how can i fix this problem? any ideas greatly appreciated.
Creating A Time Saving ChildNodes Var
Hello all
I have been passed a project that integrates XML with flash and as I only have a limited knowledge of using XML I wondered if anyone could offer some help on this question.
if you go to this link it shows how the file works and looks now which should help in my explanation. At the top of the map there are next and previous buttons which take you to different "divisions/ladders". These divisions are set as the first childNode and within these are the different bits of information that is shown at the bottom of the map (map name, clan name, next match etc).
Now, the countries are set up as buttons so the information is shown as you roll over each of them and this is where the problem arises. If a new division is added then I will have to go through each country (40+ and counting) and then change each mention of the "division" childNode 10 times within each button. I wondered if it was possible to set up this first childNode as a variable that would only need to be changed once for the whole of a new division rather than 400+ times.
An example is the following:
Code:
on (rollover) {
country=sd.childNodes[0].childNodes[8].childNodes[0].firstChild;
clan=sd.childNodes[0].childNodes[8].childNodes[2].firstChild;
field3=sd.childNodes[0].childNodes[8].childNodes[3].firstChild;
field4=sd.childNodes[0].childNodes[8].childNodes[4].firstChild;
field5=sd.childNodes[0].childNodes[8].childNodes[5].firstChild;
field7=sd.childNodes[0].childNodes[8].childNodes[7].firstChild;
field8=sd.childNodes[0].childNodes[8].childNodes[8].firstChild;
field9=sd.childNodes[0].childNodes[8].childNodes[9].firstChild;
field10=sd.childNodes[0].childNodes[8].childNodes[10].firstChild;
mapImage.loadMovie("http://www.eurodomination.co.uk/cod2/images/maps/mp_leningrad_small.jpg");
}
As you can see this is one button's rollOver state so to clarify is there a way to make a var that will get rid of the first childNode as that is the only one that would change when a new "division" is created and make a variable that says whenever the player is at a certain frame/label/scene that it would know that it is part of "division1" (childNodes[0]).
I hope this makes some sense but if not please let me know and I'll try to clarify as much as possible. I just hope there may be some solution that will save me many hours and neaten up the coding.
Thanks in advance
James
Proper Syntax For Manipulating Movie Clips
What I am trying to do, is I have created a counter that names movie clips "my_mc"+i, and i increases by 1 each time the user does something specific. What I am wondering is what the proper syntax is if I want to use something like this:
["my_mc" + i].beginFill(fill, alpha);
I know this syntax is wrong, but I am wondering what the right syntax would be. Is it easy, or do I have to create an array and enter each into an array?
Thanks.
Manipulating Swf Loaded Into Main Movie Problems
I am trying to change some properties of a movie that I have loaded into my main swf using the loadMovie command. I am applying the code to the instance of the movie clip that the movie is loaded into.
I can load the movie in no problem, but when I try to get to the manipulation part is where I am running into problems. I have been searching through previous posts here and was referring to this one:http://www.kirupa.com/forum/showthread.php?t=79640
for guidance in making certain that the clip is loaded before the script runs to (in this case) scale the clip.
Right now, once I apply the code it is not working and it is unloading an image that was previously loaded into the file. I have checked to make sure that I am not loading into the same level.
The loaded swf that I am trying to scale is the text that comes in that says "A Catholic Church Organization Serving the Church"
You can see the swf before I try to scale the clip
and after
Here is the code before:
_root.createEmptyMovieClip("text", 12);
_root.text.loadMovie("serving.swf");
_root.text._x = 165;
_root.text._y = 350;
And the code after:
_root.createEmptyMovieClip("text", 12);
_root.loadMovie("serving.swf", text);
_root.text._x = 165;
_root.text._y = 350;
_root.onEnterFrame = function() {
if (_root.text.getBytesLoaded()>=_root.text.getBytesT otal()) {
MovieClip.prototype.grow = function(a,b) {
this._xscale += b;
this._yscale = this._xscale;
if (this._xscale>a-1 && this._xscale<a+1) {
delete this.onEnterFrame;
}
}
}
};
_root.text.onEnterFrame = function() {
this.grow(250,50);
}
If I should post the fla, please let me know.
Manipulating Swf Loaded Into Main Movie Problems
I am trying to change some properties of a movie that I have loaded into my main swf using the loadMovie command. I am applying the code to the instance of the movie clip that the movie is loaded into.
I can load the movie in no problem, but when I try to get to the manipulation part is where I am running into problems. I have been searching through previous posts here and was referring to this one:http://www.kirupa.com/forum/showthread.php?t=79640
for guidance in making certain that the clip is loaded before the script runs to (in this case) scale the clip.
Right now, once I apply the code it is not working and it is unloading an image that was previously loaded into the file. I have checked to make sure that I am not loading into the same level.
The loaded swf that I am trying to scale is the text that comes in that says "A Catholic Church Organization Serving the Church"
You can see the swf before I try to scale the clip
and after
Here is the code before:
_root.createEmptyMovieClip("text", 12);
_root.text.loadMovie("serving.swf");
_root.text._x = 165;
_root.text._y = 350;
And the code after:
_root.createEmptyMovieClip("text", 12);
_root.loadMovie("serving.swf", text);
_root.text._x = 165;
_root.text._y = 350;
_root.onEnterFrame = function() {
if (_root.text.getBytesLoaded()>=_root.text.getBytesT otal()) {
MovieClip.prototype.grow = function(a,b) {
this._xscale += b;
this._yscale = this._xscale;
if (this._xscale>a-1 && this._xscale<a+1) {
delete this.onEnterFrame;
}
}
}
};
_root.text.onEnterFrame = function() {
this.grow(250,50);
}
If I should post the fla, please let me know.
|