SwapDepths On An Author Time Movieclip
I have a movie clip on a timeline. On frame 1 it's at scale 100 and at frame 5 it is scaled up. I need to swap the depth of this movieclip at runtime so I am using swapDepths. Before I call swapDepths, if I go to frame 5 the movieclip scales up as it should, but after I call swapDepths on this author-time created movieclip it seems to reset all its properties and now when I say gotoAndStop(5) the movieclip no longer scales up. It's as if a new instance of the movieclip was created at a positive depth level. I am looking for an alternative to dynamically attaching this movie clip because I don't want to hard-code the position and scale values. I am working with some non-programmer artists so I want to make it easy for them to position the movie clip as they see fit without altering the code. Any suggestions? Thanks a lot.
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 03-01-2007, 07:22 PM
View Complete Forum Thread with Replies
Sponsored Links:
Accessing Author Time Instances By Name
Hi,
I am trying to control the timeline of a movie clip (created at author time) which is nested within another movie clip.I have the flash compiler set to automatically declare stage instances and when I debug, I can see the children underneath the parent object, and they are not null.
I'm using: getChildByName(...) as Movie Clip
But when I try to do anything with the movie clip I get the Error 1009 ...null object reference...The object is does not appear to be null, although FP says it is. Any help or guidance to a resource on this type of thing would be great. Thanks in advance
View Replies !
View Related
Help Mixing Author-time Animation With AS
I've been doing a fair bit of AS, and I thought I had this issue down, but maybe I'm too tired to get this right.
I'm trying to use some hand-built animations using objects and tweens on the timeline, where the animated object is an empty MovieClip. Some animations are movement, others are alpha fades. In the AS code, I am using attachMovie to attach another movieclip from my library to the animated container object.
However, when I run it, the author-time tweens appear to be ignored. The
container does not animate, nor does its attached child movie.
Is there a good resource or example for how to accomplish this. I want to do some complex animations by hand and then reuse them for various photos.
thx,
BR
View Replies !
View Related
Referencing Author Time Buttons On The Stage?
I have some buttons on the stage that were manually placed during authoring. They all have their own instance names manually assigned already. I need to code them thru my Document Class. How do I get reference to them?
I know how to do this if I am placing them from the library at runtime, but not this way.
Thanks
View Replies !
View Related
Can You Tell Images Created At Author Time To Load Dynamically?
hello,
I have many images in my movie which I just imported onto the stage and positioned manually, but now the site loads slow. Can I tell all the images to load dynamically with some lines of AS or a publish option or something else or do I have to replace all images with placeHolder-MovieClips and use the loadMovie command to dynamically load the images?
Many Thanks !!
View Replies !
View Related
[F8] Embedding For Foreign Languages-runtime And Author Time
oh oh- never thought i would have to ask this...i am doing a site in English, Italian , and French....this word: "Événements" has clearly proven i don't know how to embed fonts outside of Latin English...All i get is nements. Now, i have some text boxes on stage from authoring time, and some created at run time....what do i need to do to cover all bases for all text boxes...it's impossible to say which of the boxes will use words such as "Événements"
or is the problem my xml??
Code:
<menubutton label="Services" sub0="Traductions" sub1="Événements" sub2="Faits sur commande">Service au francaise......you have to put the french things here.</menubutton>
View Replies !
View Related
Communicate Between Author Time Created Movie Clips
Hello All,
I am new to AS 3 and need to figure out how get some Movie Clips to communicate with with each other or with the Main timeline (Scene 1) .
I have created two movie clips during author time not dynamically
- a movie clip instance named menu_mc and a movie clip named screen_mc.
Inside menu_mc are buttons that I have 'wired' to communicate with a movie clip on the main stage/main timeline .
How can I successfully reference the 'main' timeline and/or the 'screen_mc' clip.
So far the only thing that works is:
this.parent["screen_mc"].gotoAndStop("flower") ; // <-- (Script is written in a keyframe inside menu_mc)
Any help is much appreciated as this was so easy to achieve in AS 2.
View Replies !
View Related
Can You Tell Images Created At Author Time To Load Dynamically?
hello,
I have many images in my movie which I just imported onto the stage and positioned manually, but now the site loads slow. Can I tell all the images to load dynamically with some lines of AS or a publish option or something else or do I have to replace all images with placeHolder-MovieClips and use the loadMovie command to dynamically load the images?
Many Thanks !!
View Replies !
View Related
Author Time, Attach Components By Drag And Drop.
I want to build a component that provides a set of behaviors, the component can be added to anyone's library, and then dragged onto any movie clip on the stage in the authoring environment. When dragged onto a movie clip the component is attached to that movie and may add its behaviors to, or modify, the target movie.
Is this possible without asking my users to enter actionscript to make the connections? Any ideas or pointers?
I have not been able to find any concrete examples of something like this in action.
Thanks,
-BarryFM
View Replies !
View Related
Can You Tell Images Created At Author Time To Load Dynamically?
hello,
I have many images in my movie which I just imported onto the stage and positioned manually, but now the site loads slow. Can I tell all the images to load dynamically with some lines of AS or a publish option or something else or do I have to replace all images with placeHolder-MovieClips and use the loadMovie command to dynamically load the images?
Many Thanks !!
View Replies !
View Related
Runtime Embedded Fonts Conflict With Author-time Text Fields
I've been struggling for a week now trying to find a way to use runtime embedded fonts -- Font.registerFont() -- for runtime created text fields, but still be able to have author-time created text fields in my projects. There are many issues with this. Here is what I have discovered thus far:I can successfully load in a font from an external Fonts.swf and use it to create and display text at runtime.
There does not seem to be any way to specify the use of that runtime loaded font for an author-time created text field.
If I have an author-time created text field on the stage that uses the same font, it completely breaks the use of the runtime loaded font for runtime created text. The way in which this breaks varies depending on the author-time created text field:If the field is a Static text field, runtime created text using the runtime embedded version of the same font does not appear at all.
If the field is dynamic, but does not have its font embedded (using the properties "embed" button), the runtime created text using the runtime embedded version of the same font does not appear at all.
If that text field is dynamic and does have its font embedded, it will create a duplicate entry for that font in the Font.enumerateFonts Array. This is a problem, because Flash will then default to using the version of the font embedded in its own .swf (the one from the author-time text field) rather than the one loaded in at runtime... even if the .swf version of the embedded font doesn't have all of the glyphs required to display the text! So you end up with a runtime created text field that will only display some of its characters.
When there are duplicates of embedded fonts, I cannot find any way to specify which version to use, because they are all referenced only by the original font name.
It seems utterly ridiculous to me that I have the fonts embedded and ready to be used, but that Flash gets all confused by author-time created text fields and thus makes the use of those embedded fonts for runtime created text impossible. Has anyone out there found a solution to these issues? Specifically:
- Is there a way to specify the use of a runtime embedded font in an author-time created text field?
- If there are duplicate embedded fonts (not really duplicates, but with the same fontName, fontStyle, and fontType... so indistiguishable) is there any way to specify which one a text field should use? If there is, I could do a check on each embedded font for Font.hasGlyphs() until I find the one that works and then specify that version.
Thanks in advance for any thoughts!
View Replies !
View Related
SwapDepths Of Movieclip ?
Hi there !
Have been looking here at the board and found the action for swaping between depths of movieclips, but I´m quite new to actionsscript, so I can´t figure this one out.
Got this action on my button;
on (release) {
tellTarget ("koncertermc") {
gotoAndPlay("Scene 1", 2);
_level0.koncertermc.swapDepths(_level0.myDepth);
}
}
And in my movieclip I place this action in the first frame;
myDepth = 100;
Don´t know if I´m even close at all, so I would really be glad for
a little help...!
Jakob
View Replies !
View Related
SwapDepths And A Single MovieClip
I am using multiple instances of the same movieClip in one Frame. The movieClip contains a button which makes a window open from within it. Each movieClip is placed in specific areas on screen (not draggable). There are always going to be an arbitrary (n) number of instances shown in many different frames throughout the movie.
The problem is, that I cannot get the latest movieClip mouseDown-ed to come to the front and also perform a GoToAndPlay within the movieClip that was in front.
View Replies !
View Related
Why Is My Movieclip Duplicating? Is It SwapDepths?
Okay, this is one heck of a complicated problem, so I'm gonna try my best to explain.
Basically, I've got a movieclip on the root called mcClip, let's say. I'm using Flash's drawing functions to allow the user to colour in this clip with their mouse (like a paint program) which creates a series of movieclips inside mcClip with the user's scribbles and fills.
Now, when I duplicate this clip to provide a 'print preview' the dynamically created subclips don't show up. To get around this problem (which I've given up on) I have chosen to simply swapDepths and shift the _x of mcClip into my print preview box, and then move it back once the user closes the box. The problem is, once I close the box, there is suddenly a duplicate of mcClip on the root!!!
So, I've attached my .fla, which has about 460 lines of semi-commented code in, in the hopes that someone can tell me why this is happening. Note that I've removed lots of graphics and sounds from the file to keep the size down.
mcButtonPrint's onRelease function contains the code to print the clip, so perhaps this is where the problem lies. If not, I'm stuck!
Thanks,
Aragorn
View Replies !
View Related
[F8] SwapDepths MovieClip Animation Problem
Hello there. I may be new to these boards, but I don't consider myself new to Flash 8. I have a big problem on my hands but first, let me explain my situation. I am basing my concept on This; a BBC Election Map. Where MovieClipButtons swap depths and perform smooth zoom animations. I have been trying to understand the properties of this BBC map for some time and this post deals with my latest hurdle.
I have found a swapdepths piece of code involving an array coding for button identifiers. My goal is to have neighboring buttons swap depths so that their borders highlight when the mouse cursor is over them. This works for me.
BUT
This is only half of it. I have tried to make tween animation sequences where these button regions are to be 'zoomed in' when clicked (with a graphic representing the buttons all together during the tween sequence). The problem is that I end up with two potential situations -neither of which is what I am aiming for.
Situation 1 (code i = 0): The Button(s) do not flash in an apparent random fashion and only highlight when the mouse is over (as desired) but when the MovieClip 'button' is clicked, the animation is screwed up. What I mean by this is the MovieClip 'button' which was clicked stays visible in place as the tween animation follows through (I do not want it to be seen during the animation as it's only purpose is to allow region MovieClip swapdepths.
Situation 2 (code i = 1): The Button(s) flash in an irritating manner regardless of a cursor being over them yet the animation is flawless.
I am dying for help here. Months of work have come down to what I know is not an insurmountable problem. I have a file that deals with what I am working with + some further commentary regarding my problem.
I would LOVE for someone to re-engeneer the code/file attached to solve the problem for me.
View Replies !
View Related
AS2: SwapDepths - Stops Movieclip From Moving
I have 4 cards on a carousel moving around - each card has to come to the front every time it moves around. My problem is I go to swap the depths using movieclip.swapDepth(1) and it brings it to the front but it then stops that movieclip moving on in the main time line so it stops moving back around. Does anyone know why it is doing this? I have also tried using moveiclip.getNextHighestDepth() + 1 but that does nothing!
Thanks for any help as I am stumped!
View Replies !
View Related
[CS3] Swapdepths Problem; External Swf Inside Movieclip
hi, im using AS 2.0 and i have run into a little roadblock in my current project. basically, i have an external swf with buildings and other things on it, drawn in a 3D view (not actual 3D though) and i am using swapdepths() to layer the buildings in the right order by setting their depth to their _y value, giving objects closer to the camera a higher depth
now, my problem is that i have a character that is also having his depth set according to his _y value, but he is OUTSIDE of my holder movieclip that the external swf is being loaded in to. therefore, the character can move around and his depth is being swapped, however when you walk behind one of the buildings the character is still on top, leading me to believe that the externally loaded buildings are not having their depths swapped.
i think that this is due to the fact that the buildings inside the parent movieclip cannot leave that same parent movieclip, so they are stuck not being able to change depths, unlike my character who can. what i need is help making my buildings also swap. so that they are able to be above the character when he is behind them, and below the character when he is in front of them. i know how this should be achieved, but the fact that they are stuck inside the movieclip is stopping my code from working, and yet it has to be done this way, so i cannot simply dump all of the scenarios into my main file which would fix the problem
any help on getting around the problem of swapdepths being affected by parent movieclips would be greatly appreciated, assuming its at least possible, or suggestions on a workaround, thanks.
EDIT: also, i am sure that the problem is not simply that the building's _y value is too small, as i set one of them to 10000 which should have therefore been on top of everything, but it wasn't...
View Replies !
View Related
How Do I Author A Flash File
I have been asked to create a flash thing for a CD and I have no clue how I author it so that all the person needs to do is put in the CD and it starts. I have Flash MX and it needs to work on A MAC and PC. If you know a simple solution please reply.
Jeff
View Replies !
View Related
Author, Date Setting?
is it possible to embed the author and date into the swf or fla file? i don't want the name to show up visually on the screen, but if they open up the fla or swf i want a way to know it's me.
thanks,
patrick.
View Replies !
View Related
Dynamically Author .swf Files
So,
What I would like to do is allow users to customize some aspects of a flash file, and then get emailed an animation with their personal touches. Let's say they can choose a background, a message, and a type of animation. They would input these options into a flash form, and in return, get emailed a .swf with the options they chose. I am just starting on this, an initially I have seen some stuff dealing with PHP, but at first glance, this seems to work in the browser, but not to actually be able to save a .swf in the end. Any ideas on this?
-B
View Replies !
View Related
Display Author In Invisible Mod
ok, in flash, you just need to put a invisible button and put some code on it. the code will attach a movie clip from the library to the stageor you can set a movieclip on the stage visible or invisible
does any one knows how to do that?
thanks a lot if you can help!!!
View Replies !
View Related
Is This Your Code? Parallax Source Author Needed
I really need to reference the author of this parallax code but annoyingly Ive lost the forum post and Ive looked and searched for hours but I cannot find it.
Here is the code
Code:
stop();
var paused = false;
var active;
msgBox._visible = false;
var btnList = new Array();
function toggleEnabled() {
for (i in btnList) {
btnList[i].enabled = !btnList[i].enabled;
}
}
myPress = function (mc, num) {
btnList.push(mc);
mc.num = num
mc.onPress = function() {
if (!paused) {
paused = true;
this.gotoAndStop("dn");
active = this;
toggleEnabled();
msgBox._visible = true;
msgBox.play();
msgBox.msgs.gotoAndStop(active.num)
msgBox.btnClose.onPress = function() {
msgBox.play();
paused = false;
active.gotoAndPlay("up");
toggleEnabled();
msgBox._visible = false;
};
}
};
};
//
moveIt = function (wc) {
wc.imageStartX = 0;
wc.imageEndX = -wc._width + Stage.width;
wc.StartMouseX = 0;
wc.EndMouseX = Stage.width;
wc.MouseRangeX = wc.EndMouseX - wc.StartMouseX;
wc.PanRangeX = wc.imageEndX - wc.imageStartX;
//
wc.imageStartY = 0;
wc.imageEndY = -wc._height + Stage.height;
wc.StartMouseY = 0;
wc.EndMouseY = Stage.height;
wc.MouseRangeY = wc.EndMouseY - wc.StartMouseY;
wc.PanRangeY = wc.imageEndY - wc.imageStartY;
//
wc.onEnterFrame = function() {
if (!paused) {
wc.rX = (_root._xmouse - wc.StartMouseX) / wc.MouseRangeX;
wc.rX = Math.max(0, Math.min(1, wc.rX));
wc._x += ((wc.rX * wc.PanRangeX + wc.imageStartX) - wc._x) / 9;
//
wc.rY = (_root._ymouse - wc.StartMouseY) / wc.MouseRangeY;
wc.rY = Math.max(0, Math.min(1, wc.rY));
wc._y += ((wc.rY * wc.PanRangeY + wc.imageStartY) - wc._y) / 9;
}
};
};
//Call the function for each MC that is going to move. Be sure that the
//registration point of each MC is set to the upper left corner.
moveIt(bg);
moveIt(mid);
moveIt(fg);
//Set for each button that will be used, first parameter is button MC.
//Second parameter is the frame number of the msgs MC to display.
myPress(mid.btn1, 1);
myPress(fg.btn1, 2);
myPress(fg.btn2, 3);
The file was called just parallax I think. It has an image of a field and some message boxes etc. I havent used it in the same way, but I hope someone can claim ownership!
see attached file! If anyone knows the author or has the post, please inform me!
Cheers
View Replies !
View Related
Only One Movieclip At A Time...
i have a site, and as usual there are various buttons, and when a
button is clicked an event action occurs. typically running some kind
of movie clip i have placed on the stage...
my question is...
how would i setup the buttons to play one at a time. i mean. if i have
3 buttons (b1, b2, b3) and lets say b2 was clicked, and that mc was already playing... but the user goes to click b3 instead. how would i script the one mc to close out, and tell flash to play b3's action? i would like all the buttons to behave in this fashion. if one is running, then upon clicking another button it's actions would detect another mc was running, and simply close it out before running its own actions.
by the way... each button has an associated mc. for example:
b1 runs b1mc, b2 runs b2mc, b3 runs b3mc. thought this would be useful.
i'm thinking some kind of if/else statement built within the button action would do the trick. for example if b2 was clicked, then the user clicks
on b3.
if b2mc_instance playhead = (frame)
then send playhead to nextframe //close out the current mc
else b3mc_instance.play(2) //runs the b3's associated mc.
i'm trying to make some thing like this, but my programming skills lacking.
any advice with this would be helpful.
thanks
View Replies !
View Related
50 Movieclip In Same Time
I dont know if anyone can help me. Im making a scratch card..(its not important what it is..) i've got 50 things to scratch, i've made a movieclip for one with the following actions :
onClipEvent (mouseDown) {
tellTarget ("/apple") {
play ();
}
}
It work,but the thing is, i want to use the same movieclip for the other 49... if i duplicate the movieclip,when i click on one they all play...how i do for when i click one,just this one play?
Thank you very much
View Replies !
View Related
Only One Movieclip At A Time...
i have a site, and as usual there are various buttons, and when a
button is clicked an event action occurs. typically running some kind
of movie clip i have placed on the stage...
my question is...
how would i setup the buttons to play one at a time. i mean. if i have
3 buttons (b1, b2, b3) and lets say b2 was clicked, and that mc was already playing... but the user goes to click b3 instead. how would i script the one mc to close out, and tell flash to play b3's action? i would like all the buttons to behave in this fashion. if one is running, then upon clicking another button it's actions would detect another mc was running, and simply close it out before running its own actions.
by the way... each button has an associated mc. for example:
b1 runs b1mc, b2 runs b2mc, b3 runs b3mc. thought this would be useful.
i'm thinking some kind of if/else statement built within the button action would do the trick. for example if b2 was clicked, then the user clicks
on b3.
if b2mc_instance playhead = (frame)
then send playhead to nextframe //close out the current mc
else b3mc_instance.play(2) //runs the b3's associated mc.
i'm trying to make some thing like this, but my programming skills lacking.
any advice with this would be helpful.
thanks
View Replies !
View Related
Scaling A Movieclip In Time
I've been searching through the forums but haven't found exactly what I need. Here is the situation:
I have a MC called "expander" and four buttons on the stage. When you click on a button I want the MC to change its xscale smoothly over time to a particular xscale amount. Lets say button one would scale the MC to an xscale of 200, two would be 400, three 600 and four 800. I can't seem to get the right code to do this without jumping directly to the final size or causing the script to hang.
Thanks in Advance,
S
View Replies !
View Related
Time Delay On Movieclip?
For Flash MX.
How do I go about setting time delays on Movieclips using actionscript? Could somebody point me in the right direction as to what terms to look for or a sample piece of code to look at?
Thanks.
View Replies !
View Related
Time Interval Movieclip
OK, I tried for hours to get a 'simple' time interval script to work, but..... I am stupid.
This is what I am looking for:
Timeline frame 1 animation goes to frame 2, here I want the animation to wait 10 seconds, then automatically continue to frame 3.
There must be a simple way of doing this. Can anyone PLEASE help me????
Eric
View Replies !
View Related
Time Line Of A MovieClip
i want to point to the time line of a movieClip that is located in another movieClip wen releasing a button.i use following script and it doesnt work,...
Code:
on(release){
_root.movieClip2.movieClip1.gotoAndPlay(5);
}
wat script should i write ???
View Replies !
View Related
Time Line Of A MovieClip
i want to point to the time line of a movieClip that is located inside another movieClip.i use following scripts bit it doesnt work:
Code:
on(release){
_root.movieClip2.movieClip1.gotoAndPlay(5);
}
wat script shall i write ?
View Replies !
View Related
Scaling A Movieclip Over A Set Time.
Hi guys,
i cannot seem to work out how to solve this problem:
I'm trying to give the impression of somthing getting smaller by scaling it.
I have a scale of time that stats at 0, and ends at 1.
When the movieclip is at 0 it is full size, by the time the time the timer reaches 1, it should be much smaller.
0------0.25--------0.5-------0.75----------1
BIG----------------MED------------------SMALL
Say the movieclip stats at 100x100 and by the end it should be 5x5
What would be the formula to scale the movieclip based on the 0 to 1 timer?
Any help would be great.
Cheers.
View Replies !
View Related
Play A Movieclip When That Is Time
I have a strange problem
I have a movieclip that I want to run when it come to that keyframe
I have
Code:
mymcclip.gotoAndPlay(2);
but when I place that in actionscript nothing happen but if I put that in a button like
Code:
cmdbutton.onRelease = function() {
mymcclip.gotoAndPlay(2);
}
then it work when I push the button but I want the movie to run without do anything.
I think this is very basic but I dont now what to do
View Replies !
View Related
Movieclip Controlled By Time/day?
I have no idea how to go about this, but what i'd like is a movieclip to change from one frame to another depending on the time and day...
Its for a project i am working on in flash (for uni), we are building simple websites but i'd like for an "open" or "closed" sign (like on a shop door) to display the correct instance in accordance with the time/day (shop should be open 9-5 mon-fri)...
Can anyone help me out with this? (i'm a bit of a n00b)
Matt.
View Replies !
View Related
MovieClip Determined By Time Of Day?
Thanks for looking at my question!
What I want to do is have 4 different movie clips that appear one at a time, based upon the time of day. For example, movieclip 1(mc_1) would appear in the early morning ( say 6am - 10am), movieclip 2 (mc_2) would appear in mid day (say from 10am-4pm), movieclip 3 (mc_3) would apear in the evening (say 4pm- to 8pm) and movieclip 4 (mc_4) would appear at night (say 8pm-to 6am). And this time would be based upon the viewers local time.
I would like to know how to code this. Can anyone help me?
I don't have the flash file started or built so I can't really post the file. However, if you have any questions, please let me know and I'll be happy to send more information!
View Replies !
View Related
Pausing An FLV And A Movieclip At Same Time
Hello all,
I am making a project that has a flv video playing on one side of the stage, and a corresponding movieclip animation on the other side. I want them to be able to pause the video, and also pause the animation. This may be simple, but I'm not that advanced in AS so if you could help, thanks in advance!
View Replies !
View Related
Toggling 1 Movieclip At A Time.
Hi ,
I'm new to AS3 and kinda stuck. Basically, I have different buttons that toggle movieclips on/off. I have this concept working fine. However, I can't seem to figure out how to toggle 1 at a time.
To expand, if I press a button, movieclips associated with it will be visible=true, and any other button with associated movieclips currently visible will be visible=false.
If anyone could shed some light, it would be appreciated.
My 1st frame code looks like this:
// start mc as invisible
park1.visible=false;
park2.visible=false;
// visiblility functions
function eventResponse(event:MouseEvent):void
{
if(park1.visible){
park1.visible = false
}else{
park1.visible = true
}
if(park2.visible){
park2.visible = false
}else{
park2.visible = true
}
}
// dot rollover functions
function test(event:MouseEvent):void {
park1info.gotoAndPlay("play") ;
}
function test2(event:MouseEvent):void {
park2info.gotoAndPlay("play") ;
}
// Event listeners
button_mc.addEventListener(MouseEvent.CLICK, eventResponse);
park1.addEventListener(MouseEvent.ROLL_OVER, test);
park2.addEventListener(MouseEvent.ROLL_OVER, test2);
View Replies !
View Related
Load Movieclip Depending On The Time
Hi all
Does anyone know how to load a specific movie clip depending on the time. I have twelve flash banners that i want to load into a target movie clip every hour.
i.e.
if the user accesses the page between 1 & 6 minutes past the hour they will see banner1.swf. if they access the page between 7 & 12 minutes past the hour they will see banner2.swf.
Thanks
View Replies !
View Related
User Time Control Movieclip
Hey peeps hope you can help me with this,
I want to do an actionscript where it looks at what time it is on the users machine and then goes to a frame in a movieclip (which is being used as a background)
for example:
if the users time is before 6pm it plays frame 1 of a movie clip which has a blue background (suggesting is daytime)
but if the users timesetting is between 6pm-8am it displays a dark background (to suggest its night time)
thanks for any help you can give as I havent a clue
View Replies !
View Related
Trying To Display The Date/time Within A Movieclip
I am trying to display the date/time from within a movieclip. When I put the date/time movieclip in the main timeline it works fine, but when I put the date/time movieclip within another movieclip it doesn't work. Below is the code that I'm using.
onClipEvent (load){
timedate = new Date(); }
onClipEvent (enterFrame) {
hour = (timedate.getHours());
minutes = timedate.getMinutes();
seconds = timedate.getSeconds();
todaydate = timedate.getDate();
day = timedate.getDay();
dayname = days[day];
month = (timedate.getMonth()+1);
monthname = months[month-1];
year = timedate.getFullYear();
if (length(minutes) == 1) { minutes = "0"+minutes;
}
currenttime = hour+""+minutes;
currentdate = todaydate;
fulldate = todaydate;
delete timedate;
timedate = new Date();
}
View Replies !
View Related
[CS3] Play A MovieClip When A Certain Time Is Reached.
So here's the scoop.
I want to be able to have a digital clock and have an image behind it. I want it to change movieClips at certain times.
Code:
time=new Date(); // time object
var seconds = time.getSeconds()
var minutes = time.getMinutes()
var hours = time.getHours()
if (hours<12) {
ampm = "AM";
}else{
ampm = "PM";
}
if(hours >12){
hours = hours - 12;
}
if(hours<10)
{
hours = "0" + hours;
}
if(minutes<10)
{
minutes = "0" + minutes;
}
if(seconds<10)
{
seconds = "0" + seconds;
}
Clock_text.text = hours + ":" + minutes + ":" + seconds +" "+ ampm;
So, I was thinking in one of the if/then statements I could put, "gotoAndStop(3);" for example.. But it doesn't seem to work no matter where I put it. Any suggestions?
View Replies !
View Related
Displaying The Date/time Within A Movieclip
I am trying to display the date/time from within a movieclip. When I put the date/time movieclip in the main timeline it works fine, but when I put the date/time movieclip within another movieclip it doesn't work. Below is the code that I'm using.
I thought it might be a path issue, but I'm not sure how to correct it.
Attach Code
onClipEvent (load){
timedate = new Date(); }
onClipEvent (enterFrame) {
hour = (timedate.getHours());
minutes = timedate.getMinutes();
seconds = timedate.getSeconds();
todaydate = timedate.getDate();
day = timedate.getDay();
dayname = days[day];
month = (timedate.getMonth()+1);
monthname = months[month-1];
year = timedate.getFullYear();
if (length(minutes) == 1) { minutes = "0"+minutes;
}
currenttime = hour+""+minutes;
currentdate = todaydate;
fulldate = todaydate;
delete timedate;
timedate = new Date();
}
View Replies !
View Related
Loading A Movieclip Based On The Time Of Day
Is there a way to load a MC based on an internal clock (or if that's too complicated, a digital clock based on the Digital Clock tutorial)? I also read up on the Loading Random MC tutorial, which is helpful but rather than it being random is there a way to set it so that the MC loads, for instance, everyday at noon? And it would keep this MC generated for 24 hrs until the next one that loads 24 hrs later.
View Replies !
View Related
Playing A MovieClip From A Frame On A Time Line
I have a movieClip of 10 frames.
in the first frame i put stop();
i want when i enter frame 2 on the main timeline
to tell the movieClip to start playing!
i tried to do on an empty layer this code :
stop();
tellTarget("myMC") {
gotoAndPlay(2);
}
but it's not working!
what to do?
thanks in advance
peleg
View Replies !
View Related
Dragging A Movieclip With An Independent Time Line
I am currently trying to make a VOLUME SLIDER that is a 101 frame animation. The animation represents a slide button in perspective view while it is moved from one end of the slide to the other side of the slide.
How can I script the animation to drag and show the next frame or previous frame in the animation and control the sound simultaneously?
View Replies !
View Related
Dragging A Movieclip With An Independent Time Line
I am currently trying to make a VOLUME SLIDER that is a 101 frame animation. The animation represents a slide button in perspective view while it is moved from one end of the slide to the other side of the slide.
How can I script the animation to drag and show the next frame or previous frame in the animation and control the sound simultaneously?
Is this possible????
View Replies !
View Related
|