Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Sliding & Loading



Friends,

Quick question for ya about movie loading: what is the proper actionscript to load a movie into an MC on a different SCREEN (in a slide application in flash mx 2004 pro)?

Something like

on (load)

slidename.myMovieClip.loadMovie("newMovie.swf")

Is that right? Or would it begin with _root.slidename.etc....?

The idea is this: I want to load the movie on the next slide, BEFORE the user looks at the slide. In other words, while the user is looking at slide 1, slide 2 is preloading an external swf.

Thanks in advance for your help. My deadline is May1.

Walter
Fosod Design Studios
--
www.fosod.com



FlashKit > Flash Help > Flash ActionScript
Posted on: 04-29-2004, 01:29 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Loading A Swf From Sliding Menu
Hi,

Sorry for a newbie question. I have a sliding menu. As one of the movies inside the contentHold i want to load an swf. I do this by going into the movie content2 and adding the following code:


Code:
this.clip_mc = this.createEmptyMovieClip ("holder", 1);
this.clip_mc.loadMovie("sourceMod.swf");
The swf file works perfectly if i launch it separately, but when i try to launch it from the sliding menu all i see is the background of the clip and not the actual content.

Loading Movies On A Sliding Menu
I have a menu system where if you click on a particular button, the movie will scroll by and slow down until it stops on that particular section (you've all seen these). I have five buttons with five sections. When that section finally stops, I would like to load an external swf on top of that section. How can I call up this movie??

Jiffy Loop

Loading An .swf By Tweened Sliding It Into The Movie
I have a menu (Flash Junkie's Vertical Scroll menu) which I want to put inside another swf (the main movie) by sliding it in from right to left.
So it's a separate swf file, which at a certain keyframe I want to slide into view. I've tried making a new mc, and importing the swf into it, but this doesn't seem to work...
Could anyone explain to me how I could do this, and also tell me how to position it correctly (with x/y coordinates)?

Thnx a lot in advance!

Loading External Swf On Sliding Image
hi there

I was looking through the flash demos on flashkit, for examples of what I am trying to do, I found something but the problem I have now is trying to understand what script is used to load in an external swf.

For example the zip folder example_01.zip attached to this thread contains the fla example. there are three buttons at the bottom, when you click the button the image slides across to the next section. Because this is done with the script

on (release) {
/:xpos = "647.4";
}

the number being the position along image, how do I then get an external swf to load in once the image has slides across into positon. I understand I could just attach a 'loadMovieNum' to the buttons, but this would mean that the movie loads in straight away as soon as button is pressed before the image has stopped sliding into position. Does this make any sense????

basically ,once the image has stopped moving into position I would then like an external swf to load in.

get any one explain a little more on how this is done, I'm still trying to get my head round action script so please go easy : ) Please would you have a look at the example file and tell me what you think!

....many thanks

Loading Swf With A Sliding Image, No Timeline
hi there(sorry if this got posted twice)

I was looking through the flash demos on flashkit, for examples of what I am trying to do, I found something but the problem I have now is trying to understand what script is used to load in an external swf.

For example the zip folder example_01.zip attached to this thread contains the fla example. there are three buttons at the bottom, when you click the button the image slides across to the next section. Because this is done with the script

on (release) {
/:xpos = "647.4";
}

the number being the position along image, how do I then get an external swf to load in once the image has slides across into positon. I understand I could just attach a 'loadMovieNum' to the buttons, but this would mean that the movie loads in straight away as soon as button is pressed before the image has stopped sliding into position. Does this make any sense????

basically ,once the image has stopped moving into position I would then like an external swf to load in.

get any one explain a little more on how this is done, I'm still trying to get my head round action script so please go easy : ) Please would you have a look at the example file and tell me what you think!

....many thanks

Sliding Menu & Loading Text
Hey...

Using the sliding menu ( http://www.kirupa.com/developer/flash8/slidingMenu.htm ) and wanna use the movieclips with external text but i cant seem to get that to work.

Inside content1 I have added on frame 1:
System.useCodepage = true;
loadVariables("news.txt", "");

and a dynamic text field.

But i cant get it to load. Any suggestions?

Loading External Swf With Sliding Menu...again
This was posted before by another user, but never got any responses. Now, I'm having the same problem. Is there maybe anyone that can help with this issue?

I would like to use Sliding Menu (http://www.kirupa.com/developer/flash8/slidingMenu.htm) on my web site, however, I have one question:
- how to I load the external movie when user lands on let's say slide 3 (content3)?

From actions script given on page http://www.kirupa.com/developer/flash8/slidingMenu2.htm what should I put after:

b3.onRelease = function() {
menuSlide(contentHold.content3);
->> I need to load the swf movie here <<--???

Then, when user go to another slide, I would ultimately would like to unload/stop the loaded swf movie

Your input is highly appreciated!

Thank you!

Sliding Menu Loading External Swf
The Files: fla.rar

Hi
I have problems displaying the background image of an external.swf loaded into a main.swf. The main.swf is the Sliding Menu downloaded from Kirupa.

The s2.swf calling for the background image
I have an empty mc in the main stage with the instance of imgHolder2.

The script calls for the image:
_root.imgHolder2.loadMovie("images/content2.jpg");

Why does the background image of external.swf not display???


The button in main.swf calling for external swf
After finish sliding, button loads external.swf into _root.contentHold.content2.

The script:
b2.onRelease = function() {
menuSlide(contentHold.content2);
_root.contentHold.content2.loadMovie("s2.swf");

Im not sure the script is correct. Should I define the path to the external swf differently!?
Thanks for your time
Leo

Loading Images On Sliding Page
I have a site I have designed a virtual tour of a school using  a side scrolling design.  I am stuck however on two different issues:

1. How to make the scrolling stop when one of the buttons are pushed.

2.  What is the script for loading a graphic on top of this scrolling screen for an image (not a fla).

Thanks,

disfasia

Loading External SWF Into Sliding Content -help
please point me to any tuts .

project:
---------

5 menu button:

Each button will slide the long background image to a certain x-postion. Once it slides into the appropriate x-postion, contents will start to animate and load.


Currently I have a MC movie sitting at each x-position so when it slides to it.. contents are there and already playing.. which i dont want.

In this method, the file is too heavy and very slow in sliding back and forth.

How do I only load the content needed for that particular section and when another sectioin is clicked, the current loaded content dissappear, making scrolling faster?

basically, I have a long widescreen background scene that will have content loaded when slide to a particular segmented area of the background.

I hope my descriptiion is clear.

thx

Loading Content In Sliding Panel Nav Website
Does anyone know how to start loading an external clip when a user has navigated via a sliding panel to a certain page (area of long strip movieclip)?

So I'd have my long movieclip that I could keep small in memory size and then only when they are at that section it loads the content.

would the only way be to tie the load script to the button that goes to the section?

or can you load when a movieclip area is on screen or either at a certain co-ordinate?

Loading External Movies With Sliding Menu
Hello there,

I would like to use Sliding Menu (http://www.kirupa.com/developer/flash8/slidingMenu.htm) on my web site, however, I have one question:
- how to I load the external movie when user lands on let's say slide 3 (content3)?

From actions script given on page http://www.kirupa.com/developer/flash8/slidingMenu2.htm what should I put after:

b3.onRelease = function() {
menuSlide(contentHold.content3);
->> I need to load the swf movie here <<--

Then, when user go to another slide, I would ultimately would like to unload/stop the loaded swf movie

Your input is highly appreciated!

EnigmatiCx

Loading External Movies With Sliding Menu
Hello there,

I would like to use Sliding Menu (http://www.kirupa.com/developer/flash8/slidingMenu.htm) on my web site, however, I have one question:

- how to I load the external movie when user lands on let's say slide 3 (content3)?

From actions script given on page http://www.kirupa.com/developer/flash8/slidingMenu2.htm what should I put after:

b3.onRelease = function() {
menuSlide(contentHold.content3);
->> I need to load the swf movie here <<--
Then, when user go to another slide, I would ultimately would like to unload/stop the loaded swf movie

Your input is highly appreciated!

NetScape

Please Help With Sliding Menu Static Copy Works, Sliding Doesn't
I have a copy of the same sliding tab menu. On has actionscipt on the MC telling it to slide in/out. The other does not.

The moving one loses all it's sub-timeline actions.

The static one works fine. How do I get the moving to work?

Please help.

Will be very simple for the flash gurus out there.

RR

Slideshow: Sliding Images. Repeat Sliding After Last Image
Hello.

Scenario:
I have 5 images. With a setInterval I slide the images - back-to-back - from left to right under a window (mask). When the last image is under the mask, I'm trying to figure out a way to start over again. So that when the last image is sliding out, the first image is sliding in, thus retarting the slideshow.

I figured the best way to do this is to 'move' the image that last moved out of the mask before the other images. So if im1 move out of the mask, im2 move into the mask, im1 would move to position itself after im5 (since I have 5 images.)

The problem. How to tell flash to move the image that slides out to move to a position after all my images.

im5-im4-im3-im2-im1 becomes im1-im5-im4-im3-img2

Each image is 80 pixels wide.

Any help is much appreciated.

Thanks,

/Flip

Sliding Menu - Need MC To Play After Sliding Has Finished
Hi,

I have created a Sliding Menu with about 12 sections. In one of the section/s I have a MC inside that I want to play. Is there a way to tell a MC to play once sliding has completed? Say based on pixel position (of the sliding MC) or something similar?

At the moment I'm using "on release" but with this method, the animation starts too early. (By the time you slide from section 1 to 12 the MC has already started playing)...



Any ideas?

Thanks in advance!!

Sliding In/sliding Out Images Using Actionscript
I know I should probably know how to do this by know but I'm stuck.
How do I create this effect using Actionscript?

http://synap-sys.com/in_out_slide.html

When a user clicks on button "1" the image slides in from the left. When the user chooses to view image "2" image one slides out of the way and image two then slides in. I would like to do this using Actionscript because there's going to be a bunch of pictures that are part of this slideshow. It's how to tell the Flash player how to slide out the current image and slide in the new image that I'm struggling with. Forgive my lameness.
I'm also trying to do this without dynamically loading each image everytime they click on a button. The reason for this is so all the images load at once, thereby eliminating the delay that would occur as each image loads after a user clicks a button. A fellow Flashkit member(Garbage) suggested I do this using a Library clip (all the images placed on a keyframe of a movieClip that are referenced per button click) but I'm not sure how to do this (goToAndPlay?).
Any help or guidance would be most appreciated.
I've attached the .fla if anybody wants to look at it.
Thanks
Adam

Sliding Nav ( Can You Make It Stop Sliding)
*USING FLAH MX
Hello Im having some issues trying to get this sliding nav to stop sliding.

I was referenced this file

http://www.flashkit.com/movies/Scrip...y-87/index.php

It seems to be controled with a button called tracker but I cant get the nave to stop sling on roll out (also the text fields in this fla are not needed)

The effect I want to achieve can be found on this site

http://www.theopiumgroup.com/index2.html

If you click mansion and then click info you will see how they set up there sub navigation

Any help would be great,thank you in advance

[F8] Sliding Interface With Sliding Buttons
I'm trying to get a sliding interface going with the buttons (that move the interface) moving along with it.

At the moment it looks like this: http://www.flashvista.com/details/item/746/

I got there by following by following the first page of this:
http://www.peachpit.com/articles/article.aspx?p=26319

Basically I want to encorporate the buttons with the interface images.

I tried putting the buttons in with the images_MC, but nothing happens with you click the button.

Whats the easiest way to make this work?
thanks

Sliding Page, Loading External .swfs By Button In Slidng Page
Hi

I have a sliding page navigation system and am trying to dynamically load external .swf's into that movieclip and am having major problems can anybody tell me how to load them.

I basically want it so that once the user clicks the button on the main screen a sliding page MC slides open (which I have done) and within that sliding page MC lies a button I want to load an external.swf after the button is clicked

on (release) {
_root.contents.loadMovie("myexternal.swf");
}

I've given the empty MC a instrance name of "contents" and have the external .swf in the same location)

I've also tried

on (release) {
contents.loadMovie("locations.swf");
}

I can get an external swf to load directly into the sliding page MC without the button but when I try and control it via the button it doesn't work. P.s. the actions abvove were applied directly to the button

hope somebody can help

thanks in advance

Dips

Help With A Sliding
I need some help with a slidding bar. I have the button above. and then i want the bar to slide when it is clicked. Is there a way to do this? Im in a bit of a pickle

Sliding Bar Help
I have a bar that slides with te following script in the first frame:

mouse_x = _xmouse;
if (mouse_x>45 and mouse_x<580) {
setProperty(_root.follow, _x, mouse_x+((getProperty(_root.follow, _x)-mouse_x)/1.5));
} else {
if (mouse_x<45) {
setProperty(_root.follow, _x, 45+((getProperty(_root.follow, _x)-45)/1.5));
}
if (mouse_x>580) {
setProperty(_root.follow, _x, 580+((getProperty(_root.follow, _x)-580)/1.5));
}
}


and in the second frame gotoAndPLay(1) to loop the script.
Is there a other way to loop the script without te use of the second frame with gotoAndplay(1)??

Greetz LaurenZ

_y Max For Sliding Mc
i have a mc that slides along the main timeline depending on where the mouse is.

used this script on the mc that slides:

onClipEvent (load) {
this._y = 5;
}
onClipEvent (enterFrame) {
nowy = this._y;
newy = _root._ymouse;
diff = (newy-nowy)/2;
if (Math.abs(diff)>=1) {
this._y += diff;
slider._y -= diff;
}
}

i want to make a _y max so that the sliding mc will go no longer than 170 (_Y) even if the mouse does.

anybody? thanks

Sliding Nav
does anyone know of any good sliding nav components or .fla's?
Thanx

Sliding Bar
I have a horizontal nav bar that includes various links. On screen there is also a vertical bar.

Essentially what I want to do is this: the user would click a link, then the vertical bar would slide horizontally to the area above the active link.

I know how to use the X Position to move it to the desired area, but I'd really like to have it appear to "slide" over, slowing down on the way (instead of a harsh jump to the correct position).

In the sample attached, you can see the X Position movement on the "Services" button.

Any help would be much appreciated!

Help: Sliding Nav
Hello,

Please view http://www.kaseychatila.com. My friend said that only SOME of the enlarged images show up on his PC. Can anyone confirm/deny this? Thanks.

Help: Sliding Nav
Hello,

Please view http://www.kaseychatila.com. My friend said that only SOME of the enlarged images show up on his PC. Can anyone confirm/deny whether the sliding nav. works? Thanks.



P.S. Specifically he said the fine art and logo samples weren't showing up and that he only saw colors where the full, detailed image was to be.

PLS HELP Sliding Nav.
Hello,

Please see http://www.kaseychatila.com.

It seems that on some computers (usually PC) the enlarged samples for FINE ART and LOGO DESIGN do not show up correctly in my sliding nav.

Can anyone tell me why that is? The samples come up as weird lines of color, and the detailed image is lost for some reason.

Is this a problem with my actionscripting? Any help would be great!!!

PLS HELP Sliding Nav.
Hello,

Please see http://www.kaseychatila.com.

It seems that on some computers (usually PC) the enlarged samples for FINE ART and LOGO DESIGN do not show up correctly in my sliding nav.

Can anyone tell me why that is? The samples come up as weird lines of color, and the detailed image is lost for some reason.

Is this a problem with my actionscripting? Any help would be great!!!

PLS HELP Sliding Nav.
Hello,

Please see http://www.kaseychatila.com.

It seems that on some computers (usually PC) the enlarged samples for FINE ART and LOGO DESIGN do not show up correctly in my sliding nav.

Can anyone tell me why that is? The samples come up as weird lines of color, and the detailed image is lost for some reason.

Is this a problem with my actionscripting? Any help would be great!!!

Sliding Bar
i want to make a top bar navigation with a bar that slides under the buttons as the pointer moves. unfortunately i dont know how

Sliding Nav Help
Hello First take a look at this

http://www.theopiumgroup.com/index2.html
hit mansion and then info you will see how the sub nav works
(the sliding stops on rollout)

Does anyone know how they did that? Is there a EASY to follow and learn tutorial of fla I can use?

Any help would be amazing,thanks in advance

bill

Sliding Box
Hi!

I have a movie clip that contains 4 buttons and a boks called firkant.
When the mouse is over the buttons, the box follows them.
I have a layer named "actions" where this code is:

yhome=home._y
yabout=about._y
yproducts=products._y
ycontact=contact._y
yfirkant=-70


And on a button, e.g. "home", i have this code:

on (rollOver) {
setProperty("firkant", _y, yhome);
}
on (rollOut) {
setProperty("firkant", _y, yfirkant);
}

You can see it here:
http://www.stordfriidrett.no/magnus/design.html

I would like to make the box slid smooth when you have the cursor on a button. I'm not too good in actionsscript and wondered if anybody how i can make that happen.
I use Flash MX 2004.

Thanks!
Magnus

Sliding Bar
This is what I have attached to my movie clip. The two variables sliderx & slidery are associated with two text fields that show the actual x position of my sliding button. The problem is that it doesn't refresh in real time. It refreshes only when I release and click again. I thought that the Enter frame event would do the job of refresing the fields contents. Any thoughts?


onClipEvent(load) {
this._x=_root.hbase._x - this._width/2;
left=this._x;
top=this._y;
right=this._x + _root.hbase._width;
bottom=this._y;
_root.zoomCalc= (this._x - 92)-_root.hbase._width;
_root.sliderx=this._x;
_root.slidery=this._y;
}

onClipEvent(enterFrame) {
this.onPress = function () {
startDrag(this, false,left,top,right,bottom);
_root.map_mc._xscale=this._x+35;
_root.map_mc._yscale=this._x+35;
_root.sliderx=this._x;
_root.slidery=this._y;
_root.zoomCalc= (this._x - 92)-_root.hbase._width;

}
this.onRelease = function () {
this.stopDrag();
}
}

[F8] Sliding Tab
Im assuming this would be easier to do in AS...but im not sure, im having trouble trying to get it to work right with buttons and movie clips... I have 3 small booklets piled on top of eachother with a corner showing... im trying to have the book slide up when you mouseover the small part of the booklet showing at the top...if anybody could help me out or give me an example or something that would be amazing!

The file was too large so if you want to get a visual you can dl the FLA here:
http://www.matthewdesmond.com/jamies.htm

Thanks

Sliding Nav
Anyone know where I can find Actionscript / FLA for a simple sliding nav like the one here:

http://www.brearley.org/

Much thanks.

Sliding Nav
Can anyone help me, with general concepts and approaches to build a sliding nav like the one here:

http://www.brearley.org/

i.e. script for the smooth sliding, and how to handle the different behaviors depending if the item is on top, bottom or selected.

Thanks in advance!

Sliding Bar
Hi all,

I want a sliding bar to move to a certain point according to which btn is pressed.
So if you presss the green btn the bar will slide so the green part is on the stage. And then slide straight to the orange if the orange btn is pressed
I did this code but it only works one way, I'm sure it cos of the += ,but I carn't see how to alter it so it will slide both ways


ActionScript Code:
slide = function (trag) {
    bar_mc.onEnterFrame = function() {
        this._y += (targ-this._y)/2.5;
        if (this._y >= trag) {
            this._y = trag;
            this.onEnterFrame = null;
        }
    };
};
one_btn.onRelease = function() {
    slide(0);
};
two_btn.onRelease = function() {
    slide(-400);
};
three_btn.onRelease = function() {
    slide(-800);
};

Sliding Nav Bar
hey all,

i can't seem to ge this sliding navigation bar workin... i can't even get the first part of the friggin tutorial.
what a noob.

http://robouk.mchost.com/tuts/tutori...orial=smartnav

anyways, if u get a sec, please tell me what im doin wrong. thanks ahead of time.

chorpe

Sliding Mc
I made this code for sliding mc up and down.
But there is the bug.
It wouldn't slide in opposite direction on the first click on the button...
Also can't figure it out how to disable sliding when mc reaches upper or lower line...

Maybe this isn't the optimal solution???

http://www.galahala.com/slide.zip

Sliding Bar
Hi, i encountering a problem.. I have 6 buttons, and a thin bar.. I am doing an effect whereby when i click on the 6th button the bar will move and stop at the 6 button, and when i click on the 2nd button it will move and stop at the 2nd button.. but i cant stop the bar.. Can anyone help out there?

bar = slider
button = btn_1

Each btn script:
on (press) {
slider.yMove = btn_1._y;
}

Bar Script:
onClipEvent (load) {
yMove = _y;
easeSpeed = 5;
}
onClipEvent (enterFrame) {
_y += (yMove-_y)/easeSpeed;
}

Sliding Nav
hi there, i am looking to create a menu that slides vertically from page to page depending on the button pressed. all pages are attached to the stage within an mc and the buttons will sit to the left of the pages. since i've not tried anything like this before i'm not sure if there is any other info required to make such a thing work. any help would be much appreciated and please ask if you need to know something i have left out.
regards

Sliding Nav Bar
hey all,

i can't seem to ge this sliding navigation bar workin... i can't even get the first part of the friggin tutorial.
what a noob.

http://robouk.mchost.com/tuts/tutori...orial=smartnav

anyways, if u get a sec, please tell me what im doin wrong. thanks ahead of time.

chorpe

Sliding Mc
I made this code for sliding mc up and down.
But there is the bug.
It wouldn't slide in opposite direction on the first click on the button...
Also can't figure it out how to disable sliding when mc reaches upper or lower line...

Maybe this isn't the optimal solution???

http://www.galahala.com/slide.zip

Sliding Nav
hi guys, new to flash and i need serious help building a sliding nav like the one on http://www.sonyericsson.com (the four sub sections) where the images push each other over to enlarge etc - be grateful for any help

Help With Sliding Nav
Hiya everyone! Sort of new to this actionscript and taking a class in it in July but can't wait till then - can you help me?

I downloaded this: 01_HorizontalMenu.fla from you's guys and I love it - figured out all by myself how to change the buttons (hurray!) and I am moving along nicely - except that wherever my mouse is on the screen the arrows follow it - it's too much and I'd like to tell it to only follow the mouse if the mouse is near it - can I do that?

Have a sub question - can I get this to come into view only if the mouse is near it? I tried a tween with an invisible button but that went wacky.

Thanks!!!!!!!!

Sliding Nav Bar
could anyone help?
i want to create a flash movie within my web site, i want a navigation bar of images (i am a photographer) to scroll along the top of the screen. when the mouse moves either left or right over these images they should move across the screen to reveal more. i have too many images to create simple thumbnails, anyway that looks pants!
i have seen this done on a couple of sites and thought it would be straight forward, how wrong was i, i have downloaded a few examples of the sort of thing i am looking for, i have also trawled through about 3 different manuals, and am still hunting, so any suggestions would be greatly appreciated.

Sliding Nav
I have this script on an MC:


ActionScript Code:
onClipEvent(load){
    function openNav(){
        this._x += (this.ty - this._x)/5;
        if(Math.round(this._x)-this.ty<1){
                      trace("open")
                      this.execute=null
                      }
}
function closeNav(){
    this._x += (this._ty - this._x)/5
    if(this.ty - this._x>1){
       trace("closed")
       this.execute=null
       }
       }
       }
       onClipEvent(mouseMove){
           if(this.hitTest(_root._xmouse,_root._ymouse)){
               if(!this.open){
                   trace("opening")
                   this.ty=560
                   this.open=true
                   this.execute=this.openNav
                  
               }
           }else if(this.open){
               this.open=false
               this.ty=33
               this.execute=this.closeNav
           }
           updateAfterEvent()
       }
       onClipEvent(enterFrame){
           this.execute()
       }



which I got from http://www.ericd.net/slidingNav3.html

at least thats how its suppose to work, It seems to slide out fine for me but doesn't want to slide back to its original position. seems to trace everything fine...

anyone know what could be the prob?

Sliding An MC
I have an MC which contains 7 images lined up verticaly, I have a mask which allows only one image to be visible at a time, and I have 7 buttons that correspond to each image. I'm trying to figure out how to get the MC to slide up and down to display the corresponding image when each button is rolled over. Basically I guess I'm just trying to figure out how to slide an mc into a different (x,y) cordinate everytime a different button is pressed. If anyone could help me out I would really appreaciate it.

Copyright © 2005-08 www.BigResource.com, All rights reserved