Jump to content


Drag And Drop and a big dilema..


  • You cannot reply to this topic
5 replies to this topic

#1 AfonsoSantos

    Young Padawan

  • Members
  • Pip
  • 3 posts

Posted 07 March 2007 - 10:27 AM

Hi everyone :lol:

First of all, im portuguese, so im sorry if my english isnt the best;)

Please check
http://www.binte30.com/teste2.swf


The script i wrote just simply creates a empty MC and then, using MovieClipLoader function,
just simply loas the .SWF files inte the empty Mc's.

My HUGE dilema is that i need to create a way to when i double click (or any other way)
on one off those MC's the .SWf would center the screen and enlarge.
After that a person could watch the .SWF contect and navigate thru it...
IF the person wanted to go back, just simply click out of the SWF box and the
MC would minimize and go back to his place.

Is that possible?

Anu ideia/sugestion?

Im in really need of and hand help;)

Thanks so much everyone,
Hugs,
Afonso Santos - Portugal

#2 Pax

    P2L Jedi

  • Members
  • PipPipPip
  • 911 posts
  • Gender:Male
  • Location:Windsor, ON, Canada

Posted 07 March 2007 - 01:35 PM

var tweenX:Tween = new Tween(target_mc, "_x", Strong.easeOut, target_mc._x, xpos, 15);
var tweenY:Tween = new Tween(target_mc, "_y", Strong.easeOut, target_mc._y, ypos, 15);
var tweenW:Tween = new Tween(target_mc, "_width", Strong.easeOut, this._segw, this._imgw, 15);
var tweenH:Tween = new Tween(target_mc, "_height", Strong.easeOut, this._segh, this._imgh, 15);

target_mc is the movieclip that is clicked
xpos and ypos are:
var xpos:Number = (Stage.width/2) - (this._imgw/2);
var ypos:Number = (Stage.height/2) - (this._imgh/2);
_imgw is the width of the image after it has scaled to its full size
_imgh is the height of the image after it has scaled to its full size

_segh is the height of the image before it has been scaled to its full size
_segw is the width of the image before it has been scaled to its full size


This should work for your needs. Its fairly basic. Anything much more than this and you start getting into math that simulates 3d in a 2d environment. That gets difficult...

#3 AfonsoSantos

    Young Padawan

  • Members
  • Pip
  • 3 posts

Posted 07 March 2007 - 01:57 PM

View PostPax, on Mar 7 2007, 06:35 PM, said:

var tweenX:Tween = new Tween(target_mc, "_x", Strong.easeOut, target_mc._x, xpos, 15);
var tweenY:Tween = new Tween(target_mc, "_y", Strong.easeOut, target_mc._y, ypos, 15);
var tweenW:Tween = new Tween(target_mc, "_width", Strong.easeOut, this._segw, this._imgw, 15);
var tweenH:Tween = new Tween(target_mc, "_height", Strong.easeOut, this._segh, this._imgh, 15);

target_mc is the movieclip that is clicked
xpos and ypos are:
var xpos:Number = (Stage.width/2) - (this._imgw/2);
var ypos:Number = (Stage.height/2) - (this._imgh/2);
_imgw is the width of the image after it has scaled to its full size
_imgh is the height of the image after it has scaled to its full size

_segh is the height of the image before it has been scaled to its full size
_segw is the width of the image before it has been scaled to its full size


This should work for your needs. Its fairly basic. Anything much more than this and you start getting into math that simulates 3d in a 2d environment. That gets difficult...


Thank you, but this part i made it myself also , but still thanks.



My main problem is controling the .SWF that is inside the MC.



Any ideia?

#4 Pax

    P2L Jedi

  • Members
  • PipPipPip
  • 911 posts
  • Gender:Male
  • Location:Windsor, ON, Canada

Posted 07 March 2007 - 02:11 PM

You'll need to setup a counter to keep track of the clicks to check and see if they occur in rapid succession. if they do, fire the animations, but clear the button events on the mc that you load the swf into. Those button actions will override those of the swf you load in.

#5 AfonsoSantos

    Young Padawan

  • Members
  • Pip
  • 3 posts

Posted 07 March 2007 - 04:19 PM

View PostPax, on Mar 7 2007, 07:11 PM, said:

You'll need to setup a counter to keep track of the clicks to check and see if they occur in rapid succession. if they do, fire the animations, but clear the button events on the mc that you load the swf into. Those button actions will override those of the swf you load in.


the big problem is exctly that... i mean, the if i have buttons or anything on that SWf im loading into the MC, it wont work.

MovieClipLoader says it only works the main SWF not the SWf we load, we can see the SWF we load
but we cant work with them...

I need to make them work :|

#6 Pax

    P2L Jedi

  • Members
  • PipPipPip
  • 911 posts
  • Gender:Male
  • Location:Windsor, ON, Canada

Posted 07 March 2007 - 08:22 PM

Im not sure I follow exactly whats going on here :blush: But my suggestion is to first try and load your swfs into an empty mc that has NO actionscript applied to it. Mainly just no actions related to buttons. onRelease or anything like that.

See if that works. There should be no problem loading a swf using the moviecliploader and have the buttons in the loaded swf still work. I've done it a number of times...





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users