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








Loading A Swf , But With A Twist :)


Hey all.. im pretty new to as3...
i want to load a swf inside a holder sfw, and i found well working code that does that... however, it attaches the child as soon as the load is complete..

I want to attach the child to stage at a later time, but dont know how to overcome the scope to do this. Thank you...


Code:
import caurina.transitions.Tweener;

import flash.net.URLRequest;
import flash.display.Loader;
import flash.events.Event;
import flash.events.ProgressEvent;
import flash.text.TextField;
import flash.text.TextFieldType

holder.y = - 300;
holder.alpha = 0;



var HPositioner:Number = ((stage.stageWidth - 900) /2);
var VPositioner:Number = ((stage.stageHeight - 680) /2);
whiteLine.width = 0;
whiteLine.x = (-1) * HPositioner;
var highY:Number = (-1) * VPositioner;



Tweener.addTween(holder, {time:0.7, alpha:1, y: 370, transition:"easeInOutBack"});

Tweener.addTween(holder, {_blur_blurY:8, _blur_quality:10, delay:0.1, time:0.5, transition:"easeInOutBack"});

Tweener.addTween(holder, {_blur_blurY:0, _blur_quality:0, delay:0.6, time:0.2, transition:"easeInOutBack", onComplete:startLoad});


function startLoad()
{
var mLoader:Loader = new Loader();
var mRequest:URLRequest = new URLRequest("http://nuwaydesigns.com/testing/soundblaze3/9.swf");
mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);
mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler);
mLoader.load(mRequest);
}

function onCompleteHandler(loadEvent:Event)
{
///!!!!! i dont want it to add the child now,
///!!!!! but rather when the function attachSWF() is called at the end
//addChild(loadEvent.currentTarget.content);

moveWhiteLine();
}

function onProgressHandler(mProgress:ProgressEvent)
{
var percent:Number = Math.round((mProgress.bytesLoaded/mProgress.bytesTotal) * 100) ;
holder.tf1.text = String(percent);
//trace(percent);
}


function moveWhiteLine()
{
Tweener.addTween(whiteLine, {time:0.8, width:stage.stageWidth, transition:"easeInOutQuad", onComplete:coverBlack});

//Tweener.addTween(whiteLine, {time:0.4, transition:"easeInOutQuad"});
//Tweener.addTween(whiteLine, {time:0.4, delay:0.4, _color:0xFFFFFF, transition:"easeInOutQuad"});

Tweener.addTween(holder, {time:0.4, x:1000, alpha: 0, delay:0.3, transition:"easeInOutQuad"});
}

function coverBlack()
{
Tweener.addTween(whiteLine, {time:0.4, height:stage.stageHeight, y:highY, transition:"easeInQuad", onComplete:attachSWF});
}


function attachSWF()
{
// this is where i want the attaching to happen
}




ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0
Posted on: 05-16-2008, 09:42 PM


View Complete Forum Thread with Replies

Sponsored Links:

Loading Text, With A Big Twist ( As Always With Me )
Ok, I need to load info from a text file on release of a button. Easy enough, but here is the twist. I have 3 buttons, all will load a seperate line of text, of course it will be html dynamics, so I can intergrate links, but I need this in a text box that will tick scrolling the text right to left. So far, if you've made it, it's seems pretty simple....here is the real twist. There is 1 more button, that will act as a power button. As of right now, on press it enables PowerMC, and it plays the MC. On the second press it goes to and plays the off verison.


ActionScript Code:
on (press) {if (_root.PowerMC.enabled==false) {_root.PowerMC.enabled=true;_root.PowerMC.gotoAndPlay("on");}}on (press) {if (_root.PowerMC.enabled==true) {_root.PowerMC.enabled=false;_root.PowerMC.gotoAndPlay("off");}}


How would I be able to control the other 3 buttons, so if PowerMC.enabled==false they won't load in the text. This is pretty confusing, and not knowing enough AS to pull this one off, I really need some help. Thxs in advance.

View Replies !    View Related
Dynamically Loading Jpg's In Sequence... With A Twist
Hey all
I'm no newbie to actionscript, but I've hit a small snag.

I've loaded jpg's into flash before, but now I'm throwing a few changups in the mix.

to start with, I have 250 jpgs. All are in sequence, exported frame by frame from a quicktime movie.

First off, I need for each JPG to be in its own seperate movieclip. Right now, I'm just duplicating a blank MC and dynamically throwing a jpg in each one. No problem, right?

Here's the catch: I need to keep this entire thing TIMELINE based. I know that it's probably not the best way to approach this, but I'm going to use it specifically to play the flash file like a movie, straight through from frame 1 to frame 250. I know that it sounds a little out of control (or unneccessary), but this is a starting point for some different ideas that I want to play around with.

My question is this: How can I dynamically load a JPG into a mc, and then place it on a specific frame within a container Movieclip?

Thanks for the help!!!

andy

View Replies !    View Related
Loading In Extrenal Swfs With A Twist
Hi

I have a series of buttons that when clicked load in external swfs, all works great no probs but

with certain buttons I don't want to load in any swf but I also want the currently loaded in swf to disappear.

I could do this by creating a blank swf and loading that in but is there a better way of doing this?

Thanks

Ricky55

View Replies !    View Related
FullScreen With A Twist.
I'm looking for a way to go FullScreen besides FSCommand Fullscreen = TRUE , I dont want the start menu to be displayed. I have my start menu hidden, it still shows the little white line. Any Ideas?

Thanxz!
-Paradoxz

View Replies !    View Related
Twist On PrevFrame();
hello, i've posted a similar question to this, but now i have a specific situation:

i have a *.fla with one movie clip (instance name: work) that increases size and then stops. i plan to load movie clips to this, but, my specific question is: i have another movie clip (instance name: close_b) that acts as a button. when this button is clicked, i'd like the movie clip to decrease size and return to the original start size. here is my current code (the two MCs are on the root timeline):

on close_b:
on(press){
_root.over = true;
}

on frame 12 of the actions layer on the root timeline:
close_b.onEnterFrame = function(){
if(over){
_root.work.prevFrame();
}
}

stop();

_____________________________
i don't receive any error messages, and, in fact, when i replace prevFrame(); with, say _alpha = 20; it works. "work"'s alpha changes, so it targeting. what am i doing wrong? for additional insight into what i'm trying to do, see
this site, go to the red barn, and click on the "About Us" book.

thanks in advance.

View Replies !    View Related
Preloading MCs With A Twist
hey peeps,

thanks to those who tried to help with the previous problem with the MC controll,

I have another little problem that should be a lot easier to solve, i am loading a series of external swf files into an empty placeholder MC however that MC is inside another MC on the main timeline how do i create preloaders for those swfs as the placeholder is not on the main line

cheers guys and girls

View Replies !    View Related
Preloader With A Twist
In the game im working on, ive made a core file that loads multiple files depending on what your doing. For examply the maps are each a separate file opened by the core. SI there a way to preload a maximum of 4 files without actually showing it. As it sits now my game only works on straight from the computer because a website can't load the multiple files quick enough.
Simply, a preloader in the bg, to have the files that may be accessed ready, maybe even if it loaded 90% of each file and when needed loading the last 10%

View Replies !    View Related
Twist An Pout
Ok so I want to have the window follow the spirit in the middle but i have no idea how to do it.

What i mean is how do i make a scrolling game that follows the character. so that the screen follows the sprite.

A good example of what I'd like is

http://mofunzone.com/online_games/sky_boarder_iii.shtml

In case you were wondering I'm using Flash MX
2004 pro.

"Instead of moving the sprint, you move the window. Put the map in a movieclip and put the map below the sprite. Then when the arrows are pressed, move the map the opposite way. (ie. if key.left is pressed map._x+5) Adding 5 to the map._x will move the map right, which will make it look like the sprite is moving left.... Hope this helps."


But, what if i want some walls? If it's just one big movie how would that work? Also what if instead of the figure just going the direction of the arrows how would I make it so the left and right arrow keys turn the sprite rotate left and right? Then make it move the direction that it's pointing.

Thank you for your help.

View Replies !    View Related
Twist Picture
Hello, im making a carousel but i want to give it a more 3d looking way. When the picture is in the carousel by the sides it will twist and look plain, i want the picture to always look forward. Here is the code for rotation:

// user transforms
if (pressv!=0) {
this.panel+=Pressv;
pressv=Pressv*.9;
if ((pressv<.2) && (pressv>-.2)) {
pressv=0;
}
}
// 3d transforms
theta+=_parent.speed;
xbit=Math.sin(Math.PI/180 * theta);
ybit=Math.cos(Math.PI/180 * theta);
this._xscale=ybit*this.panel;
this._x=xbit*this.radius;
this._alpha=20+(ybit+1)*50;
this._yscale=this.panel+ybit*1;
stack=Math.round((ybit+1)*radius*.5);
if (stack==100) {
stack=100;
}
this.swapDepths(stack);
Sent at 1:11 AM on Wednesday

View Replies !    View Related
Scroll With A Twist
I Have a vertical scroll bar that I built that moves a movieClip with right now 30 items inside it (item amount may change). What I'm trying to do is as the user is scrolling it also selects the items inside based on the user scrolling. I'm not sure how to go about triggering these items to highlight. Right now I have them highlight on a rollOver and RollOut stae but I need a way to trigger that based on the users scroll positions.

Any ideas on how I would approach this.

The scroll is setup based on the scrollPosition*(contentHeight-windowHeight)

Thanks

View Replies !    View Related
Fader With A Twist
I have a fader. (slider)
1) it is on a line 100 ixels long
2) I need it to control the Alpha leval of an object.

I am asuming I need to get the percentage of the slider, to find out were the slider is on the bar, and then transform that into the percentage of the alpha fade.

Any ideas on what the coding for this would be?!

Thanks,

Prodigy

View Replies !    View Related
Preloading 5 Swf's + A Twist. Oy.
I am creating an online demo which has 5 scenes that play one after another.

My goal is to load the 1st scene while the user waits. Once the 1st scene starts to play, the 2nd scene begins downloading quietly in the background. That way, once the 1st scene is complete, it will automiatically play the second scene, the viewer none the wiser.

I don't have any user interaction here.

Help. Help. Help.

I've read alot about LoadMovie, but really could use someones superbrain to help me with more guidance.

I have no idea how it works or where to start.

Thanks all,
Inkster

View Replies !    View Related
Transitions Within One Fla With A Twist
Howdy

I have serached high and low for help on this but have been unable to find help so far. There are a few tutorials on transitions between sections within one .fla but I need something a little different. I need each section to intro and outro, but I need the new section to intro on top of the old section and then the old section to disappear once it has been covered.

So far I have a .fla with three buttons and three sections. When a section is chosen, a MC is pulled in using attachMovie and placed with a dropZone. A new dropZone is created for each MC. This new MC then uses swapDepth to move to the top. This code seems to have problems though:

The intros and outros dont seem to play out properly. If you choose 3 first then go to 1, you will see that 3 plays its intro ( black sqaures ) instead of outro ( black circles) before 1 comes in.

Also, even though I have x and y set for the dropZones, after a few clicks, it seems to put the new MC a 0,0.

Any help will be greatly appreciated.

Thanks

View Replies !    View Related
A Countdown - With A Twist
Hello!

Could someone please help me out - I need to make a count down but I need it to exclude weekends. The company we are making this product for needs a 64 day work week countdown - so monday to friday. Baisically we need it to stop on the weekends, Fridays at 11:59pm and start up again on Monday at 12:00am

Does anyone know how I could achive this?

If I could have a counter with the min and seconds as well as the days that would be awesome but if it's only the days than that's cool to.

Any help! I'm an AS newb

View Replies !    View Related
Yet Another Thumbnail ? But With A Twist
Hello,
I posted earlier regarding thumbnails not showing ( figured it out).

Now here's my new problem.
I want to load my thumbnail in a large grid that scrolls vertically. When you click on a thumbnail the image should load over the thumbnails (blocking them from view) and when
the image is clicked on the image fades out and the thumbnails are back.

I hope i explained this well.

I've being searching the threads and have many codes for grids but i can't get them to work.

thanks

View Replies !    View Related
DuplicateMovieClip: With A Twist
My goal may not be attainable but I figured I'd ask anyways. I couldn't find an answer so I'm hoping that you guys do...

Lets say I have the following movieClips

_root.mc1
_root.mc1.mc1a
_root.mc2

_root.mc1.mc1a has a external JPEG loaded into it. I want to duplicate _root.mc1.mc1a and move it into _root.mc2. It would then be called _root.mc2.mc2a

I can't use duplicateMovieClip because it would create the duplicated movie clip within the original MovieClip's parent. I can't use attachMovie because the content I want to duplicate is dynamic.

Is there any way to either:duplicate the MC the traditional way (with duplicateMovieClip) and move it later
create a copy of the MC somewhere besides the duplicated MC's parent?
Thanks for your help, guys!

-sp

View Replies !    View Related
Perspective With A Twist
Hey I have been working on the perspective tutorial and I'm trying to create an effect that zooms from out to in then stops at a certain point. I was able to get the effect to zoom from out to in just by changeing the z value from + to -but I'm clueless as to how to get it to stop. Can anyone help me with this issue? Thanks

View Replies !    View Related
LoadSound Twist
I would like to put getSelectedItem in place of the url.

onChange = function () { if (combobox.getValue() == "1") {}};
screen.loadSound("combobox.getSelectedItem().data; ", true);

I get an error that says;

Error opening URL "combobox.getSelectedItem().data;"

This tells me that the load command is not reading the
getSelectedItem().data command.

Any suggestions

View Replies !    View Related
Duplicate Movie With A Twist
have some code to duplicate a movieclip

Code:
newY = 10;
for (i=0; i<menuMax; i++) {
duplicateMovieClip (_root.mainMenu.subMenuItem, "select"+i, i);
setProperty ("select"+i, _y, newY);
newY = newY+20;
}



i am playing around with trying to get every other movieclip to be white, as they are currently grey, but to no avail. can anyone point me in the right direction? even if you could tell me how to at least get every other movieclip to have an alpha of 0, it would help me out.

i am trying to achieve this

Code:
________
| GREY |
|________| <---1st dupliacted movieclip
| WHITE |
|________| <---2nd dupliacted movieclip
| GREY |
|________| <---3rd dupliacted movieclip
| WHITE |
|________| <---4th dupliacted movieclip

.....and so on



[Edited by tapo on 10-05-2001 at 03:49 PM]

View Replies !    View Related
Javascript Popup With A Twist?
Hey guys,

I am launching a pop up window using the following code..


Code:
on (release) {
getURL ("javascript:NewWindow=window.open('chat/chat.php','ircchat','width=790,height=540,left=0,top=0,location=No'); NewWindow.focus(); void(0);");
}

but i want to send a variable along in the url (the variable is var inside a text box called username on the _root of the movie) but i can't do it. I have tried fidling with the code, but it aint having none of it so basically i need.


Code:
on (release) {
getURL ("javascript:NewWindow=window.open('chat/chat.php?MY_USERNAME_VARIABLE','ircchat','width=790,height=540,left=0,top=0,location=No'); NewWindow.focus(); void(0);");
}
All help appriciated, i need to get this finished within two hours. eek!

View Replies !    View Related
I Need To Move A MC With Actionscipt Up Or Down With A Twist.
Greeting flashers here the deal,
I need to move a movie clip of a line aound 9 pixels up the screen only if the mouse is above the line. If the mouse is below the line I want the line to move back down to original position and then if the mouse is still below the line I want the line to move about 9 pixels down the screen. I have an unstable version that works using HITTEST/invisible boundryclips and nested if statements. There are many problems with this method it would take too long to discuss why(has to do with overlapping boundry movie clips). Here is my old code. I want to abandon the hittest/boundry clip style and use the method I explained at the top of this post. Just skip over this code if you already know what I'm talking about, since I want to change it completely anyways.

in the boundry movie clip(nav1Trigger) for above the line I have this
// move navline with actionscript to the open position if touching the boundry,
//main condition#1

if(_root.page eq "home")
{
if (_root.navbar.nav1Trigger.boundry.hitTest(_root.se nsor)) {

_root.navbar.nav2trigger.boundry._visible=false; //handlenav2 boundry//


// begin handling scaling UP of nav1 boundry

_root.navbar.nav1Trigger._yscale=365;
// end handling scaling of nav1 boundry


// begin handling moving nav1 boundry to compensate for scaling

_root.navbar.nav1Trigger._y>=-2.5;

// end handling moving nav1 boundry to compensate for scaling

// begin handling moving center nav line to proper position
_root.navbar.centerline._y = _root.navbar.centerline._y+2.45;

if (_root.navbar.centerline._y >= 9.0)

if(_root.navbar.nav2Trigger._visible eq true)
{

if (_root.navbar.centerline._y >= 9.0)
{
_root.nav1OPENED = true;
_root.navbar.centerline._y= 9.0;
}
}
// end handling moving center nav line to proper position


}

else
{

if (_root.navbar.nav1Trigger.boundry.hitTest(_root.se nsor) eq false )
_root.navbar.nav2trigger.boundry._visible=true; //handlenav2 boundry//
_root.nav1OPENED = false; // faded out links wehen line starts to move
// begin handling scaling DOWN of nav1 boundry
_root.navbar.nav1Trigger._yscale=_root.navbar.nav1 Trigger._yscale-8;
if(_root.navbar.nav1Trigger._yscale<=244.1)
{ _root.navbar.nav1Trigger._yscale=244.1;}
// end handling scaling DOWN of nav1 boundry



// begin handling moving nav1 boundry to compensate for scaling

_root.navbar.nav1Trigger._y=_root.navbar.nav1Trigg er._y-.5;
if(_root.navbar.nav1Trigger._y<=-8.5)
{_root.navbar.nav1trigger._y=-8.5;}
// end handling moving boundry to compensate for scaling
// begin handling moving center nav line to proper position
if(_root.navbar.nav1Trigger._visible == true)
{
_root.navbar.centerline._y = _root.navbar.centerline._y-2.5;
}
if(_root.navbar.nav1Trigger._visible == true && _root.navbar.centerline._y <= 0.5)
{

_root.navbar.centerline._y = 0.5;

}
// end handling moving center nav line to proper position
}
}



and in the boundryclip below the clip I have this:
if(_root.page eq "home")
{
if (_root.navbar.nav2Trigger.boundry.hitTest(_root.se nsor))
{
_root.navbar.nav1Trigger._visible=false;
if(_root.navbar.nav1Trigger._visible eq false)
{
_root.navbar.nav2Trigger._yscale=365;
_root.navbar.nav2Trigger._y=4;
_root.navbar.centerline._y = _root.navbar.centerline._y-2.45;
_root.nav2OPENED = true; // my links clip uses this variable as trigger to fadee in


if (_root.navbar.centerline._y <= -9.85)
{

_root.navbar.centerline._y= -9.85;
}
}
}

if (_root.navbar.nav2Trigger.boundry.hitTest(_root.se nsor) eq false )
{
_root.navbar.nav1Trigger._visible=true;
// begin handling moving nav2trigger back into place
_root.nav2OPENED = false;
_root.navbar.nav2Trigger._y=7.5
_root.navbar.nav2Trigger._yscale=243.5;
}
}

Talk about ridiculous code!! I know this can simplified somehow using mouse position relative to the line movie clip instead of hittest.
I feel a bit silly that I even tried to code it up this way. Can someone please,please help me?

Thanks millions of tons,
~dev_flasher

View Replies !    View Related
Random Scene -with A Twist
Hi i am trying to select a random scene (out of 4 scenes)

I have got this to work by when user clicks on a button action sends them to a random frame eg frame 10-13. each frame has a goto and play scene action on it!

This works well, however!

I want it to randomly choose from firstly 4 scenes. then when one is chosen, i want it to choose randomly from the 3 unchosen scenes, and so on untill all 4 scenes have been chosen. Then it must be able to choose from all 4 scenes again.

Please help me !!!!!
I need this for a University assignment! My tutors cant help me!

Thanks

View Replies !    View Related
Preloader Question With A Twist
hi, Ive got a problem here with a loader- its quite longwinded but I'll explain the best I can....

(using Flash 5)

I have a movie(navigation.swf) with 2 scenes- loader and main.
I have a frameset (html dreamweaver set-up) in which the above movie appears( it appears in a bottom frame)

I want to make a preloader which has its own html page and then (once its loaded main)it can go to the frameset page which contains navigation.swf.

to explain:loading.html(has navigation.swf/loader)
frames.html ( has navigation.swf displays main)

I thought I could use the current set-up in scenes ie put the navigation.swf in a seperate page then once it has finished loading I could use the GetURL function to get my frameset. The problem that everytime it loads it generates another frames.html inside another frames.html and so on (ie a loop and screws Internet Explorer with repeated request html commands...)

So now im thinking I would have to use seperate movies, ie one is a loader.swf and another is navigation.swf but how do you make loader.swf load the navigation.swf without navigation.swf being seen or heard whilst its being cached?

please help, any suggestions would be helpful here...
I am sure someone has done something like this before and I would be grateful for any advice.

View Replies !    View Related
New Pop-Up Window Question W/ A Twist
I am currently working on a site (flash MX). ( http://www.bsting.net ) I have used a Pop Up window to launch the site from the index page, but the same coding does not work (or for that matter several other javascript coding strategies)when I try to launch pop up windows from the models portfolios area. If you are interested in helping go to the site above and click the link for (Models) portfolios from the main menu.

The first link uses a regular "Get Url" but I want to know how to get a 450x450 popup with no toolbars, etc. Of course any help will be greatly appreciated

View Replies !    View Related
Pop Up Window Question W/ A Twist
I am currently working on a site (flash MX). ( http://www.bsting.net ) I have used a Pop Up window to launch the site from the index page, but the same coding does not work when I try to launch pop up windows from the models portfolios area. Go to the site above and click the link for (Models) portfolios from the main menu.This is the code that I'm using to achieve the first popUp;

On the button:
on (release) {
getURL("JavaScriptopup();");
}

In the Index.html:
<SCRIPT LANGUAGE="JavaScript">
function popup() {window.open('Homebase.swf','','toolbar=no,locatio n=no,directories=no,sta
tus=no,menubar=no,scrollbars=no,resizable=no,width =800,height=400,left=150,top=150');
}
</script>

View Replies !    View Related
(MX) Flash Detector With A Twist
just point me to a thread if this was discussed before.

We are in the making of a page. We are going to make a flash and html versions of the site, and a splash screen where the user chooses either one. We thought the most elegant way to make a detector would be:

-if the user clicks the flash link, javaScript would detect for the plugin, if not found or unsufficient it would pop up a 'get flash' page, otherwise it would just go right to the flash page.
Of course, if the user clicks the html link, no detector should be necessary...

I guess an if/else conditional would have to be made in a JS function and the flash link would execute that function when clicked... sorry but my lack of JS poderio is a fact.

THANKS!!

View Replies !    View Related
MX2004 Detection With A Twist
anyone know how to do this?

I have a splash page and I want this detection script to go here.
If the user has Flash 7, a 'enter' sign appears.
If they do not a pop-up window occurs and brings them to macromedia to download it.
Once they download it, the 'enter' sign appears on the splash page without refreshing the page.

cheers,

View Replies !    View Related
Random Number With A Twist
i don't whether am going to explain this right but here goes

what i want to do i generate a random number thats easy enough

say i want to generate a number betwwen 0 and 1000

but what i want is there to be a higher chance of a bigger number being produced than a smaller on
so there would be a 90% chance of 1000 being returned and 0% of 0 and 50% chance of the middle number (500)

View Replies !    View Related
Dynamic Text With A Twist
well, yes dynamic text with a twist what more can i say, the dynamic text on this flash site im doing doesnt want to work, the text is there i know because when i hover over where the textbox should be, the text cursor is displayed and if i right click and select all and then copy and paste it onto a program like notpad the text that should be there is displayed.

Now with this said, how do i make this invisible text box visible?

Thanks in advance for any help.

Right click here and save target as to download zipped .fla

View Replies !    View Related
Another Variable Question With A Twist
Hi All
Ok so i have worked out my original problem driving animations from variables I have another query::: I am looking to drive the animation based on a number and time in minutes and secs....I am doing this for a wallboard report that it displaying calls........

so the problem call queuing for a certain amount of time.....ie

if callsqueue>=3 gotoandplay "animation".......but what I want to do is
if callsqueue>=3 and is > a certain time in minutes and secs gotoandplay "animation" ....if anyone cud help that would be amazing

View Replies !    View Related
Drag N Drop With A Twist
here's probably an easy one! im trying to make a puzzle.. say i have made 3 targets, and all of em needed an Apple in the target.. how do i code it so that any apple cud go into any of the targets? ive searched the forum for "drag and drop" and couldnt find what i was looking for..would be glad if sumone can spare some time!

View Replies !    View Related
[F8] Drop And Drag With A Twist
hey guys, i need help with a drag and drop problem that you may find under
this sub forum

Can anyone of you give me a hand?
Thanks!

View Replies !    View Related
Grid With A Twist (MX04)
Hi,

Ok, this is a little confusing but I hope you can help.

I want to attach and position a random number of two different movie clips (mc_1 and mc_2) on the stage.

To make it easier, let's say I need 12 mc_1s and 5 mc_2s. I want 8 mc_1s to position themselves in rows of 3; the last row would only have 2 mc_1s. The remaining 4 mc_1s would make a row of three and a row of 1 on stage to the right of the first group. The 5 mc_2s would then be positioned to complete the row of 1 so that there's 3 in that row. The three remaining mc_2s would form a row of three above that.

It would look something like this except that the two groups would be next to eachother:

**
***
***

***
***
***

Thanks for your help!

View Replies !    View Related
[F8] Mac Dock Effect With A Twist
Hey im using the actionscript from
http://jrgraphix.net/research/flash-dock-mx-2004.php
to create the Mac Dock effect and it works fine. How ever as the icons enlarge/ scale up i need them to be positioned in a different area of the scene. So all icons that are not near the mouse and not being scaled stay put but the ones that are enlarged as the mouse moves over them to appear in a different position in the scene. the reason is I need the mouse over icons to appear on a different screen.
one idea i had was to create a function that changed the position of the icons dependent on scale??
Any help would be very much appreciated!!!

View Replies !    View Related
[F8] Mouse Over Problem With A Twist
Hi All, anyhelp is much appreciated.

I know this is not a new issue that people are having but there's a twist. Let me explane.

Im building a slideshow for a client and all is well, but due to the short timeframe given, I have opted to use a pre-built component called slide show pro and build from there. Using exiating methods and event handlers offered by the component to basically shape it into the way i need it to work...

now i've got the majority of the slide working as i want it to. But there is a sliding nav bar at the bottom of the stage which slides in when mouseOvering the picture section of the slideshow. And on mouseOut, the navbar then slides away.

The problem: all works well except when the mouse movements are too fast then on trace, the event is still being picked up but the nav bar doesnt slide. it sits there.

The Twist: this issue has been covered in other posts and i have gone and read them, but the thing is. Instead of having the liberty of setting something like "open / close" or "slide in / slide out" ie. a 2 state control, slide show pro only offeres to "toggle" the navigation. In other words, if the mouse event doesnt trigger the nav event once, then the next time it picks the mouse event up, the sliding is executed opposite to what it is intended to do.


So i guess my question is, how do i code this so that i ensure every mouseIn/out is executed prefectly?

Your help would be much appreciated


(here's the sourcefiles) unzip to same dir to get the images working

http://www.bybobby.com/M6/backup9.fla
http://www.bybobby.com/M6/gallery.renametoZIP
http://www.bybobby.com/M6/images.xml

View Replies !    View Related
[F8] Full-Screen Pop-up With A Twist
I am developing a design site that has a variety of information that will be shown from my portfolio. In certain areas I would like the web visitor to be able to select a link that will display a larger view of a selected portfolio piece. I have seen this before. The base movie screens down( darkens) and the selected piece loads(w/preloader) over the main movie. How is this done. Anyone know where I can maybe purchase the script? Thanks in advance.

View Replies !    View Related
Drag N Drop With A Twist
i have 3 objects, 2 apples and 1 orange. and ive made 3 "specific for each fruit" basket as (targets) so ive no problem assigning each item into its target. but, i need to code it so that ANY apple dragged, into any basket for apples is able to work. because there are 2 apples, and 2 baskets for apples. i only know how to code so that apple1 goes into basket1 and apple2 into basket2 (

how do i do that without doing a script on individual clips, i'd like to keep all my script in just 1 frame.. mmm ive looked into some examples of using arrays.. but i dont quite get it since im particularly new to AS.. however, below is my code and .fla if anyone would be so kind to lend me a hand


Code:
function dragItem(item, target) {
item.onPress = function() {
startDrag(this);
this.beingDragged=true;
};
item.onRelease = item.onReleaseOutside=function () {
stopDrag();
this.beingDragged=false;
if (eval(this._droptarget) == target) {
this.onTarget = true;
} else {
this.onTarget = false;
}
};

item.originX = item._x;
item.originY = item._y;
item.draggedX = target._x;
item.draggedY = target._y;
item.onEnterFrame = function() {
if (!this.beingDragged && !this.onTarget) {
this._x -= (this._x-this.originX)/5;
this._y -= (this._y-this.originY)/5;
} else if (!this.beingDragged && this.onTarget) {
this._x -= (this._x-this.draggedX)/5;
this._y -= (this._y-this.draggedY)/5;
}
};
}

dragItem(FApple1,apple1);
dragItem(FApple2,apple2);
dragItem(OrangeF1,Orange1);

{

View Replies !    View Related
Custom Mouse, With A Twist
Hi everyone!
I'm creating a custom mouse pointer that's moving in proportion to the system mouse pointer, but not in exactly the same areas as the system pointer. For example when the system mouse pointer is in the bottom of the screen, my custom mouse pointer is in the top of the screen.
The problem I have is that I need the custom pointer to not only move as the system pointer, but also behave as it. E. g. if I click my mouse all objects under both the system mouse pointer and all objects under the custom mouse pointer has to recieve that event. Likewise, if I press a mousebutton, holds it down, moves the mouse and then releases it (like drag and drop), I need to have the custom mouse pointer send all these events to all objects affected by it, just as the system mouse pointer would.
In other words, I need to have the same MouseEvent, to happen in two different places at the same time.

Is there any way to do this? Or am I making the problem bigger that it really is?

/Elias

View Replies !    View Related
Random Number From 1 To 5 With A Twist
I can generate a number from 1 to 5 - but i want to create a scenario that if any of those 5 numbers has been generated earlear and is still in use it cant be one of the numbers... I thought of having a variable:Boolean for each number, and check it that way.. any ideas on how i could have the random generator try again if one of the numbers is in use...




var myNext_num:Number = Math.ceil(Math.random()*5);

if (myNext_num && num1 == true) {try generate another number}
else if (myNext_num && num2 == true) {go back and try generate another number}
else if (myNext_num && num3 == true) {go back and try generate another number}
else if (myNext_num && num4 == true) {go back and try generate another number}
else if (myNext_num && num5 == true) {go back and try generate another number}



Many thanks

View Replies !    View Related
Variable Question With A Twist
Hi All
Ok so i have worked out my original problem driving animations from variables I have another query::: I am looking to drive the animation based on a number and time in minutes and secs....I am doing this for a wallboard report that it displaying calls........

so the problem call queuing for a certain amount of time.....ie

if callsqueue>=3 gotoandplay "animation".......but what I want to do is
if callsqueue>=3 and is > a certain time in minutes and secs gotoandplay "animation" ....if anyone cud help that would be amazing

View Replies !    View Related
Transitions Tutorial...with A Twist
Hello everyone,
I've made a few threads about this and didn't get any responses. I'm getting a lot closer to where I want with this but I've run into a bit of a snag. I'm using the "transitions" tutorial with a media player. Instead of having a seperate button for each section or song, I have one button that when pushed will load the next section. I'm not sure how to go about applying this code to what I have already.

The buttons (red and blue) I have in the file now are not supposed to be there. I want the user to only have to click on the next button in order to go to the next section. I'm thinking I need to add an array possibly?

I'm really a newbie with actionscript so if someone could please help me, I would REALLY really appreciate it. I've been having trouble with this for quite a while and it's giving me a headache.

Thanks in advance

zip file - www.beneaththesky.com/player_concept2.zip

View Replies !    View Related
Kirupa Slideshow With A Twist
Was farting around being bored. Came up with this. Feel free to use for whatever.
Preview here

Files are attached

edit: Slide show code is straight from the tutorial. I dont take credit for it.
The rest is mine however

View Replies !    View Related
XML Gallery Twist: Hierarchies
Hi there! Firstly, my respects to Scotty, the true master of XML galleries Luv ya Scotty!

Now, I'm trying to put together a XML gallery with these features:

1. multiple albuns
2. hierarchy (parent album -> multiple sub albuns)
3. Server-side parsing for XML with PHP+MySQL

My (limited) knowledge on XML says that's the way to go, since it can handle hierarchies very nicely, as in tree menus etc etc, but I'd love a little help on getting started with a blueprint for the XML. It should be obvious for someone with good XML skills, unlike mine

I've been using Scotty's v3 gallery as a starting point. Its XML goes like this:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<menu>
<gallery name="my album name">
<image source="./images/cd1b6a1faed85d09468edc246e7e613e.jpg" thumb="./images/7b39aeb0500959f9e6a57e63db9c83a8.jpg" title="captions"/>
<image source="./images/6f2c6d0d6fe6103f98d41db51d7e4a72.jpg" thumb="./images/37d60e17a01431480b4c6c221440b6aa.jpg" title="my image title"/>
</gallery>
<gallery name="my second album">
<image source="./images/824939a4d0b327b763f56092eae42db8.jpg" thumb="./images/0b21892fc1c84e097b748cae600f710d.jpg" title="Khrisna"/>
</gallery>
<gallery name="my third album
">
<image source="./images/2e3ced02db92e9726379c0d20b7150ef.jpg" thumb="./images/8e60950e924bc4c54dc9a4acbb7ad63a.jpg" title="test"/>
<image source="./images/9c78c6ede90ea14f0eebb9f0356c5b14.jpg" thumb="./images/3c4b65b1f207fc5ebe19120e1273593d.jpg" title="haka"/>
</gallery>
</menu>
The ideal solution would be adapting this structure to include the sub-albuns...
I'll be very grateful for any comments or heads up!

Cheers!

View Replies !    View Related
Transitions Tutorial...with A Twist
Hello everyone,
I've made a few threads about this and didn't get any responses. I'm getting a lot closer to where I want with this but I've run into a bit of a snag. I'm using the "transitions" tutorial with a media player. Instead of having a seperate button for each section or song, I have one button that when pushed will load the next section. I'm not sure how to go about applying this code to what I have already.

The buttons (red and blue) I have in the file now are not supposed to be there. I want the user to only have to click on the next button in order to go to the next section. I'm thinking I need to add an array possibly?

I'm really a newbie with actionscript so if someone could please help me, I would REALLY really appreciate it. I've been having trouble with this for quite a while and it's giving me a headache.

Thanks in advance

zip file - www.beneaththesky.com/player_concept2.zip

View Replies !    View Related
Slide Navigation With A Twist.
Ok not sure how to explain this but im going to do my best.

I have a menu system that is beyond me, and im wondering if it can be done

Example:



They would like to have (A) follow the mouse slowly as you mouse over the links (Keeping in mind that they are different size links so it would have to shrink and grow) and they want (B) to move as well but start off slower then catch up and stop with an elastic effect. Also when you are on a selected page the want the over state to stay highlighted (A) as well have (B) over top.

Is this possible to do? If so how?

If anyone can give me some feed back on this, it would be greatly appreciated

Thanks in advance,
Schtick

View Replies !    View Related
Portfolio Buttons - With A Twist
I'm desperatly trying to make a series of buttons for my portfolio - i want them to do two things.

1.animate for rollOver/rollOut states

2.once clicked change state to visited.

So far i've got a blank button with which i'm trying to control a mc on the same timeline. Here is the script [which doesn't work]


on (rollOver) {

gotoAndPlay ("fade_clip", "in1");

}

on (rollOut){

if (gSelected){
gotoAndStop ("fade_clip", "Vselected");;
} else {
gotoAndPlay ("fade_clip", "out1");
}
}

on (release){

gSelected=true;

_parent.gotoAndStop ("fade_clip", "Vselected");

}

fade_clip = instance name of the animated mc

in1/out1/Vselected = frame lables in the mc

&

gSelected = variable used to establish whether the button has been pressed yet.

i can't understand why the button is unable to control the mc in the same scene??!!

Any and all help is greatly appreciated!!

View Replies !    View Related
Preloader Component With A Twist
Currently I have multiple files with a preloader in the first scene of each individual file. Now, if I have to change the art work of the preloader I have to go into multiple files and update them. So I'm trying to figure out if I can create a Component which allows me to pass a variable (that variable being the path of the external file) and have that be the component that handles all the loading. I think I'm trying to mimic the ".attachMovieClip()" method.

So I got a problem when I try handling the actual loading event(s):
When I call LoadMovie() there isn't a way for me to track the progress of the event? I tried using the onEnterFrame() event to track it but haven't been succesful in inheriting the "pre-defined" code...


Code:
this.createEmptyMovieClip("instanceName", 1);
this.instanceName.onEnterFrame = function(){
trace(this._framesloaded);
// Code here which tracks progress..
}

this.instanceName.loadMovie("myfile.swf");
// This doesn't seem to work
// Is it because when I call the loadMovie() command
// it re-defines the onEnterFrame() event and thus
// lose the code which is supposed to track the progress?
// Or
// Since it's not completely loaded, it doesn't
// a onEnterFrame(). (i.e. it's not available)?
In my head, it makes sense to do the following...
this.attachMovieClip("symbolId", "instanceName", 1, {myVar:"value"});
but since I'm working with external data this wont work in this situation.

Maybe this isn't the right approach for this idea. Anyone have any insight? Does this even make any sense? I've been up working late, so my mind isn't as clear as maybe it should be.

thanks!

View Replies !    View Related
Panoramic Scroller With A Twist?
Hi there im want to do a panoramic scroller exactly like this:

http://www.virgintrains.co.uk/redirect.asp?137

where when you zoom in, it allows you to use the y axis.............ive seen various scrollers on flashkit etc, but none like this - and as im very;- well - crappy with code, i was just wondering if anyone could help me, or pseudocode it for me?????

also - whats the best tool to use for stitching the photos together??


Many thanks,
Neil

View Replies !    View Related
Mac Dock Effect With A Twist
Hey im using a actionscript to create the Mac Dock effect and it works fine. How ever as the icons enlarge/ scale up i need them to be positioned in a different area of the scene. So all icons that are not near the mouse and not being scaled stay put but the ones that are enlarged as the mouse moves over them to appear in a different position in the scene. the reason is I need the mouse over icons to appear on a different screen.
Any help would be very much appreciated!!!

View Replies !    View Related
Fullscreen?: A CD Project - A Possible Director Twist?
Hi!
I have a CD project that I am doing in Flash. I created the piece which is 800x500. The client wants it to be fullscreen. Now, stretching the file (the projector) is no problem because I am using Jugglor 1.1 (which rocks). The problem though is that along with my vector graphics, the bitmaps get stretched too and look like pooh.

SO... I need someone to tell me 2 things:
1. If I import the flash piece to Director (8), and set the settings on the director piece to go full screen and not the flash - I lose actionscript control in the flash piece - (I know like no director). can this be resolved?

2. If not, any ideas how else to do this? (No HTML methods please - I can do that - don't wanna).

Thanks!

View Replies !    View Related
Magnifying Glass With A Twist - Any Ideas?
I have looked at the sample "magnifying glass" movies and want to add a bit, but don't quite know how to do it.

When you scroll over a background (and magnify it), I want to be able to click on a chosen image and have it appear in a pop up window.

The best example I found went:

on (press) {
startDrag ("/lens")
}
on (release) {
stopDrag ()

Are there other directions I could take?
Thanks!

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved