A Flash Developer Resource Site

Results 1 to 13 of 13

Thread: External Image Linking??

  1. #1

    External Image Linking??

    What i would like to do is have a folder with a number of Pictures that i can have linked to my Flash. This is what im trying to do. I have an large menu umbrella. It starts off with 5 menus, one of those 5 have 10 more links then one of those 1 has a picture and some informatino about the picture. I would like to have them linked externally because they wont need to load all like 100 pictures just the ones they want to see.

    Basically similar to Dynamic Text linking only with like pictures. I hope i have explained this well enough. Please help me out if you can. thanks in advance.

  2. #2
    Senior Member
    Join Date
    Jul 2003
    Location
    way to east
    Posts
    109
    a few days age i worked out on this type of project and at the end i found a method that suits... i think you want to make a thumbmail previews or like a picture viewer... for that i put thumbnail of each image in a folder and put some variables about each image in a text file... that was a tough job....but as i have to complete the job...i did that....it helps?
    Discovering Logic & Order


  3. #3
    Hello
    Well, I dont know, if you want to load an image externally to your Flash movie (Linking) its very very simple
    like make a movie clicp & name is displaypic
    put this command in some button

    onrelease (){
    loadmovie("images/your-pic-name.jpg","displaypic");
    }

    plese check the code, i'm not very good in expert mode He he

    well, that should do it

    if this is what you want

    in other words, you've got to take the picture as a flash movie.. and load it using the load movie command, define a target to arrange it according to your need.

    Reply back if this is/isent that you want

  4. #4
    Ok here is the thing, I would like to have this...

    I am making the website so that people can order clocks and watches and such. I would like to have all the product pictures and the text discribing them all in external and not embedded. I would like to have it so that my flash movie is more or so the skeleton and then it will load the pictures and the text separate, for when they want to view a specific product. So there will be the first level with the thumbnails and names of the pictures, all the thumbnails i would like to have not embedded. and then if you click on a specific product it brings up the picture of that product, and its text, also on the stage will be order button etc etc. teh only reason i would like all these things to not be embedded is..

    1. Loading time
    2. So if i want to change 1 product i dont have to go edit the fla, i can instead just change txt file variables and generic pictures clock1.gif, clock1thumb.gif.

    I hope someone can help me out with this.

    thanks

  5. #5
    Yeah, that's exactly what i explaned above

  6. #6
    Thats not exactly what you said, buttons??? where does it say i want to have a button display the picture?

    I tried what you said and It doesnt seem to work, This is what i did.

    1. Create movie clip named displaypic
    2. I have gone to the first frame and added the actionscript of the load movie that you advised.
    3. I inserted the movie clip to the stage centered where i want the pic to appear.
    4. published and vualla no pic.

    you said something about a button, but i dont understand what that has to do with what im trying to do.

  7. #7
    hmmm, that means you are pretty cool in flash... he he
    well, what i explained is still exactly what i wrote.. but you were suppose to write it ur self that you are not very good in it

    you cant just make a movie clip name it displaypic and put it in ur first frame
    you've gota name it
    from its properties, "instancename"
    write displaypic
    and the same procedure will work
    and about the button ?!? well when you are going to make a site or something.. you'll have to make some buttons, or even if you dont, you've got to learn it (Linking to images externally) by first trying it on a new movie clip.. i dont undertand which part in confusing you... keep writing if it still dosent work

  8. #8
    Alright I think we are getting closer now.

    I have done a 2 stage thing the first stage or frame or whatever is a button that just loads teh second one.

    I did the button command like this
    on (release) {
    loadMovie("Watch1.jpeg", "_root.displaypic");
    gotoAndPlay("Main Menu", 1);
    }

    then for the Main Menu i have the movie clip and I named it displaypic and the instance too so it has that flag and its still not doin it.

    I even made sure the diplaypic layer is on the top and not hidden or whatever what could be the problem?

    EDIT- by stage i mean scene sorry

  9. #9
    Here is also something from the flash Help that I have been reading I think I have followed all their rules though.

    Usage


    loadMovie("url",level/target[, variables])
    Parameters


    url The absolute or relative URL of the SWF file or JPEG file to be loaded. A relative path must be relative to the SWF file at level 0. The URL must be in the same subdomain as the URL where the movie currently resides. For use in the Flash Player or for testing in test mode in the Flash authoring application, all SWF files must be stored in the same folder, and the filenames cannot include folder or disk drive specifications.

    target A path to a target movie clip. The target movie clip will be replaced by the loaded movie or image. You must specify either a target movie clip or a level of a target movie; you can't specify both.

    level An integer specifying the level in the Flash Player into which the movie will be loaded. When you load a movie or image into a level, the loadMovie action in the Actions panel in normal mode switches to loadMovieNum; in expert mode, you must specify loadMovieNum or choose it from the Actions toolbox.

    variables An optional parameter specifying an HTTP method for sending variables. The parameter must be the string GET or POST. If there are no variables to be sent, omit this parameter. The GET method appends the variables to the end of the URL, and is used for small numbers of variables. The POST method sends the variables in a separate HTTP header and is used for long strings of variables.

    Returns


    Nothing.

    Description


    Action; load a SWF or JPEG file into the Flash Player while the original movie is playing. The loadMovie action lets you display several movies at once and switch between movies without loading another HTML document. Without the loadMovie action, the Flash Player displays a single movie (SWF file) and then closes.

    When you use the loadMovie action, you must specify either a level in the Flash Player or a target movie clip, into which the movie will load. If you specify a level, the action changes to loadMovieNum. If a movie is loaded into a target movie clip, you can use the target path of that movie clip to target the loaded movie.

    A movie or image loaded into a target inherits the position, rotation, and scale properties of the targeted movie clip. The upper left corner of the loaded image or movie aligns with the registration point of the targeted movie clip. Alternatively, if the target is the _root Timeline, the upper left corner of the image or movie aligns with the upper left corner of the Stage.

    Use the unloadMovie action to remove movies loaded with the loadMovie action.

    Example


    The following loadMovie statement is attached to a navigation button labeled Products. There is an invisible movie clip on the Stage with the instance name dropZone. The loadMovie action uses this movie clip as the target parameter to load the products in the SWF file, into the correct position on the Stage.

    on(release) {
    loadMovie("products.swf",_root.dropZone);
    }
    The following example loads a JPEG image from the same directory as the SWF File that calls the loadMovie action:

    loadMovie("image45.jpeg", "ourMovieClip");

  10. #10
    can someone please tell me what im doing wrong i can not get it working still.

  11. #11
    Spidey wants his icon back! Defyeler's Avatar
    Join Date
    Jul 2002
    Location
    New York City
    Posts
    255
    If you want to load images on a stage dynamically, via variables instead of embedding the things, all you need is 2 frames, a few MC's and alot of action script and you're done...

    I just recently created this for a friend.

    http://www.dkbds.com/wedding/

    All the images are loaded via external variables.. the entire stage is a whole 2 frames long.. cause it has a preloader on frame 1.

    Everything else is controlled with AS.

    For what you want.. you need 3 basic things..

    A button.. for changing categories, selecting product.. i.e... a clock for example..

    an MC to hold the Pic for the description and a dynamic textbox to hold the description.

    say I want to see a clock.

    You load all the variables into your file on the first frame to _level0. or _global.

    then you script the button instance.

    PHP Code:
    button.onRelease = function (){
    _root.PictureHolderMC.loadMovie(pictureVariable);
    _root.descriptionTextBox.Text textvariable;

    now everytime someone clicks that button, the picture loads into an MC and the new text descriptions will load into the textbox.

    The more products you have the more complicated the script obviously, because then you deal with arrays, if / then / else checkers for the button.. to check current state, frame, location, what content is loaded etc etc.

    (all the above is being very general, obviously a site has more sections / buttons / links, especially a website selling products.)
    Its never.. wow kool I like it, its always.. ok I made this.. how can it be better?

  12. #12
    I would like to know how you did all that stuff on that wedding site of yours, I finally got the image thing to work now how did you make the preloader for each image? and how did you get that scroll button thing to work?

    If you would rather not explain it all maybe you can point me in the direction of a good tutorial site so I can persue the knowledge myself.

    Thanks

  13. #13
    Spidey wants his icon back! Defyeler's Avatar
    Join Date
    Jul 2002
    Location
    New York City
    Posts
    255
    the preloader exists on the main swf. In the entire site, there were 2 preloaders used, 1 for the main movie loading, the other for the small preview pictures and the larger prieview.

    The preloader is qued everytime you click a thumbnail. The preloader checks for which thumbnail was clicked, if the data is already loaded, if not, it will run the usual getbytestotal >= getbytesloaded type of preload. The positions of the preloader components (the bar, the numbers) are placed using Actionscript.

    The images are just normal Jpgs.

    The scroll button thing.. I think what you're referring to is the thumbnails?

    Its a relationship script. There is a hidden MC on the stage, and the buttons change the thumbnail slide's relationship to the hidden MC. Easing it into where its supposed to go.

    Here are some good tutorial sites:
    flashkit.com
    kirupa.com
    and one more. I can't remember the URL off hand, I'm not at my home office atm. I'll post it once I find it.
    Its never.. wow kool I like it, its always.. ok I made this.. how can it be better?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center