AS3 To Visual C#.NET - Some Difficulty.
The last few days I've been trying to get started learning C#.Net. I'm not thrilled about it, but I think it's probably a good idea to know at least one other language besides AS3, which is my main focus. Anyway, I found a couple of e-books and videos that cover the basics of C# and they've been helpful. One problem these books and videos all share, however, is the approach they take to creating windows form applications. I'm just finding it too visual. I'm supposed to manually drag and drop components onto a form and place little snippets of code on each instance--which means that if I've got a dozen buttons on my form, I've got a dozen little code snippets to keep track of. It feels like a big step backwards compared to what I'm used to. With AS3 I am used to creating objects and placing them on the stage using pure code. One C# video breezes through a 'longhand' version of creating a simple window with a couple of components, no drag and drop, but it goes by so fast it's impossible to follow. Just from what I can see, though, it's a lot like what I had been expecting.I hope it isn't totally against the rules of this forum to ask a C# question. Perhaps someone will understand my problem and point me to the right C# book, website, video; or, if it is permitted, wouldn't mind posting a small code sample of a window with a button and textfield being created in 'longhand' -- when the button is clicked a message appears in the textfield. Fingers
KirupaForum > Flash > ActionScript 3.0
Posted on: 12-25-2006, 12:42 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Difficulty...?
How difficult are these effects that are automatically created with "Magic Flare". Really interested in created some of the effects seen, just not sure if they are simple or difficult?
http://www.magicflare.com/examples.html
Appreciate some input!!
Thanks much!
Little Mp3 Difficulty
i'm simply trying to upload clips of songs to my brothers website but for some reason when they are played from the site the songs are all chopped up and erratic. i've tried cutting down the size of the clips but nothing seems to work. wondering if anyone has any suggestions.
thanks
brannon
www.gavintheory.com/music
Little Mp3 Difficulty
i'm simply trying to upload clips of songs to my brothers website but for some reason when they are played from the site the songs are all chopped up and erratic. i've tried cutting down the size of the clips but nothing seems to work. wondering if anyone has any suggestions.
thanks
brannon
www.gavintheory.com/music
Preloader Difficulty
I have a preloader animation that loops until a movie is loaded. This is the action I'm using:
var loadAmount = _parent._totalframes;
if (_parent._framesloaded == loadAmount) {
with (_parent) {
play ();
}
} else {
gotoAndPlay ("loading");
}
This works great on most machines (both pc and mac). However, I've tested the site on some computers and it never gets past the preloader animation. It just keeps looping even though all the frames have been loaded. I updated browsers and flash players - didn't work. Why would the preloader get "stuck" on some machines and not others? Is it something with my script?
THANKS
LoadMovie Difficulty
I am trying to load a movie into a duplicated movie clip. I made a little file where a circle movieclip is duplicated onto the screen every time a button is pressed. When you click on the circles the ID of whichever ball you selected is displayed. (circle 1, circle 2...) I need to load an external SWF into the circle that is selected. I can't figure out how to do it, or if it is even possible. I can get a movie to load if I hard wire the target name but that is not what I want. The file is very small if you want to look at it.
http://www.trina.net/Test/test.swf
http://www.trina.net/Test/test.fla
http://www.trina.net/Test/faces.fla
Any help would be great. Thanks
Matt
Ever Had Difficulty With Arrays?
I had an array made of numbers stored on a remote server. It actually contained all the data for the chess pieces so it was like this on the remote page.
ARRAY=12131415161718212223242526272871727374757677 788182838485868788&LOADED=true
So I download this and check it is there with the LOADED variable.
Then I take the variable ARRAY whic is named as that as a refrence to what it should become. So I convert it to a string and then take each number as a charAt(i). This way I fill an array with the numbers for the x and y coordinates for all the pieces.
Thats nice because I convert the long list of numbers into a string and use the charAt function to extract each number. Then I convert it back to a number and use that number to instruct the program what to put in the array. Not 1 or 8 but 50 and 450 say.. these are the actual coordinates so I can place the pieces according to what is in the compressed (ish) data format on the server. However the array isn't taking the values. I think its the way I;m writing the arrays as various tests show that to be the area of the problem.
function convertData(){
_root.piecesdata = string(ARRAY);
_root.aPieces_x = new Array();
_root.aPieces_y = new Array();
trace("piecesdata test" + piecesdata);
trace("pieces data char at test" + piecesdata.charAt(4));
//array test
testarray = new Array();
testarray[0] = 1;
trace("array assignment test" + testarray[0]);
j = 1;
for (i=0; i<64; i++) {
if (i%2) {
_root.aPieces_y[j] = Number(_root.piecesdata.charAt(i));
j++;
}else{
_root.aPieces_x[j] = Number(_root.piecesdata.charAt(i));
}
}
}
Actionscript Difficulty
Hi,
Could someone give some suggestions.
I have a MC within a movie and on the main timeline of the MC I have the following script:
onFrame (2) {
mySound = new Sound();
mySound.loadSound("testmusic.mp3");
mySound.start(0, 999);
}
onFrame (10) {
stop();
}
Now when this is placed on the internet and accessed the mp3 downloads nicely but does not automatically play. With this script it should play automatically.
I've tried various configurations to try and fix this but to no avail. I've also tried the Sound.onLoad script -that doesn't work.
1. Is this a problem with the Flash Player -- perhaps a bug or a security problem? I'm using SA FP 6 and also Browswer FPPlugin 7.
2. Or is there something I'm missing in the scripting?
Note: When the movie is placed from the hard drive it plays automatically -- using the SA FP6. It also works flawlessly if I make streaming "true".
Thanks in advance for your help and suggestions.
jwr
Difficulty Levels
hi,
how do you make difficulty levels.
sorry for the short and inpolite post but im in a bit of a hurry
Having Difficulty With Preloaders
I followed this tutorial on making a preloader
http://www.flashkit.com/tutorials/Ge...1107/index.php
and anytime I import a .swf file it only takes the images. The buttons are empty and the movie background is blank as well. When I import only a image the preloader works. Is there any actionscript that can import the .swf externally? How would I alter this so it could load it itself:
onClipEvent (load) {
total = _root.getBytesTotal();
}
onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
percent = int(loaded/total*100);
text = percent+"%";
gotoAndStop(percent);
if (loaded == total) {
_root.gotoAndPlay(2);
}
}
Thank you!
Having Some Difficulty With Sound
So I have this flash movie that loads at the top of my page and it has a little ambient sound that goes along with it.
There is also a simple on/off button so that the user can turn off the sound. if they don't like it.
The problem arises when I go to the "under" pages and the flash movie loads again and the sound starts over.
I want to be able to make it so that if the user has turned the sound off, it stays off on the pages that follow it and if they leave the sound on, it stays on.
I searched the tutorials for something that would help me with this but couldnt find anything about it. Is it something I can do with some kind of script or is it not even possible?
Any help or hints would be greatly appreciated! I have a big client waiting for this and all I have left to do is this part!
Thanks in advance.
Jay
Difficulty Loading Swf Within Swf
hey im not that advanced in actionscript yet so sorry. Well i want to load a swf from an existing url that i have. it needs to load when i hit a button then disapear when i hit the other. (this swf is within another) im using the loadMovieNum() to load. id like to know how i can create a button to unload it when its finished playing. also, i cant seem to figure out how to reposition the loaded swf i always loads in the top left. if anyone can help it would be greatly appreciated! thanks -shane
Help On The Next Button - Difficulty To End
Hi
OK this is going to be difficult to explain but basically I am doing a tutorial based program and there are external swf files that are being loaded into the presentation using xml. Now the trouble is I don't know how to end the tutorial once it reached the end - basically once the last swf file has been loaded. The next button only has the function of going to the next page in the sequence as shown by the code below:
myXML = new XML();
myXML.load("architecture4.txt")
myXML.onLoad = startCourse;
myXML.ignoreWhite = true;
function startCourse(loadOK) { //called once XML object is loaded
if (loadOK == true) {
rootNode = myXML.firstChild;
pagesNode = rootNode.firstChild;
totalPages = pagesNode.childNodes.length;
currentPage = 1;
firstPageNode = pagesNode.firstChild;
currentPageNode = firstPageNode; //used in on Release handler for Next/Back buttons
loadCurrentPage(firstPageNode); //calls function to load external flash movie into presentation area
}
}
function loadCurrentPage(newPageNode) {
contentMoviePath = newPageNode.attributes.filename;
contentTitleText = newPageNode.attributes.title;
contentInstructionText = newPageNode.attributes.instructions;
if (contentInstructionText == "") {
contentInstructionText = "Click Next to continue."
}
loadMovie(contentMoviePath,presentation);
}
btn_next.onRelease = function() {
nextPageNode = currentPageNode.nextSibling;
if (nextPageNode == null) {
break;
} else {
currentPage++;
loadCurrentPage(nextPageNode);
currentPageNode = nextPageNode;
}
};
btn_back.onRelease = function() {
nextPageNode = currentPageNode.previousSibling;
if (nextPageNode == null) {
break;
} else {
currentPage--;
loadCurrentPage(nextPageNode);
currentPageNode = nextPageNode;
}
};
Please help me because once there is an end button on the end slide - I need a button leading to another swf file altogether which indicates a quiz - I don't want it loading in the same presentation window.
Is this possible?
Please help - it will be much appreciated.
Rupz25
Preloader Difficulty
Hi i followed this preloader tutorial at this site: -
http://webwasp.co.uk/tutorials/b05-preload/01.php
It works when i made it but when i put the preloader into a flash animation i made a while ago there were a few problems. The animation is split into mclips on the scene one timeline and when i added the preloader it only plays the first mclip and not the others, although when i simulate download the preloader itself works fine, is there something else i need to do?
i can't attach the animation file that i want the preloader to go on becasue its far too big. But i can attach the preloader fla i want to put on it.
I think it might be a problem with the preloader itself, i tried adding it to a flash website and had the same problem, it would only load the first movie clip in the scene one timeline. thanks
Player 8.5 Difficulty
I downloaded and installed flash8.5 player active X from macromedia labs site after this when right click on any flash content from any website.
Its not showing me flash player 8.5 in settings
I needed 8.5 to run my flex application
When I run application from flexbulider 2 I get the error as the flash player found is of lower version and player 8.5 and above is needed
Please please help
Fl.browseForFileURL Difficulty
Hello, I'm trying to build a flash app that requires the user to open files from their PC. I want the user to be able to select multiple files at once via the Open file dialog, and not be forced to select only one at a time. The filenames that are selected in the file dialog, and OKed, are to be passed to an array for use in the Flash program. I searched the Help manual built into Flash and was able to find example code for how to retrieve the file name and location of one file, via the file dialog. The first problem I'm running into is that the example code does absolutely nothing for me:
var fileURL = fl.browseForFileURL("open", "Select file");
var doc = fl.openDocument(fileURL);
trace(doc);
I have this code on a hitTest success event for a movie clip. The intention is to click the clip instance and it'll open the file dialog, and go from there. The trace line is my own, but the first two are right out of the help manual. My trace returns undefined, and no window opens at all, of any kind. I've had problems before with methods in these top-level classes, and if I type just 'fl.' in the Actions panel, I don't get any quick-help on the available methods/properties that are available, like I would when typing, say, 'my_mc.'
I'm using Studio MX 2004, Student edition (with intentions to buy Studio 8 in the near future), as I have just wrapped up a semester class on Macromedia Flash Applications.
As an alternate route/attempt at this, I've compiled a .dll file that I have referenced from a test console application in C#, that is able to open the Open File Dialog, select a file, and return the filename to the command prompt, of the 1 file that was selected. I'm working on getting the Multiple filenames thing to work there, but baby steps work fine for me..
If Flash itself can't do what I need it to do, is there any way I can call this class object from this dll, that will open the window and return the filename back to flash?
Or maybe I need to create a class file in Actionscript, that might do the dirty work.. I don't know. That's why I'm here..
I hope I've provided you with enough information, and that someone out there has any suggestions for me.
Thanks,
-Ken
Level Of Difficulty
Just wondering what level of proficiency is required to produce something like 'simpleviewer' or preferably a slightly more customised version of a photo website/gallery like http://www.foliosnap.com/index.php ?
Preloader Difficulty...
Heya.
I'm having troubles with a pre-loader. It seems that it only appears once it has reached 60%? Im not really that good with my actionscript but any help will be appreciated.
Here is the Site
AS 2 AsBroadcaster Difficulty
Hi, I'm having and issue with AsBroadcaster. I'm trying to get different instances of the same MovieClip to respond to an event. The problem is, I can only ever get one to respond.
Here is the class for the mc broadcasting the event;
Code:
class DispatchClass extends MovieClip {
private static var events:Object;
public function DispatchClass () {
events = new Object();
AsBroadcaster.initialize(events);
}
public function onRelease () {
events.broadcastMessage("pressed");
}
public function addListener(listener:Object){
events.addListener(listener);
}
}
and here is the class for the receiving MCs:
Code:
class listenerClass extends MovieClip {
public function listenerClass () {
var obj1:DispatchClass = new DispatchClass();
var thisObj = this;
var listener1:Object = new Object();
listener1.pressed=function(){
trace("
thisObj = " + thisObj + "
");
};
obj1.addListener(listener1);
}
}
I'm sure it's something easy I just can't seem to get around it. Any help would be much appreciated. Thanks, Todd.
Having Difficulty Remembering :S
OK,here's the new code,this one at least works,but you have to hit Ctrl+Enter two times(so basically reload it).Any ideas how to make it work the first time around?
Code:
stop();
import fl.transitions.Tween;
import fl.transitions.easing.*;
import flash.display.*;
this.stop();
var image:Loader = new Loader();
var loaded:TextField = new TextField();
var loadedFormat:TextFormat = new TextFormat();
var progressBar:MovieClip = new MovieClip();
var preloader:MovieClip = new MovieClip();
var masker:MovieClip = new MovieClip();
var fadeOutTween:Tween;
var percent:Number;
var imageHeight:Number;
var style:String;
var opacity:Number;
image.load(new URLRequest("image.jpg"));
image.contentLoaderInfo.addEventListener(Event.COMPLETE, Graph);
function Graph(event:Event):void
{
preloader.addChild(image);
imageHeight = image.height;
masker.graphics.beginFill(0xffffff);
masker.graphics.drawRect(0,0,image.width,image.height);
masker.graphics.endFill();
masker.alpha = 0.5;
preloader.addChild(masker);
loaded.width = image.width;
loaded.height = 20;
loaded.y = image.height;
loaded.text = "Loading... 0%";
loaded.selectable = false;
loadedFormat.align = TextFormatAlign.CENTER;
loadedFormat.font = "Verdana";
if(image.width<100)
{
loadedFormat.size = 9;
}
else if(image.width<200)
{
loadedFormat.size = 10;
}
else
{
loadedFormat.size = 11;
}
loadedFormat.bold = true;
loaded.setTextFormat(loadedFormat);
preloader.addChild(loaded);
preloader.x = stage.stageWidth/2-preloader.width/2;
preloader.y = stage.stageHeight/2-preloader.height/2;
addChild(preloader);
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS,Loading);
}
function Loading(event:ProgressEvent):void
{
percent = Math.round((event.bytesLoaded/event.bytesTotal)*100);
loaded.text = "Loading... "+percent+"%";
loaded.setTextFormat(loadedFormat);
preloader.addChild(loaded);
masker.height = imageHeight-imageHeight/100*percent;
if(percent == 100)
{
fadeOut();
}
}
function fadeOut():void
{
preloader.removeChild(loaded);
fadeOutTween = new Tween(preloader,"alpha",None.easeOut,1,0,3,true);
var timer:Timer = new Timer(3000,1);
timer.start();
timer.addEventListener(TimerEvent.TIMER_COMPLETE, proceed);
}
function proceed(event:TimerEvent):void
{
gotoAndStop(2);
}
My suspition is on the this.loaderInfo.addEventListener(ProgressEvent.PRO GRESS,Loading); line,but it might be something else.Thanks in advance.
Degree Of Difficulty
I'm curious to know, for someone like me who is just getting his feet wet with Flash, how difficult would a presentation like this be to create (on a scale of 1-10). I share it here because it's quite indicative of the style of work that I'm interested in creating and I like it because to the untrained eye, it seems fairly straightforward. Is this true?
world vision presentation
Difficulty In Exporting Gif
I'm having a problem in exporting my file into animated GIF.
I executed some objects via actionscript and expects to comeout when exported as animated gif, but nothing came out.
Dynamic Menu Difficulty
I've been adapting a dynamic menu system which uses an array to build the menu [see the original at http://builder.cnet.com/webbuilding/...999/ss01.html]
The scripting in this version opens a new URL when the menu button is clicked.
// Menu 2 Data
Menu2Items = 7;
Menu2Title = "Subjects";
Menu2Item1 = "Geography";
Menu2Item1URL = "http://www.builder.com/Authoring/Newbies/";
Menu2Item2 = "English";
Menu2Item2URL = "http://www.builder.com/Reviews/EditorsChoice/";
Menu2Item3 = "Maths";
Menu2Item3URL = "http://www.builder.com/Resources/Jobs/";
I'd like to change this so that a loadMovie action takes place to load a submenu instead. I don't know how exactly to script it though - any thoughts?
thanks in advance
Difficulty Integrating Navigation
I have a site that were are currently using a java applet Popup menu. But the current system lacks design. The reason for the applet is that we use pdf embed src as a viewer for documents and the Drop down DHTML menus went in behind the applet for the pdf. So we use the java applet to overlay the z-index.
My current situation is that we want a flashier menu system that allows for the color and font to change. We want an XML based solution. I have delevoped something in flash and it works but my problem is framesets. The site is done in framesets and the object tag for the menu will have to be placed in the main body over and over and over. THis would not be a problem but the XML load is slow to start.
Has anyone had any success or script for hierarchical menus
or any direction that allows the flash object to bend the frameset rules.
Difficulty (Animated Logo)
I am working on a software project that has a splash screen logo display. I was hoping to have the logo animated using flash. Unfortunately, it has been a few years since I have done any flash work. My questions are...
1. How hard would it be to animate the attached logo?
I know this can't be answered without knowing what kind of animations. I was think about something that shows off the layers and dynamically creates to logo one piece at a time.
2. Are there examples or tutorials that would be helpful in doing this?
3. Would it be better to try to find someone to do the work for me?
Unfortunately, this part of the project is not budgeted.
4. How much would something like this cost?
Thanks in advance for any suggestions and feedback.
Eric
Actionscript Coding Difficulty
Heeyz
I've been trying to fix this problem for a while but havent succeeded so far
Would appreciate some help
I've got a flash game which sends its score allong with a checksum to a php script.
For the checksum you multiply the score with 63478256 and then take the first number and multiply it with 1 then substract 1 then take the second number and multiply it with 2 then substract 1 then take the third number and multiply it with 3 and substract 1.. and so on.
In php the code looks like this:
--------------------------------------------------------
$score = $holder['score'];
$score = "$score";
$scorepre = $score*63478256;
$scorepre = "$scorepre";
for($c=0;$c<strlen($scorepre);$c++) {
@$realscorecheck+=$scorepre{$c}*($c+1);
@$realscorecheck-="1";
}
echo $realscorecheck . "<br>";
--------------------------------------------------------
for a score of 200 this would output 177
In actionscript i think it should look like this: (not fully working:S)
------------------------------------------------------------
_root.scoreprecheck = _root.score*63478256;
_root.scorecheck = 0;
for (c=0; c<length(_root.scoreprecheck); c++) {
_root.scorecheck+=_root.scoreprecheck.substr(c,1)* (c+1);
_root.scorecheck-= "1";
}
trace(_root.scorecheck);
}
-----------------------------------------------------------
When running my game in swishmax it outputs 177.
When running my game in a browser it outputs -11
Because it outputs -11 i think the length() is working
But this line aint
_root.scorecheck+=_root.scoreprecheck.substr(c,1)* (c+1);
Why are the results in the browser and in swishmax different.
And what am i doing wrong?
Hope sombody knows
Greetz
Thierry
Difficulty With Flash Panorama
I am relatively new to Flash and have been having some difficulty with configuring the controls on a panorama. I am able to play to panorama on start, stop it and reverse it (only to the first frame, though .... I'd like to know how to have this continue indefinitely). I can also zoom in and out on the panorama.
The problem is that after using the zoom controls, the PLAY and REV button no longer work. Can anyone offer any suggestions? I can post the .fla if required.
Thanks in advance for your help!
TextArea Component Difficulty
I’ve stayed clear of Components for as long as i can because i find them really hard to customise but I’ve realised there useful and had another go.
so...I’m trying to customise a TextArea. I managed to do the scrollbar by importing appropriate things into the library and changing them. What I really want is a completely invisible TextArea (not including the scroll bar and text of course). Can anyone tell me the best way of doing that?
If not i would like to convert RGB colours to the colour code used when using styles eg '0x848384'.
thanks you your help.
Difficulty Of Action Script?
How difficult is it to learn actionscript if you already have experience in other languages such as Java? Is there much difference or is it just a case a learning syntax? Im considering using flash for prototyping but if actionscript would take a long time to learn, it might not be efficient to do so.
Thanks
Flash+PHP Email Difficulty
Can someone explain my blindess please and lead me to the way of wisdom?...
I am using this common email form which uses an swf and a simple php script.
It works fine when running in _root but when I try to use it as in _level1 it hangs on Frame 3 with 'Sending...' displayed. Whereas if it is in the _root it completes the 'confirm' call and goes to Frame 6. (the emails are sent out OK in both cases)
I have tried changing the '0' references to _level1 with no luck. In such a short script I can't see what else there is to be tried.
I have cut out the superfluous code from Frame 1 but the other frames are as is.
Code:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Frame 1
mailform = "mailform.php";
confirm = "Sending..."
action = "send";
function formcheck () {
if ((validate(email)) && (email != "ERROR!") && (fname != "") && (lname != "")) {
action = "send";
loadVariablesNum(mailform, 0, "POST");
gotoAndPlay (2);
}}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Frame 2
loadVariablesNum(mailform, 0);
answer = confirm;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Frame 3
if (answer != confirm) {
gotoAndStop (6);
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Frame 5
gotoAndPlay(3);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Frame 6 Done!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
So the email is sent but stops when it gets to:
if (answer != confirm) {
gotoAndStop (6);
}
dargnabbit!
Adding _level1 to the 'gotoAndStop/Play' didn't work. I tried 'this.answer' then got crazy and tried 'this.confirm'
But still no nibble at the birthday cake!
Any diagnostics?
[F8] Matching Game Difficulty
I'm refactoring the code (using a for loop) for a matching game and it works for the most part, except when it comes to recognizing the drop targets. Each dragger has a unique drop target. Even though each drop target instance has a unique name (drop1, drop2, drop3, ...etc), the draggers will recognize any drop target as its own.
Here is the code. The fla was too big to upload. I'll try and describe how it should work.
There are 7 draggers and 7 drop targets. Each dragger should go into its corresponder drop target (drag1 goes to drop1). If the user makes a mistake, the dragger returns to its original position.
What's happening with this code:
I can stop dragging any dragger anywhere on the stage that is not a drop zone, and that will register as "correct." It will register as "wrong" when I drop the dragger in ANY drop target.
I'm not sure why this isn't working. Any help will be soooo much appreciated.
Code:
// Dragger Lables
var sentence = new Array();
sentence[0] = "50 Domestic Minutes Per Month";
sentence[1] = "Domestic State-to-State (after initial 50 minutes are used)";
sentence[2] = "Unlimited Calls Between Home and Wireless Phone";
sentence[3] = "Local Toll and In-State";
sentence[4] = "Monthly Recurring Charge (MRC) - Home Phone";
sentence[5] = "Monthly Recurring Charge (MRC) - Cell Phone";
sentence[6] = "International Savings";
for(var i=0;i<sentence.length;i++){ //---------------------------Start Loop
// Dragger Labels
this["drag"+i].textbox = sentence[i];
// Counts Array Placement
this["drag"+i].arrayLocation = i;
this["drag"+i].onPress = function () {
dragXPos = this._x;
dragYPos = this._y;
startDrag(["drag"+this.arrayLocation]);
}
this["drag"+i].onRelease = function () {
this.stopDrag();
if (eval(this._droptarget) == this["drop"+this.arrayLocation]) {
//Trouble seems to be with the conditional statement
trace("Correct");
}
else {
this._x = dragXPos;
this._y = dragYPos;
trace("wrong");
}
}
} //-------------------------------------------------End Loop
And PS - this will be loaded into another movie clip, so eval() must stay.
Difficulty With A Slider Menu
I worked on this slider menu i got of the net. Tweak it, but to make it perfect i would like it slowly slow down and stop when the mouse cursor is not moving anymore or when it move out of the dflash document boundaries
Any help would be greatly appreciated.
[F8] Importing Bitmap Difficulty
hello everyone,
i'm having a problem with flash, i'm using multiple jpegs in a cartoon (it's kind of like stop-motion but a bit different), there's about 80 photos i've imported into my library without any problems. However, many of the images don't work and have a blank white space in the little preview area of the library, some of them are images i've applied to a keyframe, but some are just random. what's more is when i try to add one of these blank photos nothing is added to the stage and usually Flash just crashes. I need to finish this project for school this week so i'm kind of frustrated beyond belief with this haha.
Does anyone have any idea what's going on here? Any sort of input would help, even a push in the right direction is something.
Thank you for yr time, and thank you for any help you can give.
xoxoxo
Some Difficulty Using Arrays For Buttons
Howdy everyone, if you could help me out with my connundrum, it'd be much appreciated. Please note that im an as newbie, and am trying my hardest
I have 4 buttons, called subnav1, subnav2, subnav3, subnav4. I've set up an array, with the following for loop & onrollOver function applied:
Code:
for(i =0; i < 4; i++){
sub_nav_mc["subnav" + (i + 1)].onRollOver = function(){
var currentSubNav:MovieClip = this;
xNumber = this._x;
barStretch();
};
}
As you can see, I am declaring variable currentSubNav as the button I have just rolled over, then telling it to call function barStretch:
Code:
barStretch = function() {
onEnterFrame = function() {
if(xNumber < 92) {
}else{
var xRollOver:Tween = new Tween(currentSubNav, "_x", None.easeOut, 92, 65, 0.5, true);
rollBack();
delete onEnterFrame;
}
}
Which is saying when xNumber (_x location) is 92, do tween xRollOver, which is a simple roll to the left, and call rollBack, which handles the roll back to the right.
Code:
delay = 500;
function rollBack() {
myInterval = setInterval(pause_slideshow, delay);
function pause_slideshow() {
clearInterval(myInterval);
var xRollOut:Tween = new Tween(currentSubNav, "_x", None.easeIn, 65, 92, 0.5, true);
trace(" ----------------------- ");
}
}
}
xRollOver.onMotionFinished = function() {
stop();
};
xRollOut.onMotionFinished = function() {
stop();
};
Can you see what i'm doing? on rollover, tween left, then back to starting position. This code works perfectly when I am just rolling over one button. BUT (and this is a big, fat, annoying but) if you rollover multiple buttons in succession, currentSubNav is overwritten each time you rollover, leaving the rollBack function in the lurch.
What I ideally need is a way for each button to hold its own copy of currentSubNav until it has finished it's entire animation.
I've documented this as well as I can. The ball is in your court. Please help me.
Changing A Difficulty In A Game
Hi
I need to be able to change the difficulty on a game. In the options scene there is a dynamic text box (difficulty_txt) with 'medium' written in it.
I want to be able to set and Interval of some balls falling in the game depending on what is written in the difficulty_txt.text
the code i have tried is
if (difficulty_txt.text == "hard")
{
setInterval(createTennisBall, 500);
}
please help
dan
Difficulty Encoding Video
I'm trying to import video into a Flash movie (embedded) and it's telling me that it's unable to read the source video codec, even though it's the same codec I've been using for this last year and I've successfully imported this kind of video on other occasions.
I've done some screen capture with CamStudio, using its native lossless codec (CamStudio Lossless Codec v1.0) to produce AVIs. The funny thing is that not only will my Flash movie not import the new video, it won't import older videos that I successfully imported just a few months ago. Nor will it import AVIs made with other codecs: LZO Codec v0.4, Microsoft Video 1.
I'm guessing something has changed on my system but I can't imagine what. Anyone else running into this?
Difficulty Tracing Volume
I'm having a great deal of difficulty finding the right code to trace the getVolume(); attribute of a sound player.
What I'm ultimately interested in is getting the volume to FadeOff or FadeOn when I click a button other than the one directly connected to the SoundPlayer.
Here is a link to my testAudio.zip file whick includes the .fla an external .xml and a small sound clip
http://revelationweb.com/flashform/
I would really appreciate any help provided.
Thanks
Dave
AttachMovie Difficulty. Help, Por Favor?
I've been beating my head against the wall for the last few hours, and my Google fu has turned up nothing.
I have a bunch of empty movie clips on the stage ("Dropdown1" through "Dropdown5"). I'm trying to add menu items to each dropdown dynamically, pulling the info from an XML document. Anyway, I can't seem to get the menuItem mcs to attach to my Dropdown mcs.
This works fine:
Dropdown1.attachMovie("menuDropdown_mc", menuName, 1);
But if I try and use a variable like this:
['Dropdown' + theCategory]attachMovie("menuDropdown_mc", menuName, 1);
the mc gets attached to the root. I tried doing my concatenation elswhere and using a variable name like this:
var DropdownName = 'Dropdown' + theCategory;
DropdownName.attachMovie("menuDropdown_mc", menuName, 1);
trace(DropdownName);
which doesn't work either (still attaches the mc to the root instead of Dropdown1, although the trace does output the variable "DropdownName" as "Dropdown1".
Any idea what I'm doing wrong? Thanks!
Difficulty Loading And External .swf
I am attempting to load an external .swf into a dummy moviclip on the main timeline of my movie. The external .swf contains the SlideShowpro component with an xml feed for loading the images. I am finding that the images are loading sporadically....does anyone have a clue what may be wrong?
I am loading the swf using the following action:
loadMovie("portfolio.swf", "myClip");
To view the site... http://www.scottkells.com/websites/test/
Click through to the portfolio section and click the portfolio blurb link to reach the page.
Any help would be much appreciated!
Difficulty Loading External SWF
I've been having difficulty getting an external SWF to load into a movieclip on my stage. The teal box is a movieclip with this particular instance named mcStage1. I put an identical teal box directly behind it on a lower layer for purposes of illustration that will become clear shortly. The small dark blue rectangle is a button that is supposed to cause an external swf, in this case "tester2.swf" to load into the space currently occupied by mcStage1.
I am trying to make a click on the dark blue button load an external SWF file into mcStage1. I have tried the following three methods:
Generated by Flash Behaviors
on (release) {
//load Movie Behavior
if(this.mcStage1 == Number(this.mcStage1)){
loadMovieNum("tester2.swf",this.mcStage1);
} else {
this.mcStage1.loadMovie("tester2.swf");
}
//End Behavior
}
Written by me
on (release) {
loadMovie("tester2.swf",_root.mcStage1);
}
Also written by me
on (release){
_root.mcStage1.loadMovie("tester2.swf");
}
---------
In all three cases, the external SWF loads with its center at exactly the lower right corner of the target movieclip mcStage1. I created an identical square behind mcStage1 for illustrative purposes, as seen in the image below. It doesn't matter where I move mcStage1 on the stage, it always loads in the same relative position. (note the red square in this case is my external swf, called "tester2.swf")
Any help resolving this issue would be greatly appreciated!
AS3 Difficulty Embedding Font - Please Help
I'm learning AS3 with Flex Builder 2, and have run into all sorts of difficulties when trying to embed a font so that a group of textfields will display correctly when they are tweened. There are a number of examples posted across the web which apparently work fine for other people, but I've tried them unsuccessfully. Perhaps this is because other people are using the Flash 9 alpha and it works differently in Flex, though I don't know why that should be.
For example, with this code I receive an error that says "Unable to resolve "C:WindowsFontsARIAL.TTF for transcoding" even though the file exists in that location.
Code:
package {
import flash.utils.describeType;
import flash.display.MovieClip;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.text.AntiAliasType;
public class Test extends MovieClip {
// be sure this is pointing to a ttf font in your hardrive
[Embed(source="C:WINDOWSFontsARIAL.ttf", fontFamily="foo")]
public var bar:String;
public function Test() {
var format:TextFormat = new TextFormat();
format.font = "foo";
format.color = 0xFFFFFF;
format.size = 130;
var label:TextField = new TextField();
label.embedFonts = true;
label.autoSize = TextFieldAutoSize.LEFT;
label.antiAliasType = AntiAliasType.ADVANCED;
label.defaultTextFormat = format;
label.text = "Hello World!";
addChild(label);
}
}
}
Could someone please post a working example?
Fingers
AttachMovie Difficulty. Help, Por Favor?
I've been beating my head against the wall for the last few hours, and my Google fu has turned up nothing.
I have a bunch of empty movie clips on the stage ("Dropdown1" through "Dropdown5"). I'm trying to add menu items to each dropdown dynamically, pulling the info from an XML document. Anyway, I can't seem to get the menuItem mcs to attach to my Dropdown mcs.
This works fine:
Dropdown1.attachMovie("menuDropdown_mc", menuName, 1);
But if I try and use a variable like this:
['Dropdown' + theCategory]attachMovie("menuDropdown_mc", menuName, 1);
the mc gets attached to the root. I tried doing my concatenation elswhere and using a variable name like this:
var DropdownName = 'Dropdown' + theCategory;
DropdownName.attachMovie("menuDropdown_mc", menuName, 1);
trace(DropdownName);
which doesn't work either (still attaches the mc to the root instead of Dropdown1, although the trace does output the variable "DropdownName" as "Dropdown1".
Any idea what I'm doing wrong? Thanks!
Difficulty Loading And External .swf
I am attempting to load an external .swf into a dummy moviclip on the main timeline of my movie. The external .swf contains the SlideShowpro component with an xml feed for loading the images. I am finding that the images are loading sporadically....does anyone have a clue what may be wrong?
I am loading the swf using the following action:
loadMovie("portfolio.swf", "myClip");
To view the site... http://www.scottkells.com/websites/test/
Click through to the portfolio section and click the portfolio blurb link to reach the page.
Any help would be much appreciated!
Difficulty With Drag And Drop
I'm using Flash MX and working on a drag and drop problem. This is a geography problem to correctly identify the countries of the world and I want the users to drag a text movie clip (the name of the country) and drop it over the correct location on an outline map of the continent. It's not working well and I have used the trace function to try to figure it out:
on(press){
startDrag(this,true);
}
on(release, releaseOutside){
stopDrag();
trace("Drag Stopped");
trace("Dropped. droptarget =" +this._droptarget);
}
The image has each country in its own movie clip with a static text superimposed. So, whenever I drop over the country, the trace comes up empty. However, when I drop over the text box, I get the appropriate "droptarget = /instance46" or whatever the system has labeled the particular text box. Each country movie clip is in its own timeline. The movie clip contains a graphic of the shape of that country.
How come the text boxes are correctly identified and the movie clips containing the shapes of the countries are ignored? Any suggestions?
Roy
Difficulty Tracing Volume
I'm having a great deal of difficulty finding the right code to trace the getVolume(); attribute of a sound player.
What I'm ultimately interested in is getting the volume to FadeOff or FadeOn when I click a button other than the one directly connected to the SoundPlayer.
Here is a link to my testAudio.zip file whick includes the .fla an external .xml and a small sound clip
http://revelationweb.com/flashform/
I would really appreciate any help provided.
PS.. This is a Flash 8 Form Application
Thanks
Dave
Difficulty In Passing Variables From ASP To FLASH
Hi!,
I am facing a problem in transfereing the values retrieved from a query in ASP to display in a variable (dynamic text box) in flash.
Actually I first tried to use one of the sample codes that I found on the macromedia site ( the one which retrieves the details of an employee from a database on entering the name of the employee)
I tried to substitute the already existing query with my query and the query did work successfully.( retrieve records based on a condition)
In the same file now I have made some modifications and now the code is not working.
The modification that I have done is ...
I have added a new dynamic text box... .. assigned it with a proper name... code1(name of variable) This textbox is placed in the same frame where the other text box results showup.
I have also modified my query in the ASP file. ... The logic earlier was to retrieve records from a table if the employee name existed.
In my query I am not using any condition. I am just retrieving a particular column from the table , creating an array of the retireved records and this result I want to show in the dynamic text box. But this is not working ...
I am using the Response.Write statement to pass the variable from ASP file.
In flash I am using the loadvariables () funciton to retrieve the value of the variable.
Can anyone help me find out where possibly I'm going wrong ..
A Voting Site -- Difficulty: HARD?
I am very interested in building my own website like those of http://www.votechicks.com or http://www.votestuds.com
I would like to know if this type of webpage is hard to learn. I would like to know information on how to build a webpage using features that this one has. I know they use php and mySql and others. Please tell me a good tutorial on learning this type of html and scripting.
Thanks you.
Difficulty With GetURL Command In FlashMX
Hello all!
For reference, here is the site in question
http://www.chibardun.net/~jonsson
if you note on the side navigation bars
there are 4 (will be more eventually) buttons which change to "hands" when you place the cursor over them...
I have put in every piece of code I've seen on the subject into the actions box for each of the buttons to attempt to make them GET a NEW URL to open on top of the entire window (its not in frames)
this is the exact code ive been using (or a close variant)
on (release) {
getURL(index.htm,_top);
}
EVERY single post I have read and every piece of documentation Ive seen suggests that this should work... however it does not!!!
Help please!!
Thx in advance!
Full Loading Of Levels Difficulty
Hi
I'm creating a slideshow, using loadMovieNum to load the swf files. The slideshow is at http://homepages.ihug.co.nz/~usatede...dextest25.html What I'm trying to do is to make the control butttons disappear during the loading period, which only takes a few seconds, but if the user cannot use the controls in that period, then they won't miss out on seeing the images, and will be happier to wait. What I think is happening, though, is if (_level1 != undefined) isn't waiting for a complete load of _level1. IE, when flash first detects the presence of _level, flash hasn't completed loading the picture into level1.
Is there another, more effective way of making sure _level1 has completed it's load. I hope this makes sense. Can anyone offer some advice?
onEnterFrame=function() {
loadMovieNum(picturename[picturecounter],1);
if (_level1 == undefined) {
nextload="null";
} elseif (_level1 != undefined) { //if _level1 exists
trace ("YAY YAY YAY3");
nextload="ready";
gotoAndPlay("Controls");
onEnterFrame=null; //ends loop
}
}
stop();
Frame Controls
//Controls show or hide
if (nextload=="null") {
//hide
playpainting._visible = false;
nextimage._visible = false;
previouspainting._visible = false;
rewinds._visible = false;
playgo = "null";
nextgo = "null";
previousgo = "null";
} else if (nextload=="ready") {
//show
playpainting._visible = true;
nextimage._visible = true;
previouspainting._visible = true;
rewinds._visible = true;
playgo = "yes";
nextgo = "yes";
previousgo = "yes";
}
stop();
bye
Allyson
|