ActionScript 3.0 :: Detect When Resolution Is Below 800x600 And Goto Frame/movie?
Dec 2, 2009
I am trying to figure out how to stop a user from resizing the page below 800x600. I have found how to load a new url or swf when below a certain resolution but is it possible to load a frame or movie when the resolution is resized below 800x600 and goes back to the previous frame if resized back above 800x600? I have symbols attached to the corners of the stage. Resizing looks terrible.
View 1 Replies
Similar Posts:
Oct 21, 2003
At _level0, external movies are loaded through a movieclip using loadMovie("externalmovie.swf","targetmc");
1. Obtain the external movies' resolution/dimension (e.g. 800x600 px) using actionscript.
2. Assume the movies have different dimensions and are smaller than or equal to _level0's dimensions. If they are smaller, you have to scale up the movie until it reaches the largest size possible, to fit into _level0's dimensions. Again, the external movies are loaded using a target mc and not using levels
3. Note: Remember that when movies are loaded through target MC, they inherit the properties of that mc, so if the size of the mc is 600x600, the external movie would be so too, even if it were 800x600px . This means that you may not do a direct [AS]MC._xscale = 200;[/AS] to it.
* The _level0 movie will serve as a master swf where the different external movies will load into, and consecutively play (one at a time), automatically (ergo, without having to manually open and quit and open and quit the movies).
View 8 Replies
Oct 5, 2009
Just finally making the transition from AS2 to AS3.All i need to do at this point is make two buttons which will control the movie to goto next frame and previous frame. I have gotten how to make the buttons go to a specified frame number and also a button to go to a specified external url but no success in making a simple next/previous pair of buttons.
stop();
but1.addEventListener(
MouseEvent.MOUSE_UP,
[code]....
View 14 Replies
Aug 18, 2011
i created a two layer in time line in one layer there is a movieclip called mc1. In the same layer in 15th frame i have another movie clip mc2. Inside the movieclip mc2 i created another movie clip at frame10 now if i clik the the mc1 on first frame The movie clip should goto and stop at tenth frame
View 4 Replies
Oct 4, 2009
I created a website with 4 movie clips; home (at Frame 10), (gallery at Frame 20), about (at Frame 30), contact (at Frame 40). I have a short opening and closing animation that I want to play when you click between the movie clips.
I can easily put the opening animation in a frame before each movie clip, but I'm having trouble with the closing animation. I guess I can create 3 separate closing movies on each movie clip but that is tedious. Is there a code that will allow a closing animation to play then direct you to the movie clip that you chose? -no matter which movie you are on and clicing to.
I'm guessing this is some kind of function that will be attached to my 4 button instances.Currently I have simple gotoAndPlay code to control the navigation, like this code to go from home to the gallery at Frame20:
ActionScript Code:
stop();
butn_home.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
function mouseDownHandler(event:MouseEvent):void {
gotoAndPlay(20);
}
View 3 Replies
Dec 11, 2008
I am working on this flash website that holds an intro animation which is a .flv file placed in a .fla file. I am trying to figure out the Actionscript needed to tell it to go to the next frame within the same movie once the flv file has played. Right now it just stops and sits on the last frame of the flv file or the flv file just loops.
View 1 Replies
Feb 12, 2002
anyway to write a piece of code telling a movie to goto a random frame label?
View 4 Replies
Feb 2, 2011
I have an swf with a menu button that loads an external swf on(release) {loadMovie("Unit-Type.swf",_root.MC_UnitTypes);}When that menu movie is loaded I want to be able to click a button and have it go to a certain frame in the root movie and close itself. I have this code but it's not workingon(release){_root.gotoAndPlay(25);}
View 1 Replies
Nov 17, 2009
I have a Flash movie that uses three scenes. In scene one I have a button with some actionscript to take it to a frame label in that first scene and play the movie from that point on. It works fine. The problem is, in the third scene, I am trying the same action with a different button, going to a different frame label in that third scene. I am getting an error saying the frame label does not exist in that scene. Even though it does! I've checked for typos and everything looks fine. I've copied and pasted the simple actionscript from the third scene below. Is there a line I need to add to make this work in a scene that is not the first scene?
rocketstart_btn.addEventListener(MouseEvent.CLICK, rocketbutton);
function rocketbutton(event:MouseEvent):void {
gotoAndPlay("rocket");
}
View 7 Replies
Feb 2, 2011
I have an swf with a menu button that loads an external swf: on(release) {loadMovie("Unit-Type.swf",_root.MC_UnitTypes);} When that menu movie is loaded I want to be able to click a button and have it go to a certain frame in the root movie and close itself. I have this code but it's not working: on(release){_root.gotoAndPlay(25);}
View 5 Replies
Sep 9, 2009
I'm making a training video and right now I have a container swf that loads external swf's In the container swf there is about 3 frames in the beginning and on the fourth frame you choose the section you want to go to next. The sections are just external swf's. To load the section / external swf I'm using:
[Code]...
View 0 Replies
Feb 21, 2010
I was wondering how to make a movie clip got to a frame, but the game not goto that frame? For example, make an egg goto a frame, and move to a random spot, but the player wouldn't goto that screeen.
View 1 Replies
May 24, 2010
I am starting to use as3 and I'm with problems. What I wanted to do is: I have a movieclip and I want to load another movie clip inside the main one. That part I can do and I use this code:
Code:
var carregador:Loader = new Loader();
var arquivo tring = "main.swf";
var requisicao:URLRequest = new URLRequest(arquivo);
carregador.x = 150;
carregador.y = 150;
carregador.load(requisicao);
this.addChild(carregador);
Now I want to have a button on the main movieclip with an action to send the loaded movie clip (main.swf) to frame 50. How can I do that?
I tried:
Code:
myBtn1.addEventListener(MouseEvent.MOUSE_UP, qualquer, false, 0, true);
function qualquer(MouseEvent) {
MovieClip(root).carregador.gotoAndStop(50);
}
View 3 Replies
Mar 14, 2003
I have this action on my buttons:
on (press) {
_root.nPage = "company";
AnimationMC.play();
} on (press) {
gotoAndPlay(3);
}
I am trying to have a button change frames on the main timeline (gotoAndPlay X) and also load a MC on the same click. I think what is happening is because the on(press) is separate it is causing my pages to load at different times when I click real fast when AnimationMC is playing. However if I wait for the animation to load first it works %99 of the time.
View 4 Replies
Apr 13, 2006
How I can make a button goto and play a frame of a movie clip. Basically the first frame is blank and when the button is clicked the movie clip will go to frame 2 and play. I'm also going to have some other buttons make it go to other frames.
View 2 Replies
Dec 6, 2007
I have a main flash file that I load various external swf files into. On the first frame of the timeline, there is an intro swf loaded that basically welcoming the viewer to the site. What I want to do is have this load, play and unload and then go to frame two of the timeline where the main home section of the flash site is located.One my first frame on the timeline I have:loadMovieNum("/IntroMovie.swf",1);stop();n the external IntroMovie, I have unloadMovie (1); so the movie will play and then unload itself. What I can't figure out is how to get the timeline to go to the next frame once this movie is finished playing and has unloadedIf I don't put the stop in there, it simply skips this movie and goes to the next frame on the timeline and loads the home movie swf file.Is there a way to use some sort of if statement, that if the movie is unloaded, goto the next frame, sort of like this:if(code to verify if movie is unloaded);gotoAndStop(2);
View 4 Replies
Jan 23, 2009
I'm using a simple piece of code on a button...
on(press){
_level0.prevFrame();
}
... to go to previous frame but for some reason it causes the main movie clip to flicker. Is this a known problem or am I doing something wrong?
View 2 Replies
May 18, 2005
What is the actionscript if i want to go to a frame in a movie clip from another movieclip? And also for future reference, how do you go to a frame from a movieclip/button to a frame in the main scene? Is it something to do with root?
View 5 Replies
Feb 10, 2011
i am doing a simple project in which i have 2 frames in the main time line and a movieclip in the first frame and a button.i have something else in the second frame.when i click the button the movieclip should start after it ends the timeline should move to second frame and stop.
View 7 Replies
Dec 22, 2009
I am having problems making a movie clip goto a different frame when an item on a list box is selected. Here is my code
list.getSelectedItem().label;
_root.onEnterFrame=function(){
if(list=="2"){
mc.gotoAndStop(2);
}else
mc.gotoAndStop(1);
}
View 1 Replies
Jan 9, 2006
I'm new to Flash and am looking to use the following tutorial to create an advanced button. I know it is probably a very simple fix, I just cannot figure it out. [URL] In the tutorial the rollover and onrelease has the following script this.onRollOut = function(){ rewind = true;} this.onRelease = function(){getURL [URL]); } I have tried to change the on.Release command to go to and play another frame in to movie instead of opening a new url. But I'm not getting it to work correctly.
View 4 Replies
Mar 11, 2009
My original movie is 800x600 and my external swf is 700x525... I'm using the following script on a keyframe... loadMovieNum("123.swf", 1); ... and under normal circumstances this would work fine... however... I need the 700x525 external swf to retain its size in the center of the 800x600 original movie... right now it's edge to edge and showing what's going on 'offstage' in the external swf! What scripting am I missing? I'm using Flash 8 on a Mac.
View 2 Replies
Jul 19, 2011
How to detect the Monitor current resolution in flex.
View 2 Replies
Jan 9, 2004
Is there some code that I can use to detect whether a frame has already been played? What I'd like to do is detect yes or no, then jump to a specific frame depending on the condition.
View 11 Replies
Sep 22, 2002
Which script do I use to detect which frame the movie is at in a MC?
View 2 Replies
Dec 28, 2009
I am trying to figure out how to detect screen resolution through Flash.For example i want to move a "movieclip" to a specific point if the height of the screen resolution is smaller than 768.
Actionscript:
if(screen.height < 768){
movieclip._y = 200;
}
I think i should use this property but i don't know how to implement it!
trace(System.capabilities.screenResolutionY);
View 3 Replies
Dec 4, 2010
What are the rules for using encoded video in flash? If the video is 30fps does my flash animation have to be 30fps?
example of detecting the overall screen resolution and using it in a variable? [the resolution of the desktop]
View 3 Replies
Mar 7, 2011
I want to make an application with an image that only bounces to the users screen resolution. How can I go by detecting the users screen resolution in flex 4? (If you can that is.)
View 2 Replies
Aug 27, 2006
My site starts off with a splash page. I would like to have one link to enter the site.
A long shot, but anyway....is there an actionscript that can detect user screen resolution and then open a page accordingly?
View 4 Replies
Jun 12, 2008
Can flash detect monitor res, or any other system resources (processor speed, browser, pop-up blocker, memory, etc.)?? I know there are secutity issues, but i would like to create a detect/launch page for some eLearning courseware. I currently use javascript to do this but would like to use flash.
View 1 Replies