Friday, 25 April 2014
Quick post on play and pause button functionality in Flash
Thursday, 24 April 2014
Flash Databas problems
My flash project needed more programming in it. I was advised that I should try and create a database and functionality that allows the user to upload an image, save it to database and display on the timeline. After spending three full days of researching different methods of how to do this. I have taken on board the fact that I now have serious time restrictions and that in the space of time that I have left it is not plausible to learn how to do this. As well as the face that every resource that I have found on the matter is writing the code in ActionScript 2, while the code is mine is all ActionScript 3. This would mean that I would have to revise my entire project to suit this one function.
After going through one tutorial in particular on YouTube, and trying to implement the code into my project, it did not work. The disappointing part of all of this is that the research that I had done is not worth anything, as I had to delete the code that I had in order for the other aspects of my project to work. All I can do is mention what I have found from YouTube, Stack Overflow and a few more sites around the net, which is
Often images are uploaded using binary arrays.
When uploading an image the name of that file will be shown in a dynamic text field
AJAX came up in a post I read about the matter recently, I did not read into the functionality behind it.
All other information I have at this time is masked by utter confusion with regards to the matter.
I have decided to give up the whole database idea as it is wasting time and as you can probably tell by the tone of this post, it has annoyed me beyond belief.
It's time to think of more programming opportunities that can be taken. Although I'm a bit lost with it all. PHP, the server side language is out as I just stated, JavaScript functionality can be implemented with ActionSctipt and ActionScript will not suffice for the programming work. The question is what can be done. I can see myself going in on Monday with relatively no work to show for my time wasted on database research. While this post is more of a rant, it has stated what I needed to say.
After going through one tutorial in particular on YouTube, and trying to implement the code into my project, it did not work. The disappointing part of all of this is that the research that I had done is not worth anything, as I had to delete the code that I had in order for the other aspects of my project to work. All I can do is mention what I have found from YouTube, Stack Overflow and a few more sites around the net, which is
Often images are uploaded using binary arrays.
When uploading an image the name of that file will be shown in a dynamic text field
AJAX came up in a post I read about the matter recently, I did not read into the functionality behind it.
All other information I have at this time is masked by utter confusion with regards to the matter.
I have decided to give up the whole database idea as it is wasting time and as you can probably tell by the tone of this post, it has annoyed me beyond belief.
It's time to think of more programming opportunities that can be taken. Although I'm a bit lost with it all. PHP, the server side language is out as I just stated, JavaScript functionality can be implemented with ActionSctipt and ActionScript will not suffice for the programming work. The question is what can be done. I can see myself going in on Monday with relatively no work to show for my time wasted on database research. While this post is more of a rant, it has stated what I needed to say.
Wednesday, 9 April 2014
Ux design
My application's navigation is using a map pointer theme. As most of the sections of the project are categorised by locations, I felt that a pointer system would be quite engaging to the user to get from place to place.
Here is an example of what I mean
Here is an example of what I mean
Monday, 7 April 2014
Prototype result
After the prototype presentation I feel that I have a lot more work to do. I was advised to implement database functionality so the user can register, login and upload an image. Via Flash I don't really know how I'm going to implement. Time to do some research. I also need some more multimedia work. The design isn't quite fulfilling the application. What I need may be some audio or video tracks.
Saturday, 5 April 2014
Approaching our prototype proposal
So our prototype proposal presentation is coming up on Monday. Here is a brief overview of where my project is. I have almost completed the 'Then and Now' section of the project. This section shows old images of Limerick. There is a slider bar along the side of each image and when the user slides the bar down, a modern day version of that image will appear. Here is a description of what I mean. The opacity bar is halfway down showing Limerick as it was and is now.
Here is the opacity ActionScript code I used to achieve this.
The next piece I have accomplished is implementing the flash game. My original idea was to have the user follow frank on his adventure from Ireland to Scotland to America. After some research I did not find any information about him being in Scotland, as one of the tour guides had said. I did not want to use false information, so I changed the game around. The idea now is that a map shows up with pointers on sections of the world that Frank had connections to in Angelas Ashes. When you hit the pointer it zooms in on that country and more regional pointers will appear. When you hit these pointers information blocks will appear about Franks connection to the area. The pointer prototype I have at the moment is New York.
The next section, which realistically I have quite a lot of work to do on is 'Today's news'. This section will showcase some news articles from the time of Franks youth. I also hope to implement some entertainment new such as the top songs a the time but ideas are still to be sought for this section.
Overall I have a large degree of the design work done. I do not have much programming work done and I have yet to think of what programming work can be implemented to increase my grade.
My backups for my project files include. Google Drive, 2 extra memory sticks, my laptop and a college computer.
Friday, 4 April 2014
So close
This code was so close to what I needed, what this does is it autoplays the song when the page opens and when you click on the pause button it pauses. However I do not want this autoplay functionality. I want the sound to play when you click the play button. Good to know for the future though.
import flash.media.SoundChannel;
import flash.events.MouseEvent;
import flash.events.Event;
var isPlaying:Boolean = true;
var lastposition:Number = 0;
var mysound:music = new music();
var soundchannel:SoundChannel = new SoundChannel ();
soundchannel = mysound.play(0,0);
soundchannel.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete);
function onPlaybackComplete(event:Event):void
{
lastposition = 0;
soundchannel.stop();
btn.btn_pause.visible = false;
trace('finished');
isPlaying=false;
}
btn.addEventListener(MouseEvent.CLICK, playsound);
function playsound(event:MouseEvent):void
{
if(! isPlaying)
{
soundchannel = mysound.play(lastposition,0);
btn.btn_pause.visible = true;
isPlaying = true;
}
else
{
lastposition = soundchannel.position;
soundchannel.stop();
btn.btn_pause.visible = false;
trace(lastposition.toFixed(0), mysound.length.toFixed
(0));
isPlaying = false;
}
soundchannel.addEventListener(Event.SOUND_COMPLETE,
onPlaybackComplete);
function onPlaybackComplete(event:Event):void
{
lastposition = 0;
soundchannel.stop();
btn.btn_pause.visible = false;
trace('finished');
isPlaying=false;
}
}
import flash.media.SoundChannel;
import flash.events.MouseEvent;
import flash.events.Event;
var isPlaying:Boolean = true;
var lastposition:Number = 0;
var mysound:music = new music();
var soundchannel:SoundChannel = new SoundChannel ();
soundchannel = mysound.play(0,0);
soundchannel.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete);
function onPlaybackComplete(event:Event):void
{
lastposition = 0;
soundchannel.stop();
btn.btn_pause.visible = false;
trace('finished');
isPlaying=false;
}
btn.addEventListener(MouseEvent.CLICK, playsound);
function playsound(event:MouseEvent):void
{
if(! isPlaying)
{
soundchannel = mysound.play(lastposition,0);
btn.btn_pause.visible = true;
isPlaying = true;
}
else
{
lastposition = soundchannel.position;
soundchannel.stop();
btn.btn_pause.visible = false;
trace(lastposition.toFixed(0), mysound.length.toFixed
(0));
isPlaying = false;
}
soundchannel.addEventListener(Event.SOUND_COMPLETE,
onPlaybackComplete);
function onPlaybackComplete(event:Event):void
{
lastposition = 0;
soundchannel.stop();
btn.btn_pause.visible = false;
trace('finished');
isPlaying=false;
}
}
Subscribe to:
Posts (Atom)



