dcsimg
A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Stupid scene action

  1. #1
    Member
    Join Date
    May 2003
    Location
    @ work
    Posts
    45

    Stupid scene action

    I'm a flash 4 user going MX.

    I have a problem using a scrollbar in a scene. I've downloaded a scrollbar movie from the movie page. (Universal Actionscript S)
    It's a scrollbar using actionscript.
    The problem: When I use the bar in the mainscene (1) it work perfect but when I try to use the same one in a different scene it goes beserk. I think it's the actionscript in the slider:

    onClipEvent (load) {
    setProperty(this, _y, _root.scrollbar._y - _root.scrollbar._height * 0.5);
    magnification = (_root.object._height - _root.scrollbar._height) / (_root.scrollbar._height);
    objectstart = _root.object._y;
    sliderstart = _root.slider._y;
    top = _root.scrollbar._y - _root.scrollbar._height * 0.5;
    bottom = _root.scrollbar._y + _root.scrollbar._height * 0.5;
    }
    onClipEvent (enterFrame) {
    setProperty(_root.object, _y, (_root.slider._y - sliderstart) * -magnification + objectstart);
    }

    How can I change it so it can be used in different scene's?

    Please help, becouse I'm dumb.

    Greetings, Blackdoor

    p.s. Excuse my Englisch, I'm Dutch (and dumb)

  2. #2
    Creating Creativity!!! digitalblood's Avatar
    Join Date
    Feb 2003
    Location
    India
    Posts
    143
    try replacing (this) with (_root)

    example:
    setProperty(this, _y, this.scrollbar._y - this.scrollbar._height * 0.5);

    in place of
    setProperty(this, _y, _root.scrollbar._y - _root.scrollbar._height * 0.5);
    I don't want to run the world But I Wouldn't mind taking it for a RIDE!!

  3. #3
    Member
    Join Date
    May 2003
    Location
    @ work
    Posts
    45

    Hmmmm

    Yo, thanx 4 the reply, but it has no change.

    I've put a example as a attachment to this reply. Maybe if it's no trouble, you can look at it and find the problem. I also saw that if I switch from scene 2 to scene 1 , scene 1 bar also doesn't work. I'm very much confioused about it. Please help, it's driving me crazy!

    Kind regards,

    Blackdoor
    Attached Files Attached Files

  4. #4
    Creating Creativity!!! digitalblood's Avatar
    Join Date
    Feb 2003
    Location
    India
    Posts
    143

    hmmm?

    Hey chum. Wat are u talking about. I was not able to get you looking at your fla. It works pretty good for me except that u embed it into a MC & D&D on the stage, it behaves wierd.

    Easy Trick ..... Break the mc after u place it on the stage

    Well, sorry couldn't get much of u. But it is working gr8 for me here

    Rgds

    Bhaskee

    Psst: the design inside is good
    I don't want to run the world But I Wouldn't mind taking it for a RIDE!!

  5. #5
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    avoid using scenes, they do not exist anymore when fla becomes swf, (they are an authoring conveniance ONLY ) so my logic is : why use them in the first place ??

    hope the file helps

  6. #6
    Member
    Join Date
    May 2003
    Location
    @ work
    Posts
    45

    Yo, thanx!

    Mmmmm, not using scenes is the best solution. When I was using Flash 4 I often use the scenes to get a better view over my project, but now I have to put all of the content in the maintime line. And load some as swf into the maintime line. Hmmmm

    But thanx fellow flashers, this takes a load of my shoulders.

    Greetings from the Netherlands,

    Blackdoor

    p.s. First project I made was for http://www.di-visie.nl using flash 4.

    Comments?

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