Making a loadmovie in an empty movie clip

Hi. I'm making a new as3 file, and there i made an animation, like an intro for my website, in a movie clip. But what i want is, when this animation or this movie clip ends, automatically it charges another swf with my website, without having to press any button. I read some tutorials on internet that i can make this, creating a new empty movie clip, and then writing some code, but it didn`t work me. Please can anybody help me with the exact code i have to write? I will appreciate so much that, because i'm new in this as3 topic. Thanks so much for ur time.

All you need to do is pull the code out of the function...
stop();
var loader:Loader =new Loader() ;
addChild(loader) ;
loader.load(new URLRequest("whatever.swf"));
loader.x =0
loader.y =0
And you mentioned adding the loaded object to a movieclip, so if you still plan to do that then give the movieclip an instance name and use it's name to add the loader to it instead of what your code does above...
Change: addChild(loader);
To:  mcName.addChild(loader);

Similar Messages

  • Sizing an empty movie clip

    Hi There,
    I have an instance of an empty movie clip object
    (imageLoader) to which I load a .jpg image from an external file,
    as per the attached code . . .
    But I have a problem in that I do not know the dimmensions of
    the .jpg image before I load it and in some cases this results in a
    large image covering most of my screen, including some of the text
    on the screen, I simply can't have this as it looks crap for a
    start!
    So, my question is this . . . How do I force the image pulled
    in from the external file, and/or the movie clip object, to be no
    larger than a certain size (i.e. H: 177 pixels x W: 177 pixels)?

    I guess Loader will work fine for you, but you might want to
    have a look
    at the loadInit method of the MovieClipLoader class. That
    will allow you
    to do what you want also - you just size your holder clip to
    whatever
    you like - the trick is that you need to wait until the new
    clip is
    fully loaded and instantiated - exactly what loadInit does
    for you.
    Dave

  • Empty Movie Clips - Navigation Issue

    I'm pretty new to site building so bare with me.
    I'm building a site with empty movie clips on each page to
    provide navigation to other pages. I'm testing linkage between two
    pages, (home page and news page) When I load the home page,
    everything works fine, I click the link to my news page, and it
    loads in fine, BUT when I click back to home from the news page,
    the home page starts playing nested movie clips that should NOT be
    auto-playing.
    So basically, I have nested movie clips that decide to play
    when I click to my home page from another page. If I load the home
    page by itself however, it functions properly. Why are these nested
    clips playing?
    Here is the action script for the nested movie clips as an
    example:
    _root.rightChair.onEnterFrame = function() {
    if (mouse_over_rightChair) {
    _root.rightChair.nextFrame();
    } else {
    _root.rightChair.prevFrame();
    Basically they should not be playing unless a mouse rolls
    over them.
    Thoughts anyone?
    -Stephen

    :

  • Empty Movie Clip Shows White Box before Movie Loads

    Hi all!
    I created a type of slide show template that imports external
    swfs. Everything works, but the client doesn't like the white box
    created by the empty movie clip that appears before the external
    swf loads. Does anybody know how to get rid of this? Any assistance
    would be greatly appreciated!
    Sincerely,
    rs

    > I created a type of slide show template that imports
    external swfs. Everything
    > works, but the client doesn't like the white box created
    by the empty movie
    > clip that appears before the external swf loads. Does
    anybody know how to get
    > rid of this? Any assistance would be greatly
    appreciated!
    Hi there rs
    Forum archives:
    http://groups.google.com/advanced_group_search?q=group:macromedia.flash.*&hl=en&lr=&ie=UTF -8
    search for "white box"
    http://groups.google.com/groups?as_q=white+box&num=10&scoring=r&hl=en&as_epq=&as_oq=&as_eq =&as_ugroup=macromedia.flash.*&as_usubject=&as_uauthors=&lr=&as_drrb=q&as_qdr=&as_mind=1&a s_minm=1&as_miny=1981&as_maxd=28&as_maxm=9&as_maxy=2006&safe=off
    Best Regards
    Urami
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • Making a button rollover change a movie clip's frame

    Hi again everyone,
    I knew how to do this in AS2 but now I am having problems
    with making a button on the stage goto a frame in a movie clip on
    the stage.
    I've attached a sample of my code below, hopefully you'll see
    the error and be able to point it out to me?
    I have a movie clip on the stage that has different
    information in different frames. I want to make it so that when
    someone rolls over the button, the movie clip fades in and goes to
    the correct frame to display the information.
    With this setup the way it is below, I keep getting "Warning:
    3590: void used where a Boolean value was expected. The expression
    will be type coerced to Boolean.
    I know where the problem is happening, "function
    XXX(event:MouseEvent):void {navigateToURL(XXXweb)}"
    How can I write this differently and eliminate this problem?
    Thanks,
    Jeremiah

    I'll give that a shot, thanks!
    A follow up question to that one, is there a way to make it
    so that I can have one rolled over function applied to several
    buttons / frames in the movie clip? This movie clip has 50+ frames
    in it and if I could reduce my coding, it would make life a lot
    easier.
    Thanks,
    Jeremiah

  • Elemants disapearing in flash cs5 leaving empty symbols (Movie-Clips) where the elemnt once was.

    Hi,
    I work for with Flash CS5 for an advertising company. We make banners and my job is to animate them. Lately I have been having a weird issue.
    When I work on a flash file all is well, I save export and all, but later when I come back to the file for modifications some of my elements are  disappearing?! Most of the elements are imported from illustrator CS5 and they seem OK when I leave but when I come back I see just empty Movie-Clips.Things seem to disappear without any logic, for example some text layers can disappear while some don’t.
    This issue is frustrating since it's causing much work and I would really love to resolve it.
    Can anyone guide me as to what I should do. I will gladly provide any info needed.
    Thank you.

    that's a task much easier to do using actionscript rather than use the timeline.  each location or parent location (if you want one parent for retail and one for residential etc) could have two keyframes.  one for highlighted locations, the other for non-highlighted.  you can timeline tween between the two keyframes, if you want.
    your main timeline would not change frames.  clicking the retail toggle button would cause all retail locations to tween to the highlighted frame.  clicking it again, it should cause the retail locations to tween to the non-highlighted frame.
    likewise for you other buttons and other locations.
    this setup will remove the complications caused by having various combinations of buttons toggled on and off.

  • Attaching an embedded movie clip to an empty one

    HI,
    I am new to Flash and would like some help about the
    following. A have an embeded movie clip in my library that i want
    to attach to an empty movie clip I am creating with ActionScript. I
    want to fix the size of the empty movie clip, that I will use as a
    container to for my embedded movie clip. It turns out that when I
    fix the size of the empty movie clip container and I use
    attachMovie to load the embedded movie clip to it, the image
    doesn't show, I can hear the sound but not the image.
    So the question is , if I have a movie clip container of a
    different size than the movie clipse I want to load into it, what
    do I need to do to make sure the movie clip will fit into the empty
    container.
    thanks
    -malena

    Thanks for the answer, but what I would like to do is to have
    a FIXED size empty clip on the stage and be able to load new clips
    into that empty clip and have the loaded clips resize to fit into
    the empty clip.
    For example the FLVPlayback component does that
    automatically. I can't use the FLVPlayback component because I want
    to be able to control which frame number I want to displaly on the
    screen, and it looks like I can only have that type of frame level
    control wiht a Movie clip component but not with the FLVPlayback
    component.
    -malena

  • Finding the width of a JPEG loaded into a movie clip

    I will be loading a page of bio information. Next to the
    person's photo (photos will vary in width) I want to put a column
    of buttons about 20 pixels to the right of the photo. So after I
    load the photo into an empty movie clip, I'm trying to get the
    width of the photo in order to figure out the x position of the
    buttons next to it. Here is what I have:
    myImage = "images/" + _level0.images[link];
    loadMovie(myImage,image_mc);
    // JPEG loads okay into image_mc //
    trace("image_mc._x = " + image_mc._x);
    // I get "Image_mc._x = 393" as expected //
    trace("myImage._width = " + myImage._width);
    // I get "image_mc._width = undefined" //
    trace("image_mc._width = " + image_mc._width);
    // I get "image_mc._width = 0" //
    How do I find the width of the loaded JPEG?

    you are probably trying to get the width before the image has
    loaded completely.. use the MovieClipLoader class to load the image
    into the empty movie clip, then use the onLoadInit event to get the
    movie clips's width(which is the images width);
    var mcLoader:MovieClipLoader = new MovieClipLoader();
    var myListener:Object = new Object();
    myListener.onLoadInit = function(target:MovieClip):Void{
    trace(image_mc._width);
    mcLoader.addListener(myListener);
    mcLoader.loadClip(myImage, image_mc);

  • Loading movie clip

    I am trying to load an external swf inside another movie clip
    yet, I am new to actrionscript and am not sure how to call the
    empty movie clip inside the other movie clip. I have:
    conradButton.onRelease = function() {
    framer_trail.trailer_mc.loadMovie("einstein.swf");
    Where the framer_trail is the movie clip on stage and the
    trailer_mc is the empty movie clip inside the framer_trail movie
    clip. Any idea how to do this? Thanks for any help!

    Can this be worked with through a global variable, or is
    there an easier way? I seem to be able to load a swf through a
    button if the empty movie clip is on the main timeline, but how
    would I access the empty movie clip if it is in another movie clip
    on the timeline?

  • Target movi clip in separate swf

    Hi, i am updating a website and am trying to move the "skip"
    button to appear earlier. To do this I have to move the button to
    another swf file.
    now I can load the swf (dbo.swf) into an empty movie clip
    (named empty_mc) easily enough, but I am trying to target different
    things to happen inside of the newly loaded swf instead of playing
    from the beginning. I tried this:
    on (release) {
    empty_mc.loadMovie("swfs/dbo.swf");
    empty_mc.boxes_mc.gotoAndPlay("quickbuild");
    empty_mc.gotoAndPlay("jump_home");
    empty_mc.stopAllSounds();
    ...but it still plays from the first frame of dbo.swf instead
    of playing the appropriate movies and frames. any suggestions?

    When I load in a new .swf file into my main movie, it appears to load on top of the main movie.
    This is the load function that we set up:
    this.createEmptyMovieClip("target1MC",this.getNextHighestDepth());
    this.createEmptyMovieClip("target2MC",this.getNextHighestDepth());
    var currMC:MovieClip = target2MC;
    target1MC._alpha = 0;
    function loadF(y:Number, d:Number) {
    otherTargetF(currMC).swapDepths(Math.max(target1MC.getDepth(), target2MC.getDepth()));
    mcl.loadClip("floors_swf/"+y+"_"+d+".swf",otherTargetF(currMC));
    Is there a way to get the .swf file that gets loaded in to load behind the graphics in my main movie?
    It appears to be loading into the target1MC, but I don't see where to set the level that it loads into?
    Thanks

  • Movie clip stops playing for no reason

    I am making a banner that has multiple movie clips sharing the same area, creating different rainbow effects when different areas (invisible buttons) are moused over.
    First of all I couldn't figure out if there was a way to have one invisible button over the whole area that changed to a different colored effect with each mouse over (first mouse over the black and whites would change to reds, second would change it to blues, third would change it to browns, etc.). Since I couldn't figure this out I settled on creating three buttons covering a third of the banner each, so when the mouse passes over one button it changes to reds, over another button it changes to blues, over the third it changes to browns.
    The effects are movie clips where each frame has another stripe changing color so it goes in a wave effect from one to the next, and then goes back to white and black in the same manner.  The first frame of each movie clip I had to turn into a nested movie clip so I could turn the alpha to 0, since I was going to have these color effect movie clips on top of one another in the main timeline on different layers, and so you could see the effect even if that color layer wasn't on top. I used the same nested movie clip with zero alpha for the first frame of each color effect clip (reds movie clip, blues movie clip, etc), so I dont' know if that's an issue.
    Anyway, it seemed to work fine for a while, but after working on it for a while longer (and not getting any further since I removed most of the changes I made), now when I test the movie the mouse over does not seem to work correctly. It works fine, seemingly, for the first time I mouse over each button, but in order to have it work again I have to mouse over the button twice, and then it will pause randomly during a part of the clip and I have to move my mouse back over for the movie clip to continue.
    I can't tell if this is because of the overlapping movie clips, or because my buttons are messed up, or if my actionscript is messed up, or if the timeline has to be longer, or what. Currently the timeline is 55 frames, the same as each movie clip.
    I put a movieclip_instance.stop(); command in the first frame of the main timeline, is there a better way to do this? Should I put the stop command in the movie clip itself?
    Here is a section of my AS in the main timeline, this is my first time programming ever, in any language, and trying to learn from the internet is more difficult than I thought it would be.
    redmovie.stop();
    red_btn.addEventListener(MouseEvent.ROLL_OVER, playRed);
    function playRed(event:MouseEvent):void
              redmovie.play();

    I am not sure of what the problem is, so I don't know if this will help or not.  One thing I might suggest is that you use gotoAndPlay(1) instead of play().  That way, if your movieclip is in the middle of playing it won't continue but will start from the beginning.
    You could use one button to have the different movieclips play in sequence if you prefer that.  You would just need to have some form of counter that keeps track of which is the next to play. Somethin like...
    var mcCounter:uint = 0; // start at 0 since an array is being used to identify which movieclip to play
    var mcs:Array = new Array(redmovie, bluemovie, brownmovie);
    only_btn.addEventListener(MouseEvent.ROLL_OVER, playMC);
    function playMC(event:MouseEvent):void
             mcs[mcCounter].play();                  // tell the current mc to play
             mcCounter += 1;                            // increment for the next mc
             if(mcCounter == 3) mcCounter = 0;  // reset the counter if it exceeds the array

  • Unloading a movie clip from a for statement

    Hi,
    I have this code:
    //create empty movie clips to place bin top, flame and bin
    bottom in that order
    this.createEmptyMovieClip("holder_mc2",this.getNextHighestDepth());
    this.createEmptyMovieClip("holder_mc",this.getNextHighestDepth());
    this.createEmptyMovieClip("holder_mc1",this.getNextHighestDepth());
    //attach movie clip/variables
    var dsfInstance:DropShadowFilter = new DropShadowFilter(5,
    45, 0x000000, 1, 10, 10);
    var b:MovieClip =
    holder_mc2.attachMovie("binTop_mc","binTop_mc",holder_mc2.getNextHighestDepth());
    var a:MovieClip =
    holder_mc1.attachMovie("binBottom_mc","binBottom_mc",holder_mc1.getNextHighestDepth());
    //property values
    a._x = 419;
    a._y = 244;
    a._width = 112.0
    a._height = 140.0
    b._x = 419;
    b._y = 175;
    b._width = 112.8;
    b._height = 10.1;
    a.filters = [dsfInstance];
    //create for loop to place the flame particle on the stage
    many times
    for(i=0;i<200;i++){
    //places in temporary movieclip t
    var t:MovieClip =
    holder_mc.attachMovie("flame","flame"+i,holder_mc.getNextHighestDepth());
    // position the movieclip on the stage for y co-ordinates
    t._y = 190;
    t._x = Math.random()*80+(Stage.width/2+115);
    //give the flame random sizes no larger than 80 pixels and no
    smaller than 20
    t._xscale = t._yscale = Math.random()*80 + 20;
    //randomize the frame the movieclip is going to start in the
    flame movie clip is 16 frame long so it will pick number between
    that
    //because math.random produces decimal values we round the
    number using math.ceil to the high whole number
    t.gotoAndPlay(Math.ceil(Math.random()*16));
    what i want to do is remove the movieclip in the for loop off
    the stage when i click on a button. i can manage to remove the
    movie clips with the variables a and b but i cant do it with the
    one in the for loop.
    i put this code in the button:
    on(release){
    play();
    stopAllSounds();
    a.removeMovieClip();
    b.removeMovieClip();
    t.removeMovieClip();
    Is there a way to do this?

    im so dumb! i figured it out.
    i used the "holder_mc" the name of the empty movie clip.
    holder_mc.removeMovieClip();

  • Editable text inside draggable movie clip

    I am dinamically creating textfields inside movie clips.
    Those movie clips are all dragabble (startDrag).
    The problem is that those textfields are supposed to be
    editable (input type) but once I attach startDrag to them, it's
    impossible for them to get the focus, hence they are not editable.
    I tried manually setting the focus on release, but it didn't work
    (Selection.setFocus(_root.movieclip.textfield)).
    Any help will be rrrrreally appreciated :D

    Well there does have to be some pixels in the bg clip! (Got
    to tease you just a bit, because I run into this ALL the time.)
    Some how folks don't take the method at its word.
    createEmptyMovieClip() does just that. It creates and empty movie
    clip. There are no pixels in it so there is nothing to onPress.
    Also I've got a little trick for you – you didn't ask
    for it, but it is still free. :)
    If you use the MovieClip class' method for
    createEmptyMovieClip() it will return a reference to the newly
    create clip. You can assign that reference to a variable and use it
    again and again. To my eye it makes the code easier to read and
    maintain. So your code would change to something like:
    var curClip=this.createEmptyMovieClip("mc"+i,1000+i);
    curClip.createEmptyMovieClip("bg",100);
    curClip.createTextField("myText",2,20,20,"auto","auto");
    curClip.myText.text="default value";
    curClip.bg.onPress=function(){
    this._parent.startDrag();
    and so on.
    Also I personally think getNextHighestDepth() is a disaster
    waiting to happen so I personally never use it.

  • Movie clip resize not working when image is loaded

    Hello,
    I'm having some strange luck in building an image slide
    show. I load the image paths into an array from an XML
    page and then step through the array elements w/ forward and
    back buttons.
    I have an empty image clip on the stage where I create an
    empty movie clip inside each time a new image is loaded. I load the
    image into the second movie clip like this:
    [code]
    _root.picsPage_mc.mc_pic_loader.mc_individual_pic_loader.unloadMovie();
    _root.picsPage_mc.mc_pic_loader.createEmptyMovieClip(
    'mc_individual_pic_loader', 1 );
    _root.load_movie_and_stop(
    _root.picsPage_mc.mc_pic_loader.mc_individual_pic_loader,
    _root.photo_array[_root.photo_index].image,
    _root.picsPage_mc.mc_pbar, 'regular_load');
    [/code]
    The load_movie_and_stop function is as follows:
    [code]
    function load_movie_and_stop( target_mc:MovieClip,
    movie_clip_to_load:String, p_bar:MovieClip, action:String )
    mc_loader._width = 0;
    mc_slider_bar.mc_drag_pan._x = 0;
    if( action != 'simple_load' )
    p_bar._visible = true;
    p_bar.bar._width = 0;
    var mclListener:Object = new Object();
    mclListener.onLoadStart = function( target_mc )
    if( action != 'simple_load' && action !=
    'regular_load' ){ target_mc.stop(); }
    if( action == 'load_and_play' ){ target_mc.play(); }
    mclListener.onLoadInit = function( target_mc )
    _root.resize_movie_clip(target_mc, 160, 120, 250, 190);
    if( action == 'load_and_stop' ){ target_mc.stop(); }
    mclListener.onLoadProgress = function( target_mc )
    if( action != 'simple_load' )
    percentLoaded = Math.floor( (
    target_mc.getBytesLoaded()/target_mc.getBytesTotal() )*100);
    p_bar.bar._xscale = percentLoaded;
    p_bar.txt_percent = percentLoaded + "% loaded.";
    mclListener.onLoadComplete = function( target_mc ){
    p_bar._visible = false; }
    var my_mcl:MovieClipLoader = new MovieClipLoader();
    my_mcl.addListener(mclListener);
    my_mcl.loadClip( movie_clip_to_load, target_mc );
    }//___endFunc___
    [/code]
    After the image is loaded into the movie clip, I then resize
    the image to be a specific width.
    The image resizing is done w/ this function:
    [code]
    function resize_movie_clip(clip_loader_name:MovieClip,
    max_width:Number, max_height:Number )
    orig_width = clip_loader_name._width;
    orig_height = clip_loader_name._height;
    aspect_ratio = orig_width / orig_height;
    if( (orig_width > max_width) || ( orig_height >
    max_height ) ) // If either dimension is too big...
    if( orig_width > orig_height ) // For wide images...
    new_width = max_height;
    new_height = new_width / aspect_ratio;
    else if( orig_width < orig_height )
    new_height = max_height;
    new_width = new_height * aspect_ratio;
    else if( orig_width == test_height )
    new_width = max_width;
    new_height = max_width;
    else { trace( "Error reading image size."); return false; }
    else { new_width = orig_width; new_height = orig_height; }
    clip_loader_name._width = Math.round(new_width);
    clip_loader_name._height = Math.round(new_height);
    [/code]
    Now, 98% of the time this works perfectly, but there is some
    certain times where the image resizing is completely ignored and
    the image gets loaded as it's normal size.
    Can anyone see why the image sizing get's ignored in some
    instance?
    Thanks for any help,
    Clem

    Found the solution that worked (used ._xscale and ._yscale
    instead of ._width and ._height
    [code]
    function resize_movie_clip(clip_loader_name:MovieClip,
    max_width:Number, max_height:Number, center_offset:Number )
    if( (clip_loader_name._width > max_width) || (
    clip_loader_name._height > max_height ) ) // If either dimension
    is too big...
    if( clip_loader_name._width > max_width )
    _root.picsPage_mc.txt_test = "func if 1";
    clip_loader_name._width = max_width;
    clip_loader_name._yscale = clip_loader_name._xscale;
    if( clip_loader_name._height > max_height )
    _root.picsPage_mc.txt_test = "func if 2";
    clip_loader_name._height = max_height;
    clip_loader_name._xscale = clip_loader_name._yscale;
    else { new_width = orig_width; new_height = orig_height; }
    [/code]

  • Movie Clip loading buttons require double clicking on the first attempt

    I have created a number of buttons that load move clips into
    an empty movie clip. The problem is that it takes several clicks to
    activate the first clip button then the buttons behave as they are
    supposed to and load properly. Is there a reason why the first time
    you must click several times to activate the button loading a movie
    clip?

    stop();
    unloadMovie(1);
    agatha_btn.onRelease = function() {
    nextFrame();
    loadMovieNum("agatha_full.swf", 1);
    anastasia_btn.onRelease = function() {
    nextFrame();
    loadMovieNum("anastasia_full.swf", 1);
    chiara_btn.onRelease = function() {
    nextFrame();
    loadMovieNum("chiara_full.swf", 1);
    clarisse_btn.onRelease = function() {
    nextFrame();
    loadMovieNum("clarisse_full.swf", 1);
    fifi_btn.onRelease = function() {
    nextFrame();
    loadMovieNum("fifi_full.swf", 1);
    gigi_btn.onRelease = function() {
    nextFrame();
    loadMovieNum("gigi_full.swf", 1);
    ginger_btn.onRelease = function() {
    nextFrame();
    loadMovieNum("ginger_full.swf", 1);
    ingrid_btn.onRelease = function() {
    nextFrame();
    loadMovieNum("ingrid_full.swf", 1);
    lucrezia_btn.onRelease = function() {
    nextFrame();
    loadMovieNum("lucrezia_full.swf", 1);
    natasha_btn.onRelease = function() {
    nextFrame();
    loadMovieNum("natasha_full.swf", 1);
    philipa_btn.onRelease = function() {
    nextFrame();
    loadMovieNum("philipa_full.swf", 1);
    signy_btn.onRelease = function() {
    nextFrame();
    loadMovieNum("signy_full.swf", 1);
    sophia_btn.onRelease = function() {
    nextFrame();
    loadMovieNum("sophia_full.swf", 1);
    teresa_btn.onRelease = function() {
    nextFrame();
    loadMovieNum("teresa_full.swf", 1);
    trudi_btn.onRelease = function() {
    nextFrame();
    loadMovieNum("trudi_full.swf", 1);
    };

Maybe you are looking for

  • How can I resize the window size of my website?

    My site is http://linguistine.com/ I put the swf in a html page but i'd like the window to be the dimensions of the swf not the html page. Is there an easy way to do this? Thanks Jamie

  • Beeing kicked out from remote desktop to a Windows 2008 R2 server

    My server have 2 users, the Administrator and a user "sigma". When I use the user "sigma" with remote desktop I always get kicked out from the server after a couple of minutes. This does not happend with the user Administrator. I tried to set the RDP

  • Bridge CS3: Lost Keyword 3rd Tier Hierarchy

    Wierd stuff happening to my Suite. PS went wonky so had to reinstall. Result is wonky Bridge. Lost 3rd tier of my keyword hierarchy. Have tried replacing xml file several times and Bridge automatically changes it each time. I also lost the buttons to

  • Archive Utility error

    Hi All, Just got the problem with Archive Utility. Getting Error 2, no such a directory. It works great with other applications Any ideas? Thanks /xxx

  • UWN QOS questions

    Hello all. I've got two questions related to wireless QOS in a UWN world: 1) A QOS profile is associated with a WLAN. Is it possible to diferentiate traffic within a single WLAN? Can I assign the gold profile to one DSCP value, and the silver profile